summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Network/Connection.h')
-rw-r--r--Swiften/Network/Connection.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/Swiften/Network/Connection.h b/Swiften/Network/Connection.h
index 529dd82..1b9977f 100644
--- a/Swiften/Network/Connection.h
+++ b/Swiften/Network/Connection.h
@@ -7,13 +7,13 @@
#pragma once
#include <boost/shared_ptr.hpp>
+#include <Swiften/Base/boost_bsignals.h>
-#include "Swiften/Base/boost_bsignals.h"
-#include "Swiften/Base/ByteArray.h"
-#include <string>
-#include "Swiften/Network/HostAddressPort.h"
+#include <Swiften/Base/SafeByteArray.h>
namespace Swift {
+ class HostAddressPort;
+
class Connection {
public:
typedef boost::shared_ptr<Connection> ref;
@@ -23,20 +23,20 @@ namespace Swift {
WriteError
};
- Connection() {}
- virtual ~Connection() {}
+ Connection();
+ virtual ~Connection();
virtual void listen() = 0;
virtual void connect(const HostAddressPort& address) = 0;
virtual void disconnect() = 0;
- virtual void write(const ByteArray& data) = 0;
+ virtual void write(const SafeByteArray& data) = 0;
virtual HostAddressPort getLocalAddress() const = 0;
public:
boost::signal<void (bool /* error */)> onConnectFinished;
boost::signal<void (const boost::optional<Error>&)> onDisconnected;
- boost::signal<void (const ByteArray&)> onDataRead;
+ boost::signal<void (const SafeByteArray&)> onDataRead;
boost::signal<void ()> onDataWritten;
};
}