summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer/ComponentHandshakeSerializer.cpp')
-rw-r--r--Swiften/Serializer/ComponentHandshakeSerializer.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/Swiften/Serializer/ComponentHandshakeSerializer.cpp b/Swiften/Serializer/ComponentHandshakeSerializer.cpp
new file mode 100644
index 0000000..de1958e
--- /dev/null
+++ b/Swiften/Serializer/ComponentHandshakeSerializer.cpp
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2010 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#include "Swiften/Serializer/ComponentHandshakeSerializer.h"
+
+#include "Swiften/Elements/ComponentHandshake.h"
+
+namespace Swift {
+
+ComponentHandshakeSerializer::ComponentHandshakeSerializer() {
+}
+
+String ComponentHandshakeSerializer::serialize(boost::shared_ptr<Element> element) const {
+ boost::shared_ptr<ComponentHandshake> handshake(boost::dynamic_pointer_cast<ComponentHandshake>(element));
+ return "<handshake>" + handshake->getData() + "</challenge>";
+}
+
+}