2008-05-09 Tambet Ingo <tambet@gmail.com>

* system-settings/plugins/ifcfg-suse/nm-suse-connection.c: Implement
	NMExportedConnection's 'update' and 'delete' and return error with
	descriptive message.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3648 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Tambet Ingo 2008-05-09 09:30:03 +00:00
parent 0a230b98c1
commit 6ddd48f0f6
3 changed files with 31 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2008-05-09 Tambet Ingo <tambet@gmail.com>
* system-settings/plugins/ifcfg-suse/nm-suse-connection.c: Implement
NMExportedConnection's 'update' and 'delete' and return error with
descriptive message.
2008-05-08 Dan Williams <dcbw@redhat.com>
Patch from Markus Becker <mab@comnets.uni-bremen.de>

View file

@ -15,6 +15,7 @@ libnm_settings_plugin_ifcfg_suse_la_CPPFLAGS = \
$(GLIB_CFLAGS) \
$(GMODULE_CFLAGS) \
$(DBUS_CFLAGS) \
$(POLKIT_CFLAGS) \
-DG_DISABLE_DEPRECATED \
-I${top_srcdir}/system-settings/src \
-I$(top_srcdir)/include \
@ -26,6 +27,7 @@ libnm_settings_plugin_ifcfg_suse_la_LDFLAGS = -module -avoid-version
libnm_settings_plugin_ifcfg_suse_la_LIBADD = \
$(GLIB_LIBS) \
$(GMODULE_LIBS) \
$(POLKIT_LIBS) \
$(GIO_LIBS) \
$(top_builddir)/libnm-util/libnm-util.la \
$(top_builddir)/libnm-glib/libnm_glib.la

View file

@ -6,6 +6,7 @@
#include <NetworkManager.h>
#include "nm-suse-connection.h"
#include "parser.h"
#include "nm-polkit-helpers.h"
G_DEFINE_TYPE (NMSuseConnection, nm_suse_connection, NM_TYPE_SYSCONFIG_CONNECTION)
@ -103,6 +104,26 @@ get_id (NMExportedConnection *exported)
return NM_SUSE_CONNECTION_GET_PRIVATE (exported)->filename;
}
static gboolean
update (NMExportedConnection *exported,
GHashTable *new_settings,
GError **err)
{
g_set_error (err, NM_SYSCONFIG_SETTINGS_ERROR, NM_SYSCONFIG_SETTINGS_ERROR_GENERAL,
"%s", "Please use YaST to change this connection.");
return FALSE;
}
static gboolean
delete (NMExportedConnection *exported, GError **err)
{
g_set_error (err, NM_SYSCONFIG_SETTINGS_ERROR, NM_SYSCONFIG_SETTINGS_ERROR_GENERAL,
"%s", "Please use YaST to remove this connection.");
return FALSE;
}
/* GObject */
static void
@ -141,4 +162,6 @@ nm_suse_connection_class_init (NMSuseConnectionClass *suse_connection_class)
connection_class->get_settings = get_settings;
connection_class->get_id = get_id;
connection_class->update = update;
connection_class->delete = delete;
}