From d0204b9e28ce7bde66da233879d5879ae1cce273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Sat, 11 Jul 2009 22:22:39 +0200 Subject: Added IncomingConnection. diff --git a/Swiften/Server/IncomingConnection.cpp b/Swiften/Server/IncomingConnection.cpp new file mode 100644 index 0000000..e2317c8 --- /dev/null +++ b/Swiften/Server/IncomingConnection.cpp @@ -0,0 +1,8 @@ +#include "Swiften/Server/IncomingConnection.h" + +namespace Swift { + +IncomingConnection::~IncomingConnection() { +} + +} 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 + +#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 onError; + boost::signal onDataRead; + }; +} diff --git a/Swiften/Server/Makefile.inc b/Swiften/Server/Makefile.inc index 8dd6051..54f09ce 100644 --- a/Swiften/Server/Makefile.inc +++ b/Swiften/Server/Makefile.inc @@ -1,5 +1,6 @@ SWIFTEN_SOURCES += \ Swiften/Server/ServerSession.cpp \ - Swiften/Server/ServerStanzaRouter.cpp + Swiften/Server/ServerStanzaRouter.cpp \ + Swiften/Server/IncomingConnection.cpp include Swiften/Server/UnitTest/Makefile.inc -- cgit v0.10.2-6-g49f6