summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-11-06 20:26:48 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-11-06 20:26:48 (GMT)
commitb6003bea740e8898127ec135e230eed421924370 (patch)
tree16c5b26aa1983011b0546da50f5faca9fc738db5 /Swiften/Session/SessionStream.h
parent3fbab3b40dfc31da46924f13984415b18087a8d4 (diff)
downloadswift-contrib-b6003bea740e8898127ec135e230eed421924370.zip
swift-contrib-b6003bea740e8898127ec135e230eed421924370.tar.bz2
Added SessionStream.
Diffstat (limited to 'Swiften/Session/SessionStream.h')
-rw-r--r--Swiften/Session/SessionStream.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/Swiften/Session/SessionStream.h b/Swiften/Session/SessionStream.h
new file mode 100644
index 0000000..17d9a24
--- /dev/null
+++ b/Swiften/Session/SessionStream.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include <boost/signal.hpp>
+#include <boost/shared_ptr.hpp>
+
+#include "Swiften/Elements/ProtocolHeader.h"
+#include "Swiften/Elements/Element.h"
+
+namespace Swift {
+ class SessionStream {
+ public:
+ virtual ~SessionStream();
+
+ virtual void writeHeader(const ProtocolHeader& header) = 0;
+ virtual void writeElement(boost::shared_ptr<Element>) = 0;
+
+ virtual bool supportsTLSEncryption() = 0;
+ virtual void addTLSEncryption() = 0;
+
+ virtual void addWhitespacePing() = 0;
+
+ virtual void resetXMPPParser() = 0;
+
+ boost::signal<void (const ProtocolHeader&)> onStreamStartReceived;
+ boost::signal<void (boost::shared_ptr<Element>)> onElementReceived;
+ };
+}