core: add numeric reason codes for easier maintenance
Also makes it easier to keep the introspection and the C in sync.
This commit is contained in:
@@ -241,136 +241,136 @@ typedef enum {
|
||||
NM_DEVICE_STATE_REASON_NONE = 0,
|
||||
|
||||
/* Unknown error */
|
||||
NM_DEVICE_STATE_REASON_UNKNOWN,
|
||||
NM_DEVICE_STATE_REASON_UNKNOWN = 1,
|
||||
|
||||
/* Device is now managed */
|
||||
NM_DEVICE_STATE_REASON_NOW_MANAGED,
|
||||
NM_DEVICE_STATE_REASON_NOW_MANAGED = 2,
|
||||
|
||||
/* Device is now managed unmanaged */
|
||||
NM_DEVICE_STATE_REASON_NOW_UNMANAGED,
|
||||
NM_DEVICE_STATE_REASON_NOW_UNMANAGED = 3,
|
||||
|
||||
/* The device could not be readied for configuration */
|
||||
NM_DEVICE_STATE_REASON_CONFIG_FAILED,
|
||||
NM_DEVICE_STATE_REASON_CONFIG_FAILED = 4,
|
||||
|
||||
/* IP configuration could not be reserved (no available address, timeout, etc) */
|
||||
NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE,
|
||||
NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE = 5,
|
||||
|
||||
/* The IP config is no longer valid */
|
||||
NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED,
|
||||
NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED = 6,
|
||||
|
||||
/* Secrets were required, but not provided */
|
||||
NM_DEVICE_STATE_REASON_NO_SECRETS,
|
||||
NM_DEVICE_STATE_REASON_NO_SECRETS = 7,
|
||||
|
||||
/* 802.1x supplicant disconnected */
|
||||
NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT,
|
||||
NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT = 8,
|
||||
|
||||
/* 802.1x supplicant configuration failed */
|
||||
NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED,
|
||||
NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED = 9,
|
||||
|
||||
/* 802.1x supplicant failed */
|
||||
NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED,
|
||||
NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED = 10,
|
||||
|
||||
/* 802.1x supplicant took too long to authenticate */
|
||||
NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT,
|
||||
NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT = 11,
|
||||
|
||||
/* PPP service failed to start */
|
||||
NM_DEVICE_STATE_REASON_PPP_START_FAILED,
|
||||
NM_DEVICE_STATE_REASON_PPP_START_FAILED = 12,
|
||||
|
||||
/* PPP service disconnected */
|
||||
NM_DEVICE_STATE_REASON_PPP_DISCONNECT,
|
||||
NM_DEVICE_STATE_REASON_PPP_DISCONNECT = 13,
|
||||
|
||||
/* PPP failed */
|
||||
NM_DEVICE_STATE_REASON_PPP_FAILED,
|
||||
NM_DEVICE_STATE_REASON_PPP_FAILED = 14,
|
||||
|
||||
/* DHCP client failed to start */
|
||||
NM_DEVICE_STATE_REASON_DHCP_START_FAILED,
|
||||
NM_DEVICE_STATE_REASON_DHCP_START_FAILED = 15,
|
||||
|
||||
/* DHCP client error */
|
||||
NM_DEVICE_STATE_REASON_DHCP_ERROR,
|
||||
NM_DEVICE_STATE_REASON_DHCP_ERROR = 16,
|
||||
|
||||
/* DHCP client failed */
|
||||
NM_DEVICE_STATE_REASON_DHCP_FAILED,
|
||||
NM_DEVICE_STATE_REASON_DHCP_FAILED = 17,
|
||||
|
||||
/* Shared connection service failed to start */
|
||||
NM_DEVICE_STATE_REASON_SHARED_START_FAILED,
|
||||
NM_DEVICE_STATE_REASON_SHARED_START_FAILED = 18,
|
||||
|
||||
/* Shared connection service failed */
|
||||
NM_DEVICE_STATE_REASON_SHARED_FAILED,
|
||||
NM_DEVICE_STATE_REASON_SHARED_FAILED = 19,
|
||||
|
||||
/* AutoIP service failed to start */
|
||||
NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED,
|
||||
NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED = 20,
|
||||
|
||||
/* AutoIP service error */
|
||||
NM_DEVICE_STATE_REASON_AUTOIP_ERROR,
|
||||
NM_DEVICE_STATE_REASON_AUTOIP_ERROR = 21,
|
||||
|
||||
/* AutoIP service failed */
|
||||
NM_DEVICE_STATE_REASON_AUTOIP_FAILED,
|
||||
NM_DEVICE_STATE_REASON_AUTOIP_FAILED = 22,
|
||||
|
||||
/* The line is busy */
|
||||
NM_DEVICE_STATE_REASON_MODEM_BUSY,
|
||||
NM_DEVICE_STATE_REASON_MODEM_BUSY = 23,
|
||||
|
||||
/* No dial tone */
|
||||
NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE,
|
||||
NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE = 24,
|
||||
|
||||
/* No carrier could be established */
|
||||
NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER,
|
||||
NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER = 25,
|
||||
|
||||
/* The dialing request timed out */
|
||||
NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT,
|
||||
NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT = 26,
|
||||
|
||||
/* The dialing attempt failed */
|
||||
NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED,
|
||||
NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED = 27,
|
||||
|
||||
/* Modem initialization failed */
|
||||
NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED,
|
||||
NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED = 28,
|
||||
|
||||
/* Failed to select the specified APN */
|
||||
NM_DEVICE_STATE_REASON_GSM_APN_FAILED,
|
||||
NM_DEVICE_STATE_REASON_GSM_APN_FAILED = 29,
|
||||
|
||||
/* Not searching for networks */
|
||||
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING,
|
||||
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING = 30,
|
||||
|
||||
/* Network registration denied */
|
||||
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED,
|
||||
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED = 31,
|
||||
|
||||
/* Network registration timed out */
|
||||
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT,
|
||||
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT = 32,
|
||||
|
||||
/* Failed to register with the requested network */
|
||||
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED,
|
||||
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED = 33,
|
||||
|
||||
/* PIN check failed */
|
||||
NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED,
|
||||
NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED = 34,
|
||||
|
||||
/* Necessary firmware for the device may be missing */
|
||||
NM_DEVICE_STATE_REASON_FIRMWARE_MISSING,
|
||||
NM_DEVICE_STATE_REASON_FIRMWARE_MISSING = 35,
|
||||
|
||||
/* The device was removed */
|
||||
NM_DEVICE_STATE_REASON_REMOVED,
|
||||
NM_DEVICE_STATE_REASON_REMOVED = 36,
|
||||
|
||||
/* NetworkManager went to sleep */
|
||||
NM_DEVICE_STATE_REASON_SLEEPING,
|
||||
NM_DEVICE_STATE_REASON_SLEEPING = 37,
|
||||
|
||||
/* The device's active connection disappeared */
|
||||
NM_DEVICE_STATE_REASON_CONNECTION_REMOVED,
|
||||
NM_DEVICE_STATE_REASON_CONNECTION_REMOVED = 38,
|
||||
|
||||
/* Device disconnected by user or client */
|
||||
NM_DEVICE_STATE_REASON_USER_REQUESTED,
|
||||
NM_DEVICE_STATE_REASON_USER_REQUESTED = 39,
|
||||
|
||||
/* Carrier/link changed */
|
||||
NM_DEVICE_STATE_REASON_CARRIER,
|
||||
NM_DEVICE_STATE_REASON_CARRIER = 40,
|
||||
|
||||
/* The device's existing connection was assumed */
|
||||
NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED,
|
||||
NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED = 41,
|
||||
|
||||
/* The supplicant is now available */
|
||||
NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE,
|
||||
NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE = 42,
|
||||
|
||||
/* The modem could not be found */
|
||||
NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND,
|
||||
NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND = 43,
|
||||
|
||||
/* The Bluetooth connection failed or timed out */
|
||||
NM_DEVICE_STATE_REASON_BT_FAILED,
|
||||
NM_DEVICE_STATE_REASON_BT_FAILED = 44,
|
||||
|
||||
/* Unused */
|
||||
NM_DEVICE_STATE_REASON_LAST = 0xFFFF
|
||||
|
Reference in New Issue
Block a user