summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-19 14:10:39 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-19 17:17:45 (GMT)
commitd67ecb18c1178ecf69e6cb5e8c8ee1fecee35e4c (patch)
tree5f05b975ae39b2318d85f9ed673e2434f2916981 /Swiften/StreamStack/XMPPLayer.h
parente8b2e33a6fc569af116a32ebb5e441728e390c8f (diff)
downloadswift-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.h8
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;