diff options
Diffstat (limited to 'Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.h')
-rw-r--r-- | Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.h b/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.h index 06db76c..e4bf1d9 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.h @@ -10,20 +10,22 @@ * See the COPYING file for more information. */ #pragma once +#include <map> #include <string> +#include <utility> #include <vector> #include <Swiften/Base/API.h> #include <Swiften/Elements/S5BProxyRequest.h> #include <Swiften/FileTransfer/SOCKS5BytestreamClientSession.h> -#include <Swiften/JID/JID.h> #include <Swiften/FileTransfer/SOCKS5BytestreamProxyFinder.h> +#include <Swiften/JID/JID.h> namespace Swift { class TimerFactory; class ConnectionFactory; class DomainNameResolver; class DomainNameResolveError; @@ -56,21 +58,25 @@ namespace Swift { private: void handleProxyFound(S5BProxyRequest::ref proxy); void handleNameLookupResult(const std::vector<HostAddress>&, boost::optional<DomainNameResolveError>, S5BProxyRequest::ref proxy); void queryForProxies(); + void handleProxySessionReady(const std::string& sessionID, const JID& jid, boost::shared_ptr<SOCKS5BytestreamClientSession> session, bool error); + void handleProxySessionFinished(const std::string& sessionID, const JID& jid, boost::shared_ptr<SOCKS5BytestreamClientSession> session, boost::optional<FileTransferError> error); + private: ConnectionFactory* connectionFactory_; TimerFactory* timerFactory_; DomainNameResolver* resolver_; IQRouter* iqRouter_; JID serviceRoot_; - typedef std::map<JID, boost::shared_ptr<SOCKS5BytestreamClientSession> > ProxyJIDClientSessionMap; - std::map<std::string, ProxyJIDClientSessionMap> proxySessions_; + typedef std::vector<std::pair<JID, boost::shared_ptr<SOCKS5BytestreamClientSession> > > ProxyJIDClientSessionVector; + typedef std::map<std::string, ProxyJIDClientSessionVector> ProxySessionsMap; + ProxySessionsMap proxySessions_; boost::shared_ptr<SOCKS5BytestreamProxyFinder> proxyFinder_; boost::optional<std::vector<S5BProxyRequest::ref> > localS5BProxies_; }; |