comparison libpurple/dnssrv.h @ 31479: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
31478:9a7c5d242521 31479:0eceb1304f53
101 typedef void (*PurpleTxtCallback)(GList *responses, gpointer data); 101 typedef void (*PurpleTxtCallback)(GList *responses, gpointer data);
102 102
103 /** 103 /**
104 * Queries an SRV record. 104 * Queries an SRV record.
105 * 105 *
106 * @param account the account that the query is being done for (or NULL)
106 * @param protocol Name of the protocol (e.g. "sip") 107 * @param protocol Name of the protocol (e.g. "sip")
107 * @param transport Name of the transport ("tcp" or "udp") 108 * @param transport Name of the transport ("tcp" or "udp")
108 * @param domain Domain name to query (e.g. "blubb.com") 109 * @param domain Domain name to query (e.g. "blubb.com")
109 * @param cb A callback which will be called with the results 110 * @param cb A callback which will be called with the results
110 * @param extradata Extra data to be passed to the callback 111 * @param extradata Extra data to be passed to the callback
112 *
113 * @since 2.8.0
114 */
115 PurpleSrvTxtQueryData *purple_srv_resolve_account(PurpleAccount *account, const char *protocol, const char *transport, const char *domain, PurpleSrvCallback cb, gpointer extradata);
116
117 #ifndef PURPLE_DISABLE_DEPRECATED
118 /**
119 * Queries an SRV record.
120 *
121 * @param protocol Name of the protocol (e.g. "sip")
122 * @param transport Name of the transport ("tcp" or "udp")
123 * @param domain Domain name to query (e.g. "blubb.com")
124 * @param cb A callback which will be called with the results
125 * @param extradata Extra data to be passed to the callback
126 *
127 * @deprecated Use purple_srv_resolve_account instead
111 */ 128 */
112 PurpleSrvTxtQueryData *purple_srv_resolve(const char *protocol, const char *transport, const char *domain, PurpleSrvCallback cb, gpointer extradata); 129 PurpleSrvTxtQueryData *purple_srv_resolve(const char *protocol, const char *transport, const char *domain, PurpleSrvCallback cb, gpointer extradata);
130 #endif
113 131
114 /** 132 /**
115 * Cancel an SRV or DNS query. 133 * Cancel an SRV or DNS query.
116 * 134 *
117 * @param query_data The request to cancel. 135 * @param query_data The request to cancel.
119 void purple_srv_cancel(PurpleSrvTxtQueryData *query_data); 137 void purple_srv_cancel(PurpleSrvTxtQueryData *query_data);
120 138
121 /** 139 /**
122 * Queries an TXT record. 140 * Queries an TXT record.
123 * 141 *
142 * @param account the account that the query is being done for (or NULL)
124 * @param owner Name of the protocol (e.g. "_xmppconnect") 143 * @param owner Name of the protocol (e.g. "_xmppconnect")
125 * @param domain Domain name to query (e.g. "blubb.com") 144 * @param domain Domain name to query (e.g. "blubb.com")
126 * @param cb A callback which will be called with the results 145 * @param cb A callback which will be called with the results
127 * @param extradata Extra data to be passed to the callback 146 * @param extradata Extra data to be passed to the callback
128 * 147 *
148 * @since 2.8.0
149 */
150 PurpleSrvTxtQueryData *purple_txt_resolve_account(PurpleAccount *account, const char *owner, const char *domain, PurpleTxtCallback cb, gpointer extradata);
151
152 #ifndef PURPLE_DISABLE_DEPRECATED
153 /**
154 * Queries an TXT record.
155 *
156 * @param owner Name of the protocol (e.g. "_xmppconnect")
157 * @param domain Domain name to query (e.g. "blubb.com")
158 * @param cb A callback which will be called with the results
159 * @param extradata Extra data to be passed to the callback
160 *
161 * @deprecated Use purple_txt_resolve_account instead
162 *
129 * @since 2.6.0 163 * @since 2.6.0
130 */ 164 */
131 PurpleSrvTxtQueryData *purple_txt_resolve(const char *owner, const char *domain, PurpleTxtCallback cb, gpointer extradata); 165 PurpleSrvTxtQueryData *purple_txt_resolve(const char *owner, const char *domain, PurpleTxtCallback cb, gpointer extradata);
166 #endif
132 167
133 /** 168 /**
134 * Cancel an TXT DNS query. 169 * Cancel an TXT DNS query.
135 * 170 *
136 * @param query_data The request to cancel. 171 * @param query_data The request to cancel.