diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-12-19 14:10:39 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-12-19 17:17:45 (GMT) |
commit | d67ecb18c1178ecf69e6cb5e8c8ee1fecee35e4c (patch) | |
tree | 5f05b975ae39b2318d85f9ed673e2434f2916981 /Swiften/StreamStack/XMPPLayer.h | |
parent | e8b2e33a6fc569af116a32ebb5e441728e390c8f (diff) | |
download | swift-contrib-d67ecb18c1178ecf69e6cb5e8c8ee1fecee35e4c.zip swift-contrib-d67ecb18c1178ecf69e6cb5e8c8ee1fecee35e4c.tar.bz2 |
Refactoring streamstack to not use signal/slots.
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; |