mmcli,sim: add preferred networks list to SIM properties

This commit is contained in:
Teijo Kinnunen
2021-02-25 16:57:16 +02:00
committed by Aleksander Morgado
parent 816beeffcb
commit a4aba0a6b2
3 changed files with 56 additions and 10 deletions

View File

@@ -158,6 +158,8 @@ mmcli_sim_shutdown (void)
static void
print_sim_info (MMSim *sim)
{
GList *preferred_nets_list;
mmcli_output_string (MMC_F_SIM_GENERAL_DBUS_PATH, mm_sim_get_path (sim));
mmcli_output_string (MMC_F_SIM_PROPERTIES_ACTIVE, mm_sim_get_active (sim) ? "yes" : "no");
mmcli_output_string (MMC_F_SIM_PROPERTIES_IMSI, mm_sim_get_imsi (sim));
@@ -166,6 +168,9 @@ print_sim_info (MMSim *sim)
mmcli_output_string (MMC_F_SIM_PROPERTIES_OPERATOR_ID, mm_sim_get_operator_identifier (sim));
mmcli_output_string (MMC_F_SIM_PROPERTIES_OPERATOR_NAME, mm_sim_get_operator_name (sim));
mmcli_output_string_array (MMC_F_SIM_PROPERTIES_EMERGENCY_NUMBERS, (const gchar **) mm_sim_get_emergency_numbers (sim), FALSE);
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_dump ();
}