diff options
Diffstat (limited to 'Swiften/Serializer/StreamManagementEnabledSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/StreamManagementEnabledSerializer.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Swiften/Serializer/StreamManagementEnabledSerializer.cpp b/Swiften/Serializer/StreamManagementEnabledSerializer.cpp index 3ee0772..4f4ca2e 100644 --- a/Swiften/Serializer/StreamManagementEnabledSerializer.cpp +++ b/Swiften/Serializer/StreamManagementEnabledSerializer.cpp @@ -1,12 +1,12 @@ /* - * Copyright (c) 2010-2014 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <Swiften/Serializer/StreamManagementEnabledSerializer.h> -#include <boost/shared_ptr.hpp> +#include <memory> #include <Swiften/Elements/StreamManagementEnabled.h> #include <Swiften/Serializer/XML/XMLElement.h> @@ -16,14 +16,14 @@ using namespace Swift; StreamManagementEnabledSerializer::StreamManagementEnabledSerializer() : GenericElementSerializer<StreamManagementEnabled>() { } -SafeByteArray StreamManagementEnabledSerializer::serialize(boost::shared_ptr<ToplevelElement> el) const { - boost::shared_ptr<StreamManagementEnabled> e(boost::dynamic_pointer_cast<StreamManagementEnabled>(el)); - XMLElement element("enabled", "urn:xmpp:sm:2"); - if (!e->getResumeID().empty()) { - element.setAttribute("id", e->getResumeID()); - } - if (e->getResumeSupported()) { - element.setAttribute("resume", "true"); - } - return createSafeByteArray(element.serialize()); +SafeByteArray StreamManagementEnabledSerializer::serialize(std::shared_ptr<ToplevelElement> el) const { + std::shared_ptr<StreamManagementEnabled> e(std::dynamic_pointer_cast<StreamManagementEnabled>(el)); + XMLElement element("enabled", "urn:xmpp:sm:2"); + if (!e->getResumeID().empty()) { + element.setAttribute("id", e->getResumeID()); + } + if (e->getResumeSupported()) { + element.setAttribute("resume", "true"); + } + return createSafeByteArray(element.serialize()); } |