14 #ifndef SOCKS5BYTESTREAMMANAGER_H__
15 #define SOCKS5BYTESTREAMMANAGER_H__
17 #include "iqhandler.h"
23 class SOCKS5BytestreamHandler;
24 class SOCKS5BytestreamServer;
25 class SOCKS5Bytestream;
92 void addStreamHost(
const JID& jid,
const std::string& host,
int port );
107 bool requestSOCKS5Bytestream(
const JID& to, S5BMode mode,
const std::string& sid =
"" );
121 void acceptSOCKS5Bytestream(
const std::string& sid );
127 void rejectSOCKS5Bytestream(
const std::string& sid );
136 { m_socks5BytestreamHandler = s5bh; }
141 void removeSOCKS5BytestreamHandler()
142 { m_socks5BytestreamHandler = 0; }
157 virtual bool handleIq(
Stanza *stanza );
160 virtual bool handleIqID(
Stanza *stanza,
int context );
163 void rejectSOCKS5Bytestream(
const JID& from,
const std::string&
id,
StanzaError reason );
164 bool haveStream(
const JID& from );
165 const StreamHost* findProxy(
const JID& from,
const std::string& hostjid,
const std::string& sid );
167 void acknowledgeStreamHost(
bool success,
const JID& jid,
const std::string& sid );
176 typedef std::map<std::string, SOCKS5Bytestream*> S5BMap;
186 typedef std::map<std::string, AsyncS5BItem> AsyncTrackMap;
187 AsyncTrackMap m_asyncTrackMap;
189 ClientBase *m_parent;
190 SOCKS5BytestreamHandler* m_socks5BytestreamHandler;
191 SOCKS5BytestreamServer* m_server;
199 #endif // SOCKS5BYTESTREAMMANAGER_H__