diff libpurple/proxy.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 9a7c5d242521
children 92f3d821653f b9f58c31afc7
line wrap: on
line diff
--- a/libpurple/proxy.h	Tue Apr 19 04:41:59 2011 +0000
+++ b/libpurple/proxy.h	Tue Apr 19 04:58:17 2011 +0000
@@ -307,10 +307,39 @@
  *         opaque data structure that can be used to cancel
  *         the pending connection, if needed.
  */
+PurpleProxyConnectData *purple_proxy_connect_socks5_account(void *handle,
+			PurpleAccount *account, PurpleProxyInfo *gpi,
+			const char *host, int port,
+			PurpleProxyConnectFunction connect_cb, gpointer data);
+
+#ifndef PURPLE_DISABLE_DEPRECATED
+/**
+ * Makes a connection through a SOCKS5 proxy.
+ *
+ * @param handle     A handle that should be associated with this
+ *                   connection attempt.  The handle can be used
+ *                   to cancel the connection attempt using the
+ *                   purple_proxy_connect_cancel_with_handle()
+ *                   function.
+ * @param gpi        The PurpleProxyInfo specifying the proxy settings
+ * @param host       The destination host.
+ * @param port       The destination port.
+ * @param connect_cb The function to call when the connection is
+ *                   established.  If the connection failed then
+ *                   fd will be -1 and error message will be set
+ *                   to something descriptive (hopefully).
+ * @param data       User-defined data.
+ *
+ * @return NULL if there was an error, or a reference to an
+ *         opaque data structure that can be used to cancel
+ *         the pending connection, if needed.
+ * @deprecated Use purple_proxy_connect_socks5_account instead
+ */
 PurpleProxyConnectData *purple_proxy_connect_socks5(void *handle,
 			PurpleProxyInfo *gpi,
 			const char *host, int port,
 			PurpleProxyConnectFunction connect_cb, gpointer data);
+#endif
 
 /**
  * Cancel an in-progress connection attempt.  This should be called