summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/FileTransfer/SOCKS5BytestreamServerSession.h')
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamServerSession.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h b/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h
index 7e13ddd..762db8b 100644
--- a/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h
+++ b/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h
@@ -43,13 +43,19 @@ namespace Swift {
void start();
void stop();
- void startTransfer();
+ 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;
boost::signal<void (unsigned long long)> onBytesReceived;
+ const std::string& getStreamID() const {
+ return streamID;
+ }
+
private:
void finish(bool error);
void process();
@@ -64,8 +70,15 @@ namespace Swift {
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;
+
};
}