summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.cpp')
m---------Swiften0
-rw-r--r--Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.cpp28
2 files changed, 0 insertions, 28 deletions
diff --git a/Swiften b/Swiften
new file mode 160000
+Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c
diff --git a/Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.cpp b/Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.cpp
deleted file mode 100644
index 93ab136..0000000
--- a/Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.h"
-
-#include <boost/shared_ptr.hpp>
-
-#include "Swiften/Serializer/XML/XMLElement.h"
-#include "Swiften/Serializer/XML/XMLTextNode.h"
-
-namespace Swift {
-
-ResourceBindSerializer::ResourceBindSerializer() : GenericPayloadSerializer<ResourceBind>() {
-}
-
-String ResourceBindSerializer::serializePayload(boost::shared_ptr<ResourceBind> resourceBind) const {
- XMLElement bindElement("bind", "urn:ietf:params:xml:ns:xmpp-bind");
- if (resourceBind->getJID().isValid()) {
- boost::shared_ptr<XMLElement> jidNode(new XMLElement("jid"));
- jidNode->addNode(boost::shared_ptr<XMLTextNode>(new XMLTextNode(resourceBind->getJID().toString())));
- bindElement.addNode(jidNode);
- }
- else if (!resourceBind->getResource().isEmpty()) {
- boost::shared_ptr<XMLElement> resourceNode(new XMLElement("resource"));
- resourceNode->addNode(boost::shared_ptr<XMLTextNode>(new XMLTextNode(resourceBind->getResource())));
- bindElement.addNode(resourceNode);
- }
- return bindElement.serialize();
-}
-
-}