device,libnm,cli: add "new-activation" reason for device state change

It will be used when the device is disconnected for new connection activation.
This commit is contained in:
Lubomir Rintel 2015-04-07 11:53:09 -04:00
parent c1c3d7e145
commit 1ad193a017
4 changed files with 8 additions and 0 deletions

View file

@ -705,6 +705,9 @@ nmc_device_reason_to_string (NMDeviceStateReason reason)
case NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT:
return _("SIM PIN was incorrect");
case NM_DEVICE_STATE_REASON_NEW_ACTIVATION:
return _("New connection activation was enqueued");
default:
/* TRANSLATORS: Unknown reason for a device state change (NMDeviceStateReason) */
return _("Unknown");

View file

@ -460,6 +460,7 @@ typedef enum {
* @NM_DEVICE_STATE_REASON_MODEM_FAILED: Modem failed or no longer available
* @NM_DEVICE_STATE_REASON_MODEM_AVAILABLE: Modem now ready and available
* @NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT: SIM PIN was incorrect
* @NM_DEVICE_STATE_REASON_NEW_ACTIVATION: New connection activation was enqueued
*
* Device state change reason codes
*
@ -526,6 +527,7 @@ typedef enum {
NM_DEVICE_STATE_REASON_MODEM_FAILED = 57,
NM_DEVICE_STATE_REASON_MODEM_AVAILABLE = 58,
NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT = 59,
NM_DEVICE_STATE_REASON_NEW_ACTIVATION = 60,
} NMDeviceStateReason;

View file

@ -465,6 +465,7 @@ typedef enum {
* @NM_DEVICE_STATE_REASON_MODEM_FAILED: Modem failed or no longer available
* @NM_DEVICE_STATE_REASON_MODEM_AVAILABLE: Modem now ready and available
* @NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT: SIM PIN was incorrect
* @NM_DEVICE_STATE_REASON_NEW_ACTIVATION: New connection activation was enqueued
*
* Device state change reason codes
*
@ -531,6 +532,7 @@ typedef enum {
NM_DEVICE_STATE_REASON_MODEM_FAILED = 57,
NM_DEVICE_STATE_REASON_MODEM_AVAILABLE = 58,
NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT = 59,
NM_DEVICE_STATE_REASON_NEW_ACTIVATION = 60,
NM_DEVICE_STATE_REASON_LAST = 0xFFFF
} NMDeviceStateReason;

View file

@ -448,6 +448,7 @@ static const char *reason_table[] = {
[NM_DEVICE_STATE_REASON_MODEM_FAILED] = "modem-failed",
[NM_DEVICE_STATE_REASON_MODEM_AVAILABLE] = "modem-available",
[NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT] = "sim-pin-incorrect",
[NM_DEVICE_STATE_REASON_NEW_ACTIVATION] = "new-activation",
};
static const char *