summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Server/IncomingConnection.h')
-rw-r--r--Swiften/Server/IncomingConnection.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/Swiften/Server/IncomingConnection.h b/Swiften/Server/IncomingConnection.h
new file mode 100644
index 0000000..6ef64e8
--- /dev/null
+++ b/Swiften/Server/IncomingConnection.h
@@ -0,0 +1,24 @@
+#pragma once
+
+#include <boost/signals.hpp>
+
+#include "Swiften/Base/ByteArray.h"
+#include "Swiften/Base/String.h"
+
+namespace Swift {
+ class IncomingConnection {
+ public:
+ enum Error {
+ ConnectionError,
+ ReadError
+ };
+
+ virtual ~IncomingConnection();
+
+ virtual void write(const ByteArray& data) = 0;
+
+ public:
+ boost::signal<void (Error)> onError;
+ boost::signal<void (const ByteArray&)> onDataRead;
+ };
+}