Mercurial > pidgin.yaz
comparison libgaim/proxy.h @ 14837:118fd0dc5b6e
[gaim-migrate @ 17606]
Add a "handle" parameter to gaim_proxy_connect(). It seemed like
people thought this was a good idea. You can still cancel
each gaim_proxy_connect() individually, if needed. I passed in
NULL for the handle in most places. It might be better to pass
in the gc in more places, but these changes do no harm, and they
should help some Yahoo! things, and I wanted to get the API change in.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 28 Oct 2006 20:04:03 +0000 |
parents | baff095b146c |
children | 3217cc423a6e |
comparison
equal
deleted
inserted
replaced
14836:bfcdd361357e | 14837:118fd0dc5b6e |
---|---|
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 |