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/DefaultFileTransferTransporterFactory.cpp | |
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/DefaultFileTransferTransporterFactory.cpp')
-rw-r--r-- | Swiften/FileTransfer/DefaultFileTransferTransporterFactory.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Swiften/FileTransfer/DefaultFileTransferTransporterFactory.cpp b/Swiften/FileTransfer/DefaultFileTransferTransporterFactory.cpp index 02de40c..ffa0a12 100644 --- a/Swiften/FileTransfer/DefaultFileTransferTransporterFactory.cpp +++ b/Swiften/FileTransfer/DefaultFileTransferTransporterFactory.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Isode Limited. + * Copyright (c) 2013-2015 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -34,7 +34,7 @@ DefaultFileTransferTransporterFactory::~DefaultFileTransferTransporterFactory() } FileTransferTransporter* DefaultFileTransferTransporterFactory::createInitiatorTransporter( - const JID& initiator, const JID& responder) { + const JID& initiator, const JID& responder, const FileTransferOptions& options) { DefaultFileTransferTransporter* transporter = new DefaultFileTransferTransporter( initiator, responder, @@ -46,17 +46,18 @@ FileTransferTransporter* DefaultFileTransferTransporterFactory::createInitiatorT connectionFactory, timerFactory, cryptoProvider, - iqRouter); + iqRouter, + options); transporter->initialize(); return transporter; } FileTransferTransporter* DefaultFileTransferTransporterFactory::createResponderTransporter( - const JID& initiator, const JID& responder, const std::string& s5bSessionID) { + const JID& initiator, const JID& responder, const std::string& s5bSessionID, const FileTransferOptions& options) { DefaultFileTransferTransporter* transporter = new DefaultFileTransferTransporter( initiator, responder, - DefaultFileTransferTransporter::Initiator, + DefaultFileTransferTransporter::Responder, s5bRegistry, s5bServerManager, s5bProxiesManager, @@ -64,7 +65,8 @@ FileTransferTransporter* DefaultFileTransferTransporterFactory::createResponderT connectionFactory, timerFactory, cryptoProvider, - iqRouter); + iqRouter, + options); transporter->initialize(s5bSessionID); return transporter; } |