aboutsummaryrefslogtreecommitdiff
path: root/cli/mmcli-common.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-01-09 21:07:35 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:49 +0100
commitc5fdd839056d13b13e017fe1fb2d76d6c8424db2 (patch)
tree050dbfae68d5bc80708d8aab488fbb2ddb2e10dd /cli/mmcli-common.c
parenta71393f227da1d4aa2ca1b237ec9c5061c25434f (diff)
cli: new helper to get the CDMA registration state string
Diffstat (limited to 'cli/mmcli-common.c')
-rw-r--r--cli/mmcli-common.c13
1 files changed, 13 insertions, 0 deletions
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
@@ -775,6 +775,19 @@ mmcli_get_3gpp_registration_state_string (MMModem3gppRegistrationState state)
}
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)
{
static GEnumClass *enum_class = NULL;