diff options
Diffstat (limited to 'Swiften/StreamStack/XMPPLayer.h')
-rw-r--r-- | Swiften/StreamStack/XMPPLayer.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Swiften/StreamStack/XMPPLayer.h b/Swiften/StreamStack/XMPPLayer.h index 7316afe..54bb22d 100644 --- a/Swiften/StreamStack/XMPPLayer.h +++ b/Swiften/StreamStack/XMPPLayer.h @@ -10,6 +10,7 @@ #include "Swiften/Base/boost_bsignals.h" #include <boost/noncopyable.hpp> +#include <Swiften/StreamStack/HighLayer.h> #include "Swiften/Base/ByteArray.h" #include "Swiften/Elements/Element.h" #include "Swiften/Elements/StreamType.h" @@ -22,7 +23,7 @@ namespace Swift { class XMPPSerializer; class PayloadSerializerCollection; - class XMPPLayer : public XMPPParserClient, boost::noncopyable { + class XMPPLayer : public XMPPParserClient, public HighLayer, boost::noncopyable { public: XMPPLayer( PayloadParserFactoryCollection* payloadParserFactories, @@ -35,9 +36,12 @@ namespace Swift { void writeElement(boost::shared_ptr<Element>); void writeData(const String& data); - void parseData(ByteArray data); void resetParser(); + private: + void handleDataRead(const ByteArray& data); + void writeDataInternal(const ByteArray& data); + public: boost::signal<void (const ProtocolHeader&)> onStreamStart; boost::signal<void (boost::shared_ptr<Element>)> onElement; |