summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-04-16 18:07:13 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-04-18 19:11:46 (GMT)
commit7a3925cb996b7d8b0b683557255880747851e9ae (patch)
tree9eb65fb931168a29c78a19bb4cb8006b1f733043 /Swiften/Network/SOCKS5ProxiedConnection.h
parent7d2db3b25effc93aa111664d0745a5365f4b7f05 (diff)
downloadswift-7a3925cb996b7d8b0b683557255880747851e9ae.zip
swift-7a3925cb996b7d8b0b683557255880747851e9ae.tar.bz2
Code style fixes.
Diffstat (limited to 'Swiften/Network/SOCKS5ProxiedConnection.h')
-rw-r--r--Swiften/Network/SOCKS5ProxiedConnection.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/Swiften/Network/SOCKS5ProxiedConnection.h b/Swiften/Network/SOCKS5ProxiedConnection.h
index b222fd7..779bfa1 100644
--- a/Swiften/Network/SOCKS5ProxiedConnection.h
+++ b/Swiften/Network/SOCKS5ProxiedConnection.h
@@ -6,10 +6,8 @@
#pragma once
-#include <boost/asio.hpp>
#include <boost/enable_shared_from_this.hpp>
-#include "Swiften/Network/ConnectionFactory.h"
#include "Swiften/Network/Connection.h"
#include "Swiften/Network/HostAddressPort.h"
@@ -21,13 +19,15 @@ namespace boost {
}
namespace Swift {
+ class ConnectionFactory;
+
class SOCKS5ProxiedConnection : public Connection, public boost::enable_shared_from_this<SOCKS5ProxiedConnection> {
public:
typedef boost::shared_ptr<SOCKS5ProxiedConnection> ref;
~SOCKS5ProxiedConnection();
- static ref create(ConnectionFactory* connectionFactory, HostAddressPort proxy) {
+ static ref create(ConnectionFactory* connectionFactory, const HostAddressPort& proxy) {
return ref(new SOCKS5ProxiedConnection(connectionFactory, proxy));
}
@@ -37,19 +37,19 @@ namespace Swift {
virtual void write(const ByteArray& data);
virtual HostAddressPort getLocalAddress() const;
- private:
- enum {
- ProxyAuthenticating = 0,
- ProxyConnecting,
- } proxyState_;
- SOCKS5ProxiedConnection(ConnectionFactory* connectionFactory, HostAddressPort proxy);
+ private:
+ SOCKS5ProxiedConnection(ConnectionFactory* connectionFactory, const HostAddressPort& proxy);
void handleConnectionConnectFinished(bool error);
void handleDataRead(const ByteArray& data);
void handleDisconnected(const boost::optional<Error>& error);
private:
+ enum {
+ ProxyAuthenticating = 0,
+ ProxyConnecting,
+ } proxyState_;
bool connected_;
ConnectionFactory* connectionFactory_;
HostAddressPort proxy_;