summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer')
-rw-r--r--Swiften/Serializer/AuthChallengeSerializer.cpp4
-rw-r--r--Swiften/Serializer/AuthChallengeSerializer.h4
-rw-r--r--Swiften/Serializer/AuthFailureSerializer.h4
-rw-r--r--Swiften/Serializer/AuthRequestSerializer.cpp4
-rw-r--r--Swiften/Serializer/AuthRequestSerializer.h4
-rw-r--r--Swiften/Serializer/AuthResponseSerializer.cpp4
-rw-r--r--Swiften/Serializer/AuthResponseSerializer.h4
-rw-r--r--Swiften/Serializer/AuthSuccessSerializer.cpp4
-rw-r--r--Swiften/Serializer/AuthSuccessSerializer.h4
-rw-r--r--Swiften/Serializer/ComponentHandshakeSerializer.cpp4
-rw-r--r--Swiften/Serializer/ComponentHandshakeSerializer.h4
-rw-r--r--Swiften/Serializer/CompressFailureSerializer.h4
-rw-r--r--Swiften/Serializer/CompressRequestSerializer.cpp6
-rw-r--r--Swiften/Serializer/CompressRequestSerializer.h6
-rw-r--r--Swiften/Serializer/ElementSerializer.h8
-rw-r--r--Swiften/Serializer/EnableStreamManagementSerializer.h4
-rw-r--r--Swiften/Serializer/GenericElementSerializer.h4
-rw-r--r--Swiften/Serializer/GenericStanzaSerializer.h6
-rw-r--r--Swiften/Serializer/StanzaAckRequestSerializer.h4
-rw-r--r--Swiften/Serializer/StanzaAckSerializer.h4
-rw-r--r--Swiften/Serializer/StanzaSerializer.cpp4
-rw-r--r--Swiften/Serializer/StanzaSerializer.h6
-rw-r--r--Swiften/Serializer/StartTLSFailureSerializer.h4
-rw-r--r--Swiften/Serializer/StartTLSRequestSerializer.h4
-rw-r--r--Swiften/Serializer/StreamErrorSerializer.cpp4
-rw-r--r--Swiften/Serializer/StreamErrorSerializer.h4
-rw-r--r--Swiften/Serializer/StreamFeaturesSerializer.cpp4
-rw-r--r--Swiften/Serializer/StreamFeaturesSerializer.h4
-rw-r--r--Swiften/Serializer/StreamManagementEnabledSerializer.cpp4
-rw-r--r--Swiften/Serializer/StreamManagementEnabledSerializer.h4
-rw-r--r--Swiften/Serializer/StreamManagementFailedSerializer.h4
-rw-r--r--Swiften/Serializer/StreamResumeSerializer.cpp4
-rw-r--r--Swiften/Serializer/StreamResumeSerializer.h4
-rw-r--r--Swiften/Serializer/StreamResumedSerializer.cpp4
-rw-r--r--Swiften/Serializer/StreamResumedSerializer.h4
-rw-r--r--Swiften/Serializer/TLSProceedSerializer.h4
-rw-r--r--Swiften/Serializer/XMPPSerializer.cpp4
-rw-r--r--Swiften/Serializer/XMPPSerializer.h6
38 files changed, 83 insertions, 83 deletions
diff --git a/Swiften/Serializer/AuthChallengeSerializer.cpp b/Swiften/Serializer/AuthChallengeSerializer.cpp
index 1ddc165..57a79e0 100644
--- a/Swiften/Serializer/AuthChallengeSerializer.cpp
+++ b/Swiften/Serializer/AuthChallengeSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -15,7 +15,7 @@ namespace Swift {
AuthChallengeSerializer::AuthChallengeSerializer() {
}
-SafeByteArray AuthChallengeSerializer::serialize(boost::shared_ptr<Element> element) const {
+SafeByteArray AuthChallengeSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
boost::shared_ptr<AuthChallenge> authChallenge(boost::dynamic_pointer_cast<AuthChallenge>(element));
std::string value;
boost::optional<std::vector<unsigned char> > message = authChallenge->getValue();
diff --git a/Swiften/Serializer/AuthChallengeSerializer.h b/Swiften/Serializer/AuthChallengeSerializer.h
index 7d0b1b8..af77a5e 100644
--- a/Swiften/Serializer/AuthChallengeSerializer.h
+++ b/Swiften/Serializer/AuthChallengeSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -17,6 +17,6 @@ namespace Swift {
public:
AuthChallengeSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<Element> element) const;
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
};
}
diff --git a/Swiften/Serializer/AuthFailureSerializer.h b/Swiften/Serializer/AuthFailureSerializer.h
index 090f0c4..f7e48f0 100644
--- a/Swiften/Serializer/AuthFailureSerializer.h
+++ b/Swiften/Serializer/AuthFailureSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -18,7 +18,7 @@ namespace Swift {
AuthFailureSerializer() : GenericElementSerializer<AuthFailure>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<Element>) const {
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("failure", "urn:ietf:params:xml:ns:xmpp-sasl").serialize());
}
};
diff --git a/Swiften/Serializer/AuthRequestSerializer.cpp b/Swiften/Serializer/AuthRequestSerializer.cpp
index 7f25c93..5c78e48 100644
--- a/Swiften/Serializer/AuthRequestSerializer.cpp
+++ b/Swiften/Serializer/AuthRequestSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -16,7 +16,7 @@ namespace Swift {
AuthRequestSerializer::AuthRequestSerializer() {
}
-SafeByteArray AuthRequestSerializer::serialize(boost::shared_ptr<Element> element) const {
+SafeByteArray AuthRequestSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
boost::shared_ptr<AuthRequest> authRequest(boost::dynamic_pointer_cast<AuthRequest>(element));
SafeByteArray value;
boost::optional<SafeByteArray> message = authRequest->getMessage();
diff --git a/Swiften/Serializer/AuthRequestSerializer.h b/Swiften/Serializer/AuthRequestSerializer.h
index 0b49384..45c2ff8 100644
--- a/Swiften/Serializer/AuthRequestSerializer.h
+++ b/Swiften/Serializer/AuthRequestSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -17,6 +17,6 @@ namespace Swift {
public:
AuthRequestSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<Element> element) const;
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
};
}
diff --git a/Swiften/Serializer/AuthResponseSerializer.cpp b/Swiften/Serializer/AuthResponseSerializer.cpp
index 86b7fbe..c04fed0 100644
--- a/Swiften/Serializer/AuthResponseSerializer.cpp
+++ b/Swiften/Serializer/AuthResponseSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -16,7 +16,7 @@ namespace Swift {
AuthResponseSerializer::AuthResponseSerializer() {
}
-SafeByteArray AuthResponseSerializer::serialize(boost::shared_ptr<Element> element) const {
+SafeByteArray AuthResponseSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
boost::shared_ptr<AuthResponse> authResponse(boost::dynamic_pointer_cast<AuthResponse>(element));
SafeByteArray value;
boost::optional<SafeByteArray> message = authResponse->getValue();
diff --git a/Swiften/Serializer/AuthResponseSerializer.h b/Swiften/Serializer/AuthResponseSerializer.h
index af71f59..9c9ae74 100644
--- a/Swiften/Serializer/AuthResponseSerializer.h
+++ b/Swiften/Serializer/AuthResponseSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -17,6 +17,6 @@ namespace Swift {
public:
AuthResponseSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<Element> element) const;
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
};
}
diff --git a/Swiften/Serializer/AuthSuccessSerializer.cpp b/Swiften/Serializer/AuthSuccessSerializer.cpp
index 26b58c3..0f4ef6e 100644
--- a/Swiften/Serializer/AuthSuccessSerializer.cpp
+++ b/Swiften/Serializer/AuthSuccessSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -15,7 +15,7 @@ namespace Swift {
AuthSuccessSerializer::AuthSuccessSerializer() {
}
-SafeByteArray AuthSuccessSerializer::serialize(boost::shared_ptr<Element> element) const {
+SafeByteArray AuthSuccessSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
boost::shared_ptr<AuthSuccess> authSuccess(boost::dynamic_pointer_cast<AuthSuccess>(element));
std::string value;
boost::optional<std::vector<unsigned char> > message = authSuccess->getValue();
diff --git a/Swiften/Serializer/AuthSuccessSerializer.h b/Swiften/Serializer/AuthSuccessSerializer.h
index 370afaa..7aa934e 100644
--- a/Swiften/Serializer/AuthSuccessSerializer.h
+++ b/Swiften/Serializer/AuthSuccessSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -17,6 +17,6 @@ namespace Swift {
public:
AuthSuccessSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<Element> element) const;
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
};
}
diff --git a/Swiften/Serializer/ComponentHandshakeSerializer.cpp b/Swiften/Serializer/ComponentHandshakeSerializer.cpp
index e7837d3..123798c 100644
--- a/Swiften/Serializer/ComponentHandshakeSerializer.cpp
+++ b/Swiften/Serializer/ComponentHandshakeSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -13,7 +13,7 @@ namespace Swift {
ComponentHandshakeSerializer::ComponentHandshakeSerializer() {
}
-SafeByteArray ComponentHandshakeSerializer::serialize(boost::shared_ptr<Element> element) const {
+SafeByteArray ComponentHandshakeSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
boost::shared_ptr<ComponentHandshake> handshake(boost::dynamic_pointer_cast<ComponentHandshake>(element));
return createSafeByteArray("<handshake>" + handshake->getData() + "</handshake>");
}
diff --git a/Swiften/Serializer/ComponentHandshakeSerializer.h b/Swiften/Serializer/ComponentHandshakeSerializer.h
index 1145ed9..54cd7c8 100644
--- a/Swiften/Serializer/ComponentHandshakeSerializer.h
+++ b/Swiften/Serializer/ComponentHandshakeSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -16,6 +16,6 @@ namespace Swift {
public:
ComponentHandshakeSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<Element> element) const;
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
};
}
diff --git a/Swiften/Serializer/CompressFailureSerializer.h b/Swiften/Serializer/CompressFailureSerializer.h
index 27a638f..2545608 100644
--- a/Swiften/Serializer/CompressFailureSerializer.h
+++ b/Swiften/Serializer/CompressFailureSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -18,7 +18,7 @@ namespace Swift {
CompressFailureSerializer() : GenericElementSerializer<CompressFailure>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<Element>) const {
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("failure", "http://jabber.org/protocol/compress").serialize());
}
};
diff --git a/Swiften/Serializer/CompressRequestSerializer.cpp b/Swiften/Serializer/CompressRequestSerializer.cpp
index af7f7db..38f5b71 100644
--- a/Swiften/Serializer/CompressRequestSerializer.cpp
+++ b/Swiften/Serializer/CompressRequestSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -13,12 +13,12 @@ namespace Swift {
CompressRequestSerializer::CompressRequestSerializer() {
}
-SafeByteArray CompressRequestSerializer::serialize(boost::shared_ptr<Element> element) const {
+SafeByteArray CompressRequestSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
boost::shared_ptr<CompressRequest> compressRequest(boost::dynamic_pointer_cast<CompressRequest>(element));
return createSafeByteArray("<compress xmlns='http://jabber.org/protocol/compress'><method>" + compressRequest->getMethod() + "</method></compress>");
}
-bool CompressRequestSerializer::canSerialize(boost::shared_ptr<Element> element) const {
+bool CompressRequestSerializer::canSerialize(boost::shared_ptr<ToplevelElement> element) const {
return boost::dynamic_pointer_cast<CompressRequest>(element) != 0;
}
diff --git a/Swiften/Serializer/CompressRequestSerializer.h b/Swiften/Serializer/CompressRequestSerializer.h
index 4d68c98..a8610d1 100644
--- a/Swiften/Serializer/CompressRequestSerializer.h
+++ b/Swiften/Serializer/CompressRequestSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -15,7 +15,7 @@ namespace Swift {
public:
CompressRequestSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<Element> element) const;
- virtual bool canSerialize(boost::shared_ptr<Element> element) const;
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
+ virtual bool canSerialize(boost::shared_ptr<ToplevelElement> element) const;
};
}
diff --git a/Swiften/Serializer/ElementSerializer.h b/Swiften/Serializer/ElementSerializer.h
index ba59106..76c7d20 100644
--- a/Swiften/Serializer/ElementSerializer.h
+++ b/Swiften/Serializer/ElementSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -8,7 +8,7 @@
#include <boost/shared_ptr.hpp>
-#include <Swiften/Elements/Element.h>
+#include <Swiften/Elements/ToplevelElement.h>
#include <Swiften/Base/SafeByteArray.h>
namespace Swift {
@@ -16,7 +16,7 @@ namespace Swift {
public:
virtual ~ElementSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<Element> element) const = 0;
- virtual bool canSerialize(boost::shared_ptr<Element> element) const = 0;
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const = 0;
+ virtual bool canSerialize(boost::shared_ptr<ToplevelElement> element) const = 0;
};
}
diff --git a/Swiften/Serializer/EnableStreamManagementSerializer.h b/Swiften/Serializer/EnableStreamManagementSerializer.h
index 384753b..a41df81 100644
--- a/Swiften/Serializer/EnableStreamManagementSerializer.h
+++ b/Swiften/Serializer/EnableStreamManagementSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -18,7 +18,7 @@ namespace Swift {
EnableStreamManagementSerializer() : GenericElementSerializer<EnableStreamManagement>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<Element>) const {
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("enable", "urn:xmpp:sm:2").serialize());
}
};
diff --git a/Swiften/Serializer/GenericElementSerializer.h b/Swiften/Serializer/GenericElementSerializer.h
index 92f7737..620ae7b 100644
--- a/Swiften/Serializer/GenericElementSerializer.h
+++ b/Swiften/Serializer/GenericElementSerializer.h
@@ -14,9 +14,9 @@ namespace Swift {
template<typename T>
class GenericElementSerializer : public ElementSerializer {
public:
- virtual SafeByteArray serialize(boost::shared_ptr<Element> element) const = 0;
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const = 0;
- virtual bool canSerialize(boost::shared_ptr<Element> element) const {
+ virtual bool canSerialize(boost::shared_ptr<ToplevelElement> element) const {
return !!boost::dynamic_pointer_cast<T>(element);
}
};
diff --git a/Swiften/Serializer/GenericStanzaSerializer.h b/Swiften/Serializer/GenericStanzaSerializer.h
index 4129ca8..a85d3ba 100644
--- a/Swiften/Serializer/GenericStanzaSerializer.h
+++ b/Swiften/Serializer/GenericStanzaSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -14,12 +14,12 @@ namespace Swift {
public:
GenericStanzaSerializer(const std::string& tag, PayloadSerializerCollection* payloadSerializers) : StanzaSerializer(tag, payloadSerializers) {}
- virtual bool canSerialize(boost::shared_ptr<Element> element) const {
+ virtual bool canSerialize(boost::shared_ptr<ToplevelElement> element) const {
return dynamic_cast<STANZA_TYPE*>(element.get()) != 0;
}
virtual void setStanzaSpecificAttributes(
- boost::shared_ptr<Element> stanza,
+ boost::shared_ptr<ToplevelElement> stanza,
XMLElement& element) const {
setStanzaSpecificAttributesGeneric(
boost::dynamic_pointer_cast<STANZA_TYPE>(stanza), element);
diff --git a/Swiften/Serializer/StanzaAckRequestSerializer.h b/Swiften/Serializer/StanzaAckRequestSerializer.h
index fff2a83..9766308 100644
--- a/Swiften/Serializer/StanzaAckRequestSerializer.h
+++ b/Swiften/Serializer/StanzaAckRequestSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -18,7 +18,7 @@ namespace Swift {
StanzaAckRequestSerializer() : GenericElementSerializer<StanzaAckRequest>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<Element>) const {
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("r", "urn:xmpp:sm:2").serialize());
}
};
diff --git a/Swiften/Serializer/StanzaAckSerializer.h b/Swiften/Serializer/StanzaAckSerializer.h
index ea1e8ad..ad2add6 100644
--- a/Swiften/Serializer/StanzaAckSerializer.h
+++ b/Swiften/Serializer/StanzaAckSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -19,7 +19,7 @@ namespace Swift {
StanzaAckSerializer() : GenericElementSerializer<StanzaAck>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<Element> element) const {
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const {
StanzaAck::ref stanzaAck(boost::dynamic_pointer_cast<StanzaAck>(element));
assert(stanzaAck->isValid());
XMLElement result("a", "urn:xmpp:sm:2");
diff --git a/Swiften/Serializer/StanzaSerializer.cpp b/Swiften/Serializer/StanzaSerializer.cpp
index b5f0b22..358e4b8 100644
--- a/Swiften/Serializer/StanzaSerializer.cpp
+++ b/Swiften/Serializer/StanzaSerializer.cpp
@@ -22,11 +22,11 @@ namespace Swift {
StanzaSerializer::StanzaSerializer(const std::string& tag, PayloadSerializerCollection* payloadSerializers) : tag_(tag), payloadSerializers_(payloadSerializers) {
}
-SafeByteArray StanzaSerializer::serialize(boost::shared_ptr<Element> element) const {
+SafeByteArray StanzaSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
return serialize(element, "");
}
-SafeByteArray StanzaSerializer::serialize(boost::shared_ptr<Element> element, const std::string& xmlns) const {
+SafeByteArray StanzaSerializer::serialize(boost::shared_ptr<ToplevelElement> element, const std::string& xmlns) const {
boost::shared_ptr<Stanza> stanza(boost::dynamic_pointer_cast<Stanza>(element));
XMLElement stanzaElement(tag_, xmlns);
diff --git a/Swiften/Serializer/StanzaSerializer.h b/Swiften/Serializer/StanzaSerializer.h
index d569d82..6b46670 100644
--- a/Swiften/Serializer/StanzaSerializer.h
+++ b/Swiften/Serializer/StanzaSerializer.h
@@ -18,9 +18,9 @@ namespace Swift {
public:
StanzaSerializer(const std::string& tag, PayloadSerializerCollection* payloadSerializers);
- virtual SafeByteArray serialize(boost::shared_ptr<Element> element) const;
- virtual SafeByteArray serialize(boost::shared_ptr<Element> element, const std::string& xmlns) const;
- virtual void setStanzaSpecificAttributes(boost::shared_ptr<Element>, XMLElement&) const = 0;
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element, const std::string& xmlns) const;
+ virtual void setStanzaSpecificAttributes(boost::shared_ptr<ToplevelElement>, XMLElement&) const = 0;
private:
std::string tag_;
diff --git a/Swiften/Serializer/StartTLSFailureSerializer.h b/Swiften/Serializer/StartTLSFailureSerializer.h
index 779be92..f924545 100644
--- a/Swiften/Serializer/StartTLSFailureSerializer.h
+++ b/Swiften/Serializer/StartTLSFailureSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -18,7 +18,7 @@ namespace Swift {
StartTLSFailureSerializer() : GenericElementSerializer<StartTLSFailure>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<Element>) const {
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("failure", "urn:ietf:params:xml:ns:xmpp-tls").serialize());
}
};
diff --git a/Swiften/Serializer/StartTLSRequestSerializer.h b/Swiften/Serializer/StartTLSRequestSerializer.h
index df914ce..80745e3 100644
--- a/Swiften/Serializer/StartTLSRequestSerializer.h
+++ b/Swiften/Serializer/StartTLSRequestSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -18,7 +18,7 @@ namespace Swift {
StartTLSRequestSerializer() : GenericElementSerializer<StartTLSRequest>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<Element>) const {
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("starttls", "urn:ietf:params:xml:ns:xmpp-tls").serialize());
}
};
diff --git a/Swiften/Serializer/StreamErrorSerializer.cpp b/Swiften/Serializer/StreamErrorSerializer.cpp
index b3d62a0..37ac3ca 100644
--- a/Swiften/Serializer/StreamErrorSerializer.cpp
+++ b/Swiften/Serializer/StreamErrorSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -15,7 +15,7 @@ namespace Swift {
StreamErrorSerializer::StreamErrorSerializer() : GenericElementSerializer<StreamError>() {
}
-SafeByteArray StreamErrorSerializer::serialize(boost::shared_ptr<Element> element) const {
+SafeByteArray StreamErrorSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
StreamError::ref error = boost::dynamic_pointer_cast<StreamError>(element);
XMLElement errorElement("error", "http://etherx.jabber.org/streams");
diff --git a/Swiften/Serializer/StreamErrorSerializer.h b/Swiften/Serializer/StreamErrorSerializer.h
index bdaa831..d82cd02 100644
--- a/Swiften/Serializer/StreamErrorSerializer.h
+++ b/Swiften/Serializer/StreamErrorSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -14,6 +14,6 @@ namespace Swift {
public:
StreamErrorSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<Element> error) const;
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> error) const;
};
}
diff --git a/Swiften/Serializer/StreamFeaturesSerializer.cpp b/Swiften/Serializer/StreamFeaturesSerializer.cpp
index 2344349..a93247a 100644
--- a/Swiften/Serializer/StreamFeaturesSerializer.cpp
+++ b/Swiften/Serializer/StreamFeaturesSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -17,7 +17,7 @@ namespace Swift {
StreamFeaturesSerializer::StreamFeaturesSerializer() {
}
-SafeByteArray StreamFeaturesSerializer::serialize(boost::shared_ptr<Element> element) const {
+SafeByteArray StreamFeaturesSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
boost::shared_ptr<StreamFeatures> streamFeatures(boost::dynamic_pointer_cast<StreamFeatures>(element));
XMLElement streamFeaturesElement("stream:features");
diff --git a/Swiften/Serializer/StreamFeaturesSerializer.h b/Swiften/Serializer/StreamFeaturesSerializer.h
index 1bd1136..b69a218 100644
--- a/Swiften/Serializer/StreamFeaturesSerializer.h
+++ b/Swiften/Serializer/StreamFeaturesSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -17,6 +17,6 @@ namespace Swift {
public:
StreamFeaturesSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<Element> element) const;
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
};
}
diff --git a/Swiften/Serializer/StreamManagementEnabledSerializer.cpp b/Swiften/Serializer/StreamManagementEnabledSerializer.cpp
index b559721..9d4ee94 100644
--- a/Swiften/Serializer/StreamManagementEnabledSerializer.cpp
+++ b/Swiften/Serializer/StreamManagementEnabledSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -16,7 +16,7 @@ using namespace Swift;
StreamManagementEnabledSerializer::StreamManagementEnabledSerializer() : GenericElementSerializer<StreamManagementEnabled>() {
}
-SafeByteArray StreamManagementEnabledSerializer::serialize(boost::shared_ptr<Element> el) const {
+SafeByteArray StreamManagementEnabledSerializer::serialize(boost::shared_ptr<ToplevelElement> el) const {
boost::shared_ptr<StreamManagementEnabled> e(boost::dynamic_pointer_cast<StreamManagementEnabled>(el));
XMLElement element("enabled", "urn:xmpp:sm:2");
if (!e->getResumeID().empty()) {
diff --git a/Swiften/Serializer/StreamManagementEnabledSerializer.h b/Swiften/Serializer/StreamManagementEnabledSerializer.h
index 5f28a2b..ee2a980 100644
--- a/Swiften/Serializer/StreamManagementEnabledSerializer.h
+++ b/Swiften/Serializer/StreamManagementEnabledSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -16,6 +16,6 @@ namespace Swift {
public:
StreamManagementEnabledSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<Element>) const;
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const;
};
}
diff --git a/Swiften/Serializer/StreamManagementFailedSerializer.h b/Swiften/Serializer/StreamManagementFailedSerializer.h
index f3dcce0..f6e7b0e 100644
--- a/Swiften/Serializer/StreamManagementFailedSerializer.h
+++ b/Swiften/Serializer/StreamManagementFailedSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -18,7 +18,7 @@ namespace Swift {
StreamManagementFailedSerializer() : GenericElementSerializer<StreamManagementFailed>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<Element>) const {
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("failed", "urn:xmpp:sm:2").serialize());
}
};
diff --git a/Swiften/Serializer/StreamResumeSerializer.cpp b/Swiften/Serializer/StreamResumeSerializer.cpp
index e9e520d..902ab21 100644
--- a/Swiften/Serializer/StreamResumeSerializer.cpp
+++ b/Swiften/Serializer/StreamResumeSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 Remko Tronçon
+ * Copyright (c) 2011-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -17,7 +17,7 @@ using namespace Swift;
StreamResumeSerializer::StreamResumeSerializer() : GenericElementSerializer<StreamResume>() {
}
-SafeByteArray StreamResumeSerializer::serialize(boost::shared_ptr<Element> el) const {
+SafeByteArray StreamResumeSerializer::serialize(boost::shared_ptr<ToplevelElement> el) const {
boost::shared_ptr<StreamResume> e(boost::dynamic_pointer_cast<StreamResume>(el));
XMLElement element("resume", "urn:xmpp:sm:2");
element.setAttribute("previd", e->getResumeID());
diff --git a/Swiften/Serializer/StreamResumeSerializer.h b/Swiften/Serializer/StreamResumeSerializer.h
index 501d8b6..17baa44 100644
--- a/Swiften/Serializer/StreamResumeSerializer.h
+++ b/Swiften/Serializer/StreamResumeSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 Remko Tronçon
+ * Copyright (c) 2011-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -16,6 +16,6 @@ namespace Swift {
public:
StreamResumeSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<Element>) const;
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const;
};
}
diff --git a/Swiften/Serializer/StreamResumedSerializer.cpp b/Swiften/Serializer/StreamResumedSerializer.cpp
index 7ae82d1..6477af9 100644
--- a/Swiften/Serializer/StreamResumedSerializer.cpp
+++ b/Swiften/Serializer/StreamResumedSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 Remko Tronçon
+ * Copyright (c) 2011-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -17,7 +17,7 @@ using namespace Swift;
StreamResumedSerializer::StreamResumedSerializer() : GenericElementSerializer<StreamResumed>() {
}
-SafeByteArray StreamResumedSerializer::serialize(boost::shared_ptr<Element> el) const {
+SafeByteArray StreamResumedSerializer::serialize(boost::shared_ptr<ToplevelElement> el) const {
boost::shared_ptr<StreamResumed> e(boost::dynamic_pointer_cast<StreamResumed>(el));
XMLElement element("resumed", "urn:xmpp:sm:2");
element.setAttribute("previd", e->getResumeID());
diff --git a/Swiften/Serializer/StreamResumedSerializer.h b/Swiften/Serializer/StreamResumedSerializer.h
index 7828694..bdca891 100644
--- a/Swiften/Serializer/StreamResumedSerializer.h
+++ b/Swiften/Serializer/StreamResumedSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 Remko Tronçon
+ * Copyright (c) 2011-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -16,6 +16,6 @@ namespace Swift {
public:
StreamResumedSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<Element>) const;
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const;
};
}
diff --git a/Swiften/Serializer/TLSProceedSerializer.h b/Swiften/Serializer/TLSProceedSerializer.h
index 21a8420..15db3dc 100644
--- a/Swiften/Serializer/TLSProceedSerializer.h
+++ b/Swiften/Serializer/TLSProceedSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -18,7 +18,7 @@ namespace Swift {
TLSProceedSerializer() : GenericElementSerializer<TLSProceed>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<Element>) const {
+ virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("proceed", "urn:ietf:params:xml:ns:xmpp-tls").serialize());
}
};
diff --git a/Swiften/Serializer/XMPPSerializer.cpp b/Swiften/Serializer/XMPPSerializer.cpp
index 389f7cc..e3f43cd 100644
--- a/Swiften/Serializer/XMPPSerializer.cpp
+++ b/Swiften/Serializer/XMPPSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -83,7 +83,7 @@ std::string XMPPSerializer::serializeHeader(const ProtocolHeader& header) const
return result;
}
-SafeByteArray XMPPSerializer::serializeElement(boost::shared_ptr<Element> element) const {
+SafeByteArray XMPPSerializer::serializeElement(boost::shared_ptr<ToplevelElement> element) const {
std::vector< boost::shared_ptr<ElementSerializer> >::const_iterator i = std::find_if(serializers_.begin(), serializers_.end(), boost::bind(&ElementSerializer::canSerialize, _1, element));
if (i != serializers_.end()) {
return (*i)->serialize(element);
diff --git a/Swiften/Serializer/XMPPSerializer.h b/Swiften/Serializer/XMPPSerializer.h
index 5b5c9d6..cbcdccb 100644
--- a/Swiften/Serializer/XMPPSerializer.h
+++ b/Swiften/Serializer/XMPPSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -10,7 +10,7 @@
#include <vector>
#include <Swiften/Base/API.h>
-#include <Swiften/Elements/Element.h>
+#include <Swiften/Elements/ToplevelElement.h>
#include <Swiften/Elements/StreamType.h>
#include <string>
#include <Swiften/Serializer/ElementSerializer.h>
@@ -25,7 +25,7 @@ namespace Swift {
XMPPSerializer(PayloadSerializerCollection*, StreamType type);
std::string serializeHeader(const ProtocolHeader&) const;
- SafeByteArray serializeElement(boost::shared_ptr<Element> stanza) const;
+ SafeByteArray serializeElement(boost::shared_ptr<ToplevelElement> stanza) const;
std::string serializeFooter() const;
private: