aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/mmcli-bearer.c3
-rw-r--r--cli/mmcli-output.c19
-rw-r--r--cli/mmcli-output.h1
3 files changed, 23 insertions, 0 deletions
diff --git a/cli/mmcli-bearer.c b/cli/mmcli-bearer.c
index 5a5e3e8d..1789f3f9 100644
--- a/cli/mmcli-bearer.c
+++ b/cli/mmcli-bearer.c
@@ -174,6 +174,7 @@ print_bearer_info (MMBearer *bearer)
gchar *allowed_auth_str = NULL;
gchar *properties_profile_id_str = NULL;
const gchar *access_type_preference_str = NULL;
+ gchar *roaming_allowance_str = NULL;
if (properties) {
gint properties_profile_id;
@@ -193,6 +194,7 @@ print_bearer_info (MMBearer *bearer)
rm_protocol = mm_modem_cdma_rm_protocol_get_string (mm_bearer_properties_get_rm_protocol (properties));
}
access_type_preference_str = mm_bearer_access_type_preference_get_string (mm_bearer_properties_get_access_type_preference (properties));
+ roaming_allowance_str = mm_bearer_roaming_allowance_build_string_from_mask (mm_bearer_properties_get_roaming_allowance (properties));
}
mmcli_output_string_take (MMC_F_BEARER_PROPERTIES_PROFILE_ID, properties_profile_id_str);
@@ -205,6 +207,7 @@ print_bearer_info (MMBearer *bearer)
mmcli_output_string (MMC_F_BEARER_PROPERTIES_RM_PROTOCOL, rm_protocol);
mmcli_output_string_list_take (MMC_F_BEARER_PROPERTIES_ALLOWED_AUTH, allowed_auth_str);
mmcli_output_string (MMC_F_BEARER_PROPERTIES_ACCESS_TYPE_PREFERENCE, access_type_preference_str);
+ mmcli_output_string_take (MMC_F_BEARER_PROPERTIES_ROAMING_ALLOWANCE, roaming_allowance_str);
}
/* IPv4 config */
diff --git a/cli/mmcli-output.c b/cli/mmcli-output.c
index 1769ce20..c7a98922 100644
--- a/cli/mmcli-output.c
+++ b/cli/mmcli-output.c
@@ -241,6 +241,7 @@ static FieldInfo field_infos[] = {
[MMC_F_BEARER_PROPERTIES_NUMBER] = { "bearer.properties.number", "number", MMC_S_BEARER_PROPERTIES, },
[MMC_F_BEARER_PROPERTIES_RM_PROTOCOL] = { "bearer.properties.rm-protocol", "rm protocol", MMC_S_BEARER_PROPERTIES, },
[MMC_F_BEARER_PROPERTIES_ACCESS_TYPE_PREFERENCE] = { "bearer.properties.access-type-preference", "access type preference", MMC_S_BEARER_PROPERTIES, },
+ [MMC_F_BEARER_PROPERTIES_ROAMING_ALLOWANCE] = { "bearer.properties.roaming-allowance", "roaming allowance", MMC_S_BEARER_PROPERTIES, },
[MMC_F_BEARER_IPV4_CONFIG_METHOD] = { "bearer.ipv4-config.method", "method", MMC_S_BEARER_IPV4_CONFIG, },
[MMC_F_BEARER_IPV4_CONFIG_ADDRESS] = { "bearer.ipv4-config.address", "address", MMC_S_BEARER_IPV4_CONFIG, },
[MMC_F_BEARER_IPV4_CONFIG_PREFIX] = { "bearer.ipv4-config.prefix", "prefix", MMC_S_BEARER_IPV4_CONFIG, },
@@ -931,6 +932,7 @@ build_profile_human (GPtrArray *array,
MMBearerIpFamily ip_type;
MMBearerApnType apn_type;
MMBearerAccessTypePreference access_type_preference;
+ MMBearerRoamingAllowance roaming_allowance;
g_ptr_array_add (array, g_strdup_printf ("profile-id: %u", mm_3gpp_profile_get_profile_id (profile)));
g_ptr_array_add (array, g_strdup_printf (" profile enabled: %s",
@@ -977,6 +979,14 @@ build_profile_human (GPtrArray *array,
aux = mm_bearer_access_type_preference_get_string (access_type_preference);
g_ptr_array_add (array, g_strdup_printf (" access type preference: %s", aux));
}
+
+ roaming_allowance = mm_3gpp_profile_get_roaming_allowance (profile);
+ if (roaming_allowance != MM_BEARER_ROAMING_ALLOWANCE_NONE) {
+ g_autofree gchar *roaming_allowance_str = NULL;
+
+ roaming_allowance_str = mm_bearer_roaming_allowance_build_string_from_mask (roaming_allowance);
+ g_ptr_array_add (array, g_strdup_printf (" roaming allowance: %s", roaming_allowance_str));
+ }
}
static void
@@ -989,6 +999,7 @@ build_profile_keyvalue (GPtrArray *array,
MMBearerIpFamily ip_type;
MMBearerApnType apn_type;
MMBearerAccessTypePreference access_type_preference;
+ MMBearerRoamingAllowance roaming_allowance;
str = g_string_new ("");
g_string_append_printf (str, "profile-id: %u", mm_3gpp_profile_get_profile_id (profile));
@@ -1035,6 +1046,14 @@ build_profile_keyvalue (GPtrArray *array,
g_string_append_printf (str, ", access-type-preference: %s", aux);
}
+ roaming_allowance = mm_3gpp_profile_get_roaming_allowance (profile);
+ if (roaming_allowance != MM_BEARER_ROAMING_ALLOWANCE_NONE) {
+ g_autofree gchar *roaming_allowance_str = NULL;
+
+ roaming_allowance_str = mm_bearer_roaming_allowance_build_string_from_mask (roaming_allowance);
+ g_string_append_printf (str, ", roaming-allowance: %s", roaming_allowance_str);
+ }
+
g_ptr_array_add (array, g_string_free (str, FALSE));
}
diff --git a/cli/mmcli-output.h b/cli/mmcli-output.h
index 0830ee40..601912f1 100644
--- a/cli/mmcli-output.h
+++ b/cli/mmcli-output.h
@@ -259,6 +259,7 @@ typedef enum {
MMC_F_BEARER_PROPERTIES_NUMBER,
MMC_F_BEARER_PROPERTIES_RM_PROTOCOL,
MMC_F_BEARER_PROPERTIES_ACCESS_TYPE_PREFERENCE,
+ MMC_F_BEARER_PROPERTIES_ROAMING_ALLOWANCE,
MMC_F_BEARER_IPV4_CONFIG_METHOD,
MMC_F_BEARER_IPV4_CONFIG_ADDRESS,
MMC_F_BEARER_IPV4_CONFIG_PREFIX,