diff options
author | Lukas Voegl <lvoegl@tdt.de> | 2024-11-22 15:53:33 +0100 |
---|---|---|
committer | Lukas Voegl <lvoegl@tdt.de> | 2025-04-25 09:37:16 +0200 |
commit | 436081648b3587096683bd3ba4d219d16f14efb5 (patch) | |
tree | 4d134aeef271bd970c527dadfd611d05fec9903c /cli | |
parent | 39123f964ba6f359987f22d89317a842d8f1d528 (diff) |
api,modem: new 'IgnoredPorts' property
Expose a new list of 'IgnoredPorts' via D-Bus and therefore remove the use of `MM_MODEM_PORT_TYPE_IGNORED`
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
Diffstat (limited to 'cli')
-rw-r--r-- | cli/mmcli-modem.c | 7 | ||||
-rw-r--r-- | cli/mmcli-output.c | 1 | ||||
-rw-r--r-- | cli/mmcli-output.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/cli/mmcli-modem.c b/cli/mmcli-modem.c index 4d806ef5..45739625 100644 --- a/cli/mmcli-modem.c +++ b/cli/mmcli-modem.c @@ -316,8 +316,11 @@ print_modem_info (void) MMModemBand *bands = NULL; guint n_bands = 0; MMModemPortInfo *ports = NULL; + MMModemPortInfo *ignored_ports = NULL; guint n_ports = 0; + guint n_ignored_ports = 0; gchar *ports_string; + gchar *ignored_ports_string; MMUnlockRetries *unlock_retries; guint signal_quality = 0; gboolean signal_quality_recent = FALSE; @@ -343,6 +346,8 @@ print_modem_info (void) g_free (bands); mm_modem_get_ports (ctx->modem, &ports, &n_ports); ports_string = mm_common_build_ports_string (ports, n_ports); + mm_modem_get_ignored_ports (ctx->modem, &ignored_ports, &n_ignored_ports); + ignored_ports_string = mm_common_build_ports_string (ignored_ports, n_ignored_ports); mm_modem_port_info_array_free (ports, n_ports); if (mm_modem_get_current_modes (ctx->modem, &allowed_modes, &preferred_mode)) { allowed_modes_string = mm_modem_mode_build_string_from_mask (allowed_modes); @@ -376,6 +381,7 @@ print_modem_info (void) mmcli_output_string (MMC_F_SYSTEM_PLUGIN, mm_modem_get_plugin (ctx->modem)); mmcli_output_string (MMC_F_SYSTEM_PRIMARY_PORT, mm_modem_get_primary_port (ctx->modem)); mmcli_output_string_list (MMC_F_SYSTEM_PORTS, ports_string); + mmcli_output_string_list (MMC_F_SYSTEM_IGNORED_PORTS, ignored_ports_string); mmcli_output_string_array (MMC_F_NUMBERS_OWN, (const gchar **) mm_modem_get_own_numbers (ctx->modem), FALSE); @@ -540,6 +546,7 @@ print_modem_info (void) mmcli_output_dump (); g_free (ports_string); + g_free (ignored_ports_string); g_free (supported_ip_families_string); g_free (current_bands_string); g_free (supported_bands_string); diff --git a/cli/mmcli-output.c b/cli/mmcli-output.c index c5a10b84..8aaa3581 100644 --- a/cli/mmcli-output.c +++ b/cli/mmcli-output.c @@ -120,6 +120,7 @@ static FieldInfo field_infos[] = { [MMC_F_SYSTEM_PLUGIN] = { "modem.generic.plugin", "plugin", MMC_S_MODEM_SYSTEM, }, [MMC_F_SYSTEM_PRIMARY_PORT] = { "modem.generic.primary-port", "primary port", MMC_S_MODEM_SYSTEM, }, [MMC_F_SYSTEM_PORTS] = { "modem.generic.ports", "ports", MMC_S_MODEM_SYSTEM, }, + [MMC_F_SYSTEM_IGNORED_PORTS] = { "modem.generic.ignored-ports", "ignored ports", MMC_S_MODEM_SYSTEM, }, [MMC_F_NUMBERS_OWN] = { "modem.generic.own-numbers", "own", MMC_S_MODEM_NUMBERS, }, [MMC_F_STATUS_LOCK] = { "modem.generic.unlock-required", "lock", MMC_S_MODEM_STATUS, }, [MMC_F_STATUS_UNLOCK_RETRIES] = { "modem.generic.unlock-retries", "unlock retries", MMC_S_MODEM_STATUS, }, diff --git a/cli/mmcli-output.h b/cli/mmcli-output.h index 700b6800..e7627653 100644 --- a/cli/mmcli-output.h +++ b/cli/mmcli-output.h @@ -114,6 +114,7 @@ typedef enum { MMC_F_SYSTEM_PLUGIN, MMC_F_SYSTEM_PRIMARY_PORT, MMC_F_SYSTEM_PORTS, + MMC_F_SYSTEM_IGNORED_PORTS, /* Numbers section */ MMC_F_NUMBERS_OWN, /* Status section */ |