Mercurial > pidgin.yaz
comparison libpurple/dnsquery.h @ 31930:0eceb1304f53
Add new DNS-related API to perform lookups in the context of an account.
Combined with the new "Tor/Privacy" proxy setting, this allows us to prevent
DNS lookups when the user has selected a proxy that they may want to use to
for privacy.
Refs #11110
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 19 Apr 2011 04:58:17 +0000 |
parents | 08dcd2d4f0b7 |
children | 92f3d821653f |
comparison
equal
deleted
inserted
replaced
31929:9a7c5d242521 | 31930:0eceb1304f53 |
---|---|
86 /*@{*/ | 86 /*@{*/ |
87 | 87 |
88 /** | 88 /** |
89 * Perform an asynchronous DNS query. | 89 * Perform an asynchronous DNS query. |
90 * | 90 * |
91 * @param account the account that the query is being done for (or NULL) | |
91 * @param hostname The hostname to resolve. | 92 * @param hostname The hostname to resolve. |
92 * @param port A port number which is stored in the struct sockaddr. | 93 * @param port A port number which is stored in the struct sockaddr. |
93 * @param callback The callback function to call after resolving. | 94 * @param callback The callback function to call after resolving. |
94 * @param data Extra data to pass to the callback function. | 95 * @param data Extra data to pass to the callback function. |
95 * | 96 * |
96 * @return NULL if there was an error, otherwise return a reference to | 97 * @return NULL if there was an error, otherwise return a reference to |
97 * a data structure that can be used to cancel the pending | 98 * a data structure that can be used to cancel the pending |
98 * DNS query, if needed. | 99 * DNS query, if needed. |
100 * | |
101 * @since 2.8.0 | |
102 */ | |
103 PurpleDnsQueryData *purple_dnsquery_a_account(PurpleAccount *account, const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data); | |
104 | |
105 #ifndef PURPLE_DISABLE_DEPRECATED | |
106 /** | |
107 * Perform an asynchronous DNS query. | |
108 * | |
109 * @param hostname The hostname to resolve. | |
110 * @param port A port number which is stored in the struct sockaddr. | |
111 * @param callback The callback function to call after resolving. | |
112 * @param data Extra data to pass to the callback function. | |
113 * | |
114 * @return NULL if there was an error, otherwise return a reference to | |
115 * a data structure that can be used to cancel the pending | |
116 * DNS query, if needed. | |
117 * | |
118 * @deprecated Use purple_dnsquery_a_account instead | |
99 */ | 119 */ |
100 PurpleDnsQueryData *purple_dnsquery_a(const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data); | 120 PurpleDnsQueryData *purple_dnsquery_a(const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data); |
121 #endif | |
101 | 122 |
102 /** | 123 /** |
103 * Cancel a DNS query and destroy the associated data structure. | 124 * Cancel a DNS query and destroy the associated data structure. |
104 * | 125 * |
105 * @param query_data The DNS query to cancel. This data structure | 126 * @param query_data The DNS query to cancel. This data structure |