diff options
Diffstat (limited to 'Swiften/Network/Connection.h')
-rw-r--r-- | Swiften/Network/Connection.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Swiften/Network/Connection.h b/Swiften/Network/Connection.h index 529dd82..6ad2999 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 (boost::shared_ptr<SafeByteArray>)> onDataRead; boost::signal<void ()> onDataWritten; }; } |