comparison src/proxy.h @ 14163:c3167a1dd817

[gaim-migrate @ 16811] Split the DNS query stuff out into it's own file. Eventually we should move the dnssrv code into this same file. Maybe even share some code? Also the first steps toward cancelable DNS queries. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 17 Aug 2006 07:44:52 +0000
parents 7a205b430d19
children 879bb47cff8e
comparison
equal deleted inserted replaced
14162:cef7f6a93592 14163:c3167a1dd817
24 */ 24 */
25 #ifndef _GAIM_PROXY_H_ 25 #ifndef _GAIM_PROXY_H_
26 #define _GAIM_PROXY_H_ 26 #define _GAIM_PROXY_H_
27 27
28 #include <glib.h> 28 #include <glib.h>
29 #include "dnsquery.h"
29 #include "eventloop.h" 30 #include "eventloop.h"
30 31
31 /** 32 /**
32 * A type of proxy connection. 33 * A type of proxy connection.
33 */ 34 */
54 char *username; /**< The username. */ 55 char *username; /**< The username. */
55 char *password; /**< The password. */ 56 char *password; /**< The password. */
56 57
57 } GaimProxyInfo; 58 } GaimProxyInfo;
58 59
60 typedef struct _GaimDnsQueryData GaimDnsQueryData;
59 typedef struct _GaimProxyConnectInfo GaimProxyConnectInfo; 61 typedef struct _GaimProxyConnectInfo GaimProxyConnectInfo;
60 62
61 typedef void (*GaimProxyConnectFunction)(gpointer data, gint source, const gchar *error_message); 63 typedef void (*GaimProxyConnectFunction)(gpointer data, gint source, const gchar *error_message);
62 64
63 /** 65 /**
276 * attempt early rather than just letting the OS's TCP/IP stack 278 * attempt early rather than just letting the OS's TCP/IP stack
277 * time-out the connection. 279 * time-out the connection.
278 */ 280 */
279 void gaim_proxy_connect_cancel(GaimProxyConnectInfo *connect_info); 281 void gaim_proxy_connect_cancel(GaimProxyConnectInfo *connect_info);
280 282
281 /**
282 * Do an async dns query
283 *
284 * @param hostname The hostname to resolve
285 * @param port A portnumber which is stored in the struct sockaddr
286 * @param callback Callback to call after resolving
287 * @param data Extra data for the callback function
288 *
289 * @return Zero indicates the connection is pending. Any other value indicates failure.
290 */
291 int gaim_gethostbyname_async(const char *hostname, int port, GaimProxyDnsConnectFunction callback, gpointer data);
292
293 /*@}*/ 283 /*@}*/
294 284
295 #ifdef __cplusplus 285 #ifdef __cplusplus
296 } 286 }
297 #endif 287 #endif