diff options
-rw-r--r-- | cli/mmcli-modem.c | 68 | ||||
-rw-r--r-- | introspection/org.freedesktop.ModemManager1.Modem.xml | 3 |
2 files changed, 3 insertions, 68 deletions
diff --git a/cli/mmcli-modem.c b/cli/mmcli-modem.c index 8967b1d0..5fde013b 100644 --- a/cli/mmcli-modem.c +++ b/cli/mmcli-modem.c @@ -56,7 +56,6 @@ static gboolean set_power_state_off_flag; static gboolean reset_flag; static gchar *factory_reset_str; static gchar *command_str; -static gboolean list_bearers_flag; static gchar *create_bearer_str; static gchar *delete_bearer_str; static gchar *set_current_capabilities_str; @@ -101,10 +100,6 @@ static GOptionEntry entries[] = { "Send an AT command to the modem", "[COMMAND]" }, - { "list-bearers", 0, 0, G_OPTION_ARG_NONE, &list_bearers_flag, - "List packet data bearers available in a given modem", - NULL - }, { "create-bearer", 0, 0, G_OPTION_ARG_STRING, &create_bearer_str, "Create a new packet data bearer in a given modem", "[\"key=value,...\"]" @@ -164,7 +159,6 @@ mmcli_modem_options_enabled (void) set_power_state_low_flag + set_power_state_off_flag + reset_flag + - list_bearers_flag + !!create_bearer_str + !!delete_bearer_str + !!factory_reset_str + @@ -761,48 +755,6 @@ command_get_timeout (MMModem *modem) } static void -list_bearers_process_reply (GList *result, - const GError *error) -{ - if (error) { - g_printerr ("error: couldn't list bearers: '%s'\n", - error->message); - exit (EXIT_FAILURE); - } - - g_print ("\n"); - if (!result) { - g_print ("No bearers were found\n"); - } else { - GList *l; - - g_print ("Found %u bearers:\n", g_list_length (result)); - for (l = result; l; l = g_list_next (l)) { - MMBearer *bearer = MM_BEARER (l->data); - - g_print ("\n"); - print_bearer_short_info (bearer); - g_object_unref (bearer); - } - g_list_free (result); - } -} - -static void -list_bearers_ready (MMModem *modem, - GAsyncResult *result, - gpointer nothing) -{ - GList *operation_result; - GError *error = NULL; - - operation_result = mm_modem_list_bearers_finish (modem, result, &error); - list_bearers_process_reply (operation_result, error); - - mmcli_async_operation_done (); -} - -static void create_bearer_process_reply (MMBearer *bearer, const GError *error) { @@ -1166,16 +1118,6 @@ get_modem_ready (GObject *source, return; } - /* Request to list bearers? */ - if (list_bearers_flag) { - g_debug ("Asynchronously listing bearers in modem..."); - mm_modem_list_bearers (ctx->modem, - ctx->cancellable, - (GAsyncReadyCallback)list_bearers_ready, - NULL); - return; - } - /* Request to create a new bearer? */ if (create_bearer_str) { GError *error = NULL; @@ -1397,16 +1339,6 @@ mmcli_modem_run_synchronous (GDBusConnection *connection) return; } - /* Request to list the bearers? */ - if (list_bearers_flag) { - GList *result; - - g_debug ("Synchronously listing bearers..."); - result = mm_modem_list_bearers_sync (ctx->modem, NULL, &error); - list_bearers_process_reply (result, error); - return; - } - /* Request to create a new bearer? */ if (create_bearer_str) { MMBearer *bearer; diff --git a/introspection/org.freedesktop.ModemManager1.Modem.xml b/introspection/org.freedesktop.ModemManager1.Modem.xml index b84f2083..54307ae3 100644 --- a/introspection/org.freedesktop.ModemManager1.Modem.xml +++ b/introspection/org.freedesktop.ModemManager1.Modem.xml @@ -42,6 +42,9 @@ List configured packet data bearers (EPS Bearers, PDP Contexts, or CDMA2000 Packet Data Sessions). + + Deprecated: 1.10.0. Use #org.freedesktop.ModemManager1.Modem:Bearers + property instead. --> <method name="ListBearers"> <arg name="bearers" type="ao" direction="out" /> |