summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2012-08-29 14:21:08 -0500
committerDan Williams <dcbw@redhat.com>2012-08-29 17:39:33 -0500
commite6061a1e96c373747c89a9ba8c47ce979097ccca (patch)
tree1b6d87636288e38bb1f1ea2bf2dd4287de131a32
parent1eaf919bc65f2cda2dc6c76686976e57c2b0f26f (diff)
api: add a "ModemManager unavailable" device state reason
To be used when MM quits unexpectedly, or isn't running and the device needs MM.
-rw-r--r--include/NetworkManager.h3
-rw-r--r--introspection/nm-device.xml5
-rw-r--r--src/nm-device.c2
3 files changed, 10 insertions, 0 deletions
diff --git a/include/NetworkManager.h b/include/NetworkManager.h
index bb67b8f7..e0194b64 100644
--- a/include/NetworkManager.h
+++ b/include/NetworkManager.h
@@ -492,6 +492,9 @@ typedef enum {
/* Problem with the RFC 2684 Ethernet over ADSL bridge */
NM_DEVICE_STATE_REASON_BR2684_FAILED = 51,
+ /* ModemManager not running */
+ NM_DEVICE_STATE_REASON_MODEM_MANAGER_UNAVAILABLE = 52,
+
/* Unused */
NM_DEVICE_STATE_REASON_LAST = 0xFFFF
} NMDeviceStateReason;
diff --git a/introspection/nm-device.xml b/introspection/nm-device.xml
index 5b2c98b3..240cbd31 100644
--- a/introspection/nm-device.xml
+++ b/introspection/nm-device.xml
@@ -559,6 +559,11 @@
Problem with the RFC 2684 Ethernet over ADSL bridge.
</tp:docstring>
</tp:enumvalue>
+ <tp:enumvalue suffix="MODEM_MANAGER_UNAVAILABLE" value="52">
+ <tp:docstring>
+ ModemManager was not running or quit unexpectedly.
+ </tp:docstring>
+ </tp:enumvalue>
</tp:enum>
<tp:struct name="NM_DEVICE_STATE_REASON_STRUCT">
diff --git a/src/nm-device.c b/src/nm-device.c
index 18aa92a9..23e8ed41 100644
--- a/src/nm-device.c
+++ b/src/nm-device.c
@@ -4520,6 +4520,8 @@ reason_to_string (NMDeviceStateReason reason)
return "dependency-failed";
case NM_DEVICE_STATE_REASON_BR2684_FAILED:
return "br2684-bridge-failed";
+ case NM_DEVICE_STATE_REASON_MODEM_MANAGER_UNAVAILABLE:
+ return "modem-manager-unavailable";
default:
break;
}