device,libnm,cli: add "new-activation" reason for device state change
authorLubomir Rintel <lkundrak@v3.sk>
Tue, 7 Apr 2015 15:53:09 +0000 (11:53 -0400)
committerLubomir Rintel <lkundrak@v3.sk>
Wed, 8 Apr 2015 08:00:11 +0000 (10:00 +0200)
It will be used when the device is disconnected for new connection activation.

clients/cli/common.c
libnm-core/nm-dbus-interface.h
libnm-util/NetworkManager.h
src/devices/nm-device.c

index 1276e73..56a7a00 100644 (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");
index dd2b70a..04a822c 100644 (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;
 
 
index 08b4e6c..4557a87 100644 (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;
index 5b3c7db..5584ea1 100644 (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 *