diff options
Diffstat (limited to 'Swiften/Serializer')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp | 2 | ||||
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/RawXMLPayloadSerializer.h | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp b/Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp index 0f66b35..6a24008 100644 --- a/Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp +++ b/Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp @@ -17,6 +17,7 @@ #include "Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.h" #include "Swiften/Serializer/PayloadSerializers/VCardSerializer.h" #include "Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.h" +#include "Swiften/Serializer/PayloadSerializers/RawXMLPayloadSerializer.h" namespace Swift { @@ -37,6 +38,7 @@ FullPayloadSerializerCollection::FullPayloadSerializerCollection() { serializers_.push_back(new SecurityLabelsCatalogSerializer()); serializers_.push_back(new VCardSerializer()); serializers_.push_back(new VCardUpdateSerializer()); + serializers_.push_back(new RawXMLPayloadSerializer()); foreach(PayloadSerializer* serializer, serializers_) { addSerializer(serializer); } diff --git a/Swiften/Serializer/PayloadSerializers/RawXMLPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/RawXMLPayloadSerializer.h new file mode 100644 index 0000000..f980174 --- /dev/null +++ b/Swiften/Serializer/PayloadSerializers/RawXMLPayloadSerializer.h @@ -0,0 +1,15 @@ +#pragma once + +#include "Swiften/Serializer/GenericPayloadSerializer.h" +#include "Swiften/Elements/RawXMLPayload.h" + +namespace Swift { + class RawXMLPayloadSerializer : public GenericPayloadSerializer<RawXMLPayload> { + public: + RawXMLPayloadSerializer() : GenericPayloadSerializer<RawXMLPayload>() {} + + virtual String serializePayload(boost::shared_ptr<RawXMLPayload> p) const { + return p->getRawXML(); + } + }; +} |