/* * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include #include #include namespace Swift { CapsInfoSerializer::CapsInfoSerializer() : GenericPayloadSerializer() { } std::string CapsInfoSerializer::serializePayload(std::shared_ptr capsInfo) const { XMLElement capsElement("c", "http://jabber.org/protocol/caps"); capsElement.setAttribute("node", capsInfo->getNode()); capsElement.setAttribute("hash", capsInfo->getHash()); capsElement.setAttribute("ver", capsInfo->getVersion()); return capsElement.serialize(); } }