summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-11-20 21:40:03 +0100
committerAleksander Morgado <aleksander@aleksander.es>2021-12-11 12:53:37 +0100
commitf8719e6308404e6c2f077c59a1dc9b13dc37819e (patch)
treec3d46d6446b66cc0ce426ff7cd870033e6b3b9b8 /cli
parent0eda648bb9d0fef19bf882f36f853d6aa2699d12 (diff)
downloadModemManager-f8719e6308404e6c2f077c59a1dc9b13dc37819e.tar.gz
cli,sim: new 'SimType', 'Removability' and 'EsimStatus' properties
Diffstat (limited to 'cli')
-rw-r--r--cli/mmcli-output.c3
-rw-r--r--cli/mmcli-output.h3
-rw-r--r--cli/mmcli-sim.c3
3 files changed, 9 insertions, 0 deletions
diff --git a/cli/mmcli-output.c b/cli/mmcli-output.c
index 712018b69..23af2741a 100644
--- a/cli/mmcli-output.c
+++ b/cli/mmcli-output.c
@@ -296,6 +296,9 @@ static FieldInfo field_infos[] = {
[MMC_F_SIM_PROPERTIES_OPERATOR_NAME] = { "sim.properties.operator-name", "operator name", MMC_S_SIM_PROPERTIES, },
[MMC_F_SIM_PROPERTIES_EMERGENCY_NUMBERS] = { "sim.properties.emergency-numbers", "emergency numbers", MMC_S_SIM_PROPERTIES, },
[MMC_F_SIM_PROPERTIES_PREFERRED_NETWORKS] = { "sim.properties.preferred-networks", "preferred networks", MMC_S_SIM_PROPERTIES, },
+ [MMC_F_SIM_PROPERTIES_SIM_TYPE] = { "sim.properties.sim-type", "type", MMC_S_SIM_PROPERTIES, },
+ [MMC_F_SIM_PROPERTIES_ESIM_STATUS] = { "sim.properties.esim-status", "esim status", MMC_S_SIM_PROPERTIES, },
+ [MMC_F_SIM_PROPERTIES_REMOVABILITY] = { "sim.properties.removability", "removability", MMC_S_SIM_PROPERTIES, },
[MMC_F_SAR_STATE] = { "modem.sar.state", "enabled", MMC_S_MODEM_SAR, },
[MMC_F_SAR_POWER_LEVEL] = { "modem.sar.power-level", "power level", MMC_S_MODEM_SAR, },
[MMC_F_MODEM_LIST_DBUS_PATH] = { "modem-list", "modems", MMC_S_UNKNOWN, },
diff --git a/cli/mmcli-output.h b/cli/mmcli-output.h
index cc34d536c..1fcddab7f 100644
--- a/cli/mmcli-output.h
+++ b/cli/mmcli-output.h
@@ -314,6 +314,9 @@ typedef enum {
MMC_F_SIM_PROPERTIES_OPERATOR_NAME,
MMC_F_SIM_PROPERTIES_EMERGENCY_NUMBERS,
MMC_F_SIM_PROPERTIES_PREFERRED_NETWORKS,
+ MMC_F_SIM_PROPERTIES_SIM_TYPE,
+ MMC_F_SIM_PROPERTIES_ESIM_STATUS,
+ MMC_F_SIM_PROPERTIES_REMOVABILITY,
MMC_F_SAR_STATE,
MMC_F_SAR_POWER_LEVEL,
/* Lists */
diff --git a/cli/mmcli-sim.c b/cli/mmcli-sim.c
index 3056783bc..3a384ed15 100644
--- a/cli/mmcli-sim.c
+++ b/cli/mmcli-sim.c
@@ -177,6 +177,9 @@ print_sim_info (MMSim *sim)
preferred_nets_list = mm_sim_get_preferred_networks (sim);
mmcli_output_preferred_networks (preferred_nets_list);
g_list_free_full (preferred_nets_list, (GDestroyNotify) mm_sim_preferred_network_free);
+ mmcli_output_string (MMC_F_SIM_PROPERTIES_SIM_TYPE, mm_sim_type_get_string (mm_sim_get_sim_type (sim)));
+ mmcli_output_string (MMC_F_SIM_PROPERTIES_ESIM_STATUS, mm_sim_esim_status_get_string (mm_sim_get_esim_status (sim)));
+ mmcli_output_string (MMC_F_SIM_PROPERTIES_REMOVABILITY, mm_sim_removability_get_string (mm_sim_get_removability (sim)));
mmcli_output_dump ();
}