summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-12-17 15:21:30 (GMT)
committerSwift Review <review@swift.im>2015-02-03 10:03:17 (GMT)
commitb5fc240f1cf4e340e04177a23cb8cf827b9ca16b (patch)
tree13d701e160af328553551974e55fea876d21eed8 /Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp
parentd860805af76ec85e003bf3019407bbb7acd218c9 (diff)
downloadswift-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/OutgoingJingleFileTransfer.cpp')
-rw-r--r--Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp b/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp
index 93214eb..369af8f 100644
--- a/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp
+++ b/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (C) 2013 Isode Limited.
+ * Copyright (C) 2013-2014 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -49,7 +49,7 @@ OutgoingJingleFileTransfer::OutgoingJingleFileTransfer(
boost::shared_ptr<ReadBytestream> stream,
FileTransferTransporterFactory* transporterFactory,
IDGenerator* idGenerator,
- const StreamInitiationFileInfo& fileInfo,
+ const JingleFileTransferFileInfo& fileInfo,
const FileTransferOptions& options,
CryptoProvider* crypto) :
JingleFileTransfer(session, toJID, transporterFactory),
@@ -149,8 +149,8 @@ void OutgoingJingleFileTransfer::sendSessionInfoHash() {
SWIFT_LOG(debug) << std::endl;
JingleFileTransferHash::ref hashElement = boost::make_shared<JingleFileTransferHash>();
- hashElement->setHash("sha-1", hashCalculator->getSHA1String());
- hashElement->setHash("md5", hashCalculator->getMD5String());
+ hashElement->getFileInfo().addHash(HashElement("sha-1", hashCalculator->getSHA1Hash()));
+ hashElement->getFileInfo().addHash(HashElement("md5", hashCalculator->getMD5Hash()));
session->sendInfo(hashElement);
}
@@ -162,7 +162,9 @@ void OutgoingJingleFileTransfer::handleLocalTransportCandidatesGenerated(
fillCandidateMap(localCandidates, candidates);
JingleFileTransferDescription::ref description = boost::make_shared<JingleFileTransferDescription>();
- description->addOffer(fileInfo);
+ fileInfo.addHash(HashElement("sha-1", ByteArray()));
+ fileInfo.addHash(HashElement("md5", ByteArray()));
+ description->setFileInfo(fileInfo);
JingleS5BTransportPayload::ref transport = boost::make_shared<JingleS5BTransportPayload>();
transport->setSessionID(s5bSessionID);