diff options
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp index 39bd129..157c99e 100644 --- a/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp @@ -1,33 +1,29 @@ /* - * Copyright (c) 2011 Isode Limited. + * Copyright (c) 2011-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.h> +#include <memory> #include <sstream> -#include <boost/shared_ptr.hpp> -#include <boost/smart_ptr/make_shared.hpp> - -#include <Swiften/Base/foreach.h> +#include <Swiften/Serializer/PayloadSerializers/MUCItemSerializer.h> #include <Swiften/Serializer/XML/XMLElement.h> #include <Swiften/Serializer/XML/XMLTextNode.h> -#include <Swiften/Serializer/PayloadSerializers/MUCItemSerializer.h> - namespace Swift { MUCAdminPayloadSerializer::MUCAdminPayloadSerializer() : GenericPayloadSerializer<MUCAdminPayload>() { } -std::string MUCAdminPayloadSerializer::serializePayload(boost::shared_ptr<MUCAdminPayload> payload) const { - XMLElement mucElement("query", "http://jabber.org/protocol/muc#admin"); - foreach (const MUCItem& item, payload->getItems()) { - mucElement.addNode(MUCItemSerializer::itemToElement(item)); - } - return mucElement.serialize(); +std::string MUCAdminPayloadSerializer::serializePayload(std::shared_ptr<MUCAdminPayload> payload) const { + XMLElement mucElement("query", "http://jabber.org/protocol/muc#admin"); + for (const auto& item : payload->getItems()) { + mucElement.addNode(MUCItemSerializer::itemToElement(item)); + } + return mucElement.serialize(); } |