summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-01-11 17:13:41 (GMT)
committerSwift Review <review@swift.im>2015-02-11 09:36:14 (GMT)
commita049c80f0862a994a76e8e63d71c633bce63f66a (patch)
treec5fc7786d2d245c765067545bb9a0e433e58a3f9 /Swiften/FileTransfer/DefaultFileTransferTransporter.h
parentf176050a50fb846bbad3fb49d6b2f7a2c81e3589 (diff)
downloadswift-a049c80f0862a994a76e8e63d71c633bce63f66a.zip
swift-a049c80f0862a994a76e8e63d71c633bce63f66a.tar.bz2
Renable SOCKS5 bytestream proxy support for Jingle file transfers.
Test-Information: Tested interoperability with Swiften using FileTransferTest. Change-Id: Ic13a68a91cad199be0bfc8852ff43c25c7085f12
Diffstat (limited to 'Swiften/FileTransfer/DefaultFileTransferTransporter.h')
-rw-r--r--Swiften/FileTransfer/DefaultFileTransferTransporter.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/Swiften/FileTransfer/DefaultFileTransferTransporter.h b/Swiften/FileTransfer/DefaultFileTransferTransporter.h
index f5a4b9d..347c313 100644
--- a/Swiften/FileTransfer/DefaultFileTransferTransporter.h
+++ b/Swiften/FileTransfer/DefaultFileTransferTransporter.h
@@ -9,6 +9,7 @@
#include <Swiften/Base/Override.h>
#include <Swiften/Base/API.h>
#include <Swiften/FileTransfer/FileTransferTransporter.h>
+#include <Swiften/Elements/ErrorPayload.h>
namespace Swift {
class LocalJingleTransportCandidateGenerator;
@@ -57,7 +58,7 @@ namespace Swift {
virtual void stopGeneratingLocalCandidates() SWIFTEN_OVERRIDE;
virtual void addRemoteCandidates(
- const std::vector<JingleS5BTransportPayload::Candidate>&) SWIFTEN_OVERRIDE;
+ const std::vector<JingleS5BTransportPayload::Candidate>&, const std::string&) SWIFTEN_OVERRIDE;
virtual void startTryingRemoteCandidates() SWIFTEN_OVERRIDE;
virtual void stopTryingRemoteCandidates() SWIFTEN_OVERRIDE;
@@ -69,30 +70,37 @@ namespace Swift {
virtual boost::shared_ptr<TransportSession> createIBBReceiveSession(
const std::string& sessionID, unsigned long long size, boost::shared_ptr<WriteBytestream>) SWIFTEN_OVERRIDE;
virtual boost::shared_ptr<TransportSession> createRemoteCandidateSession(
- boost::shared_ptr<ReadBytestream>) SWIFTEN_OVERRIDE;
+ boost::shared_ptr<ReadBytestream>, const JingleS5BTransportPayload::Candidate& candidate) SWIFTEN_OVERRIDE;
virtual boost::shared_ptr<TransportSession> createRemoteCandidateSession(
- boost::shared_ptr<WriteBytestream>) SWIFTEN_OVERRIDE;
+ boost::shared_ptr<WriteBytestream>, const JingleS5BTransportPayload::Candidate& candidate) SWIFTEN_OVERRIDE;
virtual boost::shared_ptr<TransportSession> createLocalCandidateSession(
- boost::shared_ptr<ReadBytestream>) SWIFTEN_OVERRIDE;
+ boost::shared_ptr<ReadBytestream>, const JingleS5BTransportPayload::Candidate& candidate) SWIFTEN_OVERRIDE;
virtual boost::shared_ptr<TransportSession> createLocalCandidateSession(
- boost::shared_ptr<WriteBytestream>) SWIFTEN_OVERRIDE;
+ boost::shared_ptr<WriteBytestream>, const JingleS5BTransportPayload::Candidate& candidate) SWIFTEN_OVERRIDE;
private:
void handleLocalCandidatesGenerated(const std::vector<JingleS5BTransportPayload::Candidate>&);
void handleRemoteCandidateSelectFinished(
const boost::optional<JingleS5BTransportPayload::Candidate>&,
boost::shared_ptr<SOCKS5BytestreamClientSession>);
- std::string getSOCKS5DstAddr() const;
+ void handleActivateProxySessionResult(const std::string& sessionID, ErrorPayload::ref error);
void closeLocalSession();
void closeRemoteSession();
boost::shared_ptr<SOCKS5BytestreamServerSession> getServerSession();
+ std::string getSOCKS5DstAddr() const;
+ std::string getInitiatorCandidateSOCKS5DstAddr() const;
+ std::string getResponderCandidateSOCKS5DstAddr() const;
+ std::string getRemoteCandidateSOCKS5DstAddr() const;
+ std::string getLocalCandidateSOCKS5DstAddr() const;
+
private:
JID initiator;
JID responder;
Role role;
SOCKS5BytestreamRegistry* s5bRegistry;
SOCKS5BytestreamServerManager* s5bServerManager;
+ SOCKS5BytestreamProxiesManager* s5bProxy;
CryptoProvider* crypto;
IQRouter* router;
LocalJingleTransportCandidateGenerator* localCandidateGenerator;