diff options
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.cpp index 1594643..5d1c5a6 100644 --- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.cpp @@ -1,17 +1,18 @@ /* - * Copyright (c) 2013 Isode Limited. + * Copyright (c) 2013-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ -#pragma clang diagnostic ignored "-Wunused-private-field" + #include <Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.h> -#include <Swiften/Serializer/XML/XMLElement.h> -#include <boost/smart_ptr/make_shared.hpp> + +#include <memory> #include <Swiften/Serializer/PayloadSerializerCollection.h> #include <Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.h> +#include <Swiften/Serializer/XML/XMLElement.h> #include <Swiften/Serializer/XML/XMLRawTextNode.h> using namespace Swift; @@ -22,14 +23,14 @@ PubSubOwnerDeleteSerializer::PubSubOwnerDeleteSerializer(PayloadSerializerCollec PubSubOwnerDeleteSerializer::~PubSubOwnerDeleteSerializer() { } -std::string PubSubOwnerDeleteSerializer::serializePayload(boost::shared_ptr<PubSubOwnerDelete> payload) const { - if (!payload) { - return ""; - } - XMLElement element("delete", "http://jabber.org/protocol/pubsub#owner"); - element.setAttribute("node", payload->getNode()); - element.addNode(boost::make_shared<XMLRawTextNode>(PubSubOwnerRedirectSerializer(serializers).serialize(payload->getRedirect()))); - return element.serialize(); +std::string PubSubOwnerDeleteSerializer::serializePayload(std::shared_ptr<PubSubOwnerDelete> payload) const { + if (!payload) { + return ""; + } + XMLElement element("delete", "http://jabber.org/protocol/pubsub#owner"); + element.setAttribute("node", payload->getNode()); + element.addNode(std::make_shared<XMLRawTextNode>(PubSubOwnerRedirectSerializer(serializers).serialize(payload->getRedirect()))); + return element.serialize(); } |