changeset 25392:4670851af098

Patch from fqueze to add API for setting the global proxy settings. Fixes #7610.
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 06 Jan 2009 03:46:52 +0000
parents 991796129108
children be3ba7e07de5
files ChangeLog.API libpurple/proxy.c libpurple/proxy.h
diffstat 3 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog.API	Fri Jan 02 22:52:17 2009 +0000
+++ b/ChangeLog.API	Tue Jan 06 03:46:52 2009 +0000
@@ -22,6 +22,7 @@
 		* purple_request_field_get_ui_data
 		* purple_request_field_set_ui_data
 		* purple_network_force_online
+		* purple_global_proxy_set_info
 
 		Deprecated:
 		* purple_buddy_get_local_alias
--- a/libpurple/proxy.c	Fri Jan 02 22:52:17 2009 +0000
+++ b/libpurple/proxy.c	Tue Jan 06 03:46:52 2009 +0000
@@ -207,6 +207,16 @@
 	return global_proxy_info;
 }
 
+void
+purple_global_proxy_set_info(PurpleProxyInfo *info)
+{
+	g_return_if_fail(info != NULL);
+
+	purple_proxy_info_destroy(global_proxy_info);
+
+	global_proxy_info = info;
+}
+
 static PurpleProxyInfo *
 purple_gnome_proxy_get_info(void)
 {
--- a/libpurple/proxy.h	Fri Jan 02 22:52:17 2009 +0000
+++ b/libpurple/proxy.h	Tue Jan 06 03:46:52 2009 +0000
@@ -186,6 +186,13 @@
  */
 PurpleProxyInfo *purple_global_proxy_get_info(void);
 
+/**
+ * Set purple's global proxy information.
+ *
+ * @param info     The proxy information.
+ */
+void purple_global_proxy_set_info(PurpleProxyInfo *info);
+
 /*@}*/
 
 /**************************************************************************/