diff options
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp b/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp index e57fd12..73e2585 100644 --- a/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp @@ -6,8 +6,7 @@ #include <Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.h> -#include <boost/shared_ptr.hpp> -#include <boost/smart_ptr/make_shared.hpp> +#include <memory> #include <Swiften/Base/foreach.h> #include <Swiften/Serializer/PayloadSerializers/FormSerializer.h> @@ -19,13 +18,13 @@ namespace Swift { DiscoInfoSerializer::DiscoInfoSerializer() : GenericPayloadSerializer<DiscoInfo>() { } -std::string DiscoInfoSerializer::serializePayload(boost::shared_ptr<DiscoInfo> discoInfo) const { +std::string DiscoInfoSerializer::serializePayload(std::shared_ptr<DiscoInfo> discoInfo) const { XMLElement queryElement("query", "http://jabber.org/protocol/disco#info"); if (!discoInfo->getNode().empty()) { queryElement.setAttribute("node", discoInfo->getNode()); } foreach(const DiscoInfo::Identity& identity, discoInfo->getIdentities()) { - boost::shared_ptr<XMLElement> identityElement(new XMLElement("identity")); + std::shared_ptr<XMLElement> identityElement(new XMLElement("identity")); if (!identity.getLanguage().empty()) { identityElement->setAttribute("xml:lang", identity.getLanguage()); } @@ -35,12 +34,12 @@ std::string DiscoInfoSerializer::serializePayload(boost::shared_ptr<DiscoInfo> d queryElement.addNode(identityElement); } foreach(const std::string& feature, discoInfo->getFeatures()) { - boost::shared_ptr<XMLElement> featureElement(new XMLElement("feature")); + std::shared_ptr<XMLElement> featureElement(new XMLElement("feature")); featureElement->setAttribute("var", feature); queryElement.addNode(featureElement); } foreach(const Form::ref extension, discoInfo->getExtensions()) { - queryElement.addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(extension))); + queryElement.addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(extension))); } return queryElement.serialize(); } |