summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/StreamStack/LowLayer.h')
-rw-r--r--Swiften/StreamStack/LowLayer.h26
1 files changed, 19 insertions, 7 deletions
diff --git a/Swiften/StreamStack/LowLayer.h b/Swiften/StreamStack/LowLayer.h
index 2224adc..1f9645a 100644
--- a/Swiften/StreamStack/LowLayer.h
+++ b/Swiften/StreamStack/LowLayer.h
@@ -4,22 +4,34 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#ifndef SWIFTEN_LOWLAYER_H
-#define SWIFTEN_LOWLAYER_H
-
-#include "Swiften/Base/boost_bsignals.h"
+#pragma once
#include "Swiften/Base/ByteArray.h"
namespace Swift {
+ class HighLayer;
+
class LowLayer {
+ friend class StreamStack;
+
public:
+ LowLayer();
virtual ~LowLayer();
virtual void writeData(const ByteArray& data) = 0;
+
+ protected:
+ HighLayer* getParentLayer() {
+ return parentLayer;
+ }
- boost::signal<void (const ByteArray&)> onDataRead;
+ void setParentLayer(HighLayer* parentLayer) {
+ this->parentLayer = parentLayer;
+ }
+
+ void writeDataToParentLayer(const ByteArray& data);
+
+ private:
+ HighLayer* parentLayer;
};
}
-
-#endif