api: add a "ModemManager unavailable" device state reason

To be used when MM quits unexpectedly, or isn't running and the
device needs MM.
This commit is contained in:
Dan Williams 2012-08-29 14:21:08 -05:00
parent 1eaf919bc6
commit e6061a1e96
3 changed files with 10 additions and 0 deletions

View file

@ -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;

View file

@ -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">

View file

@ -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;
}