summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Network/Connection.h')
-rw-r--r--Swiften/Network/Connection.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/Swiften/Network/Connection.h b/Swiften/Network/Connection.h
index 6d05eee..16d5d7b 100644
--- a/Swiften/Network/Connection.h
+++ b/Swiften/Network/Connection.h
@@ -12,13 +12,15 @@ namespace Swift {
enum Error {
DomainNameResolveError,
ConnectionError,
- ReadError
+ ReadError,
+ WriteError
};
- Connection(const String& domain) : domain_(domain) {}
+ Connection() {}
virtual ~Connection() {}
- virtual void connect() = 0;
+ virtual void listen() = 0;
+ virtual void connect(const String& domain) = 0;
virtual void disconnect() = 0;
virtual void write(const ByteArray& data) = 0;
@@ -26,14 +28,6 @@ namespace Swift {
boost::signal<void ()> onConnected;
boost::signal<void (Error)> onError;
boost::signal<void (const ByteArray&)> onDataRead;
-
- protected:
- const String& getDomain() const {
- return domain_;
- }
-
- private:
- String domain_;
};
}