diff options
Diffstat (limited to 'Swiften/StreamStack/XMPPLayer.h')
-rw-r--r-- | Swiften/StreamStack/XMPPLayer.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Swiften/StreamStack/XMPPLayer.h b/Swiften/StreamStack/XMPPLayer.h index 81f0457..13266e4 100644 --- a/Swiften/StreamStack/XMPPLayer.h +++ b/Swiften/StreamStack/XMPPLayer.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,7 +11,8 @@ #include <boost/noncopyable.hpp> +#include <Swiften/Base/API.h> #include <Swiften/StreamStack/HighLayer.h> #include <Swiften/Base/SafeByteArray.h> -#include <Swiften/Elements/Element.h> +#include <Swiften/Elements/ToplevelElement.h> #include <Swiften/Elements/StreamType.h> #include <Swiften/Parser/XMPPParserClient.h> @@ -26,5 +27,5 @@ namespace Swift { class BOSHSessionStream; - class XMPPLayer : public XMPPParserClient, public HighLayer, boost::noncopyable { + class SWIFTEN_API XMPPLayer : public XMPPParserClient, public HighLayer, boost::noncopyable { friend class BOSHSessionStream; public: @@ -33,10 +34,11 @@ namespace Swift { PayloadSerializerCollection* payloadSerializers, XMLParserFactory* xmlParserFactory, - StreamType streamType); + StreamType streamType, + bool setExplictNSonTopLevelElements = false); ~XMPPLayer(); void writeHeader(const ProtocolHeader& header); void writeFooter(); - void writeElement(boost::shared_ptr<Element>); + void writeElement(boost::shared_ptr<ToplevelElement>); void writeData(const std::string& data); @@ -49,5 +51,5 @@ namespace Swift { public: boost::signal<void (const ProtocolHeader&)> onStreamStart; - boost::signal<void (boost::shared_ptr<Element>)> onElement; + boost::signal<void (boost::shared_ptr<ToplevelElement>)> onElement; boost::signal<void (const SafeByteArray&)> onWriteData; boost::signal<void (const SafeByteArray&)> onDataRead; @@ -56,5 +58,5 @@ namespace Swift { private: void handleStreamStart(const ProtocolHeader&); - void handleElement(boost::shared_ptr<Element>); + void handleElement(boost::shared_ptr<ToplevelElement>); void handleStreamEnd(); @@ -67,4 +69,5 @@ namespace Swift { XMLParserFactory* xmlParserFactory_; XMPPSerializer* xmppSerializer_; + bool setExplictNSonTopLevelElements_; bool resetParserAfterParse_; bool inParser_; |