diff options
Diffstat (limited to 'Swiften/Elements/Stanza.h')
-rw-r--r-- | Swiften/Elements/Stanza.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Swiften/Elements/Stanza.h b/Swiften/Elements/Stanza.h index 9e082cc..648c4df 100644 --- a/Swiften/Elements/Stanza.h +++ b/Swiften/Elements/Stanza.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. @@ -13,5 +13,6 @@ #include <boost/date_time/posix_time/ptime.hpp> -#include <Swiften/Elements/Element.h> +#include <Swiften/Base/API.h> +#include <Swiften/Elements/ToplevelElement.h> #include <Swiften/JID/JID.h> @@ -19,10 +20,14 @@ namespace Swift { class Payload; - class Stanza : public Element { + class SWIFTEN_API Stanza : public ToplevelElement { public: typedef boost::shared_ptr<Stanza> ref; + protected: Stanza(); + + public: virtual ~Stanza(); + SWIFTEN_DEFAULT_COPY_CONSTRUCTOR(Stanza) template<typename T> @@ -58,4 +63,9 @@ namespace Swift { } + template<typename InputIterator> + void addPayloads(InputIterator begin, InputIterator end) { + payloads_.insert(payloads_.end(), begin, end); + } + void updatePayload(boost::shared_ptr<Payload> payload); |