diff options
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.cpp new file mode 100644 index 0000000..60cc562 --- /dev/null +++ b/Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.cpp @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2013 Remko Tronçon + * Licensed under the GNU General Public License. + * See the COPYING file for more information. + */ + +#pragma clang diagnostic ignored "-Wunused-private-field" + +#include <Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.h> +#include <Swiften/Serializer/XML/XMLElement.h> + + +#include <Swiften/Serializer/PayloadSerializerCollection.h> + + +using namespace Swift; + +PubSubEventDisassociateSerializer::PubSubEventDisassociateSerializer(PayloadSerializerCollection* serializers) : serializers(serializers) { +} + +PubSubEventDisassociateSerializer::~PubSubEventDisassociateSerializer() { +} + +std::string PubSubEventDisassociateSerializer::serializePayload(boost::shared_ptr<PubSubEventDisassociate> payload) const { + if (!payload) { + return ""; + } + XMLElement element("disassociate", "http://jabber.org/protocol/pubsub#event"); + element.setAttribute("node", payload->getNode()); + return element.serialize(); +} + + |