| Top |
| BluetoothClient * | bluetooth_client_new () |
| GListStore * | bluetooth_client_get_devices () |
| void | bluetooth_client_connect_service () |
| gboolean | bluetooth_client_connect_service_finish () |
| char * | default-adapter | Read |
| char * | default-adapter-address | Read |
| char * | default-adapter-name | Read |
| gboolean | default-adapter-powered | Read / Write |
| gboolean | default-adapter-setup-mode | Read / Write |
| guint | num-adapters | Read |
The BluetoothClient object is used to query the state of Bluetooth devices and adapters.
BluetoothClient *
bluetooth_client_new (void);
Returns a reference to the BluetoothClient singleton. Use g_object_unref() when done with the object.
GListStore *
bluetooth_client_get_devices (BluetoothClient *client);
Returns an unfiltered GListStore representing the devices attached to the default Bluetooth adapter.
void bluetooth_client_connect_service (BluetoothClient *client,const char *path,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.
client |
||
path |
the object path on which to operate |
|
connect |
Whether try to connect or disconnect from services on a device |
|
cancellable |
optional GCancellable object, |
|
callback |
a GAsyncReadyCallback to call when the connection is complete. |
[scope async] |
user_data |
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().
“default-adapter” property “default-adapter” char *
The D-Bus path of the default Bluetooth adapter or NULL.
Owner: BluetoothClient
Flags: Read
Default value: NULL
“default-adapter-address” property “default-adapter-address” char *
The address of the default Bluetooth adapter or NULL.
Owner: BluetoothClient
Flags: Read
Default value: NULL
“default-adapter-name” property “default-adapter-name” char *
The name of the default Bluetooth adapter or NULL.
Owner: BluetoothClient
Flags: Read
Default value: NULL
“default-adapter-powered” property “default-adapter-powered” gboolean
TRUE if the default Bluetooth adapter is powered.
Owner: BluetoothClient
Flags: Read / Write
Default value: FALSE
“default-adapter-setup-mode” property “default-adapter-setup-mode” gboolean
TRUE if the default Bluetooth adapter is in setup mode (discoverable, and discovering).
Owner: BluetoothClient
Flags: Read / Write
Default value: FALSE
“device-added” signalvoid user_function (BluetoothClient *client, GObject *device, gpointer user_data)
The “device-added” signal is launched when a device gets added to the model.
client |
a BluetoothClient object which received the signal |
|
device |
a BluetoothDevice object |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“device-removed” signalvoid user_function (BluetoothClient *client, char *device, gpointer user_data)
The “device-removed” signal is launched when a device gets removed from the model.
client |
a BluetoothClient object which received the signal |
|
device |
the D-Bus object path for the now-removed device |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last