diff libpurple/dnsquery.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
line wrap: on
line diff
--- a/libpurple/dnsquery.h	Tue Apr 19 04:41:59 2011 +0000
+++ b/libpurple/dnsquery.h	Tue Apr 19 04:58:17 2011 +0000
@@ -88,6 +88,7 @@
 /**
  * Perform an asynchronous DNS query.
  *
+ * @param account the account that the query is being done for (or NULL)
  * @param hostname The hostname to resolve.
  * @param port     A port number which is stored in the struct sockaddr.
  * @param callback The callback function to call after resolving.
@@ -96,8 +97,28 @@
  * @return NULL if there was an error, otherwise return a reference to
  *         a data structure that can be used to cancel the pending
  *         DNS query, if needed.
+ *
+ * @since 2.8.0
+ */
+PurpleDnsQueryData *purple_dnsquery_a_account(PurpleAccount *account, const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data);
+
+#ifndef PURPLE_DISABLE_DEPRECATED
+/**
+ * Perform an asynchronous DNS query.
+ *
+ * @param hostname The hostname to resolve.
+ * @param port     A port number which is stored in the struct sockaddr.
+ * @param callback The callback function to call after resolving.
+ * @param data     Extra data to pass to the callback function.
+ *
+ * @return NULL if there was an error, otherwise return a reference to
+ *         a data structure that can be used to cancel the pending
+ *         DNS query, if needed.
+ *
+ * @deprecated Use purple_dnsquery_a_account instead
  */
 PurpleDnsQueryData *purple_dnsquery_a(const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data);
+#endif
 
 /**
  * Cancel a DNS query and destroy the associated data structure.