aboutsummaryrefslogtreecommitdiff
path: root/cli/mmcli-common.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2011-12-19 12:28:49 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:34 +0100
commit55654d5b462f59ec5d6d77de759a1b7012f3d5c6 (patch)
tree6a33fe12123c8e45b160060e38c2ac0143c60635 /cli/mmcli-common.c
parentdae3f9570422fd14f630fa1c060bc26e0f27481c (diff)
cli: new helper to get name of MMBearerIpMethod
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 11b4b831..9eff59fb 100644
--- a/cli/mmcli-common.c
+++ b/cli/mmcli-common.c
@@ -238,6 +238,19 @@ mmcli_get_modem_sync (GDBusConnection *connection,
}
const gchar *
+mmcli_get_bearer_ip_method_string (MMBearerIpMethod method)
+{
+ static GEnumClass *enum_class = NULL;
+ GEnumValue *value;
+
+ if (!enum_class)
+ enum_class = G_ENUM_CLASS (g_type_class_ref (MM_TYPE_BEARER_IP_METHOD));
+
+ value = g_enum_get_value (enum_class, method);
+ return value->value_nick;
+}
+
+const gchar *
mmcli_get_state_string (MMModemState state)
{
static GEnumClass *enum_class = NULL;