diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-05-22 17:43:21 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-06-05 19:15:13 +0200 |
commit | 804642adc234094717158ff09857de1432565dda (patch) | |
tree | fdcf1cd2fc158e2edc6325b7b67095fa4895932d /cli/mmcli-bearer.c | |
parent | a42234dd1c680e7604008fc2e66be849c7bf70de (diff) |
api: let MMBearerIpFamily be flags instead of a enumeration
We want to expose in the Modem interface the list of supported IP families, and
the easiest way to do so is to have the IP family as flags, and provide in the
interface a single enum.
Also, a value of 0 for a MMBearerIpFamily specifies that no flags are set, so
just rename it to 'NONE'.
And add a new 'ANY' value which sets all flags to 1.
Diffstat (limited to 'cli/mmcli-bearer.c')
-rw-r--r-- | cli/mmcli-bearer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cli/mmcli-bearer.c b/cli/mmcli-bearer.c index 0da8f5b2..600be116 100644 --- a/cli/mmcli-bearer.c +++ b/cli/mmcli-bearer.c @@ -160,6 +160,10 @@ print_bearer_info (MMBearer *bearer) mm_bearer_get_ip_timeout (bearer)); if (properties) { + gchar *ip_family_str; + + ip_family_str = (mm_bearer_ip_family_build_string_from_mask ( + mm_bearer_properties_get_ip_type (properties))); g_print (" -------------------------\n" " Properties | apn: '%s'\n" " | roaming: '%s'\n" @@ -170,13 +174,13 @@ print_bearer_info (MMBearer *bearer) " | Rm protocol: '%s'\n", VALIDATE_NONE (mm_bearer_properties_get_apn (properties)), mm_bearer_properties_get_allow_roaming (properties) ? "allowed" : "forbidden", - VALIDATE_UNKNOWN (mm_bearer_ip_family_get_string ( - mm_bearer_properties_get_ip_type (properties))), + VALIDATE_UNKNOWN (ip_family_str), VALIDATE_NONE (mm_bearer_properties_get_user (properties)), VALIDATE_NONE (mm_bearer_properties_get_password (properties)), VALIDATE_NONE (mm_bearer_properties_get_number (properties)), VALIDATE_UNKNOWN (mm_modem_cdma_rm_protocol_get_string ( mm_bearer_properties_get_rm_protocol (properties)))); + g_free (ip_family_str); } /* IPv4 */ |