summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers')
-rw-r--r--Swiften/Serializer/PayloadSerializers/ForwardedSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.h10
-rw-r--r--Swiften/Serializer/PayloadSerializers/MAMFinSerializer.h5
-rw-r--r--Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h5
-rw-r--r--Swiften/Serializer/PayloadSerializers/MAMResultSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXCreateSerializer.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXCreateSerializer.h11
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXDestroySerializer.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXDestroySerializer.h11
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXJoinSerializer.cpp15
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXJoinSerializer.h11
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXLeaveSerializer.cpp31
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXLeaveSerializer.h29
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXPayloadSerializer.cpp44
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXPayloadSerializer.h26
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXRegisterNickSerializer.cpp29
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXRegisterNickSerializer.h (renamed from Swiften/Serializer/PayloadSerializers/MIXSubscribeSerializer.h)13
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXSetNickSerializer.cpp29
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXSetNickSerializer.h26
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXSubscribeSerializer.cpp29
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXUpdateSubscriptionSerializer.cpp43
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXUpdateSubscriptionSerializer.h30
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXUserPreferenceSerializer.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/MIXUserPreferenceSerializer.h11
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubAffiliationSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.h10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubCreateSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.h5
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.h10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.h10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.h10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.h10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventPurgeSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventRetractSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventSubscriptionSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.h10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.h10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.h10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.h10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerPurgeSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.h10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.h10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubSubscribeSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.h10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/ResultSetSerializer.h5
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MIXCreateSerializerTest.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MIXDestroySerializerTest.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MIXJoinSerializerTest.cpp100
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MIXLeaveSerializerTest.cpp30
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MIXPayloadSerializerTest.cpp61
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MIXRegisterNickSerializerTest.cpp22
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MIXSetNickSerializerTest.cpp22
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MIXUpdateSubscriptionSerializerTest.cpp36
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MIXUserPreferenceSerializerTest.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/UserLocationSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/UserTuneSerializer.h7
76 files changed, 696 insertions, 353 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/ForwardedSerializer.h b/Swiften/Serializer/PayloadSerializers/ForwardedSerializer.h
index f3eb6fb..439e684 100644
--- a/Swiften/Serializer/PayloadSerializers/ForwardedSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/ForwardedSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/Forwarded.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,9 +18,9 @@ namespace Swift {
class SWIFTEN_API ForwardedSerializer : public GenericPayloadSerializer<Forwarded> {
public:
ForwardedSerializer(PayloadSerializerCollection* serializers);
- virtual ~ForwardedSerializer();
+ virtual ~ForwardedSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<Forwarded>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<Forwarded>) const override;
private:
PayloadSerializerCollection* serializers_;
diff --git a/Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp b/Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp
index 9832bd5..428ce76 100644
--- a/Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp
+++ b/Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp
@@ -47,9 +47,14 @@
#include <Swiften/Serializer/PayloadSerializers/MAMResultSerializer.h>
#include <Swiften/Serializer/PayloadSerializers/MIXJoinSerializer.h>
#include <Swiften/Serializer/PayloadSerializers/MIXDestroySerializer.h>
+#include <Swiften/Serializer/PayloadSerializers/MIXUpdateSubscriptionSerializer.h>
#include <Swiften/Serializer/PayloadSerializers/MIXParticipantSerializer.h>
+#include <Swiften/Serializer/PayloadSerializers/MIXRegisterNickSerializer.h>
#include <Swiften/Serializer/PayloadSerializers/MIXCreateSerializer.h>
+#include <Swiften/Serializer/PayloadSerializers/MIXPayloadSerializer.h>
+#include <Swiften/Serializer/PayloadSerializers/MIXSetNickSerializer.h>
#include <Swiften/Serializer/PayloadSerializers/MIXUserPreferenceSerializer.h>
+#include <Swiften/Serializer/PayloadSerializers/MIXLeaveSerializer.h>
#include <Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.h>
#include <Swiften/Serializer/PayloadSerializers/MUCDestroyPayloadSerializer.h>
#include <Swiften/Serializer/PayloadSerializers/MUCInvitationPayloadSerializer.h>
@@ -161,9 +166,14 @@ FullPayloadSerializerCollection::FullPayloadSerializerCollection() {
serializers_.push_back(new ForwardedSerializer(this));
serializers_.push_back(new MIXParticipantSerializer());
serializers_.push_back(new MIXCreateSerializer());
+ serializers_.push_back(new MIXRegisterNickSerializer());
+ serializers_.push_back(new MIXPayloadSerializer());
+ serializers_.push_back(new MIXSetNickSerializer());
serializers_.push_back(new MIXUserPreferenceSerializer());
+ serializers_.push_back(new MIXLeaveSerializer());
serializers_.push_back(new MIXJoinSerializer());
serializers_.push_back(new MIXDestroySerializer());
+ serializers_.push_back(new MIXUpdateSubscriptionSerializer());
serializers_.push_back(new MAMResultSerializer(this));
serializers_.push_back(new MAMQuerySerializer());
serializers_.push_back(new MAMFinSerializer());
diff --git a/Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.h b/Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.h
index e7cfef9..419e2d5 100644
--- a/Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/IsodeIQDelegation.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,12 +18,9 @@ namespace Swift {
class SWIFTEN_API IsodeIQDelegationSerializer : public GenericPayloadSerializer<IsodeIQDelegation> {
public:
IsodeIQDelegationSerializer(PayloadSerializerCollection* serializers);
- virtual ~IsodeIQDelegationSerializer();
-
- virtual std::string serializePayload(std::shared_ptr<IsodeIQDelegation>) const SWIFTEN_OVERRIDE;
-
- private:
+ virtual ~IsodeIQDelegationSerializer() override;
+ virtual std::string serializePayload(std::shared_ptr<IsodeIQDelegation>) const override;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/MAMFinSerializer.h b/Swiften/Serializer/PayloadSerializers/MAMFinSerializer.h
index 7c5bd29..d8cff6a 100644
--- a/Swiften/Serializer/PayloadSerializers/MAMFinSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MAMFinSerializer.h
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/MAMFin.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -17,8 +16,8 @@ namespace Swift {
class SWIFTEN_API MAMFinSerializer : public GenericPayloadSerializer<MAMFin> {
public:
MAMFinSerializer();
- virtual ~MAMFinSerializer();
+ virtual ~MAMFinSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<MAMFin>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<MAMFin>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h b/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h
index 6b2403f..e2ed063 100644
--- a/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/MAMQuery.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -17,8 +16,8 @@ namespace Swift {
class SWIFTEN_API MAMQuerySerializer : public GenericPayloadSerializer<MAMQuery> {
public:
MAMQuerySerializer();
- virtual ~MAMQuerySerializer();
+ virtual ~MAMQuerySerializer() override;
- virtual std::string serializePayload(std::shared_ptr<MAMQuery>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<MAMQuery>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.h b/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.h
index f4fc054..5cac8c4 100644
--- a/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/MAMResult.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,9 +18,9 @@ namespace Swift {
class SWIFTEN_API MAMResultSerializer : public GenericPayloadSerializer<MAMResult> {
public:
MAMResultSerializer(PayloadSerializerCollection* serializers);
- virtual ~MAMResultSerializer();
+ virtual ~MAMResultSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<MAMResult>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<MAMResult>) const override;
private:
PayloadSerializerCollection* serializers_;
diff --git a/Swiften/Serializer/PayloadSerializers/MIXCreateSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MIXCreateSerializer.cpp
index 9476df2..2034d86 100644
--- a/Swiften/Serializer/PayloadSerializers/MIXCreateSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MIXCreateSerializer.cpp
@@ -24,7 +24,7 @@ std::string MIXCreateSerializer::serializePayload(std::shared_ptr<MIXCreate> pay
if (!payload) {
return "";
}
- XMLElement element("create", "urn:xmpp:mix:1");
+ XMLElement element("create", "urn:xmpp:mix:0");
if(payload->getChannel()) {
element.setAttribute("channel", *payload->getChannel());
diff --git a/Swiften/Serializer/PayloadSerializers/MIXCreateSerializer.h b/Swiften/Serializer/PayloadSerializers/MIXCreateSerializer.h
index 23cc65d..54f3adc 100644
--- a/Swiften/Serializer/PayloadSerializers/MIXCreateSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MIXCreateSerializer.h
@@ -4,12 +4,17 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2017 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#pragma once
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/MIXCreate.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -18,8 +23,8 @@ namespace Swift {
class SWIFTEN_API MIXCreateSerializer : public GenericPayloadSerializer<MIXCreate> {
public:
MIXCreateSerializer();
- virtual ~MIXCreateSerializer();
+ virtual ~MIXCreateSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<MIXCreate>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<MIXCreate>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXDestroySerializer.cpp b/Swiften/Serializer/PayloadSerializers/MIXDestroySerializer.cpp
index a395416..ed0d252 100644
--- a/Swiften/Serializer/PayloadSerializers/MIXDestroySerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MIXDestroySerializer.cpp
@@ -24,7 +24,7 @@ std::string MIXDestroySerializer::serializePayload(std::shared_ptr<MIXDestroy> p
if (!payload) {
return "";
}
- XMLElement element("destroy", "urn:xmpp:mix:1");
+ XMLElement element("destroy", "urn:xmpp:mix:0");
element.setAttribute("channel", payload->getChannel());
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXDestroySerializer.h b/Swiften/Serializer/PayloadSerializers/MIXDestroySerializer.h
index c14c0dd..a0640a1 100644
--- a/Swiften/Serializer/PayloadSerializers/MIXDestroySerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MIXDestroySerializer.h
@@ -4,12 +4,17 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2017 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#pragma once
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/MIXDestroy.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -18,8 +23,8 @@ namespace Swift {
class SWIFTEN_API MIXDestroySerializer : public GenericPayloadSerializer<MIXDestroy> {
public:
MIXDestroySerializer();
- virtual ~MIXDestroySerializer();
+ virtual ~MIXDestroySerializer() override;
- virtual std::string serializePayload(std::shared_ptr<MIXDestroy>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<MIXDestroy>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXJoinSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MIXJoinSerializer.cpp
index cae15c2..509e41e 100644
--- a/Swiften/Serializer/PayloadSerializers/MIXJoinSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MIXJoinSerializer.cpp
@@ -7,8 +7,8 @@
#include <Swiften/Serializer/PayloadSerializers/MIXJoinSerializer.h>
#include <memory>
+#include <string>
-#include <Swiften/Serializer/PayloadSerializers/MIXSubscribeSerializer.h>
#include <Swiften/Serializer/PayloadSerializers/FormSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
#include <Swiften/Serializer/XML/XMLRawTextNode.h>
@@ -25,16 +25,23 @@ std::string MIXJoinSerializer::serializePayload(std::shared_ptr<MIXJoin> payload
if (!payload) {
return "";
}
- XMLElement element("join", "urn:xmpp:mix:1");
+ XMLElement element("join", "urn:xmpp:mix:0");
if (payload->getChannel()) {
element.setAttribute("channel", *payload->getChannel());
}
if (payload->getJID()) {
element.setAttribute("jid", *payload->getJID());
}
- for (const auto& item : payload->getSubscriptions()) {
- element.addNode(std::make_shared<XMLRawTextNode>(MIXSubscribeSerializer().serialize(item)));
+ auto subscriptionData = payload->getSubscriptions();
+ std::vector<std::string> subscriptions(subscriptionData.begin(), subscriptionData.end());
+ std::sort(subscriptions.begin(), subscriptions.end());
+
+ for (const auto& item : subscriptions) {
+ auto subscribeElement = std::make_shared<XMLElement>("subscribe");
+ subscribeElement->setAttribute("node", item);
+ element.addNode(subscribeElement);
}
+
if (payload->getForm()) {
element.addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getForm())));
}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXJoinSerializer.h b/Swiften/Serializer/PayloadSerializers/MIXJoinSerializer.h
index a53fbe3..9be6915 100644
--- a/Swiften/Serializer/PayloadSerializers/MIXJoinSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MIXJoinSerializer.h
@@ -4,12 +4,17 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2017 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#pragma once
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/MIXJoin.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -18,8 +23,8 @@ namespace Swift {
class SWIFTEN_API MIXJoinSerializer : public GenericPayloadSerializer<MIXJoin> {
public:
MIXJoinSerializer();
- virtual ~MIXJoinSerializer();
+ virtual ~MIXJoinSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<MIXJoin>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<MIXJoin>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXLeaveSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MIXLeaveSerializer.cpp
new file mode 100644
index 0000000..111186a
--- /dev/null
+++ b/Swiften/Serializer/PayloadSerializers/MIXLeaveSerializer.cpp
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2017 Tarun Gupta
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#include <Swiften/Serializer/PayloadSerializers/MIXLeaveSerializer.h>
+
+#include <memory>
+
+#include <Swiften/Serializer/XML/XMLElement.h>
+
+namespace Swift {
+
+MIXLeaveSerializer::MIXLeaveSerializer() {
+}
+
+MIXLeaveSerializer::~MIXLeaveSerializer() {
+}
+
+std::string MIXLeaveSerializer::serializePayload(std::shared_ptr<MIXLeave> payload) const {
+ if (!payload) {
+ return "";
+ }
+ XMLElement element("leave", "urn:xmpp:mix:0");
+ if (payload->getChannel()) {
+ element.setAttribute("channel", *payload->getChannel());
+ }
+ return element.serialize();
+}
+}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXLeaveSerializer.h b/Swiften/Serializer/PayloadSerializers/MIXLeaveSerializer.h
new file mode 100644
index 0000000..dd593b6
--- /dev/null
+++ b/Swiften/Serializer/PayloadSerializers/MIXLeaveSerializer.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017 Tarun Gupta
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+/*
+ * Copyright (c) 2017 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
+#pragma once
+
+#include <memory>
+
+#include <Swiften/Base/API.h>
+#include <Swiften/Elements/MIXLeave.h>
+#include <Swiften/Serializer/GenericPayloadSerializer.h>
+
+namespace Swift {
+ class SWIFTEN_API MIXLeaveSerializer : public GenericPayloadSerializer<MIXLeave> {
+ public:
+ MIXLeaveSerializer();
+ virtual ~MIXLeaveSerializer() override;
+
+ virtual std::string serializePayload(std::shared_ptr<MIXLeave>) const override;
+ };
+}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MIXPayloadSerializer.cpp
new file mode 100644
index 0000000..843270a
--- /dev/null
+++ b/Swiften/Serializer/PayloadSerializers/MIXPayloadSerializer.cpp
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2017 Tarun Gupta
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#include <Swiften/Serializer/PayloadSerializers/MIXPayloadSerializer.h>
+
+#include <memory>
+
+#include <Swiften/Serializer/XML/XMLElement.h>
+#include <Swiften/Serializer/XML/XMLRawTextNode.h>
+#include <Swiften/Serializer/XML/XMLTextNode.h>
+
+namespace Swift {
+
+MIXPayloadSerializer::MIXPayloadSerializer() : GenericPayloadSerializer<MIXPayload>() {
+}
+
+std::string MIXPayloadSerializer::serializePayload(std::shared_ptr<MIXPayload> payload) const {
+ XMLElement mixElement("mix", "urn:xmpp:mix:0");
+
+ if (payload->getNick()) {
+ std::shared_ptr<XMLElement> nickElement = std::make_shared<XMLElement>("nick");
+ nickElement->addNode(std::make_shared<XMLTextNode>(*payload->getNick()));
+ mixElement.addNode(nickElement);
+ }
+
+ if (payload->getJID()) {
+ std::shared_ptr<XMLElement> jidElement = std::make_shared<XMLElement>("jid");
+ jidElement->addNode(std::make_shared<XMLTextNode>(*payload->getJID()));
+ mixElement.addNode(jidElement);
+ }
+
+ if (payload->getSubmissionID()) {
+ std::shared_ptr<XMLElement> subIDElement = std::make_shared<XMLElement>("submission-id");
+ subIDElement->addNode(std::make_shared<XMLTextNode>(*payload->getSubmissionID()));
+ mixElement.addNode(subIDElement);
+ }
+
+ return mixElement.serialize();
+}
+
+}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/MIXPayloadSerializer.h
new file mode 100644
index 0000000..bc7ec7f
--- /dev/null
+++ b/Swiften/Serializer/PayloadSerializers/MIXPayloadSerializer.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017 Tarun Gupta
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+/*
+ * Copyright (c) 2017 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
+#pragma once
+
+#include <Swiften/Base/API.h>
+#include <Swiften/Elements/MIXPayload.h>
+#include <Swiften/Serializer/GenericPayloadSerializer.h>
+
+namespace Swift {
+ class SWIFTEN_API MIXPayloadSerializer : public GenericPayloadSerializer<MIXPayload> {
+ public:
+ MIXPayloadSerializer();
+
+ virtual std::string serializePayload(std::shared_ptr<MIXPayload> payload) const override;
+ };
+}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXRegisterNickSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MIXRegisterNickSerializer.cpp
new file mode 100644
index 0000000..9045ffe
--- /dev/null
+++ b/Swiften/Serializer/PayloadSerializers/MIXRegisterNickSerializer.cpp
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017 Tarun Gupta
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#include <Swiften/Serializer/PayloadSerializers/MIXRegisterNickSerializer.h>
+
+#include <memory>
+
+#include <Swiften/Serializer/XML/XMLElement.h>
+#include <Swiften/Serializer/XML/XMLTextNode.h>
+
+namespace Swift {
+
+MIXRegisterNickSerializer::MIXRegisterNickSerializer() : GenericPayloadSerializer<MIXRegisterNick>() {
+}
+
+std::string MIXRegisterNickSerializer::serializePayload(std::shared_ptr<MIXRegisterNick> payload) const {
+ XMLElement registernickElement("register", "urn:xmpp:mix:0");
+
+ auto nickElement = std::make_shared<XMLElement>("nick");
+ nickElement->addNode(std::make_shared<XMLTextNode>(payload->getNick()));
+ registernickElement.addNode(nickElement);
+
+ return registernickElement.serialize();
+}
+
+}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXSubscribeSerializer.h b/Swiften/Serializer/PayloadSerializers/MIXRegisterNickSerializer.h
index b343f86..011fb18 100644
--- a/Swiften/Serializer/PayloadSerializers/MIXSubscribeSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MIXRegisterNickSerializer.h
@@ -6,20 +6,15 @@
#pragma once
-#include <memory>
-
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
-#include <Swiften/Elements/MIXSubscribe.h>
+#include <Swiften/Elements/MIXRegisterNick.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
namespace Swift {
-
- class SWIFTEN_API MIXSubscribeSerializer : public GenericPayloadSerializer<MIXSubscribe> {
+ class SWIFTEN_API MIXRegisterNickSerializer : public GenericPayloadSerializer<MIXRegisterNick> {
public:
- MIXSubscribeSerializer();
- virtual ~MIXSubscribeSerializer();
+ MIXRegisterNickSerializer();
- virtual std::string serializePayload(std::shared_ptr<MIXSubscribe>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<MIXRegisterNick> payload) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXSetNickSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MIXSetNickSerializer.cpp
new file mode 100644
index 0000000..d111d8c
--- /dev/null
+++ b/Swiften/Serializer/PayloadSerializers/MIXSetNickSerializer.cpp
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017 Tarun Gupta
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#include <Swiften/Serializer/PayloadSerializers/MIXSetNickSerializer.h>
+
+#include <memory>
+
+#include <Swiften/Serializer/XML/XMLElement.h>
+#include <Swiften/Serializer/XML/XMLTextNode.h>
+
+namespace Swift {
+
+MIXSetNickSerializer::MIXSetNickSerializer() : GenericPayloadSerializer<MIXSetNick>() {
+}
+
+std::string MIXSetNickSerializer::serializePayload(std::shared_ptr<MIXSetNick> payload) const {
+ XMLElement setnickElement("setnick", "urn:xmpp:mix:0");
+
+ auto nickElement = std::make_shared<XMLElement>("nick");
+ nickElement->addNode(std::make_shared<XMLTextNode>(payload->getNick()));
+ setnickElement.addNode(nickElement);
+
+ return setnickElement.serialize();
+}
+
+}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXSetNickSerializer.h b/Swiften/Serializer/PayloadSerializers/MIXSetNickSerializer.h
new file mode 100644
index 0000000..7c28d8e
--- /dev/null
+++ b/Swiften/Serializer/PayloadSerializers/MIXSetNickSerializer.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017 Tarun Gupta
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+/*
+ * Copyright (c) 2017 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
+#pragma once
+
+#include <Swiften/Base/API.h>
+#include <Swiften/Elements/MIXSetNick.h>
+#include <Swiften/Serializer/GenericPayloadSerializer.h>
+
+namespace Swift {
+ class SWIFTEN_API MIXSetNickSerializer : public GenericPayloadSerializer<MIXSetNick> {
+ public:
+ MIXSetNickSerializer();
+
+ virtual std::string serializePayload(std::shared_ptr<MIXSetNick> payload) const override ;
+ };
+}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXSubscribeSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MIXSubscribeSerializer.cpp
deleted file mode 100644
index 3ce6d89..0000000
--- a/Swiften/Serializer/PayloadSerializers/MIXSubscribeSerializer.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2017 Tarun Gupta
- * Licensed under the simplified BSD license.
- * See Documentation/Licenses/BSD-simplified.txt for more information.
- */
-
-#include <Swiften/Serializer/PayloadSerializers/MIXSubscribeSerializer.h>
-
-#include <memory>
-
-#include <Swiften/Serializer/XML/XMLElement.h>
-#include <Swiften/Serializer/XML/XMLRawTextNode.h>
-
-using namespace Swift;
-
-MIXSubscribeSerializer::MIXSubscribeSerializer() {
-}
-
-MIXSubscribeSerializer::~MIXSubscribeSerializer() {
-}
-
-std::string MIXSubscribeSerializer::serializePayload(std::shared_ptr<MIXSubscribe> payload) const {
- if (!payload) {
- return "";
- }
- XMLElement element("subscribe");
- element.setAttribute("node", payload->getNode());
- return element.serialize();
-}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXUpdateSubscriptionSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MIXUpdateSubscriptionSerializer.cpp
new file mode 100644
index 0000000..8e95474
--- /dev/null
+++ b/Swiften/Serializer/PayloadSerializers/MIXUpdateSubscriptionSerializer.cpp
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2017 Tarun Gupta
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#include <Swiften/Serializer/PayloadSerializers/MIXUpdateSubscriptionSerializer.h>
+
+#include <memory>
+
+#include <Swiften/Serializer/PayloadSerializers/FormSerializer.h>
+#include <Swiften/Serializer/XML/XMLElement.h>
+#include <Swiften/Serializer/XML/XMLRawTextNode.h>
+
+namespace Swift {
+
+MIXUpdateSubscriptionSerializer::MIXUpdateSubscriptionSerializer() {
+}
+
+MIXUpdateSubscriptionSerializer::~MIXUpdateSubscriptionSerializer() {
+}
+
+std::string MIXUpdateSubscriptionSerializer::serializePayload(std::shared_ptr<MIXUpdateSubscription> payload) const {
+ if (!payload) {
+ return "";
+ }
+ XMLElement element("update-subscription", "urn:xmpp:mix:0");
+ if (payload->getJID()) {
+ element.setAttribute("jid", *payload->getJID());
+ }
+ auto subscriptionData = payload->getSubscriptions();
+ std::vector<std::string> subscriptions(subscriptionData.begin(), subscriptionData.end());
+ std::sort(subscriptions.begin(), subscriptions.end());
+
+ for (const auto& item : subscriptions) {
+ auto subscribeElement = std::make_shared<XMLElement>("subscribe");
+ subscribeElement->setAttribute("node", item);
+ element.addNode(subscribeElement);
+ }
+ return element.serialize();
+}
+
+}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXUpdateSubscriptionSerializer.h b/Swiften/Serializer/PayloadSerializers/MIXUpdateSubscriptionSerializer.h
new file mode 100644
index 0000000..ee59bf7
--- /dev/null
+++ b/Swiften/Serializer/PayloadSerializers/MIXUpdateSubscriptionSerializer.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017 Tarun Gupta
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+/*
+ * Copyright (c) 2017 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
+#pragma once
+
+#include <memory>
+
+#include <Swiften/Base/API.h>
+#include <Swiften/Elements/MIXUpdateSubscription.h>
+#include <Swiften/Serializer/GenericPayloadSerializer.h>
+
+namespace Swift {
+
+ class SWIFTEN_API MIXUpdateSubscriptionSerializer : public GenericPayloadSerializer<MIXUpdateSubscription> {
+ public:
+ MIXUpdateSubscriptionSerializer();
+ virtual ~MIXUpdateSubscriptionSerializer();
+
+ virtual std::string serializePayload(std::shared_ptr<MIXUpdateSubscription>) const override;
+ };
+}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXUserPreferenceSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MIXUserPreferenceSerializer.cpp
index 2d057ad..618e0b3 100644
--- a/Swiften/Serializer/PayloadSerializers/MIXUserPreferenceSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MIXUserPreferenceSerializer.cpp
@@ -24,7 +24,7 @@ std::string MIXUserPreferenceSerializer::serializePayload(std::shared_ptr<MIXUse
if (!payload) {
return "";
}
- XMLElement element("user-preference", "urn:xmpp:mix:1");
+ XMLElement element("user-preference", "urn:xmpp:mix:0");
if(payload->getData()) {
element.addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getData())));
}
diff --git a/Swiften/Serializer/PayloadSerializers/MIXUserPreferenceSerializer.h b/Swiften/Serializer/PayloadSerializers/MIXUserPreferenceSerializer.h
index 301083a..f262b83 100644
--- a/Swiften/Serializer/PayloadSerializers/MIXUserPreferenceSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MIXUserPreferenceSerializer.h
@@ -4,12 +4,17 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2017 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#pragma once
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/MIXUserPreference.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -18,8 +23,8 @@ namespace Swift {
class SWIFTEN_API MIXUserPreferenceSerializer : public GenericPayloadSerializer<MIXUserPreference> {
public:
MIXUserPreferenceSerializer();
- virtual ~MIXUserPreferenceSerializer();
+ virtual ~MIXUserPreferenceSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<MIXUserPreference>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<MIXUserPreference>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubAffiliationSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubAffiliationSerializer.h
index 8862414..9b6dadb 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubAffiliationSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubAffiliationSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubAffiliation.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,9 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubAffiliationSerializer : public GenericPayloadSerializer<PubSubAffiliation> {
public:
PubSubAffiliationSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubAffiliationSerializer();
+ virtual ~PubSubAffiliationSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubAffiliation>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubAffiliation>) const override;
private:
static std::string serializeType(PubSubAffiliation::Type);
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.h
index c51d70e..b8096d3 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubAffiliations.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,12 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubAffiliationsSerializer : public GenericPayloadSerializer<PubSubAffiliations> {
public:
PubSubAffiliationsSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubAffiliationsSerializer();
-
- virtual std::string serializePayload(std::shared_ptr<PubSubAffiliations>) const SWIFTEN_OVERRIDE;
-
- private:
+ virtual ~PubSubAffiliationsSerializer() override;
+ virtual std::string serializePayload(std::shared_ptr<PubSubAffiliations>) const override;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.h
index 6a6241c..ead5c4f 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubConfigure.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubConfigureSerializer : public GenericPayloadSerializer<PubSubConfigure> {
public:
PubSubConfigureSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubConfigureSerializer();
+ virtual ~PubSubConfigureSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubConfigure>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubConfigure>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubCreateSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubCreateSerializer.h
index 876e26f..0aa32af 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubCreateSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubCreateSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubCreate.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubCreateSerializer : public GenericPayloadSerializer<PubSubCreate> {
public:
PubSubCreateSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubCreateSerializer();
+ virtual ~PubSubCreateSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubCreate>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubCreate>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.h
index 4f5031b..42419e3 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubDefault.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,9 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubDefaultSerializer : public GenericPayloadSerializer<PubSubDefault> {
public:
PubSubDefaultSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubDefaultSerializer();
+ virtual ~PubSubDefaultSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubDefault>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubDefault>) const override;
private:
static std::string serializeType(PubSubDefault::Type);
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.h
index d3d1227..0f075fe 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.h
@@ -7,7 +7,6 @@
#pragma once
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubError.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -15,9 +14,9 @@ namespace Swift {
class SWIFTEN_API PubSubErrorSerializer : public GenericPayloadSerializer<PubSubError> {
public:
PubSubErrorSerializer();
- virtual ~PubSubErrorSerializer();
+ virtual ~PubSubErrorSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubError>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubError>) const override;
private:
static std::string serializeType(PubSubError::Type);
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.h
index 9348549..766ad93 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventAssociate.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubEventAssociateSerializer : public GenericPayloadSerializer<PubSubEventAssociate> {
public:
PubSubEventAssociateSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubEventAssociateSerializer();
+ virtual ~PubSubEventAssociateSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubEventAssociate>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventAssociate>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.h
index 33144e9..749abdd 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventCollection.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,12 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubEventCollectionSerializer : public GenericPayloadSerializer<PubSubEventCollection> {
public:
PubSubEventCollectionSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubEventCollectionSerializer();
-
- virtual std::string serializePayload(std::shared_ptr<PubSubEventCollection>) const SWIFTEN_OVERRIDE;
-
- private:
+ virtual ~PubSubEventCollectionSerializer() override;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventCollection>) const override;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.h
index a1e565c..3902840 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventConfiguration.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubEventConfigurationSerializer : public GenericPayloadSerializer<PubSubEventConfiguration> {
public:
PubSubEventConfigurationSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubEventConfigurationSerializer();
+ virtual ~PubSubEventConfigurationSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubEventConfiguration>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventConfiguration>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.h
index e02d44c..94f7441 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventDelete.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,12 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubEventDeleteSerializer : public GenericPayloadSerializer<PubSubEventDelete> {
public:
PubSubEventDeleteSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubEventDeleteSerializer();
-
- virtual std::string serializePayload(std::shared_ptr<PubSubEventDelete>) const SWIFTEN_OVERRIDE;
-
- private:
+ virtual ~PubSubEventDeleteSerializer() override;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventDelete>) const override;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.h
index 0d2d426..8f9fd00 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventDisassociate.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubEventDisassociateSerializer : public GenericPayloadSerializer<PubSubEventDisassociate> {
public:
PubSubEventDisassociateSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubEventDisassociateSerializer();
+ virtual ~PubSubEventDisassociateSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubEventDisassociate>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventDisassociate>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.h
index f292a53..5bb2b83 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventItem.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,12 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubEventItemSerializer : public GenericPayloadSerializer<PubSubEventItem> {
public:
PubSubEventItemSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubEventItemSerializer();
-
- virtual std::string serializePayload(std::shared_ptr<PubSubEventItem>) const SWIFTEN_OVERRIDE;
-
- private:
+ virtual ~PubSubEventItemSerializer() override;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventItem>) const override;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.h
index 7220fde..83d3d95 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventItems.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,12 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubEventItemsSerializer : public GenericPayloadSerializer<PubSubEventItems> {
public:
PubSubEventItemsSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubEventItemsSerializer();
-
- virtual std::string serializePayload(std::shared_ptr<PubSubEventItems>) const SWIFTEN_OVERRIDE;
-
- private:
+ virtual ~PubSubEventItemsSerializer() override;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventItems>) const override;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventPurgeSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventPurgeSerializer.h
index 161a733..533841f 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventPurgeSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventPurgeSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventPurge.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubEventPurgeSerializer : public GenericPayloadSerializer<PubSubEventPurge> {
public:
PubSubEventPurgeSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubEventPurgeSerializer();
+ virtual ~PubSubEventPurgeSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubEventPurge>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventPurge>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.h
index 1720847..391d93e 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventRedirect.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubEventRedirectSerializer : public GenericPayloadSerializer<PubSubEventRedirect> {
public:
PubSubEventRedirectSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubEventRedirectSerializer();
+ virtual ~PubSubEventRedirectSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubEventRedirect>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventRedirect>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventRetractSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventRetractSerializer.h
index ff2f7e7..5a70fdd 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventRetractSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventRetractSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventRetract.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubEventRetractSerializer : public GenericPayloadSerializer<PubSubEventRetract> {
public:
PubSubEventRetractSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubEventRetractSerializer();
+ virtual ~PubSubEventRetractSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubEventRetract>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventRetract>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.h
index bebb101..f16a749 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -10,7 +10,6 @@
#include <vector>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEvent.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -20,9 +19,9 @@ namespace Swift {
class SWIFTEN_API PubSubEventSerializer : public GenericPayloadSerializer<PubSubEvent> {
public:
PubSubEventSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubEventSerializer();
+ virtual ~PubSubEventSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubEvent>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEvent>) const override;
private:
std::vector< std::shared_ptr<PayloadSerializer> > pubsubSerializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventSubscriptionSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventSubscriptionSerializer.h
index 7d85ba1..80830ac 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventSubscriptionSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventSubscriptionSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventSubscription.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,9 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubEventSubscriptionSerializer : public GenericPayloadSerializer<PubSubEventSubscription> {
public:
PubSubEventSubscriptionSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubEventSubscriptionSerializer();
+ virtual ~PubSubEventSubscriptionSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubEventSubscription>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventSubscription>) const override;
private:
static std::string serializeSubscriptionType(PubSubEventSubscription::SubscriptionType);
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.h
index 866d09b..54a8ead 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubItem.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,12 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubItemSerializer : public GenericPayloadSerializer<PubSubItem> {
public:
PubSubItemSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubItemSerializer();
-
- virtual std::string serializePayload(std::shared_ptr<PubSubItem>) const SWIFTEN_OVERRIDE;
-
- private:
+ virtual ~PubSubItemSerializer() override;
+ virtual std::string serializePayload(std::shared_ptr<PubSubItem>) const override;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.h
index 51b0578..416c47e 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubItems.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,12 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubItemsSerializer : public GenericPayloadSerializer<PubSubItems> {
public:
PubSubItemsSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubItemsSerializer();
-
- virtual std::string serializePayload(std::shared_ptr<PubSubItems>) const SWIFTEN_OVERRIDE;
-
- private:
+ virtual ~PubSubItemsSerializer() override;
+ virtual std::string serializePayload(std::shared_ptr<PubSubItems>) const override;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.h
index 0b7a9a7..6f30756 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOptions.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubOptionsSerializer : public GenericPayloadSerializer<PubSubOptions> {
public:
PubSubOptionsSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubOptionsSerializer();
+ virtual ~PubSubOptionsSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubOptions>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOptions>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationSerializer.h
index ac6379a..ae97086 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerAffiliation.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,9 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubOwnerAffiliationSerializer : public GenericPayloadSerializer<PubSubOwnerAffiliation> {
public:
PubSubOwnerAffiliationSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubOwnerAffiliationSerializer();
+ virtual ~PubSubOwnerAffiliationSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubOwnerAffiliation>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerAffiliation>) const override;
private:
static std::string serializeType(PubSubOwnerAffiliation::Type);
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.h
index 6c53189..ed244ff 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerAffiliations.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,12 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubOwnerAffiliationsSerializer : public GenericPayloadSerializer<PubSubOwnerAffiliations> {
public:
PubSubOwnerAffiliationsSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubOwnerAffiliationsSerializer();
-
- virtual std::string serializePayload(std::shared_ptr<PubSubOwnerAffiliations>) const SWIFTEN_OVERRIDE;
-
- private:
+ virtual ~PubSubOwnerAffiliationsSerializer() override;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerAffiliations>) const override;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.h
index 528f29e..4512eda 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerConfigure.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubOwnerConfigureSerializer : public GenericPayloadSerializer<PubSubOwnerConfigure> {
public:
PubSubOwnerConfigureSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubOwnerConfigureSerializer();
+ virtual ~PubSubOwnerConfigureSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubOwnerConfigure>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerConfigure>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.h
index e41900c..c19b250 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerDefault.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubOwnerDefaultSerializer : public GenericPayloadSerializer<PubSubOwnerDefault> {
public:
PubSubOwnerDefaultSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubOwnerDefaultSerializer();
+ virtual ~PubSubOwnerDefaultSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubOwnerDefault>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerDefault>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.h
index c06a916..7a0cecc 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerDelete.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,12 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubOwnerDeleteSerializer : public GenericPayloadSerializer<PubSubOwnerDelete> {
public:
PubSubOwnerDeleteSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubOwnerDeleteSerializer();
-
- virtual std::string serializePayload(std::shared_ptr<PubSubOwnerDelete>) const SWIFTEN_OVERRIDE;
-
- private:
+ virtual ~PubSubOwnerDeleteSerializer() override;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerDelete>) const override;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.h
index b179c82..13889b6 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -10,7 +10,6 @@
#include <vector>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerPubSub.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -20,9 +19,9 @@ namespace Swift {
class SWIFTEN_API PubSubOwnerPubSubSerializer : public GenericPayloadSerializer<PubSubOwnerPubSub> {
public:
PubSubOwnerPubSubSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubOwnerPubSubSerializer();
+ virtual ~PubSubOwnerPubSubSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubOwnerPubSub>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerPubSub>) const override;
private:
std::vector< std::shared_ptr<PayloadSerializer> > pubsubSerializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerPurgeSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerPurgeSerializer.h
index 32f6523..d361928 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerPurgeSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerPurgeSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerPurge.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubOwnerPurgeSerializer : public GenericPayloadSerializer<PubSubOwnerPurge> {
public:
PubSubOwnerPurgeSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubOwnerPurgeSerializer();
+ virtual ~PubSubOwnerPurgeSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubOwnerPurge>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerPurge>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.h
index cd78fc8..c35b3ea 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerRedirect.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubOwnerRedirectSerializer : public GenericPayloadSerializer<PubSubOwnerRedirect> {
public:
PubSubOwnerRedirectSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubOwnerRedirectSerializer();
+ virtual ~PubSubOwnerRedirectSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubOwnerRedirect>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerRedirect>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionSerializer.h
index 9f9e80d..52089b7 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerSubscription.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,9 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubOwnerSubscriptionSerializer : public GenericPayloadSerializer<PubSubOwnerSubscription> {
public:
PubSubOwnerSubscriptionSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubOwnerSubscriptionSerializer();
+ virtual ~PubSubOwnerSubscriptionSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubOwnerSubscription>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerSubscription>) const override;
private:
static std::string serializeSubscriptionType(PubSubOwnerSubscription::SubscriptionType);
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.h
index 0c282b4..42956cf 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerSubscriptions.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,12 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubOwnerSubscriptionsSerializer : public GenericPayloadSerializer<PubSubOwnerSubscriptions> {
public:
PubSubOwnerSubscriptionsSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubOwnerSubscriptionsSerializer();
-
- virtual std::string serializePayload(std::shared_ptr<PubSubOwnerSubscriptions>) const SWIFTEN_OVERRIDE;
-
- private:
+ virtual ~PubSubOwnerSubscriptionsSerializer() override;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerSubscriptions>) const override;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.h
index fb1af2e..5eeb8bf 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubPublish.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,12 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubPublishSerializer : public GenericPayloadSerializer<PubSubPublish> {
public:
PubSubPublishSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubPublishSerializer();
-
- virtual std::string serializePayload(std::shared_ptr<PubSubPublish>) const SWIFTEN_OVERRIDE;
-
- private:
+ virtual ~PubSubPublishSerializer() override;
+ virtual std::string serializePayload(std::shared_ptr<PubSubPublish>) const override;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.h
index 64737df..23b6b59 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubRetract.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,9 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubRetractSerializer : public GenericPayloadSerializer<PubSubRetract> {
public:
PubSubRetractSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubRetractSerializer();
+ virtual ~PubSubRetractSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubRetract>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubRetract>) const override;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubSerializer.h
index 829f827..fb14c29 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSub.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,9 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubSerializer : public GenericPayloadSerializer<PubSub> {
public:
PubSubSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubSerializer();
+ virtual ~PubSubSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSub>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSub>) const override;
private:
std::vector< std::shared_ptr<PayloadSerializer> > pubsubSerializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.h
index fba02fe..028a437 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubSubscribeOptions.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubSubscribeOptionsSerializer : public GenericPayloadSerializer<PubSubSubscribeOptions> {
public:
PubSubSubscribeOptionsSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubSubscribeOptionsSerializer();
+ virtual ~PubSubSubscribeOptionsSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubSubscribeOptions>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubSubscribeOptions>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubSubscribeSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubSubscribeSerializer.h
index b48e849..1c0070b 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubSubscribeSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubSubscribeSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubSubscribe.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubSubscribeSerializer : public GenericPayloadSerializer<PubSubSubscribe> {
public:
PubSubSubscribeSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubSubscribeSerializer();
+ virtual ~PubSubSubscribeSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubSubscribe>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubSubscribe>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.h
index 5a5f847..b849269 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubSubscription.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,9 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubSubscriptionSerializer : public GenericPayloadSerializer<PubSubSubscription> {
public:
PubSubSubscriptionSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubSubscriptionSerializer();
+ virtual ~PubSubSubscriptionSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubSubscription>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubSubscription>) const override;
private:
static std::string serializeSubscriptionType(PubSubSubscription::SubscriptionType);
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.h
index caeb3ef..1430cdf 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubSubscriptions.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,12 +18,9 @@ namespace Swift {
class SWIFTEN_API PubSubSubscriptionsSerializer : public GenericPayloadSerializer<PubSubSubscriptions> {
public:
PubSubSubscriptionsSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubSubscriptionsSerializer();
-
- virtual std::string serializePayload(std::shared_ptr<PubSubSubscriptions>) const SWIFTEN_OVERRIDE;
-
- private:
+ virtual ~PubSubSubscriptionsSerializer() override;
+ virtual std::string serializePayload(std::shared_ptr<PubSubSubscriptions>) const override;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.h
index 959bd9f..002d337 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubUnsubscribe.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API PubSubUnsubscribeSerializer : public GenericPayloadSerializer<PubSubUnsubscribe> {
public:
PubSubUnsubscribeSerializer(PayloadSerializerCollection* serializers);
- virtual ~PubSubUnsubscribeSerializer();
+ virtual ~PubSubUnsubscribeSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<PubSubUnsubscribe>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubUnsubscribe>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/ResultSetSerializer.h b/Swiften/Serializer/PayloadSerializers/ResultSetSerializer.h
index 6a1429a..6f850eb 100644
--- a/Swiften/Serializer/PayloadSerializers/ResultSetSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/ResultSetSerializer.h
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/ResultSet.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -17,8 +16,8 @@ namespace Swift {
class SWIFTEN_API ResultSetSerializer : public GenericPayloadSerializer<ResultSet> {
public:
ResultSetSerializer();
- virtual ~ResultSetSerializer();
+ virtual ~ResultSetSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<ResultSet>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<ResultSet>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXCreateSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXCreateSerializerTest.cpp
index 78424be..80210a5 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXCreateSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXCreateSerializerTest.cpp
@@ -14,7 +14,7 @@ TEST(MIXCreateSerializerTest, XEP0369_Example31) {
MIXCreateSerializer testling;
auto create = std::make_shared<MIXCreate>();
- std::string expectedResult = "<create xmlns=\"urn:xmpp:mix:1\"/>";
+ std::string expectedResult = "<create xmlns=\"urn:xmpp:mix:0\"/>";
ASSERT_EQ(expectedResult, testling.serialize(create));
}
@@ -24,6 +24,6 @@ TEST(MIXCreateSerializerTest, XEP0369_Example66) {
auto create = std::make_shared<MIXCreate>();
create->setChannel(std::string("coven"));
- std::string expectedResult = "<create channel=\"coven\" xmlns=\"urn:xmpp:mix:1\"/>";
+ std::string expectedResult = "<create channel=\"coven\" xmlns=\"urn:xmpp:mix:0\"/>";
ASSERT_EQ(expectedResult, testling.serialize(create));
}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXDestroySerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXDestroySerializerTest.cpp
index e9cfa8b..5b21873 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXDestroySerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXDestroySerializerTest.cpp
@@ -16,6 +16,6 @@ TEST(MIXDestroySerializerTest, XEP0369_Example31) {
auto destroy = std::make_shared<MIXDestroy>();
destroy->setChannel(std::string("coven"));
- std::string expectedResult = "<destroy channel=\"coven\" xmlns=\"urn:xmpp:mix:1\"/>";
+ std::string expectedResult = "<destroy channel=\"coven\" xmlns=\"urn:xmpp:mix:0\"/>";
ASSERT_EQ(expectedResult, testling.serialize(destroy));
}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXJoinSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXJoinSerializerTest.cpp
index 61d8a4a..2987a20 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXJoinSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXJoinSerializerTest.cpp
@@ -16,24 +16,16 @@ TEST(MIXJoinSerializerTest, XEP0369_Example22) {
auto join = std::make_shared<MIXJoin>();
join->setChannel(JID("coven@mix.shakespeare.example"));
- std::shared_ptr<MIXSubscribe> node1(new MIXSubscribe());
- node1->setNode(std::string("urn:xmpp:mix:nodes:messages"));
- join->addSubscription(node1);
- std::shared_ptr<MIXSubscribe> node2(new MIXSubscribe());
- node2->setNode(std::string("urn:xmpp:mix:nodes:presence"));
- join->addSubscription(node2);
- std::shared_ptr<MIXSubscribe> node3(new MIXSubscribe());
- node3->setNode(std::string("urn:xmpp:mix:nodes:participants"));
- join->addSubscription(node3);
- std::shared_ptr<MIXSubscribe> node4(new MIXSubscribe());
- node4->setNode(std::string("urn:xmpp:mix:nodes:config"));
- join->addSubscription(node4);
-
- std::string expectedResult = "<join channel=\"coven@mix.shakespeare.example\" xmlns=\"urn:xmpp:mix:1\">"
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:messages"));
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:presence"));
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:participants"));
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:config"));
+
+ std::string expectedResult = "<join channel=\"coven@mix.shakespeare.example\" xmlns=\"urn:xmpp:mix:0\">"
+ "<subscribe node=\"urn:xmpp:mix:nodes:config\"/>"
"<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>"
- "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>"
"<subscribe node=\"urn:xmpp:mix:nodes:participants\"/>"
- "<subscribe node=\"urn:xmpp:mix:nodes:config\"/>"
+ "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>"
"</join>";
ASSERT_EQ(expectedResult, testling.serialize(join));
}
@@ -43,24 +35,16 @@ TEST(MIXJoinSerializerTest, XEP0369_Example23) {
std::shared_ptr<MIXJoin> join(new MIXJoin());
- std::shared_ptr<MIXSubscribe> node1(new MIXSubscribe());
- node1->setNode(std::string("urn:xmpp:mix:nodes:messages"));
- join->addSubscription(node1);
- std::shared_ptr<MIXSubscribe> node2(new MIXSubscribe());
- node2->setNode(std::string("urn:xmpp:mix:nodes:presence"));
- join->addSubscription(node2);
- std::shared_ptr<MIXSubscribe> node3(new MIXSubscribe());
- node3->setNode(std::string("urn:xmpp:mix:nodes:participants"));
- join->addSubscription(node3);
- std::shared_ptr<MIXSubscribe> node4(new MIXSubscribe());
- node4->setNode(std::string("urn:xmpp:mix:nodes:config"));
- join->addSubscription(node4);
-
- std::string expectedResult = "<join xmlns=\"urn:xmpp:mix:1\">"
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:messages"));
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:presence"));
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:participants"));
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:config"));
+
+ std::string expectedResult = "<join xmlns=\"urn:xmpp:mix:0\">"
+ "<subscribe node=\"urn:xmpp:mix:nodes:config\"/>"
"<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>"
- "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>"
"<subscribe node=\"urn:xmpp:mix:nodes:participants\"/>"
- "<subscribe node=\"urn:xmpp:mix:nodes:config\"/>"
+ "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>"
"</join>";
ASSERT_EQ(expectedResult, testling.serialize(join));
}
@@ -71,24 +55,16 @@ TEST(MIXJoinSerializerTest, XEP0369_Example24) {
std::shared_ptr<MIXJoin> join(new MIXJoin());
join->setJID(JID("123456#coven@mix.shakespeare.example"));
- std::shared_ptr<MIXSubscribe> node1(new MIXSubscribe());
- node1->setNode(std::string("urn:xmpp:mix:nodes:messages"));
- join->addSubscription(node1);
- std::shared_ptr<MIXSubscribe> node2(new MIXSubscribe());
- node2->setNode(std::string("urn:xmpp:mix:nodes:presence"));
- join->addSubscription(node2);
- std::shared_ptr<MIXSubscribe> node3(new MIXSubscribe());
- node3->setNode(std::string("urn:xmpp:mix:nodes:participants"));
- join->addSubscription(node3);
- std::shared_ptr<MIXSubscribe> node4(new MIXSubscribe());
- node4->setNode(std::string("urn:xmpp:mix:nodes:config"));
- join->addSubscription(node4);
-
- std::string expectedResult = "<join jid=\"123456#coven@mix.shakespeare.example\" xmlns=\"urn:xmpp:mix:1\">"
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:messages"));
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:presence"));
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:participants"));
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:config"));
+
+ std::string expectedResult = "<join jid=\"123456#coven@mix.shakespeare.example\" xmlns=\"urn:xmpp:mix:0\">"
+ "<subscribe node=\"urn:xmpp:mix:nodes:config\"/>"
"<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>"
- "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>"
"<subscribe node=\"urn:xmpp:mix:nodes:participants\"/>"
- "<subscribe node=\"urn:xmpp:mix:nodes:config\"/>"
+ "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>"
"</join>";
ASSERT_EQ(expectedResult, testling.serialize(join));
}
@@ -98,19 +74,15 @@ TEST(MIXJoinSerializerTest, XEP0369_Example29) {
std::shared_ptr<MIXJoin> join(new MIXJoin());
- std::shared_ptr<MIXSubscribe> node1(new MIXSubscribe());
- node1->setNode(std::string("urn:xmpp:mix:nodes:messages"));
- join->addSubscription(node1);
- std::shared_ptr<MIXSubscribe> node2(new MIXSubscribe());
- node2->setNode(std::string("urn:xmpp:mix:nodes:presence"));
- join->addSubscription(node2);
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:messages"));
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:presence"));
std::shared_ptr<Form> parameters(std::make_shared<Form>());
parameters->setType(Form::Type::SubmitType);
std::shared_ptr<FormField> fieldType = std::make_shared<FormField>(FormField::HiddenType);
fieldType->setName("FORM_TYPE");
- fieldType->addValue("urn:xmpp:mix:1");
+ fieldType->addValue("urn:xmpp:mix:0");
parameters->addField(fieldType);
std::shared_ptr<FormField> fieldJIDVisibility = std::make_shared<FormField>();
@@ -120,12 +92,12 @@ TEST(MIXJoinSerializerTest, XEP0369_Example29) {
join->setForm(parameters);
- std::string expectedResult = "<join xmlns=\"urn:xmpp:mix:1\">"
+ std::string expectedResult = "<join xmlns=\"urn:xmpp:mix:0\">"
"<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>"
"<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>"
"<x type=\"submit\" xmlns=\"jabber:x:data\">"
"<field type=\"hidden\" var=\"FORM_TYPE\">"
- "<value>urn:xmpp:mix:1</value>"
+ "<value>urn:xmpp:mix:0</value>"
"</field>"
"<field var=\"JID Visibility\">"
"<value>never</value>"
@@ -141,19 +113,15 @@ TEST(MIXJoinSerializerTest, XEP0369_Example30) {
std::shared_ptr<MIXJoin> join(new MIXJoin());
join->setJID(JID("hag66@shakespeare.example"));
- std::shared_ptr<MIXSubscribe> node1(new MIXSubscribe());
- node1->setNode(std::string("urn:xmpp:mix:nodes:messages"));
- join->addSubscription(node1);
- std::shared_ptr<MIXSubscribe> node2(new MIXSubscribe());
- node2->setNode(std::string("urn:xmpp:mix:nodes:presence"));
- join->addSubscription(node2);
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:messages"));
+ join->addSubscription(std::string("urn:xmpp:mix:nodes:presence"));
std::shared_ptr<Form> parameters(std::make_shared<Form>());
parameters->setType(Form::Type::ResultType);
std::shared_ptr<FormField> fieldType = std::make_shared<FormField>(FormField::HiddenType);
fieldType->setName("FORM_TYPE");
- fieldType->addValue("urn:xmpp:mix:1");
+ fieldType->addValue("urn:xmpp:mix:0");
parameters->addField(fieldType);
std::shared_ptr<FormField> fieldJIDVisibility = std::make_shared<FormField>();
@@ -173,12 +141,12 @@ TEST(MIXJoinSerializerTest, XEP0369_Example30) {
join->setForm(parameters);
- std::string expectedResult = "<join jid=\"hag66@shakespeare.example\" xmlns=\"urn:xmpp:mix:1\">"
+ std::string expectedResult = "<join jid=\"hag66@shakespeare.example\" xmlns=\"urn:xmpp:mix:0\">"
"<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>"
"<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>"
"<x type=\"result\" xmlns=\"jabber:x:data\">"
"<field type=\"hidden\" var=\"FORM_TYPE\">"
- "<value>urn:xmpp:mix:1</value>"
+ "<value>urn:xmpp:mix:0</value>"
"</field>"
"<field var=\"JID Visibility\">"
"<value>never</value>"
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXLeaveSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXLeaveSerializerTest.cpp
new file mode 100644
index 0000000..d9537a8
--- /dev/null
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXLeaveSerializerTest.cpp
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017 Tarun Gupta
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#include <gtest/gtest.h>
+
+#include <Swiften/Serializer/PayloadSerializers/MIXLeaveSerializer.h>
+
+using namespace Swift;
+
+TEST(MIXLeaveSerializerTest, XEP0369_Example33) {
+ MIXLeaveSerializer testling;
+
+ auto leave = std::shared_ptr<MIXLeave>(new MIXLeave());
+ leave->setChannel(JID("coven@mix.shakespeare.example"));
+
+ std::string expectedResult = "<leave channel=\"coven@mix.shakespeare.example\" xmlns=\"urn:xmpp:mix:0\"/>";
+ ASSERT_EQ(expectedResult, testling.serialize(leave));
+}
+
+TEST(MIXLeaveSerializerTest, XEP0369_Example34) {
+ MIXLeaveSerializer testling;
+
+ auto leave = std::shared_ptr<MIXLeave>(new MIXLeave());
+
+ std::string expectedResult = "<leave xmlns=\"urn:xmpp:mix:0\"/>";
+ ASSERT_EQ(expectedResult, testling.serialize(leave));
+}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXPayloadSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXPayloadSerializerTest.cpp
new file mode 100644
index 0000000..266b066
--- /dev/null
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXPayloadSerializerTest.cpp
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2017 Tarun Gupta
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#include <gtest/gtest.h>
+
+#include <Swiften/Serializer/PayloadSerializers/MIXPayloadSerializer.h>
+#include <Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h>
+
+using namespace Swift;
+
+TEST(MIXPayloadSerializerTest, testSerializeEmpty) {
+ MIXPayloadSerializer testling;
+
+ auto mix = std::shared_ptr<MIXPayload>(new MIXPayload());
+
+ std::string expectedResult = "<mix xmlns=\"urn:xmpp:mix:0\"/>";
+ ASSERT_EQ(expectedResult, testling.serialize(mix));
+}
+
+TEST(MIXPayloadSerializerTest, testSerializeNick) {
+ MIXPayloadSerializer testling;
+
+ auto mix = std::shared_ptr<MIXPayload>(new MIXPayload());
+ mix->setNick("thirdwitch");
+
+ std::string expectedResult = "<mix xmlns=\"urn:xmpp:mix:0\">"
+ "<nick>thirdwitch</nick>"
+ "</mix>";
+ ASSERT_EQ(expectedResult, testling.serialize(mix));
+}
+
+TEST(MIXPayloadSerializerTest, testSerializeJID) {
+ MIXPayloadSerializer testling;
+
+ auto mix = std::shared_ptr<MIXPayload>(new MIXPayload());
+ mix->setJID(JID("hecate@mix.shakespeare.example"));
+
+ std::string expectedResult = "<mix xmlns=\"urn:xmpp:mix:0\">"
+ "<jid>hecate@mix.shakespeare.example</jid>"
+ "</mix>";
+ ASSERT_EQ(expectedResult, testling.serialize(mix));
+}
+
+TEST(MIXPayloadSerializerTest, testSerializeAll) {
+ MIXPayloadSerializer testling;
+
+ auto mix = std::shared_ptr<MIXPayload>(new MIXPayload());
+ mix->setNick("thirdwitch");
+ mix->setJID(JID("hecate@mix.shakespeare.example"));
+ mix->setSubmissionID("92vax143g");
+
+ std::string expectedResult = "<mix xmlns=\"urn:xmpp:mix:0\">"
+ "<nick>thirdwitch</nick>"
+ "<jid>hecate@mix.shakespeare.example</jid>"
+ "<submission-id>92vax143g</submission-id>"
+ "</mix>";
+ ASSERT_EQ(expectedResult, testling.serialize(mix));
+}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXRegisterNickSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXRegisterNickSerializerTest.cpp
new file mode 100644
index 0000000..dc6cf0c
--- /dev/null
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXRegisterNickSerializerTest.cpp
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2017 Tarun Gupta
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#include <gtest/gtest.h>
+
+#include <Swiften/Serializer/PayloadSerializers/MIXRegisterNickSerializer.h>
+#include <Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h>
+
+using namespace Swift;
+
+TEST(MIXRegisterNickSerializerTest, testSerializeNick) {
+ MIXRegisterNickSerializer testling;
+
+ auto mix = std::shared_ptr<MIXRegisterNick>(new MIXRegisterNick());
+ mix->setNick(std::string("thirdwitch"));
+
+ std::string expectedResult = "<register xmlns=\"urn:xmpp:mix:0\"><nick>thirdwitch</nick></register>";
+ ASSERT_EQ(expectedResult, testling.serialize(mix));
+}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXSetNickSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXSetNickSerializerTest.cpp
new file mode 100644
index 0000000..ab29bc5
--- /dev/null
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXSetNickSerializerTest.cpp
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2017 Tarun Gupta
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#include <gtest/gtest.h>
+
+#include <Swiften/Serializer/PayloadSerializers/MIXSetNickSerializer.h>
+#include <Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h>
+
+using namespace Swift;
+
+TEST(MIXSetNickSerializerTest, testSerializeNick) {
+ MIXSetNickSerializer testling;
+
+ auto mix = std::shared_ptr<MIXSetNick>(new MIXSetNick());
+ mix->setNick(std::string("thirdwitch"));
+
+ std::string expectedResult = "<setnick xmlns=\"urn:xmpp:mix:0\"><nick>thirdwitch</nick></setnick>";
+ ASSERT_EQ(expectedResult, testling.serialize(mix));
+}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXUpdateSubscriptionSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXUpdateSubscriptionSerializerTest.cpp
new file mode 100644
index 0000000..3e35a82
--- /dev/null
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXUpdateSubscriptionSerializerTest.cpp
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2017 Tarun Gupta
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#include <gtest/gtest.h>
+
+#include <Swiften/Serializer/PayloadSerializers/MIXUpdateSubscriptionSerializer.h>
+
+using namespace Swift;
+
+TEST(MIXUpdateSubscriptionSerializerTest, XEP0369_Example28) {
+ MIXUpdateSubscriptionSerializer testling;
+
+ auto update = std::make_shared<MIXUpdateSubscription>();
+ update->addSubscription(std::string("urn:xmpp:mix:nodes:messages"));
+
+ std::string expectedResult = "<update-subscription xmlns=\"urn:xmpp:mix:0\">"
+ "<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>"
+ "</update-subscription>";
+ ASSERT_EQ(expectedResult, testling.serialize(update));
+}
+
+TEST(MIXUpdateSubscriptionSerializerTest, XEP0369_Example28WithJID) {
+ MIXUpdateSubscriptionSerializer testling;
+
+ auto update = std::make_shared<MIXUpdateSubscription>();
+ update->setJID(JID("hag66@shakespeare.example"));
+ update->addSubscription(std::string("urn:xmpp:mix:nodes:messages"));
+
+ std::string expectedResult = "<update-subscription jid=\"hag66@shakespeare.example\" xmlns=\"urn:xmpp:mix:0\">"
+ "<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>"
+ "</update-subscription>";
+ ASSERT_EQ(expectedResult, testling.serialize(update));
+}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXUserPreferenceSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXUserPreferenceSerializerTest.cpp
index 7cbfbfc..0226b0f 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXUserPreferenceSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXUserPreferenceSerializerTest.cpp
@@ -15,7 +15,7 @@ TEST(MIXUserPreferenceSerializerTest, XEP0369_Example31) {
MIXUserPreferenceSerializer testling;
auto userpreference = std::shared_ptr<MIXUserPreference>(new MIXUserPreference());
- std::string expectedResult = "<user-preference xmlns=\"urn:xmpp:mix:1\"/>";
+ std::string expectedResult = "<user-preference xmlns=\"urn:xmpp:mix:0\"/>";
ASSERT_EQ(expectedResult, testling.serialize(userpreference));
}
@@ -28,7 +28,7 @@ TEST(MIXUserPreferenceSerializerTest, XEP0369_Example32) {
std::shared_ptr<FormField> fieldType = std::make_shared<FormField>(FormField::HiddenType);
fieldType->setName("FORM_TYPE");
- fieldType->addValue("urn:xmpp:mix:1");
+ fieldType->addValue("urn:xmpp:mix:0");
parameters->addField(fieldType);
std::shared_ptr<FormField> fieldJIDVisibility = std::make_shared<FormField>();
@@ -48,10 +48,10 @@ TEST(MIXUserPreferenceSerializerTest, XEP0369_Example32) {
userpreference->setData(parameters);
- std::string expectedResult = "<user-preference xmlns=\"urn:xmpp:mix:1\">"
+ std::string expectedResult = "<user-preference xmlns=\"urn:xmpp:mix:0\">"
"<x type=\"result\" xmlns=\"jabber:x:data\">"
"<field type=\"hidden\" var=\"FORM_TYPE\">"
- "<value>urn:xmpp:mix:1</value>"
+ "<value>urn:xmpp:mix:0</value>"
"</field>"
"<field var=\"JID Visibility\">"
"<value>never</value>"
diff --git a/Swiften/Serializer/PayloadSerializers/UserLocationSerializer.h b/Swiften/Serializer/PayloadSerializers/UserLocationSerializer.h
index 5d38997..9c2f2db 100644
--- a/Swiften/Serializer/PayloadSerializers/UserLocationSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/UserLocationSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/UserLocation.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API UserLocationSerializer : public GenericPayloadSerializer<UserLocation> {
public:
UserLocationSerializer(PayloadSerializerCollection* serializers);
- virtual ~UserLocationSerializer();
+ virtual ~UserLocationSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<UserLocation>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<UserLocation>) const override;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/UserTuneSerializer.h b/Swiften/Serializer/PayloadSerializers/UserTuneSerializer.h
index 06e9a0e..1d5737a 100644
--- a/Swiften/Serializer/PayloadSerializers/UserTuneSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/UserTuneSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <memory>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/UserTune.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -19,8 +18,8 @@ namespace Swift {
class SWIFTEN_API UserTuneSerializer : public GenericPayloadSerializer<UserTune> {
public:
UserTuneSerializer(PayloadSerializerCollection* serializers);
- virtual ~UserTuneSerializer();
+ virtual ~UserTuneSerializer() override;
- virtual std::string serializePayload(std::shared_ptr<UserTune>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<UserTune>) const override;
};
}