diff options
Diffstat (limited to 'Swiften/Serializer')
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,4 +1,4 @@ /* - * 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,5 +16,5 @@ 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; 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,4 +1,4 @@ /* - * 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,5 +18,5 @@ namespace Swift { 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,4 +1,4 @@ /* - * 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,5 +19,5 @@ namespace Swift { } - 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,4 +1,4 @@ /* - * 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,5 +17,5 @@ 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; 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,4 +1,4 @@ /* - * 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,5 +18,5 @@ namespace Swift { 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,4 +1,4 @@ /* - * 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,5 +17,5 @@ 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; 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,4 +1,4 @@ /* - * 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,5 +18,5 @@ namespace Swift { 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,4 +1,4 @@ /* - * 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,5 +16,5 @@ 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; 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,4 +1,4 @@ /* - * 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,5 +18,5 @@ namespace Swift { 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,4 +1,4 @@ /* - * 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,5 +14,5 @@ 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,4 +1,4 @@ /* - * 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,5 +17,5 @@ namespace Swift { 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,4 +1,4 @@ /* - * 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,5 +19,5 @@ namespace Swift { } - 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,4 +1,4 @@ /* - * 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,10 +14,10 @@ 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,4 +1,4 @@ /* - * 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 { 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,4 +1,4 @@ /* - * 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. @@ -9,5 +9,5 @@ #include <boost/shared_ptr.hpp> -#include <Swiften/Elements/Element.h> +#include <Swiften/Elements/ToplevelElement.h> #include <Swiften/Base/SafeByteArray.h> @@ -17,6 +17,6 @@ namespace Swift { 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,4 +1,4 @@ /* - * 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,5 +19,5 @@ namespace Swift { } - 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 @@ -15,7 +15,7 @@ namespace Swift { 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,4 +1,4 @@ /* - * 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,10 +15,10 @@ namespace Swift { 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( 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,4 +1,4 @@ /* - * 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,5 +19,5 @@ namespace Swift { } - 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,4 +1,4 @@ /* - * 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. @@ -20,5 +20,5 @@ namespace Swift { } - 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()); 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 @@ -23,9 +23,9 @@ StanzaSerializer::StanzaSerializer(const std::string& tag, PayloadSerializerColl } -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)); 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 @@ -19,7 +19,7 @@ namespace Swift { 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: 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,4 +1,4 @@ /* - * 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,5 +19,5 @@ namespace Swift { } - 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,4 +1,4 @@ /* - * 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,5 +19,5 @@ namespace Swift { } - 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,4 +1,4 @@ /* - * 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,5 +16,5 @@ StreamErrorSerializer::StreamErrorSerializer() : GenericElementSerializer<Stream } -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,4 +1,4 @@ /* - * 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,5 +15,5 @@ namespace Swift { 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,4 +1,4 @@ /* - * 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,5 +18,5 @@ 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)); 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,4 +1,4 @@ /* - * 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,5 +18,5 @@ namespace Swift { 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,4 +1,4 @@ /* - * 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,5 +17,5 @@ StreamManagementEnabledSerializer::StreamManagementEnabledSerializer() : Generic } -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"); 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,4 +1,4 @@ /* - * 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,5 +17,5 @@ namespace Swift { 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,4 +1,4 @@ /* - * 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,5 +19,5 @@ namespace Swift { } - 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,4 +1,4 @@ /* - * 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. @@ -18,5 +18,5 @@ StreamResumeSerializer::StreamResumeSerializer() : GenericElementSerializer<Stre } -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"); 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,4 +1,4 @@ /* - * 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,5 +17,5 @@ namespace Swift { 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,4 +1,4 @@ /* - * 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. @@ -18,5 +18,5 @@ StreamResumedSerializer::StreamResumedSerializer() : GenericElementSerializer<St } -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"); 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,4 +1,4 @@ /* - * 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,5 +17,5 @@ namespace Swift { 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,4 +1,4 @@ /* - * 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,5 +19,5 @@ namespace Swift { } - 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,4 +1,4 @@ /* - * 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. @@ -84,5 +84,5 @@ std::string XMPPSerializer::serializeHeader(const ProtocolHeader& header) const } -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()) { 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,4 +1,4 @@ /* - * 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. @@ -11,5 +11,5 @@ #include <Swiften/Base/API.h> -#include <Swiften/Elements/Element.h> +#include <Swiften/Elements/ToplevelElement.h> #include <Swiften/Elements/StreamType.h> #include <string> @@ -26,5 +26,5 @@ namespace Swift { 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; |
Swift