NetworkManager r4052 - in trunk: . libnm-glib



Author: dcbw
Date: Tue Sep  9 20:25:01 2008
New Revision: 4052
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=4052&view=rev

Log:
2008-09-09  Dan Williams  <dcbw redhat com>

	* libnm-glib/nm-vpn-plugin-ui-interface.c
	  libnm-glib/nm-vpn-plugin-ui-interface.h
	  libnm-glib/libnm_glib_vpn.ver
		- (nm_vpn_plugin_ui_interface_delete_connection): called when the plugin
			should clean up resources related to the connection (like keyring
			secrets)
		- (nm_vpn_plugin_ui_widget_interface_save_secrets): called when the plugin
			should save user-scope secrets (like to the keyring)



Modified:
   trunk/ChangeLog
   trunk/libnm-glib/libnm_glib_vpn.ver
   trunk/libnm-glib/nm-vpn-plugin-ui-interface.c
   trunk/libnm-glib/nm-vpn-plugin-ui-interface.h

Modified: trunk/libnm-glib/libnm_glib_vpn.ver
==============================================================================
--- trunk/libnm-glib/libnm_glib_vpn.ver	(original)
+++ trunk/libnm-glib/libnm_glib_vpn.ver	Tue Sep  9 20:25:01 2008
@@ -10,6 +10,7 @@
 	nm_vpn_plugin_set_ip4_config;
 	nm_vpn_plugin_set_login_banner;
 	nm_vpn_plugin_set_state;
+	nm_vpn_plugin_ui_interface_delete_connection;
 	nm_vpn_plugin_ui_interface_export;
 	nm_vpn_plugin_ui_interface_get_capabilities;
 	nm_vpn_plugin_ui_interface_get_suggested_name;
@@ -18,6 +19,7 @@
 	nm_vpn_plugin_ui_interface_ui_factory;
 	nm_vpn_plugin_ui_widget_interface_get_type;
 	nm_vpn_plugin_ui_widget_interface_get_widget;
+	nm_vpn_plugin_ui_widget_interface_save_secrets;
 	nm_vpn_plugin_ui_widget_interface_update_connection;
 local:
 	*;

Modified: trunk/libnm-glib/nm-vpn-plugin-ui-interface.c
==============================================================================
--- trunk/libnm-glib/nm-vpn-plugin-ui-interface.c	(original)
+++ trunk/libnm-glib/nm-vpn-plugin-ui-interface.c	Tue Sep  9 20:25:01 2008
@@ -134,6 +134,17 @@
 	return NULL;
 }
 
+gboolean
+nm_vpn_plugin_ui_interface_delete_connection (NMVpnPluginUiInterface *iface,
+                                              NMConnection *connection,
+                                              GError **error)
+{
+	if (error)
+		g_return_val_if_fail (*error == NULL, FALSE);
+
+	return NM_VPN_PLUGIN_UI_INTERFACE_GET_INTERFACE (iface)->delete_connection (iface, connection, error);
+}
+
 
 static void
 widget_interface_init (gpointer g_iface)
@@ -202,3 +213,14 @@
 	return NM_VPN_PLUGIN_UI_WIDGET_INTERFACE_GET_INTERFACE (iface)->update_connection (iface, connection, error);
 }
 
+gboolean
+nm_vpn_plugin_ui_widget_interface_save_secrets (NMVpnPluginUiWidgetInterface *iface,
+                                                NMConnection *connection,
+                                                GError **error)
+{
+	if (error)
+		g_return_val_if_fail (*error == NULL, FALSE);
+
+	return NM_VPN_PLUGIN_UI_WIDGET_INTERFACE_GET_INTERFACE (iface)->save_secrets (iface, connection, error);
+}
+

Modified: trunk/libnm-glib/nm-vpn-plugin-ui-interface.h
==============================================================================
--- trunk/libnm-glib/nm-vpn-plugin-ui-interface.h	(original)
+++ trunk/libnm-glib/nm-vpn-plugin-ui-interface.h	Tue Sep  9 20:25:01 2008
@@ -103,6 +103,13 @@
 	 * by the caller.
 	 */
 	char * (*get_suggested_name) (NMVpnPluginUiInterface *iface, NMConnection *connection);
+
+	/* Called when the user has chosen to remove the connection (for user
+	 * connections only; system connections are handled by the system
+	 * settings service).  Should clear out any VPN-specific secrets or data
+	 * related to the connection.
+	 */
+	gboolean (*delete_connection) (NMVpnPluginUiInterface *iface, NMConnection *connection, GError **error);
 };
 
 GType nm_vpn_plugin_ui_interface_get_type (void);
@@ -125,6 +132,10 @@
 char *nm_vpn_plugin_ui_interface_get_suggested_name (NMVpnPluginUiInterface *iface,
                                                      NMConnection *connection);
 
+gboolean nm_vpn_plugin_ui_interface_delete_connection (NMVpnPluginUiInterface *iface,
+                                                       NMConnection *connection,
+                                                       GError **error);
+
 
 /**************************************************/
 /* UI widget interface                            */
@@ -152,6 +163,15 @@
 	                               NMConnection *connection,
 	                               GError **error);
 
+	/* Called when the user has chosen to save the connection (for user
+	 * connections only; system connections are handled by the system
+	 * settings service).  Should save VPN-specific connection secrets in
+	 * a way that the auth-dialog can read them.
+	 */
+	gboolean (*save_secrets) (NMVpnPluginUiWidgetInterface *iface,
+	                          NMConnection *connection,
+	                          GError **error);
+
 	/* Emitted when the value of a UI widget changes.  May trigger a validity
 	 * check via update_connection() to write values to the connection */
 	void (*changed) (NMVpnPluginUiWidgetInterface *iface);
@@ -165,6 +185,10 @@
                                                               NMConnection *connection,
                                                               GError **error);
 
+gboolean nm_vpn_plugin_ui_widget_interface_save_secrets (NMVpnPluginUiWidgetInterface *iface,
+                                                         NMConnection *connection,
+                                                         GError **error);
+
 G_END_DECLS
 
 #endif	/* NM_VPN_PLUGIN_UI_INTERFACE_H */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]