2008-04-22 Tambet Ingo <tambet@gmail.com>

Implement GKeyFile system settings plugin.
	Implement writing system settings (currently supported only by GKeyFile plugin).

	* system-settings/src/main.c:
	* system-settings/src/dbus-settings.c: Move the communication with plugins
	from main.c to dbus-settings.c. Makes it possible to talk to all registered
	plugins for adding/updating/removing connections.

	* system-settings/src/nm-system-config-interface.c
	(nm_system_config_interface_add_connection): Implement
	(nm_system_config_interface_update_connection): Implement.
	(nm_system_config_interface_remove_connection): Implement.

	* system-settings/plugins/keyfile/Makefile.am:
	* system-settings/plugins/keyfile/plugin.[ch]:
	* system-settings/plugins/keyfile/writer.[ch]:
	* system-settings/plugins/keyfile/reader.[ch]: Implement.

	* system-settings/plugins/Makefile.am: Add GKeyFile plugin.

	* configure.in: Generate GKeyFile Makefile.

	* libnm-glib/nm-settings.c (impl_exported_connection_get_id): Fix a memory
	corruption, need to duplicate the returned string.
	(impl_exported_connection_update): Implement.
	(impl_exported_connection_delete): Implement.

	* introspection/nm-settings-system.xml: Add "AddConnection" method.

	* introspection/nm-exported-connection.xml: Add "Update" and "Delete" methods.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3587 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Tambet Ingo
2008-04-22 14:48:02 +00:00
parent bfa6b28b59
commit e6a5d0be51
19 changed files with 1228 additions and 244 deletions

View File

@@ -161,3 +161,35 @@ nm_system_config_interface_get_unmanaged_devices (NMSystemConfigInterface *confi
return NULL;
}
void
nm_system_config_interface_add_connection (NMSystemConfigInterface *config,
NMConnection *connection)
{
g_return_if_fail (config != NULL);
g_return_if_fail (NM_IS_CONNECTION (connection));
if (NM_SYSTEM_CONFIG_INTERFACE_GET_INTERFACE (config)->add_connection)
NM_SYSTEM_CONFIG_INTERFACE_GET_INTERFACE (config)->add_connection (config, connection);
}
void
nm_system_config_interface_update_connection (NMSystemConfigInterface *config,
NMConnection *connection)
{
g_return_if_fail (config != NULL);
g_return_if_fail (NM_IS_CONNECTION (connection));
if (NM_SYSTEM_CONFIG_INTERFACE_GET_INTERFACE (config)->update_connection)
NM_SYSTEM_CONFIG_INTERFACE_GET_INTERFACE (config)->update_connection (config, connection);
}
void
nm_system_config_interface_remove_connection (NMSystemConfigInterface *config,
NMConnection *connection)
{
g_return_if_fail (config != NULL);
g_return_if_fail (NM_IS_CONNECTION (connection));
if (NM_SYSTEM_CONFIG_INTERFACE_GET_INTERFACE (config)->remove_connection)
NM_SYSTEM_CONFIG_INTERFACE_GET_INTERFACE (config)->remove_connection (config, connection);
}