Mercurial > pidgin
comparison libpurple/proxy.h @ 32672:3828a61c44da
A boring and large patch so I can merge heads.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 23 Dec 2011 08:21:58 +0000 |
parents | 3e11fa72c5d8 |
children |
comparison
equal
deleted
inserted
replaced
32671:0e69949b3e61 | 32672:3828a61c44da |
---|---|
45 } PurpleProxyType; | 45 } PurpleProxyType; |
46 | 46 |
47 /** | 47 /** |
48 * Information on proxy settings. | 48 * Information on proxy settings. |
49 */ | 49 */ |
50 typedef struct | 50 typedef struct _PurpleProxyInfo PurpleProxyInfo; |
51 { | |
52 PurpleProxyType type; /**< The proxy type. */ | |
53 | |
54 char *host; /**< The host. */ | |
55 int port; /**< The port number. */ | |
56 char *username; /**< The username. */ | |
57 char *password; /**< The password. */ | |
58 | |
59 } PurpleProxyInfo; | |
60 | 51 |
61 typedef struct _PurpleProxyConnectData PurpleProxyConnectData; | 52 typedef struct _PurpleProxyConnectData PurpleProxyConnectData; |
62 | 53 |
63 typedef void (*PurpleProxyConnectFunction)(gpointer data, gint source, const gchar *error_message); | 54 typedef void (*PurpleProxyConnectFunction)(gpointer data, gint source, const gchar *error_message); |
64 | 55 |
189 | 180 |
190 /** | 181 /** |
191 * Set purple's global proxy information. | 182 * Set purple's global proxy information. |
192 * | 183 * |
193 * @param info The proxy information. | 184 * @param info The proxy information. |
194 * @since 2.6.0 | |
195 */ | 185 */ |
196 void purple_global_proxy_set_info(PurpleProxyInfo *info); | 186 void purple_global_proxy_set_info(PurpleProxyInfo *info); |
197 | 187 |
198 /*@}*/ | 188 /*@}*/ |
199 | 189 |
314 PurpleProxyConnectData *purple_proxy_connect_socks5_account(void *handle, | 304 PurpleProxyConnectData *purple_proxy_connect_socks5_account(void *handle, |
315 PurpleAccount *account, PurpleProxyInfo *gpi, | 305 PurpleAccount *account, PurpleProxyInfo *gpi, |
316 const char *host, int port, | 306 const char *host, int port, |
317 PurpleProxyConnectFunction connect_cb, gpointer data); | 307 PurpleProxyConnectFunction connect_cb, gpointer data); |
318 | 308 |
319 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PROXY_C_) | |
320 /** | |
321 * Makes a connection through a SOCKS5 proxy. | |
322 * | |
323 * @param handle A handle that should be associated with this | |
324 * connection attempt. The handle can be used | |
325 * to cancel the connection attempt using the | |
326 * purple_proxy_connect_cancel_with_handle() | |
327 * function. | |
328 * @param gpi The PurpleProxyInfo specifying the proxy settings | |
329 * @param host The destination host. | |
330 * @param port The destination port. | |
331 * @param connect_cb The function to call when the connection is | |
332 * established. If the connection failed then | |
333 * fd will be -1 and error message will be set | |
334 * to something descriptive (hopefully). | |
335 * @param data User-defined data. | |
336 * | |
337 * @return NULL if there was an error, or a reference to an | |
338 * opaque data structure that can be used to cancel | |
339 * the pending connection, if needed. | |
340 * @deprecated Use purple_proxy_connect_socks5_account instead | |
341 */ | |
342 PurpleProxyConnectData *purple_proxy_connect_socks5(void *handle, | |
343 PurpleProxyInfo *gpi, | |
344 const char *host, int port, | |
345 PurpleProxyConnectFunction connect_cb, gpointer data); | |
346 #endif | |
347 | |
348 /** | 309 /** |
349 * Cancel an in-progress connection attempt. This should be called | 310 * Cancel an in-progress connection attempt. This should be called |
350 * by the PRPL if the user disables an account while it is still | 311 * by the PRPL if the user disables an account while it is still |
351 * performing the initial sign on. Or when establishing a file | 312 * performing the initial sign on. Or when establishing a file |
352 * transfer, if we attempt to connect to a remote user but they | 313 * transfer, if we attempt to connect to a remote user but they |