summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2015-04-07 11:53:09 -0400
committerLubomir Rintel <lkundrak@v3.sk>2015-04-08 10:00:11 +0200
commit1ad193a01759f1dd8cbb16317b9b3490fa95193a (patch)
tree16b72d7214933038b0b75b3e6f3459e17de27c51
parentc1c3d7e145ab2ea65c5474817bcb20b58f434ecb (diff)
downloadNetworkManager-1ad193a01759f1dd8cbb16317b9b3490fa95193a.tar.gz
device,libnm,cli: add "new-activation" reason for device state change
It will be used when the device is disconnected for new connection activation.
-rw-r--r--clients/cli/common.c3
-rw-r--r--libnm-core/nm-dbus-interface.h2
-rw-r--r--libnm-util/NetworkManager.h2
-rw-r--r--src/devices/nm-device.c1
4 files changed, 8 insertions, 0 deletions
diff --git a/clients/cli/common.c b/clients/cli/common.c
index 1276e73cbd..56a7a009a8 100644
--- a/clients/cli/common.c
+++ b/clients/cli/common.c
@@ -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");
diff --git a/libnm-core/nm-dbus-interface.h b/libnm-core/nm-dbus-interface.h
index dd2b70a0dc..04a822cb4c 100644
--- a/libnm-core/nm-dbus-interface.h
+++ b/libnm-core/nm-dbus-interface.h
@@ -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;
diff --git a/libnm-util/NetworkManager.h b/libnm-util/NetworkManager.h
index 08b4e6cf6b..4557a87c8f 100644
--- a/libnm-util/NetworkManager.h
+++ b/libnm-util/NetworkManager.h
@@ -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;
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 5b3c7dbc74..5584ea116c 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -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 *