summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/SwiftenDevelopersGuide/Examples/EchoBot/EchoPayloadSerializer.h')
-rw-r--r--Documentation/SwiftenDevelopersGuide/Examples/EchoBot/EchoPayloadSerializer.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/EchoPayloadSerializer.h b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/EchoPayloadSerializer.h
index abc4760..faf1080 100644
--- a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/EchoPayloadSerializer.h
+++ b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/EchoPayloadSerializer.h
@@ -1,19 +1,20 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Swiften.h>
#include "EchoPayload.h"
+#include <Swiften/Swiften.h>
+
class EchoPayloadSerializer : public Swift::GenericPayloadSerializer<EchoPayload> {
- public:
- std::string serializePayload(boost::shared_ptr<EchoPayload> payload) const {
- XMLElement element("echo", "http://swift.im/protocol/echo");
- element.addNode(XMLTextNode::ref(new XMLTextNode(payload->getMessage())));
- return element.serialize();
- }
+ public:
+ std::string serializePayload(std::shared_ptr<EchoPayload> payload) const {
+ XMLElement element("echo", "http://swift.im/protocol/echo");
+ element.addNode(XMLTextNode::ref(new XMLTextNode(payload->getMessage())));
+ return element.serialize();
+ }
};