Files
@ ad7e5ebbbec2
Branch filter:
Location: libtransport.git/include/Swiften/Serializer/PayloadSerializers/XHTMLIMSerializer.cpp - annotation
ad7e5ebbbec2
919 B
text/x-c++hdr
Merge pull request #39 from vitalyster/master
AdHocCommand: fix empty response when user is not registered or storage ...
AdHocCommand: fix empty response when user is not registered or storage ...
64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c 64f1921f8d5c | /*
* Copyright (c) 2011 Jan Kaluza
* Licensed under the Simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
#include <Swiften/Serializer/PayloadSerializers/XHTMLIMSerializer.h>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/XML/XMLRawTextNode.h>
#include <Swiften/Serializer/XML/XMLTextNode.h>
#include <Swiften/Serializer/XML/XMLElement.h>
namespace Swift {
XHTMLIMSerializer::XHTMLIMSerializer() : GenericPayloadSerializer<XHTMLIMPayload>() {
}
std::string XHTMLIMSerializer::serializePayload(boost::shared_ptr<XHTMLIMPayload> payload) const {
XMLElement html("html", "http://jabber.org/protocol/xhtml-im");
boost::shared_ptr<XMLElement> body(new XMLElement("body", "http://www.w3.org/1999/xhtml"));
body->addNode(boost::shared_ptr<XMLRawTextNode>(new XMLRawTextNode(payload->getBody())));
html.addNode(body);
return html.serialize();
}
}
|