diff options
author | Tobias Markmann <tm@ayena.de> | 2015-01-11 12:39:50 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2015-02-11 09:35:33 (GMT) |
commit | 9281a35fb912657f98ff0918ed683b2ef6071b45 (patch) | |
tree | 9a9ac8a5e9cf9f2d3680fbc2323e643f03bfe5d8 /Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h | |
parent | 779f0d57bc9d90300aad0b1386dc937612ac35f4 (diff) | |
download | swift-9281a35fb912657f98ff0918ed683b2ef6071b45.zip swift-9281a35fb912657f98ff0918ed683b2ef6071b45.tar.bz2 |
Restrict generated candidates and selected candidates to those allowed
by supplied FileTransferOptions.
Test-Information:
Automatically tested all FileTransferOption combinations and verified
it generates only allowed candidates.
Change-Id: I0b3ce983a3f230a4c2c3940f5d928fd74d6012b6
Diffstat (limited to 'Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h')
-rw-r--r-- | Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h index 0b831be..ed2b4f0 100644 --- a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h +++ b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2013 Isode Limited. + * Copyright (c) 2013-2015 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -19,6 +19,8 @@ #include <Swiften/Base/Override.h> #include <Swiften/JID/JID.h> #include <Swiften/Elements/JingleS5BTransportPayload.h> +#include <Swiften/FileTransfer/FileTransferOptions.h> +#include <Swiften/FileTransfer/SOCKS5BytestreamProxyFinder.h> namespace Swift { class SOCKS5BytestreamServerManager; @@ -32,7 +34,8 @@ namespace Swift { SOCKS5BytestreamServerManager* s5bServerManager, SOCKS5BytestreamProxiesManager* s5bProxy, const JID& ownJID, - IDGenerator* idGenerator); + IDGenerator* idGenerator, + const FileTransferOptions& options); virtual ~LocalJingleTransportCandidateGenerator(); virtual void start(); @@ -42,7 +45,10 @@ namespace Swift { private: void handleS5BServerInitialized(bool success); + void handleDiscoveredProxiesChanged(); + void checkS5BCandidatesReady(); + void emitOnLocalTransportCandidatesGenerated(); private: SOCKS5BytestreamServerManager* s5bServerManager; @@ -50,5 +56,6 @@ namespace Swift { JID ownJID; IDGenerator* idGenerator; boost::shared_ptr<SOCKS5BytestreamServerInitializeRequest> s5bServerInitializeRequest; + FileTransferOptions options_; }; } |