| 235 * |
235 * |
| 236 * @return NULL if there was an error, or a reference to a data |
236 * @return NULL if there was an error, or a reference to a data |
| 237 * structure that can be used to cancel the pending |
237 * structure that can be used to cancel the pending |
| 238 * connection, if needed. |
238 * connection, if needed. |
| 239 */ |
239 */ |
| 240 GaimProxyConnectData *gaim_proxy_connect(GaimAccount *account, |
240 GaimProxyConnectData *gaim_proxy_connect(void *handle, |
| |
241 GaimAccount *account, |
| 241 const char *host, int port, |
242 const char *host, int port, |
| 242 GaimProxyConnectFunction connect_cb, gpointer data); |
243 GaimProxyConnectFunction connect_cb, gpointer data); |
| 243 |
244 |
| 244 /** |
245 /** |
| 245 * Makes a connection through a SOCKS5 proxy. |
246 * Makes a connection through a SOCKS5 proxy. |
| 255 * |
256 * |
| 256 * @return NULL if there was an error, or a reference to a data |
257 * @return NULL if there was an error, or a reference to a data |
| 257 * structure that can be used to cancel the pending |
258 * structure that can be used to cancel the pending |
| 258 * connection, if needed. |
259 * connection, if needed. |
| 259 */ |
260 */ |
| 260 GaimProxyConnectData *gaim_proxy_connect_socks5(GaimProxyInfo *gpi, |
261 GaimProxyConnectData *gaim_proxy_connect_socks5(void *handle, |
| |
262 GaimProxyInfo *gpi, |
| 261 const char *host, int port, |
263 const char *host, int port, |
| 262 GaimProxyConnectFunction connect_cb, gpointer data); |
264 GaimProxyConnectFunction connect_cb, gpointer data); |
| 263 |
265 |
| 264 /** |
266 /** |
| 265 * Cancel an in-progress connection attempt. This should be called |
267 * Cancel an in-progress connection attempt. This should be called |
| 270 * attempt early rather than just letting the OS's TCP/IP stack |
272 * attempt early rather than just letting the OS's TCP/IP stack |
| 271 * time-out the connection. |
273 * time-out the connection. |
| 272 */ |
274 */ |
| 273 void gaim_proxy_connect_cancel(GaimProxyConnectData *connect_data); |
275 void gaim_proxy_connect_cancel(GaimProxyConnectData *connect_data); |
| 274 |
276 |
| |
277 /* |
| |
278 * Closes all proxy connections registered with the specified handle. |
| |
279 * |
| |
280 * @param handle The handle. |
| |
281 */ |
| |
282 void gaim_proxy_connect_cancel_with_handle(void *handle); |
| |
283 |
| 275 /*@}*/ |
284 /*@}*/ |
| 276 |
285 |
| 277 #ifdef __cplusplus |
286 #ifdef __cplusplus |
| 278 } |
287 } |
| 279 #endif |
288 #endif |