NetworkManager/system-settings/src/nm-system-config-error.c
Dan Williams 201fd4ed8e 2008-11-03 Dan Williams <dcbw@redhat.com>
* system-settings/src/main.c
		- (add_default_dhcp_connection): make the fallback connection read-only

	* libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- Add detailed errors
		- (impl_exported_connection_update, impl_exported_connection_delete):
			return an error if the connection is read-only

	* system-settings/plugins/ifupdown/nm-ifupdown-connection.c
	  system-settings/plugins/keyfile/nm-keyfile-connection.c
	  system-settings/src/main.c
		- Use more detailed errors

	* system-settings/src/nm-system-config-error.c
	  system-settings/src/nm-system-config-error.h
	  system-settings/src/dbus-settings.c
		- Remove NM_SYSCONFIG_SETTINGS_ERROR_INVALID_CONNECTION, replaced by
			NM_SETTINGS_ERROR_INVALID_CONNECTION



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4254 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-03 22:32:49 +00:00

59 lines
2.1 KiB
C

/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager system settings service
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Copyright (C) 2008 Novell, Inc.
* Copyright (C) 2008 Red Hat, Inc.
*/
#include "nm-system-config-error.h"
GQuark
nm_sysconfig_settings_error_quark (void)
{
static GQuark ret = 0;
if (ret == 0)
ret = g_quark_from_static_string ("nm_sysconfig_settings_error");
return ret;
}
#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
GType
nm_sysconfig_settings_error_get_type (void)
{
static GType etype = 0;
if (etype == 0) {
static const GEnumValue values[] = {
ENUM_ENTRY (NM_SYSCONFIG_SETTINGS_ERROR_GENERAL, "GeneralError"),
ENUM_ENTRY (NM_SYSCONFIG_SETTINGS_ERROR_NOT_PRIVILEGED, "NotPrivileged"),
ENUM_ENTRY (NM_SYSCONFIG_SETTINGS_ERROR_ADD_NOT_SUPPORTED, "AddNotSupported"),
ENUM_ENTRY (NM_SYSCONFIG_SETTINGS_ERROR_UPDATE_NOT_SUPPORTED, "UpdateNotSupported"),
ENUM_ENTRY (NM_SYSCONFIG_SETTINGS_ERROR_DELETE_NOT_SUPPORTED, "DeleteNotSupported"),
ENUM_ENTRY (NM_SYSCONFIG_SETTINGS_ERROR_ADD_FAILED, "AddFailed"),
ENUM_ENTRY (NM_SYSCONFIG_SETTINGS_ERROR_SAVE_HOSTNAME_NOT_SUPPORTED, "SaveHostnameNotSupported"),
ENUM_ENTRY (NM_SYSCONFIG_SETTINGS_ERROR_SAVE_HOSTNAME_FAILED, "SaveHostnameFailed"),
{ 0, 0, 0 }
};
etype = g_enum_register_static ("NMSysconfigSettingsError", values);
}
return etype;
}