diff options
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.cpp b/Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.cpp index bf63a69..cc87929 100644 --- a/Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.cpp @@ -1,26 +1,26 @@ /* - * Copyright (c) 2015 Isode Limited. + * Copyright (c) 2015-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.h> -#include <boost/make_shared.hpp> +#include <memory> namespace Swift { - CarbonsReceivedSerializer::CarbonsReceivedSerializer(PayloadSerializerCollection* serializers) : GenericPayloadSerializer<CarbonsReceived>(), serializers_(serializers) { - } + CarbonsReceivedSerializer::CarbonsReceivedSerializer(PayloadSerializerCollection* serializers) : GenericPayloadSerializer<CarbonsReceived>(), serializers_(serializers) { + } - CarbonsReceivedSerializer::~CarbonsReceivedSerializer() { - } - - std::string CarbonsReceivedSerializer::serializePayload(boost::shared_ptr<CarbonsReceived> received) const { - XMLElement element("received", "urn:xmpp:carbons:2"); - if (received->getForwarded()) { - element.addNode(boost::make_shared<XMLRawTextNode>(ForwardedSerializer(serializers_).serialize(received->getForwarded()))); - } - return element.serialize(); - } + CarbonsReceivedSerializer::~CarbonsReceivedSerializer() { + } + + std::string CarbonsReceivedSerializer::serializePayload(std::shared_ptr<CarbonsReceived> received) const { + XMLElement element("received", "urn:xmpp:carbons:2"); + if (received->getForwarded()) { + element.addNode(std::make_shared<XMLRawTextNode>(ForwardedSerializer(serializers_).serialize(received->getForwarded()))); + } + return element.serialize(); + } } |