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. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3297 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -128,3 +128,17 @@ nm_system_config_interface_get_connections (NMSystemConfigInterface *config)
|
||||
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;
|
||||
}
|
||||
|
||||
|
@@ -71,13 +71,29 @@ typedef struct _NMSystemConfigInterface NMSystemConfigInterface;
|
||||
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 @@ void nm_system_config_interface_init (NMSystemConfigInterface *config);
|
||||
|
||||
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 */
|
||||
|
Reference in New Issue
Block a user