diff options
Diffstat (limited to 'Swiften/Serializer/StreamResumedSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/StreamResumedSerializer.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/Swiften/Serializer/StreamResumedSerializer.cpp b/Swiften/Serializer/StreamResumedSerializer.cpp index 55d91de..5b88ded 100644 --- a/Swiften/Serializer/StreamResumedSerializer.cpp +++ b/Swiften/Serializer/StreamResumedSerializer.cpp @@ -1,12 +1,13 @@ /* - * Copyright (c) 2011-2014 Isode Limited. + * Copyright (c) 2011-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <Swiften/Serializer/StreamResumedSerializer.h> -#include <boost/shared_ptr.hpp> +#include <memory> + #include <boost/lexical_cast.hpp> #include <Swiften/Elements/StreamResumed.h> @@ -17,12 +18,12 @@ using namespace Swift; StreamResumedSerializer::StreamResumedSerializer() : GenericElementSerializer<StreamResumed>() { } -SafeByteArray StreamResumedSerializer::serialize(boost::shared_ptr<ToplevelElement> el) const { - boost::shared_ptr<StreamResumed> e(boost::dynamic_pointer_cast<StreamResumed>(el)); - XMLElement element("resumed", "urn:xmpp:sm:2"); - element.setAttribute("previd", e->getResumeID()); - if (e->getHandledStanzasCount()) { - element.setAttribute("h", boost::lexical_cast<std::string>(e->getHandledStanzasCount().get())); - } - return createSafeByteArray(element.serialize()); +SafeByteArray StreamResumedSerializer::serialize(std::shared_ptr<ToplevelElement> el) const { + std::shared_ptr<StreamResumed> e(std::dynamic_pointer_cast<StreamResumed>(el)); + XMLElement element("resumed", "urn:xmpp:sm:2"); + element.setAttribute("previd", e->getResumeID()); + if (e->getHandledStanzasCount()) { + element.setAttribute("h", boost::lexical_cast<std::string>(e->getHandledStanzasCount().get())); + } + return createSafeByteArray(element.serialize()); } |