/* * Copyright (c) 2011 Tobias Markmann * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ /* * Copyright (c) 2015-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include #include #include #include #include #include #include #include #include namespace Swift { JingleFileTransferDescriptionSerializer::JingleFileTransferDescriptionSerializer() { } std::string JingleFileTransferDescriptionSerializer::serializePayload(std::shared_ptr payload) const { XMLElement description("description", "urn:xmpp:jingle:apps:file-transfer:4"); JingleFileTransferFileInfoSerializer fileInfoSerializer; std::shared_ptr fileInfoXML = std::make_shared(fileInfoSerializer.serialize(std::make_shared(payload->getFileInfo()))); description.addNode(fileInfoXML); return description.serialize(); } }