From c5fdd839056d13b13e017fe1fb2d76d6c8424db2 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 9 Jan 2012 21:07:35 +0100 Subject: cli: new helper to get the CDMA registration state string --- 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 57f27a26..acbce994 100644 --- a/cli/mmcli-common.c +++ b/cli/mmcli-common.c @@ -774,6 +774,19 @@ mmcli_get_3gpp_registration_state_string (MMModem3gppRegistrationState state) return value->value_nick; } +const gchar * +mmcli_get_cdma_registration_state_string (MMModemCdmaRegistrationState state) +{ + static GEnumClass *enum_class = NULL; + GEnumValue *value; + + if (!enum_class) + enum_class = G_ENUM_CLASS (g_type_class_ref (MM_TYPE_MODEM_CDMA_REGISTRATION_STATE)); + + value = g_enum_get_value (enum_class, state); + return value->value_nick; +} + const gchar * mmcli_get_cdma_rm_protocol_string (MMModemCdmaRmProtocol protocol) { -- cgit v1.2.3-70-g09d2