cli: new --firmware-list' and --firmware-select' actions

This commit is contained in:
Aleksander Morgado
2012-10-02 12:55:35 +02:00
parent 715a775949
commit c07a3832dd
4 changed files with 342 additions and 0 deletions

View File

@@ -205,6 +205,8 @@ main (gint argc, gchar **argv)
mmcli_modem_messaging_get_option_group ());
g_option_context_add_group (context,
mmcli_modem_time_get_option_group ());
g_option_context_add_group (context,
mmcli_modem_firmware_get_option_group ());
g_option_context_add_group (context,
mmcli_sim_get_option_group ());
g_option_context_add_group (context,
@@ -315,6 +317,13 @@ main (gint argc, gchar **argv)
else
mmcli_modem_time_run_synchronous (connection);
}
/* Modem Firmware options? */
else if (mmcli_modem_firmware_options_enabled ()) {
if (async_flag)
mmcli_modem_firmware_run_asynchronous (connection, cancellable);
else
mmcli_modem_firmware_run_synchronous (connection);
}
/* Modem options?
* NOTE: let this check be always the last one, as other groups also need
* having a modem specified, and therefore if -m is set, modem options
@@ -349,6 +358,8 @@ main (gint argc, gchar **argv)
mmcli_modem_messaging_shutdown ();
} else if (mmcli_modem_time_options_enabled ()) {
mmcli_modem_time_shutdown ();
} else if (mmcli_modem_firmware_options_enabled ()) {
mmcli_modem_firmware_shutdown ();
} else if (mmcli_sim_options_enabled ()) {
mmcli_sim_shutdown ();
} else if (mmcli_bearer_options_enabled ()) {