![]() |
![]() |
![]() |
gnome-bluetooth Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#include <bluetooth-client.h> struct BluetoothClient; struct BluetoothClientClass; void bluetooth_client_connect_service (BluetoothClient *client
,const char *device
,gboolean connect
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean bluetooth_client_connect_service_finish (BluetoothClient *client
,GAsyncResult *res
,GError **error
); GtkTreeModel * bluetooth_client_get_adapter_model (BluetoothClient *client
); GtkTreeModel * bluetooth_client_get_device_model (BluetoothClient *client
); GtkTreeModel * bluetooth_client_get_filter_model (BluetoothClient *client
,GtkTreeModelFilterVisibleFunc func
,gpointer data
,GDestroyNotify destroy
); GtkTreeModel * bluetooth_client_get_model (BluetoothClient *client
); BluetoothClient * bluetooth_client_new (void
);
"default-adapter" gchar* : Read "default-adapter-discoverable" gboolean : Read / Write "default-adapter-discovering" gboolean : Read / Write "default-adapter-name" gchar* : Read "default-adapter-powered" gboolean : Read
The BluetoothClient object is used to query the state of Bluetooth devices and adapters.
void bluetooth_client_connect_service (BluetoothClient *client
,const char *device
,gboolean connect
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
When the connection operation is finished, callback
will be called. You can
then call bluetooth_client_connect_service_finish()
to get the result of the
operation.
|
a BluetoothClient |
|
the DBUS path on which to operate |
|
Whether try to connect or disconnect from services on a device |
|
optional GCancellable object, NULL to ignore |
|
a GAsyncReadyCallback to call when the connection is complete. [scope async] |
|
the data to pass to callback function |
gboolean bluetooth_client_connect_service_finish (BluetoothClient *client
,GAsyncResult *res
,GError **error
);
Finishes the connection operation, See bluetooth_client_connect_service()
.
|
a BluetoothClient |
|
a GAsyncResult |
|
a GError |
Returns : |
TRUE if the connection operation succeeded, FALSE otherwise. |
GtkTreeModel * bluetooth_client_get_adapter_model (BluetoothClient *client
);
Returns a GtkTreeModelFilter with only adapters present.
|
a BluetoothClient object |
Returns : |
a GtkTreeModel object. [transfer full] |
GtkTreeModel * bluetooth_client_get_device_model (BluetoothClient *client
);
Returns a GtkTreeModelFilter with only devices belonging to the default adapter listed. Note that the model will follow a specific adapter, and will not follow the default adapter. Also note that due to the way GtkTreeModelFilter works, you will probably want to monitor signals on the "child-model" GtkTreeModel to monitor for changes.
|
a BluetoothClient object |
Returns : |
a GtkTreeModel object. [transfer full] |
GtkTreeModel * bluetooth_client_get_filter_model (BluetoothClient *client
,GtkTreeModelFilterVisibleFunc func
,gpointer data
,GDestroyNotify destroy
);
Returns a GtkTreeModelFilter of devices filtered using the func
, data
and destroy
arguments to pass to gtk_tree_model_filter_set_visible_func()
.
|
a BluetoothClient object |
|
a GtkTreeModelFilterVisibleFunc |
|
user data to pass to gtk_tree_model_filter_set_visible_func()
|
|
a destroy function for gtk_tree_model_filter_set_visible_func()
|
Returns : |
a GtkTreeModel object. [transfer full] |
GtkTreeModel * bluetooth_client_get_model (BluetoothClient *client
);
Returns an unfiltered GtkTreeModel representing the adapter and devices available on the system.
|
a BluetoothClient object |
Returns : |
a GtkTreeModel object. [transfer full] |
BluetoothClient * bluetooth_client_new (void
);
Returns a reference to the BluetoothClient singleton. Use g_object_unref()
when done with the object.
Returns : |
a BluetoothClient object. [transfer full] |