summaryrefslogtreecommitdiff
path: root/libnm/nm-device-infiniband.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-infiniband.h
parent5632ac6730b2bc35c8a3ec1d40b921dfadaef110 (diff)
downloadNetworkManager-69099f3e80dde14b4556c95fbdde7f01b913cdbc.tar.gz
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-infiniband.h')
-rw-r--r--libnm/nm-device-infiniband.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/libnm/nm-device-infiniband.h b/libnm/nm-device-infiniband.h
index ac15410afa..c1f9be073f 100644
--- a/libnm/nm-device-infiniband.h
+++ b/libnm/nm-device-infiniband.h
@@ -36,25 +36,6 @@ G_BEGIN_DECLS
#define NM_IS_DEVICE_INFINIBAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_INFINIBAND))
#define NM_DEVICE_INFINIBAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_INFINIBAND, NMDeviceInfinibandClass))
-/**
- * NMDeviceInfinibandError:
- * @NM_DEVICE_INFINIBAND_ERROR_UNKNOWN: unknown or unclassified error
- * @NM_DEVICE_INFINIBAND_ERROR_NOT_INFINIBAND_CONNECTION: the connection was not of InfiniBand type
- * @NM_DEVICE_INFINIBAND_ERROR_INVALID_INFINIBAND_CONNECTION: the InfiniBand connection was invalid
- * @NM_DEVICE_INFINIBAND_ERROR_INVALID_DEVICE_MAC: the device's MAC was invalid
- * @NM_DEVICE_INFINIBAND_ERROR_MAC_MISMATCH: the MACs of the connection and the device mismatched
- */
-typedef enum {
- NM_DEVICE_INFINIBAND_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
- NM_DEVICE_INFINIBAND_ERROR_NOT_INFINIBAND_CONNECTION, /*< nick=NotInfinibandConnection >*/
- NM_DEVICE_INFINIBAND_ERROR_INVALID_INFINIBAND_CONNECTION, /*< nick=InvalidInfinibandConnection >*/
- NM_DEVICE_INFINIBAND_ERROR_INVALID_DEVICE_MAC, /*< nick=InvalidDeviceMac >*/
- NM_DEVICE_INFINIBAND_ERROR_MAC_MISMATCH, /*< nick=MacMismatch >*/
-} NMDeviceInfinibandError;
-
-#define NM_DEVICE_INFINIBAND_ERROR nm_device_infiniband_error_quark ()
-GQuark nm_device_infiniband_error_quark (void);
-
#define NM_DEVICE_INFINIBAND_HW_ADDRESS "hw-address"
#define NM_DEVICE_INFINIBAND_CARRIER "carrier"