diff options
| author | Jiří Klimeš <jklimes@redhat.com> | 2012-03-14 14:10:03 +0100 |
|---|---|---|
| committer | Jiří Klimeš <jklimes@redhat.com> | 2012-03-16 09:54:36 +0100 |
| commit | a11067f5846e3effe2f653b8babdfbabf7d2254d (patch) | |
| tree | 0de8df6221fad934fb9539976af5af9b29131b5b /libnm-glib/nm-device-bond.h | |
| parent | 43ba4eb04bc1d651f79a138a8ecdc7491d2bece1 (diff) | |
| download | NetworkManager-a11067f5846e3effe2f653b8babdfbabf7d2254d.tar.gz | |
libnm-glib: add errors to device classes and nm_device_connection_compatible()
Add nm_device_connection_compatible() that returns an error when it fails.
nm_device_connection_valid() does the same work except it doesn't set GError.
Diffstat (limited to 'libnm-glib/nm-device-bond.h')
| -rw-r--r-- | libnm-glib/nm-device-bond.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/libnm-glib/nm-device-bond.h b/libnm-glib/nm-device-bond.h index 097a204b51..db4a90fc56 100644 --- a/libnm-glib/nm-device-bond.h +++ b/libnm-glib/nm-device-bond.h @@ -17,8 +17,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * Copyright (C) 2007 - 2008 Novell, Inc. - * Copyright (C) 2007 - 2011 Red Hat, Inc. + * Copyright (C) 2012 Red Hat, Inc. */ #ifndef NM_DEVICE_BOND_H @@ -35,6 +34,23 @@ G_BEGIN_DECLS #define NM_IS_DEVICE_BOND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_BOND)) #define NM_DEVICE_BOND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_BOND, NMDeviceBondClass)) +/** + * NMDeviceBondError: + * @NM_DEVICE_BOND_ERROR_UNKNOWN: unknown or unclassified error + * @NM_DEVICE_BOND_ERROR_NOT_BOND_CONNECTION: the connection was not of bond type + * @NM_DEVICE_BOND_ERROR_INVALID_BOND_CONNECTION: the bond connection was invalid + * @NM_DEVICE_BOND_ERROR_INTERFACE_MISMATCH: the interfaces of the connection and the device mismatched + */ +typedef enum { + NM_DEVICE_BOND_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/ + NM_DEVICE_BOND_ERROR_NOT_BOND_CONNECTION, /*< nick=NotBondConnection >*/ + NM_DEVICE_BOND_ERROR_INVALID_BOND_CONNECTION, /*< nick=InvalidBondConnection >*/ + NM_DEVICE_BOND_ERROR_INTERFACE_MISMATCH, /*< nick=InterfaceMismatch >*/ +} NMDeviceBondError; + +#define NM_DEVICE_BOND_ERROR nm_device_bond_error_quark () +GQuark nm_device_bond_error_quark (void); + #define NM_DEVICE_BOND_HW_ADDRESS "hw-address" #define NM_DEVICE_BOND_CARRIER "carrier" |
