diff options
Diffstat (limited to 'Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h')
-rw-r--r-- | Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h | 81 |
1 files changed, 41 insertions, 40 deletions
diff --git a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h index bbf17a1..2159063 100644 --- a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h +++ b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h @@ -5,65 +5,66 @@ */ /* - * Copyright (c) 2013-2015 Isode Limited. + * Copyright (c) 2013-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h> +#include <boost/signals2.hpp> + #include <Swiften/Base/IDGenerator.h> #include <Swiften/Base/Override.h> -#include <Swiften/JID/JID.h> #include <Swiften/Elements/JingleS5BTransportPayload.h> #include <Swiften/FileTransfer/FileTransferOptions.h> #include <Swiften/FileTransfer/SOCKS5BytestreamProxyFinder.h> +#include <Swiften/JID/JID.h> namespace Swift { - class SOCKS5BytestreamServerManager; - class SOCKS5BytestreamProxiesManager; - class SOCKS5BytestreamServerInitializeRequest; - class SOCKS5BytestreamServerResourceUser; - class SOCKS5BytestreamServerPortForwardingUser; - class JingleS5BTransportPayload; + class SOCKS5BytestreamServerManager; + class SOCKS5BytestreamProxiesManager; + class SOCKS5BytestreamServerInitializeRequest; + class SOCKS5BytestreamServerResourceUser; + class SOCKS5BytestreamServerPortForwardingUser; + class JingleS5BTransportPayload; - class LocalJingleTransportCandidateGenerator { - public: - LocalJingleTransportCandidateGenerator( - SOCKS5BytestreamServerManager* s5bServerManager, - SOCKS5BytestreamProxiesManager* s5bProxy, - const JID& ownJID, - IDGenerator* idGenerator, - const FileTransferOptions& options); - virtual ~LocalJingleTransportCandidateGenerator(); + class LocalJingleTransportCandidateGenerator { + public: + LocalJingleTransportCandidateGenerator( + SOCKS5BytestreamServerManager* s5bServerManager, + SOCKS5BytestreamProxiesManager* s5bProxy, + const JID& ownJID, + IDGenerator* idGenerator, + const FileTransferOptions& options); + virtual ~LocalJingleTransportCandidateGenerator(); - virtual void start(); - virtual void stop(); + virtual void start(); + virtual void stop(); - boost::signal<void (const std::vector<JingleS5BTransportPayload::Candidate>&)> onLocalTransportCandidatesGenerated; + boost::signals2::signal<void (const std::vector<JingleS5BTransportPayload::Candidate>&)> onLocalTransportCandidatesGenerated; - private: - void handleS5BServerInitialized(bool success); - void handlePortForwardingSetup(bool success); - void handleDiscoveredProxiesChanged(); + private: + void handleS5BServerInitialized(bool success); + void handlePortForwardingSetup(bool success); + void handleDiscoveredProxiesChanged(); - void checkS5BCandidatesReady(); - void emitOnLocalTransportCandidatesGenerated(); + void checkS5BCandidatesReady(); + void emitOnLocalTransportCandidatesGenerated(); - private: - SOCKS5BytestreamServerManager* s5bServerManager; - SOCKS5BytestreamProxiesManager* s5bProxy; - JID ownJID; - IDGenerator* idGenerator; - boost::shared_ptr<SOCKS5BytestreamServerInitializeRequest> s5bServerInitializeRequest; - boost::shared_ptr<SOCKS5BytestreamServerResourceUser> s5bServerResourceUser_; - boost::shared_ptr<SOCKS5BytestreamServerPortForwardingUser> s5bServerPortForwardingUser_; - bool triedServerInit_; - bool triedForwarding_; - bool triedProxyDiscovery_; - FileTransferOptions options_; - }; + private: + SOCKS5BytestreamServerManager* s5bServerManager; + SOCKS5BytestreamProxiesManager* s5bProxy; + JID ownJID; + IDGenerator* idGenerator; + std::shared_ptr<SOCKS5BytestreamServerInitializeRequest> s5bServerInitializeRequest; + std::shared_ptr<SOCKS5BytestreamServerResourceUser> s5bServerResourceUser_; + std::shared_ptr<SOCKS5BytestreamServerPortForwardingUser> s5bServerPortForwardingUser_; + bool triedServerInit_; + bool triedForwarding_; + bool triedProxyDiscovery_; + FileTransferOptions options_; + }; } |