summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-03-31 14:57:35 (GMT)
committerTobias Markmann <tm@ayena.de>2016-03-31 14:57:35 (GMT)
commitcfbdb43d2cadd40aa87338d41548e4bf89e146e6 (patch)
tree18d94153a302445196fc0c18586abf44a1ce4a38 /Swiften/FileTransfer/SOCKS5BytestreamServerManager.h
parent1d545a4a7fb877f021508094b88c1f17b30d8b4e (diff)
downloadswift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.zip
swift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.tar.bz2
Convert tabs to 4 spaces for all source files
Removed trailing spaces and whitespace on empty lines in the process. Changed CheckTabs.py tool to disallow hard tabs in source files. Test-Information: Manually checked 30 random files that the conversion worked as expected. Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
Diffstat (limited to 'Swiften/FileTransfer/SOCKS5BytestreamServerManager.h')
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamServerManager.h148
1 files changed, 74 insertions, 74 deletions
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamServerManager.h b/Swiften/FileTransfer/SOCKS5BytestreamServerManager.h
index c49031b..ab12dfe 100644
--- a/Swiften/FileTransfer/SOCKS5BytestreamServerManager.h
+++ b/Swiften/FileTransfer/SOCKS5BytestreamServerManager.h
@@ -17,79 +17,79 @@
#include <Swiften/Network/NATPortMapping.h>
namespace Swift {
- class NetworkEnvironment;
- class NATTraverser;
- class NATTraversalGetPublicIPRequest;
- class NATTraversalForwardPortRequest;
- class NATTraversalRemovePortForwardingRequest;
- class SOCKS5BytestreamRegistry;
- class ConnectionServerFactory;
- class ConnectionServer;
- class SOCKS5BytestreamServer;
- class SOCKS5BytestreamServerResourceUser;
- class SOCKS5BytestreamServerPortForwardingUser;
-
- class SWIFTEN_API SOCKS5BytestreamServerManager {
- friend class SOCKS5BytestreamServerResourceUser;
- friend class SOCKS5BytestreamServerPortForwardingUser;
-
- public:
- SOCKS5BytestreamServerManager(
- SOCKS5BytestreamRegistry* bytestreamRegistry,
- ConnectionServerFactory* connectionServerFactory,
- NetworkEnvironment* networkEnvironment,
- NATTraverser* natTraverser);
- ~SOCKS5BytestreamServerManager();
-
- boost::shared_ptr<SOCKS5BytestreamServerResourceUser> aquireResourceUser();
- boost::shared_ptr<SOCKS5BytestreamServerPortForwardingUser> aquirePortForwardingUser();
-
- void stop();
-
- std::vector<HostAddressPort> getHostAddressPorts() const;
- std::vector<HostAddressPort> getAssistedHostAddressPorts() const;
-
- SOCKS5BytestreamServer* getServer() const {
- return server;
- }
-
- private:
- bool isInitialized() const;
- void initialize();
-
- bool isPortForwardingReady() const;
- void setupPortForwarding();
- void removePortForwarding();
-
- void checkInitializeFinished();
-
- void handleGetPublicIPResult(boost::optional<HostAddress> address);
- void handleForwardPortResult(boost::optional<NATPortMapping> mapping);
- void handleUnforwardPortResult(boost::optional<bool> result);
-
- boost::signal<void (bool /* success */)> onInitialized;
- boost::signal<void (bool /* success */)> onPortForwardingSetup;
-
- private:
- friend class SOCKS5BytestreamServerInitializeRequest;
- SOCKS5BytestreamRegistry* bytestreamRegistry;
- ConnectionServerFactory* connectionServerFactory;
- NetworkEnvironment* networkEnvironment;
- NATTraverser* natTraverser;
- enum { Start, Initializing, Initialized } state;
- SOCKS5BytestreamServer* server;
- boost::shared_ptr<ConnectionServer> connectionServer;
- int connectionServerPort;
-
- boost::shared_ptr<NATTraversalGetPublicIPRequest> getPublicIPRequest;
- boost::shared_ptr<NATTraversalForwardPortRequest> forwardPortRequest;
- boost::shared_ptr<NATTraversalRemovePortForwardingRequest> unforwardPortRequest;
- boost::optional<HostAddress> publicAddress;
- boost::optional<NATPortMapping> portMapping;
- bool attemptedPortMapping_;
-
- boost::weak_ptr<SOCKS5BytestreamServerResourceUser> s5bServerResourceUser_;
- boost::weak_ptr<SOCKS5BytestreamServerPortForwardingUser> s5bServerPortForwardingUser_;
- };
+ class NetworkEnvironment;
+ class NATTraverser;
+ class NATTraversalGetPublicIPRequest;
+ class NATTraversalForwardPortRequest;
+ class NATTraversalRemovePortForwardingRequest;
+ class SOCKS5BytestreamRegistry;
+ class ConnectionServerFactory;
+ class ConnectionServer;
+ class SOCKS5BytestreamServer;
+ class SOCKS5BytestreamServerResourceUser;
+ class SOCKS5BytestreamServerPortForwardingUser;
+
+ class SWIFTEN_API SOCKS5BytestreamServerManager {
+ friend class SOCKS5BytestreamServerResourceUser;
+ friend class SOCKS5BytestreamServerPortForwardingUser;
+
+ public:
+ SOCKS5BytestreamServerManager(
+ SOCKS5BytestreamRegistry* bytestreamRegistry,
+ ConnectionServerFactory* connectionServerFactory,
+ NetworkEnvironment* networkEnvironment,
+ NATTraverser* natTraverser);
+ ~SOCKS5BytestreamServerManager();
+
+ boost::shared_ptr<SOCKS5BytestreamServerResourceUser> aquireResourceUser();
+ boost::shared_ptr<SOCKS5BytestreamServerPortForwardingUser> aquirePortForwardingUser();
+
+ void stop();
+
+ std::vector<HostAddressPort> getHostAddressPorts() const;
+ std::vector<HostAddressPort> getAssistedHostAddressPorts() const;
+
+ SOCKS5BytestreamServer* getServer() const {
+ return server;
+ }
+
+ private:
+ bool isInitialized() const;
+ void initialize();
+
+ bool isPortForwardingReady() const;
+ void setupPortForwarding();
+ void removePortForwarding();
+
+ void checkInitializeFinished();
+
+ void handleGetPublicIPResult(boost::optional<HostAddress> address);
+ void handleForwardPortResult(boost::optional<NATPortMapping> mapping);
+ void handleUnforwardPortResult(boost::optional<bool> result);
+
+ boost::signal<void (bool /* success */)> onInitialized;
+ boost::signal<void (bool /* success */)> onPortForwardingSetup;
+
+ private:
+ friend class SOCKS5BytestreamServerInitializeRequest;
+ SOCKS5BytestreamRegistry* bytestreamRegistry;
+ ConnectionServerFactory* connectionServerFactory;
+ NetworkEnvironment* networkEnvironment;
+ NATTraverser* natTraverser;
+ enum { Start, Initializing, Initialized } state;
+ SOCKS5BytestreamServer* server;
+ boost::shared_ptr<ConnectionServer> connectionServer;
+ int connectionServerPort;
+
+ boost::shared_ptr<NATTraversalGetPublicIPRequest> getPublicIPRequest;
+ boost::shared_ptr<NATTraversalForwardPortRequest> forwardPortRequest;
+ boost::shared_ptr<NATTraversalRemovePortForwardingRequest> unforwardPortRequest;
+ boost::optional<HostAddress> publicAddress;
+ boost::optional<NATPortMapping> portMapping;
+ bool attemptedPortMapping_;
+
+ boost::weak_ptr<SOCKS5BytestreamServerResourceUser> s5bServerResourceUser_;
+ boost::weak_ptr<SOCKS5BytestreamServerPortForwardingUser> s5bServerPortForwardingUser_;
+ };
}