summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Maudsley <richard.maudsley@isode.com>2014-02-28 14:38:04 (GMT)
committerRichard Maudsley <richard.maudsley@isode.com>2014-05-02 08:47:32 (GMT)
commit47ba7eb4a5d3a48f4aa554ff07d20cc7c8682bae (patch)
treee6a6d69e187e75fbf34ffa89370476a9a3bc9752 /Swiften
parent481f33cdee8a907c98f1b87dd1b65418b096c4f6 (diff)
downloadswift-47ba7eb4a5d3a48f4aa554ff07d20cc7c8682bae.zip
swift-47ba7eb4a5d3a48f4aa554ff07d20cc7c8682bae.tar.bz2
Added Sluift MAM convertors.
Change-Id: I472023726e84fbdd14af1fd9f57de411a20eb584
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp11
-rw-r--r--Swiften/Serializer/PayloadSerializers/MAMArchivedSerializer.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/MAMArchivedSerializer.h5
-rw-r--r--Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h5
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MAMArchivedSerializerTest.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MAMQuerySerializerTest.cpp2
7 files changed, 17 insertions, 12 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp b/Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp
index cd9b4d7..b5269d1 100644
--- a/Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp
+++ b/Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp
@@ -58,6 +58,11 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.h>
#include <Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.h>
#include <Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.h>
+#include <Swiften/Serializer/PayloadSerializers/ResultSetSerializer.h>
+#include <Swiften/Serializer/PayloadSerializers/ForwardedSerializer.h>
+#include <Swiften/Serializer/PayloadSerializers/MAMResultSerializer.h>
+#include <Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h>
+#include <Swiften/Serializer/PayloadSerializers/MAMArchivedSerializer.h>
#include <Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.h>
#include <Swiften/Serializer/PayloadSerializers/JingleContentPayloadSerializer.h>
@@ -137,6 +142,12 @@ FullPayloadSerializerCollection::FullPayloadSerializerCollection() {
serializers_.push_back(new PubSubEventSerializer(this));
serializers_.push_back(new PubSubOwnerPubSubSerializer(this));
serializers_.push_back(new PubSubErrorSerializer());
+
+ serializers_.push_back(new ResultSetSerializer());
+ serializers_.push_back(new ForwardedSerializer(this));
+ serializers_.push_back(new MAMResultSerializer(this));
+ serializers_.push_back(new MAMQuerySerializer());
+ serializers_.push_back(new MAMArchivedSerializer());
foreach(PayloadSerializer* serializer, serializers_) {
addSerializer(serializer);
diff --git a/Swiften/Serializer/PayloadSerializers/MAMArchivedSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MAMArchivedSerializer.cpp
index 04a6584..0a49a4b 100644
--- a/Swiften/Serializer/PayloadSerializers/MAMArchivedSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MAMArchivedSerializer.cpp
@@ -13,7 +13,7 @@
using namespace Swift;
-MAMArchivedSerializer::MAMArchivedSerializer(PayloadSerializerCollection* serializers) : serializers_(serializers) {
+MAMArchivedSerializer::MAMArchivedSerializer() {
}
MAMArchivedSerializer::~MAMArchivedSerializer() {
diff --git a/Swiften/Serializer/PayloadSerializers/MAMArchivedSerializer.h b/Swiften/Serializer/PayloadSerializers/MAMArchivedSerializer.h
index 7c60798..67fffcb 100644
--- a/Swiften/Serializer/PayloadSerializers/MAMArchivedSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MAMArchivedSerializer.h
@@ -17,12 +17,9 @@ namespace Swift {
class SWIFTEN_API MAMArchivedSerializer : public GenericPayloadSerializer<MAMArchived> {
public:
- MAMArchivedSerializer(PayloadSerializerCollection* serializers);
+ MAMArchivedSerializer();
virtual ~MAMArchivedSerializer();
virtual std::string serializePayload(boost::shared_ptr<MAMArchived>) const SWIFTEN_OVERRIDE;
-
- private:
- PayloadSerializerCollection* serializers_;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.cpp b/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.cpp
index 1151fba..6a12f8e 100644
--- a/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.cpp
@@ -16,7 +16,7 @@
using namespace Swift;
-MAMQuerySerializer::MAMQuerySerializer(PayloadSerializerCollection* serializers) : serializers_(serializers) {
+MAMQuerySerializer::MAMQuerySerializer() {
}
MAMQuerySerializer::~MAMQuerySerializer() {
diff --git a/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h b/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h
index a6d1339..11526a8 100644
--- a/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h
@@ -17,12 +17,9 @@ namespace Swift {
class SWIFTEN_API MAMQuerySerializer : public GenericPayloadSerializer<MAMQuery> {
public:
- MAMQuerySerializer(PayloadSerializerCollection* serializers);
+ MAMQuerySerializer();
virtual ~MAMQuerySerializer();
virtual std::string serializePayload(boost::shared_ptr<MAMQuery>) const SWIFTEN_OVERRIDE;
-
- private:
- PayloadSerializerCollection* serializers_;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MAMArchivedSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MAMArchivedSerializerTest.cpp
index b174d32..2bd5c6a 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/MAMArchivedSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MAMArchivedSerializerTest.cpp
@@ -22,7 +22,7 @@ class MAMArchivedSerializerTest : public CppUnit::TestFixture {
public:
void testSerialize() {
- MAMArchivedSerializer serializer(&serializers);
+ MAMArchivedSerializer serializer;
boost::shared_ptr<MAMArchived> archived(boost::make_shared<MAMArchived>());
archived->setBy("juliet@capulet.lit");
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MAMQuerySerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MAMQuerySerializerTest.cpp
index cc49be1..7f6cbd9 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/MAMQuerySerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MAMQuerySerializerTest.cpp
@@ -25,7 +25,7 @@ class MAMQuerySerializerTest : public CppUnit::TestFixture {
public:
void testSerialize() {
- MAMQuerySerializer serializer(&serializers);
+ MAMQuerySerializer serializer;
boost::shared_ptr<Form> parameters(boost::make_shared<Form>());