NetworkManager r3297 - trunk/system-settings/src
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3297 - trunk/system-settings/src
- Date: Thu, 7 Feb 2008 18:47:47 +0000 (GMT)
Author: dcbw
Date: Thu Feb 7 18:47:47 2008
New Revision: 3297
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3297&view=rev
Log:
2008-02-07 Dan Williams <dcbw redhat com>
* system-settings/src/nm-system-config-interface.c
system-settings/src/nm-system-config-interface.h
- Add a get_secrets() interface function to retrieve secrets for a
specific setting of a specific connection. Document the interface
a bit more too.
Modified:
trunk/system-settings/src/nm-system-config-interface.c
trunk/system-settings/src/nm-system-config-interface.h
Modified: trunk/system-settings/src/nm-system-config-interface.c
==============================================================================
--- trunk/system-settings/src/nm-system-config-interface.c (original)
+++ trunk/system-settings/src/nm-system-config-interface.c Thu Feb 7 18:47:47 2008
@@ -128,3 +128,17 @@
return NULL;
}
+GHashTable *
+nm_system_config_interface_get_secrets (NMSystemConfigInterface *config,
+ NMConnection *connection,
+ NMSetting *setting)
+{
+ g_return_val_if_fail (config != NULL, NULL);
+ g_return_val_if_fail (connection != NULL, NULL);
+ g_return_val_if_fail (setting != NULL, NULL);
+
+ if (NM_SYSTEM_CONFIG_INTERFACE_GET_INTERFACE (config)->get_secrets)
+ return NM_SYSTEM_CONFIG_INTERFACE_GET_INTERFACE (config)->get_secrets (config, connection, setting);
+ return NULL;
+}
+
Modified: trunk/system-settings/src/nm-system-config-interface.h
==============================================================================
--- trunk/system-settings/src/nm-system-config-interface.h (original)
+++ trunk/system-settings/src/nm-system-config-interface.h Thu Feb 7 18:47:47 2008
@@ -71,13 +71,29 @@
struct _NMSystemConfigInterface {
GTypeInterface g_iface;
+ /* Called when the plugin is loaded to initialize it */
void (*init) (NMSystemConfigInterface *config);
+ /* Returns the plugins currently known list of connections. The returned
+ * list is owned by the plugin and not freed by the system settings service.
+ */
GSList * (*get_connections) (NMSystemConfigInterface *config);
+ /* Return the secrets associated with a specific setting of a specific
+ * connection. The returned hash table is unreffed by the system settings
+ * service.
+ */
+ GHashTable * (*get_secrets) (NMSystemConfigInterface *config, NMConnection *connection, NMSetting *setting);
+
/* Signals */
+
+ /* Emitted when a new connection has been found by the plugin */
void (*connection_added) (NMSystemConfigInterface *config, NMConnection *connection);
+
+ /* Emitted when a connection has been removed by the plugin */
void (*connection_removed) (NMSystemConfigInterface *config, NMConnection *connection);
+
+ /* Emitted when any non-secret settings of the connection change */
void (*connection_updated) (NMSystemConfigInterface *config, NMConnection *connection);
};
@@ -87,6 +103,10 @@
GSList * nm_system_config_interface_get_connections (NMSystemConfigInterface *config);
+GHashTable *nm_system_config_interface_get_secrets (NMSystemConfigInterface *config,
+ NMConnection *connection,
+ NMSetting *setting);
+
G_END_DECLS
#endif /* NM_SYSTEM_CONFIG_INTERFACE_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]