diff options
author | Bastien Nocera <hadess@hadess.net> | 2021-11-30 14:48:43 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2021-11-30 15:32:21 +0100 |
commit | 633abe492d9d99feefb81d8b3f928370550d89b0 (patch) | |
tree | b2982ca3f5a32bc18a3af49b3131f908198ceb2f /lib/bluetooth-client.c | |
parent | badfd3c7d8d9b915f4a5a3c582eabe8565cf3a64 (diff) | |
download | gnome-bluetooth-633abe492d9d99feefb81d8b3f928370550d89b0.tar.gz |
lib: Remove bluetooth_client_dump_device()
There's a similar function available for BluetoothDevice objects.
Diffstat (limited to 'lib/bluetooth-client.c')
-rw-r--r-- | lib/bluetooth-client.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c index 96dcbe9a..2785cdde 100644 --- a/lib/bluetooth-client.c +++ b/lib/bluetooth-client.c @@ -1633,71 +1633,3 @@ bluetooth_client_connect_service_finish (BluetoothClient *client, return g_task_propagate_boolean (task, error); } - -#define BOOL_STR(x) (x ? "True" : "False") - -void -bluetooth_client_dump_device (GtkTreeModel *model, - GtkTreeIter *iter) -{ - GDBusProxy *proxy; - char *address, *alias, *icon, **uuids; - gboolean is_default, paired, trusted, connected, discovering, powered, is_adapter; - GtkTreeIter parent; - BluetoothType type; - - gtk_tree_model_get (model, iter, - BLUETOOTH_COLUMN_ADDRESS, &address, - BLUETOOTH_COLUMN_ALIAS, &alias, - BLUETOOTH_COLUMN_TYPE, &type, - BLUETOOTH_COLUMN_ICON, &icon, - BLUETOOTH_COLUMN_DEFAULT, &is_default, - BLUETOOTH_COLUMN_PAIRED, &paired, - BLUETOOTH_COLUMN_TRUSTED, &trusted, - BLUETOOTH_COLUMN_CONNECTED, &connected, - BLUETOOTH_COLUMN_DISCOVERING, &discovering, - BLUETOOTH_COLUMN_POWERED, &powered, - BLUETOOTH_COLUMN_UUIDS, &uuids, - BLUETOOTH_COLUMN_PROXY, &proxy, - -1); - if (proxy) { - char *basename; - basename = g_path_get_basename(g_dbus_proxy_get_object_path(proxy)); - is_adapter = !g_str_has_prefix (basename, "dev_"); - g_free (basename); - } else { - is_adapter = !gtk_tree_model_iter_parent (model, &parent, iter); - } - - if (is_adapter != FALSE) { - /* Adapter */ - g_print ("Adapter: %s (%s)\n", alias, address); - if (is_default) - g_print ("\tDefault adapter\n"); - g_print ("\tD-Bus Path: %s\n", proxy ? g_dbus_proxy_get_object_path (proxy) : "(none)"); - if (discovering) - g_print ("\tDiscovery in progress\n"); - g_print ("\t%s\n", powered ? "Is powered" : "Is not powered"); - } else { - /* Device */ - g_print ("Device: %s (%s)\n", alias, address); - g_print ("\tD-Bus Path: %s\n", proxy ? g_dbus_proxy_get_object_path (proxy) : "(none)"); - g_print ("\tType: %s Icon: %s\n", bluetooth_type_to_string (type), icon); - g_print ("\tPaired: %s Trusted: %s Connected: %s\n", BOOL_STR(paired), BOOL_STR(trusted), BOOL_STR(connected)); - if (uuids != NULL) { - guint i; - g_print ("\tUUIDs: "); - for (i = 0; uuids[i] != NULL; i++) - g_print ("%s ", uuids[i]); - g_print ("\n"); - } - } - g_print ("\n"); - - g_free (alias); - g_free (address); - g_free (icon); - g_clear_object (&proxy); - g_strfreev (uuids); -} - |