summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/MAMResultSerializer.cpp')
-rw-r--r--Swiften/Serializer/PayloadSerializers/MAMResultSerializer.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.cpp
index 5e3666b..7ef2102 100644
--- a/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.cpp
@@ -1,16 +1,19 @@
/*
- * Copyright (c) 2014 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
+#include <Swiften/Serializer/PayloadSerializers/MAMResultSerializer.h>
+
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
-#include <Swiften/Serializer/XML/XMLElement.h>
-#include <Swiften/Serializer/XML/XMLRawTextNode.h>
+
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/ForwardedSerializer.h>
-#include <Swiften/Serializer/PayloadSerializers/MAMResultSerializer.h>
+#include <Swiften/Serializer/XML/XMLElement.h>
+#include <Swiften/Serializer/XML/XMLRawTextNode.h>
using namespace Swift;
@@ -20,20 +23,20 @@ MAMResultSerializer::MAMResultSerializer(PayloadSerializerCollection* serializer
MAMResultSerializer::~MAMResultSerializer() {
}
-std::string MAMResultSerializer::serializePayload(boost::shared_ptr<MAMResult> payload) const {
- if (!payload) {
- return "";
- }
+std::string MAMResultSerializer::serializePayload(std::shared_ptr<MAMResult> payload) const {
+ if (!payload) {
+ return "";
+ }
- XMLElement element("result", "urn:xmpp:mam:0");
+ XMLElement element("result", "urn:xmpp:mam:0");
- element.setAttribute("id", payload->getID());
+ element.setAttribute("id", payload->getID());
- if (payload->getQueryID()) {
- element.setAttribute("queryid", *payload->getQueryID());
- }
+ if (payload->getQueryID()) {
+ element.setAttribute("queryid", *payload->getQueryID());
+ }
- element.addNode(boost::make_shared<XMLRawTextNode>(ForwardedSerializer(serializers_).serialize(payload->getPayload())));
+ element.addNode(std::make_shared<XMLRawTextNode>(ForwardedSerializer(serializers_).serialize(payload->getPayload())));
- return element.serialize();
+ return element.serialize();
}