summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/MIXSubscribeSerializer.cpp')
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXSubscribeSerializer.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/MIXSubscribeSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MIXSubscribeSerializer.cpp
new file mode 100644
index 0000000..3ce6d89
--- /dev/null
+++ b/Swiften/Serializer/PayloadSerializers/MIXSubscribeSerializer.cpp
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017 Tarun Gupta
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#include <Swiften/Serializer/PayloadSerializers/MIXSubscribeSerializer.h>
+
+#include <memory>
+
+#include <Swiften/Serializer/XML/XMLElement.h>
+#include <Swiften/Serializer/XML/XMLRawTextNode.h>
+
+using namespace Swift;
+
+MIXSubscribeSerializer::MIXSubscribeSerializer() {
+}
+
+MIXSubscribeSerializer::~MIXSubscribeSerializer() {
+}
+
+std::string MIXSubscribeSerializer::serializePayload(std::shared_ptr<MIXSubscribe> payload) const {
+ if (!payload) {
+ return "";
+ }
+ XMLElement element("subscribe");
+ element.setAttribute("node", payload->getNode());
+ return element.serialize();
+}