summaryrefslogtreecommitdiff
path: root/libnm/nm-device-generic.h
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-10-11 14:44:10 -0400
committerDan Winship <danw@gnome.org>2014-10-22 08:29:08 -0400
commit69099f3e80dde14b4556c95fbdde7f01b913cdbc (patch)
treec22208fdc344dbe6b6875cf583308b06953cf304 /libnm/nm-device-generic.h
parent5632ac6730b2bc35c8a3ec1d40b921dfadaef110 (diff)
libnm: merge device-type-specific errors into NMDeviceError
As with the settings, each device type was defining its own error type, containing either redundant or non-useful error codes. Drop all of the subtype-specific errors, and reduce things to just NM_DEVICE_ERROR_FAILED, NM_DEVICE_ERROR_INCOMPATIBLE_CONNECTION, and NM_DEVICE_ERROR_INVALID_CONNECTION. The device-type-specific errors were only returned from their nm_device_connection_compatible() implementations, so this is also a good opportunity to simplify those, by moving duplicated functionality into the base NMDevice implementation, and then allowing the subclasses to assume that the connection has already been validated in their own code. Most of the implementations now just check that the connection has the correct type for the device (which can't be done at the NMDevice level since some device types (eg, Ethernet) support multiple connection types.) Also, make sure that all of the error messages are localized.
Diffstat (limited to 'libnm/nm-device-generic.h')
-rw-r--r--libnm/nm-device-generic.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/libnm/nm-device-generic.h b/libnm/nm-device-generic.h
index be0d932d93..457a88403e 100644
--- a/libnm/nm-device-generic.h
+++ b/libnm/nm-device-generic.h
@@ -36,21 +36,6 @@ G_BEGIN_DECLS
#define NM_IS_DEVICE_GENERIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_GENERIC))
#define NM_DEVICE_GENERIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_GENERIC, NMDeviceGenericClass))
-/**
- * NMDeviceGenericError:
- * @NM_DEVICE_GENERIC_ERROR_UNKNOWN: unknown or unclassified error
- * @NM_DEVICE_GENERIC_ERROR_NOT_GENERIC_CONNECTION: the connection was not of generic type
- * @NM_DEVICE_GENERIC_ERROR_MISSING_INTERFACE_NAME: the connection did not specify the interface name
- */
-typedef enum {
- NM_DEVICE_GENERIC_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
- NM_DEVICE_GENERIC_ERROR_NOT_GENERIC_CONNECTION, /*< nick=NotGenericConnection >*/
- NM_DEVICE_GENERIC_ERROR_MISSING_INTERFACE_NAME, /*< nick=MissingInterfaceName >*/
-} NMDeviceGenericError;
-
-#define NM_DEVICE_GENERIC_ERROR nm_device_generic_error_quark ()
-GQuark nm_device_generic_error_quark (void);
-
#define NM_DEVICE_GENERIC_HW_ADDRESS "hw-address"
#define NM_DEVICE_GENERIC_TYPE_DESCRIPTION "type-description"