summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-03-31 14:57:35 (GMT)
committerTobias Markmann <tm@ayena.de>2016-03-31 14:57:35 (GMT)
commitcfbdb43d2cadd40aa87338d41548e4bf89e146e6 (patch)
tree18d94153a302445196fc0c18586abf44a1ce4a38 /Swiften/FileTransfer/SOCKS5BytestreamServerSession.h
parent1d545a4a7fb877f021508094b88c1f17b30d8b4e (diff)
downloadswift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.zip
swift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.tar.bz2
Convert tabs to 4 spaces for all source files
Removed trailing spaces and whitespace on empty lines in the process. Changed CheckTabs.py tool to disallow hard tabs in source files. Test-Information: Manually checked 30 random files that the conversion worked as expected. Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
Diffstat (limited to 'Swiften/FileTransfer/SOCKS5BytestreamServerSession.h')
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamServerSession.h128
1 files changed, 64 insertions, 64 deletions
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h b/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h
index ed5272f..a90e8c5 100644
--- a/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h
+++ b/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h
@@ -16,68 +16,68 @@
#include <Swiften/Network/Connection.h>
namespace Swift {
- class SOCKS5BytestreamRegistry;
-
- class SWIFTEN_API SOCKS5BytestreamServerSession {
- public:
- typedef boost::shared_ptr<SOCKS5BytestreamServerSession> ref;
-
- public:
- enum State {
- Initial,
- WaitingForAuthentication,
- WaitingForRequest,
- ReadyForTransfer,
- ReadingData,
- WritingData,
- Finished
- };
-
- SOCKS5BytestreamServerSession(boost::shared_ptr<Connection> connection, SOCKS5BytestreamRegistry* registry);
- ~SOCKS5BytestreamServerSession();
-
- void setChunkSize(int chunkSize) {
- this->chunkSize = chunkSize;
- }
-
- void start();
- void stop();
-
- void startSending(boost::shared_ptr<ReadBytestream>);
- void startReceiving(boost::shared_ptr<WriteBytestream>);
-
- HostAddressPort getAddressPort() const;
-
- boost::signal<void (boost::optional<FileTransferError>)> onFinished;
- boost::signal<void (unsigned long long)> onBytesSent;
-
- const std::string& getStreamID() const {
- return streamID;
- }
-
- private:
- void finish(const boost::optional<FileTransferError>& error = boost::optional<FileTransferError>());
- void process();
- void handleDataRead(boost::shared_ptr<SafeByteArray>);
- void handleDisconnected(const boost::optional<Connection::Error>&);
- void handleDataAvailable();
- void sendData();
-
- private:
- boost::shared_ptr<Connection> connection;
- SOCKS5BytestreamRegistry* bytestreams;
- ByteArray unprocessedData;
- State state;
- int chunkSize;
- std::string streamID;
- boost::shared_ptr<ReadBytestream> readBytestream;
- boost::shared_ptr<WriteBytestream> writeBytestream;
- bool waitingForData;
-
- boost::bsignals::connection disconnectedConnection;
- boost::bsignals::connection dataReadConnection;
- boost::bsignals::connection dataWrittenConnection;
- boost::bsignals::connection dataAvailableConnection;
-
- };
+ class SOCKS5BytestreamRegistry;
+
+ class SWIFTEN_API SOCKS5BytestreamServerSession {
+ public:
+ typedef boost::shared_ptr<SOCKS5BytestreamServerSession> ref;
+
+ public:
+ enum State {
+ Initial,
+ WaitingForAuthentication,
+ WaitingForRequest,
+ ReadyForTransfer,
+ ReadingData,
+ WritingData,
+ Finished
+ };
+
+ SOCKS5BytestreamServerSession(boost::shared_ptr<Connection> connection, SOCKS5BytestreamRegistry* registry);
+ ~SOCKS5BytestreamServerSession();
+
+ void setChunkSize(int chunkSize) {
+ this->chunkSize = chunkSize;
+ }
+
+ void start();
+ void stop();
+
+ void startSending(boost::shared_ptr<ReadBytestream>);
+ void startReceiving(boost::shared_ptr<WriteBytestream>);
+
+ HostAddressPort getAddressPort() const;
+
+ boost::signal<void (boost::optional<FileTransferError>)> onFinished;
+ boost::signal<void (unsigned long long)> onBytesSent;
+
+ const std::string& getStreamID() const {
+ return streamID;
+ }
+
+ private:
+ void finish(const boost::optional<FileTransferError>& error = boost::optional<FileTransferError>());
+ void process();
+ void handleDataRead(boost::shared_ptr<SafeByteArray>);
+ void handleDisconnected(const boost::optional<Connection::Error>&);
+ void handleDataAvailable();
+ void sendData();
+
+ private:
+ boost::shared_ptr<Connection> connection;
+ SOCKS5BytestreamRegistry* bytestreams;
+ ByteArray unprocessedData;
+ State state;
+ int chunkSize;
+ std::string streamID;
+ boost::shared_ptr<ReadBytestream> readBytestream;
+ boost::shared_ptr<WriteBytestream> writeBytestream;
+ bool waitingForData;
+
+ boost::bsignals::connection disconnectedConnection;
+ boost::bsignals::connection dataReadConnection;
+ boost::bsignals::connection dataWrittenConnection;
+ boost::bsignals::connection dataAvailableConnection;
+
+ };
}