comparison libpurple/dnsquery.h @ 32819:2c6510167895 default tip

propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24) to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 02 Jun 2012 02:30:49 +0000
parents 98520ee78f12
children
comparison
equal deleted inserted replaced
32818:01ff09d4a463 32819:2c6510167895
74 void (*_purple_reserved2)(void); 74 void (*_purple_reserved2)(void);
75 void (*_purple_reserved3)(void); 75 void (*_purple_reserved3)(void);
76 void (*_purple_reserved4)(void); 76 void (*_purple_reserved4)(void);
77 } PurpleDnsQueryUiOps; 77 } PurpleDnsQueryUiOps;
78 78
79 #ifdef __cplusplus 79 G_BEGIN_DECLS
80 extern "C" {
81 #endif
82 80
83 /**************************************************************************/ 81 /**************************************************************************/
84 /** @name DNS query API */ 82 /** @name DNS query API */
85 /**************************************************************************/ 83 /**************************************************************************/
86 /*@{*/ 84 /*@{*/
87 85
88 /** 86 /**
89 * Perform an asynchronous DNS query. 87 * Perform an asynchronous DNS query.
90 * 88 *
91 * @param account the account that the query is being done for (or NULL) 89 * @param account The account that the query is being done for (or NULL)
92 * @param hostname The hostname to resolve. 90 * @param hostname The hostname to resolve.
93 * @param port A port number which is stored in the struct sockaddr. 91 * @param port A port number which is stored in the struct sockaddr.
94 * @param callback The callback function to call after resolving. 92 * @param callback The callback function to call after resolving.
95 * @param data Extra data to pass to the callback function. 93 * @param data Extra data to pass to the callback function.
96 * 94 *
97 * @return NULL if there was an error, otherwise return a reference to 95 * @return NULL if there was an error, otherwise return a reference to
98 * a data structure that can be used to cancel the pending 96 * a data structure that can be used to cancel the pending
99 * DNS query, if needed. 97 * DNS query, if needed.
100 * 98 *
101 * @since 2.8.0
102 */ 99 */
103 PurpleDnsQueryData *purple_dnsquery_a_account(PurpleAccount *account, const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data); 100 PurpleDnsQueryData *purple_dnsquery_a(PurpleAccount *account, const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data);
104
105 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_DNSQUERY_C_)
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
119 */
120 PurpleDnsQueryData *purple_dnsquery_a(const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data);
121 #endif
122 101
123 /** 102 /**
124 * Cancel a DNS query and destroy the associated data structure. 103 * Cancel a DNS query and destroy the associated data structure.
125 * 104 *
126 * @param query_data The DNS query to cancel. This data structure 105 * @param query_data The DNS query to cancel. This data structure
171 */ 150 */
172 void purple_dnsquery_uninit(void); 151 void purple_dnsquery_uninit(void);
173 152
174 /*@}*/ 153 /*@}*/
175 154
176 #ifdef __cplusplus 155 G_END_DECLS
177 }
178 #endif
179 156
180 #endif /* _PURPLE_DNSQUERY_H_ */ 157 #endif /* _PURPLE_DNSQUERY_H_ */