diff --git a/cli/mmcli-modem.c b/cli/mmcli-modem.c index e405307b..99233217 100644 --- a/cli/mmcli-modem.c +++ b/cli/mmcli-modem.c @@ -238,6 +238,8 @@ print_modem_info (void) gchar *modem_capabilities_string; gchar *current_capabilities_string; gchar *access_technologies_string; + MMModemModeCombination *modes = NULL; + guint n_modes = 0; gchar *supported_modes_string; gchar *allowed_modes_string; gchar *preferred_mode_string; @@ -266,6 +268,9 @@ print_modem_info (void) mm_modem_get_current_capabilities (ctx->modem)); access_technologies_string = mm_modem_access_technology_build_string_from_mask ( mm_modem_get_access_technologies (ctx->modem)); + mm_modem_get_supported_modes (ctx->modem, &modes, &n_modes); + supported_modes_string = mm_common_build_mode_combinations_string (modes, n_modes); + g_free (modes); mm_modem_get_current_bands (ctx->modem, &bands, &n_bands); current_bands_string = mm_common_build_bands_string (bands, n_bands); g_free (bands); @@ -276,8 +281,6 @@ print_modem_info (void) mm_modem_get_allowed_modes (ctx->modem)); preferred_mode_string = mm_modem_mode_build_string_from_mask ( mm_modem_get_preferred_mode (ctx->modem)); - supported_modes_string = mm_modem_mode_build_string_from_mask ( - mm_modem_get_supported_modes (ctx->modem)); supported_ip_families_string = mm_bearer_ip_family_build_string_from_mask ( mm_modem_get_supported_ip_families (ctx->modem)); @@ -310,6 +313,15 @@ print_modem_info (void) else prefixed_revision = NULL; + if (supported_modes_string) { + gchar *prefixed; + + prefixed = mmcli_prefix_newlines (" | ", + supported_modes_string); + g_free (supported_modes_string); + supported_modes_string = prefixed; + } + /* Get signal quality info */ signal_quality = mm_modem_get_signal_quality (ctx->modem, &signal_quality_recent); diff --git a/docs/reference/libmm-glib/libmm-glib-sections.txt b/docs/reference/libmm-glib/libmm-glib-sections.txt index 358f613c..1d1704b4 100644 --- a/docs/reference/libmm-glib/libmm-glib-sections.txt +++ b/docs/reference/libmm-glib/libmm-glib-sections.txt @@ -73,6 +73,7 @@ mm_object_get_type mm-modem MMModem MMModem +MMModemModeCombination mm_modem_get_path mm_modem_dup_path @@ -106,6 +107,7 @@ mm_modem_get_max_bearers mm_modem_get_max_active_bearers mm_modem_get_own_numbers mm_modem_dup_own_numbers +mm_modem_peek_supported_modes mm_modem_get_supported_modes mm_modem_get_allowed_modes mm_modem_get_preferred_mode @@ -1455,6 +1457,7 @@ mm_gdbus_modem_get_supported_bands mm_gdbus_modem_dup_supported_bands mm_gdbus_modem_get_supported_ip_families mm_gdbus_modem_get_supported_modes +mm_gdbus_modem_dup_supported_modes mm_gdbus_modem_get_unlock_required mm_gdbus_modem_get_unlock_retries mm_gdbus_modem_dup_unlock_retries diff --git a/introspection/org.freedesktop.ModemManager1.Modem.xml b/introspection/org.freedesktop.ModemManager1.Modem.xml index 0f8364b7..7b43846e 100644 --- a/introspection/org.freedesktop.ModemManager1.Modem.xml +++ b/introspection/org.freedesktop.ModemManager1.Modem.xml @@ -410,14 +410,25 @@ - +