diff options
Diffstat (limited to 'Swiften/Serializer/StanzaAckSerializer.h')
-rw-r--r-- | Swiften/Serializer/StanzaAckSerializer.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/Swiften/Serializer/StanzaAckSerializer.h b/Swiften/Serializer/StanzaAckSerializer.h index 38e097b..f5a27dc 100644 --- a/Swiften/Serializer/StanzaAckSerializer.h +++ b/Swiften/Serializer/StanzaAckSerializer.h @@ -1,12 +1,13 @@ /* - * Copyright (c) 2010-2015 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once -#include <boost/shared_ptr.hpp> +#include <memory> + #include <boost/lexical_cast.hpp> #include <Swiften/Base/API.h> @@ -15,17 +16,17 @@ #include <Swiften/Serializer/XML/XMLElement.h> namespace Swift { - class SWIFTEN_API StanzaAckSerializer : public GenericElementSerializer<StanzaAck> { - public: - StanzaAckSerializer() : GenericElementSerializer<StanzaAck>() { - } + class SWIFTEN_API StanzaAckSerializer : public GenericElementSerializer<StanzaAck> { + public: + StanzaAckSerializer() : GenericElementSerializer<StanzaAck>() { + } - virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const { - StanzaAck::ref stanzaAck(boost::dynamic_pointer_cast<StanzaAck>(element)); - assert(stanzaAck->isValid()); - XMLElement result("a", "urn:xmpp:sm:2"); - result.setAttribute("h", std::string(boost::lexical_cast<std::string>(stanzaAck->getHandledStanzasCount()))); - return createSafeByteArray(result.serialize()); - } - }; + virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement> element) const { + StanzaAck::ref stanzaAck(std::dynamic_pointer_cast<StanzaAck>(element)); + assert(stanzaAck->isValid()); + XMLElement result("a", "urn:xmpp:sm:2"); + result.setAttribute("h", std::string(boost::lexical_cast<std::string>(stanzaAck->getHandledStanzasCount()))); + return createSafeByteArray(result.serialize()); + } + }; } |