cli,sim: new 'SimType', 'Removability' and 'EsimStatus' properties

This commit is contained in:
Aleksander Morgado
2021-11-20 21:40:03 +01:00
parent 0eda648bb9
commit f8719e6308
3 changed files with 9 additions and 0 deletions

View File

@@ -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, },

View File

@@ -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 */

View File

@@ -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 ();
}