From 82693cf523456058f03a06d6e9e449e1df7caac2 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 9 Dec 2011 19:10:08 +0100 Subject: cli: enable printing modem info --- cli/mmcli-common.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cli/mmcli-common.c') diff --git a/cli/mmcli-common.c b/cli/mmcli-common.c index 5dccd823..11b4b831 100644 --- a/cli/mmcli-common.c +++ b/cli/mmcli-common.c @@ -265,3 +265,16 @@ mmcli_get_state_reason_string (MMModemStateChangeReason reason) g_warn_if_reached (); return NULL; } + +const gchar * +mmcli_get_lock_string (MMModemLock lock) +{ + static GEnumClass *enum_class = NULL; + GEnumValue *value; + + if (!enum_class) + enum_class = G_ENUM_CLASS (g_type_class_ref (MM_TYPE_MODEM_LOCK)); + + value = g_enum_get_value (enum_class, lock); + return value->value_nick; +} -- cgit v1.2.3-70-g09d2