diff options
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.cpp | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.cpp index 934f877..68d334d 100644 --- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.cpp @@ -1,34 +1,30 @@ /* - * 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/PubSubOwnerDefaultSerializer.h> -#include <Swiften/Serializer/XML/XMLElement.h> -#include <boost/smart_ptr/make_shared.hpp> -#include <Swiften/Serializer/PayloadSerializerCollection.h> +#include <memory> + #include <Swiften/Serializer/PayloadSerializers/FormSerializer.h> +#include <Swiften/Serializer/XML/XMLElement.h> #include <Swiften/Serializer/XML/XMLRawTextNode.h> using namespace Swift; -PubSubOwnerDefaultSerializer::PubSubOwnerDefaultSerializer(PayloadSerializerCollection* serializers) : serializers(serializers) { +PubSubOwnerDefaultSerializer::PubSubOwnerDefaultSerializer(PayloadSerializerCollection* /*serializers*/) { } PubSubOwnerDefaultSerializer::~PubSubOwnerDefaultSerializer() { } -std::string PubSubOwnerDefaultSerializer::serializePayload(boost::shared_ptr<PubSubOwnerDefault> payload) const { - if (!payload) { - return ""; - } - XMLElement element("default", "http://jabber.org/protocol/pubsub#owner"); - element.addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getData()))); - return element.serialize(); +std::string PubSubOwnerDefaultSerializer::serializePayload(std::shared_ptr<PubSubOwnerDefault> payload) const { + if (!payload) { + return ""; + } + XMLElement element("default", "http://jabber.org/protocol/pubsub#owner"); + element.addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getData()))); + return element.serialize(); } - - |