GnomeBluetooth.Client¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r |
The D-Bus path of the default adapter |
||
r |
The address of the default adapter |
||
r |
The human readable name of the default adapter |
||
r/w |
Whether the default adapter is powered |
||
r/w |
Whether the default adapter is visible to others and scanning |
||
r |
State of the default adapter |
||
r |
The number of detected Bluetooth adapters |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
The |
|
The |
Fields¶
- Inherited:
Class Details¶
- class GnomeBluetooth.Client(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
a
GnomeBluetooth.Clientobject.- Return type:
Returns a reference to the
GnomeBluetooth.Clientsingleton. UseGObject.Object.unref() when done with the object.
- connect_service(path, connect, cancellable, callback, *user_data)¶
- Parameters:
path (
str) – the object path on which to operateconnect (
bool) – Whether try to connect or disconnect from services on a devicecancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignorecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the connection is completeuser_data (
objectorNone) – the data to pass to callback function
This will start the process of connecting to one of the known-connectable services on the device. This means that it could connect to all the audio services on a headset, but just to the input service on a keyboard.
Broadly speaking, this will only have an effect on devices with audio and HID services, and do nothing if the device doesn’t have the “connectable” property set.
When the connection operation is finished, callback will be called. You can then call
GnomeBluetooth.Client.connect_service_finish() to get the result of the operation.
- connect_service_finish(res)¶
- Parameters:
res (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
- Returns:
Trueif the connection operation succeeded,Falseotherwise.- Return type:
Finishes the connection operation. See
GnomeBluetooth.Client.connect_service().
- get_devices()¶
- Returns:
- Return type:
Returns an unfiltered
Gio.ListStorerepresenting the devices attached to the default Bluetooth adapter.
- has_connected_input_devices()¶
-
Returns whether there are connected devices with the input capability. This can be used by an OS user interface to warn the user before disabling Bluetooth so that the user isn’t stranded without any input devices.
Signal Details¶
- GnomeBluetooth.Client.signals.device_added(client, device)¶
- Signal Name:
device-added- Flags:
- Parameters:
client (
GnomeBluetooth.Client) – The object which received the signaldevice (
GObject.Object) – aGnomeBluetooth.Deviceobject
The
GnomeBluetooth.Client::device-addedsignal is launched when a device gets added to the model.
- GnomeBluetooth.Client.signals.device_removed(client, device)¶
- Signal Name:
device-removed- Flags:
- Parameters:
client (
GnomeBluetooth.Client) – The object which received the signaldevice (
str) – the D-Bus object path for the now-removed device
The
GnomeBluetooth.Client::device-removedsignal is launched when a device gets removed from the model.Note that
GnomeBluetooth.Client::device-removedwill not be called for each individual device as the model is cleared when theGnomeBluetooth.Client:default-adapterproperty changes.
Property Details¶
- GnomeBluetooth.Client.props.default_adapter¶
-
The D-Bus path of the default Bluetooth adapter or
None.
- GnomeBluetooth.Client.props.default_adapter_address¶
-
The address of the default Bluetooth adapter or
None.
- GnomeBluetooth.Client.props.default_adapter_name¶
-
The name of the default Bluetooth adapter or
None.
- GnomeBluetooth.Client.props.default_adapter_powered¶
-
Trueif the default Bluetooth adapter is powered.
- GnomeBluetooth.Client.props.default_adapter_setup_mode¶
-
Trueif the default Bluetooth adapter is in setup mode (discoverable, and discovering).
- GnomeBluetooth.Client.props.default_adapter_state¶
- Name:
default-adapter-state- Type:
- Default Value:
- Flags:
The
GnomeBluetooth.AdapterStateof the default Bluetooth adapter. More precise thanGnomeBluetooth.Client:default-adapter-powered.