diff options
author | Tobias Markmann <tm@ayena.de> | 2014-12-17 15:21:30 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2015-02-03 10:03:17 (GMT) |
commit | b5fc240f1cf4e340e04177a23cb8cf827b9ca16b (patch) | |
tree | 13d701e160af328553551974e55fea876d21eed8 /Swiften/FileTransfer/IncomingJingleFileTransfer.h | |
parent | d860805af76ec85e003bf3019407bbb7acd218c9 (diff) | |
download | swift-b5fc240f1cf4e340e04177a23cb8cf827b9ca16b.zip swift-b5fc240f1cf4e340e04177a23cb8cf827b9ca16b.tar.bz2 |
Update Jingle FT protocol to namespace verison urn:xmpp:jingle:apps:file-transfer:4.
Test-Information:
Adjusted unit tests and successfully build/run them on OS X 10.9.5.
Change-Id: I63789e3fb351999f719157b54fa9fcf95f40fb07
Diffstat (limited to 'Swiften/FileTransfer/IncomingJingleFileTransfer.h')
-rw-r--r-- | Swiften/FileTransfer/IncomingJingleFileTransfer.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Swiften/FileTransfer/IncomingJingleFileTransfer.h b/Swiften/FileTransfer/IncomingJingleFileTransfer.h index 727d278..7fc22f4 100644 --- a/Swiften/FileTransfer/IncomingJingleFileTransfer.h +++ b/Swiften/FileTransfer/IncomingJingleFileTransfer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2013 Isode Limited. + * Copyright (c) 2010-2014 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -17,6 +17,7 @@ #include <Swiften/FileTransfer/JingleFileTransfer.h> #include <Swiften/Elements/JingleS5BTransportPayload.h> #include <Swiften/FileTransfer/FileTransferOptions.h> +#include <Swiften/Base/ByteArray.h> namespace Swift { class JID; @@ -29,7 +30,15 @@ namespace Swift { class CryptoProvider; class IncrementalBytestreamHashCalculator; class JingleFileTransferDescription; + class HashElement; + /** + * @brief The IncomingJingleFileTransfer class contains the business logic for managing incoming + * Jingle file transfers. + * + * Calling IncomingJingleFileTransfer::accept will start to negotiate possible transfer + * methods and after a working method has been decided among peers the trasnfer is started. + */ class SWIFTEN_API IncomingJingleFileTransfer : public IncomingFileTransfer, public JingleFileTransfer { public: typedef boost::shared_ptr<IncomingJingleFileTransfer> ref; @@ -43,7 +52,7 @@ namespace Swift { CryptoProvider*); ~IncomingJingleFileTransfer(); - virtual void accept(boost::shared_ptr<WriteBytestream>, const FileTransferOptions&) SWIFTEN_OVERRIDE; + virtual void accept(boost::shared_ptr<WriteBytestream>, const FileTransferOptions& = FileTransferOptions()) SWIFTEN_OVERRIDE; virtual void cancel() SWIFTEN_OVERRIDE; private: @@ -108,8 +117,7 @@ namespace Swift { boost::uintmax_t receivedBytes; IncrementalBytestreamHashCalculator* hashCalculator; boost::shared_ptr<Timer> waitOnHashTimer; - std::string hashAlgorithm; - std::string hash; + std::map<std::string, ByteArray> hashes; FileTransferOptions options; boost::bsignals::scoped_connection writeStreamDataReceivedConnection; |