summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-05-24 12:35:44 +0200
committerAleksander Morgado <aleksander@lanedo.com>2013-06-05 19:15:15 +0200
commit700ebc5c07ce667204f95dbe61716234131c15fb (patch)
treeb31f281dbcd072cbb360847f858e0eda5af67a8f /cli
parent1c67d050cb0451a63c8fdb0bd673892bdc04e4e0 (diff)
downloadModemManager-700ebc5c07ce667204f95dbe61716234131c15fb.tar.gz
api,introspection: rename 'ModemCapabilities' to 'SupportedCapabilities'
And also make it a list of masks, specifying which are the specific combinations supported, not just one mask with all. E.g.: ------------------------- Hardware | manufacturer: 'Sierra Wireless, Incorporated' | model: 'MC7710' | revision: 'SWI9200X_03.05.19.04ap r5475 carmd-en-10527 2012/09/17 17:57:14' | supported: 'gsm-umts | gsm-umts, lte' | current: 'gsm-umts, lte' | equipment id: '358178040668164'
Diffstat (limited to 'cli')
-rw-r--r--cli/mmcli-modem.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/cli/mmcli-modem.c b/cli/mmcli-modem.c
index 188fab8a7..7ab462443 100644
--- a/cli/mmcli-modem.c
+++ b/cli/mmcli-modem.c
@@ -235,7 +235,9 @@ print_modem_info (void)
{
gchar *drivers_string;
gchar *prefixed_revision;
- gchar *modem_capabilities_string;
+ gchar *supported_capabilities_string;
+ MMModemCapability *capabilities = NULL;
+ guint n_capabilities = 0;
gchar *current_capabilities_string;
gchar *access_technologies_string;
MMModemModeCombination *modes = NULL;
@@ -264,8 +266,9 @@ print_modem_info (void)
#define VALIDATE_PATH(str) ((str && !g_str_equal (str, "/")) ? str : "none")
/* Strings in heap */
- modem_capabilities_string = mm_modem_capability_build_string_from_mask (
- mm_modem_get_modem_capabilities (ctx->modem));
+ mm_modem_get_supported_capabilities (ctx->modem, &capabilities, &n_capabilities);
+ supported_capabilities_string = mm_common_build_capabilities_string (capabilities, n_capabilities);
+ g_free (capabilities);
current_capabilities_string = mm_modem_capability_build_string_from_mask (
mm_modem_get_current_capabilities (ctx->modem));
access_technologies_string = mm_modem_access_technology_build_string_from_mask (
@@ -324,6 +327,15 @@ print_modem_info (void)
supported_modes_string = prefixed;
}
+ if (supported_capabilities_string) {
+ gchar *prefixed;
+
+ prefixed = mmcli_prefix_newlines (" | ",
+ supported_capabilities_string);
+ g_free (supported_capabilities_string);
+ supported_capabilities_string = prefixed;
+ }
+
/* Get signal quality info */
signal_quality = mm_modem_get_signal_quality (ctx->modem, &signal_quality_recent);
@@ -338,13 +350,13 @@ print_modem_info (void)
" Hardware | manufacturer: '%s'\n"
" | model: '%s'\n"
" | revision: '%s'\n"
- " | capabilities: '%s'\n"
+ " | supported: '%s'\n"
" | current: '%s'\n"
" | equipment id: '%s'\n",
VALIDATE_UNKNOWN (mm_modem_get_manufacturer (ctx->modem)),
VALIDATE_UNKNOWN (mm_modem_get_model (ctx->modem)),
VALIDATE_UNKNOWN (prefixed_revision),
- VALIDATE_UNKNOWN (modem_capabilities_string),
+ VALIDATE_UNKNOWN (supported_capabilities_string),
VALIDATE_UNKNOWN (current_capabilities_string),
VALIDATE_UNKNOWN (mm_modem_get_equipment_identifier (ctx->modem)));
@@ -475,7 +487,7 @@ print_modem_info (void)
g_free (current_bands_string);
g_free (supported_bands_string);
g_free (access_technologies_string);
- g_free (modem_capabilities_string);
+ g_free (supported_capabilities_string);
g_free (current_capabilities_string);
g_free (prefixed_revision);
g_free (allowed_modes_string);