Urfkill.Client¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r |
The running daemon version |
||
r |
The key control state |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
The device-added signal is emitted when a rfkill device is added. |
|
The device-changed signal is emitted when a rfkill device is changed. |
|
The device-removed signal is emitted when a rfkill device is removed. |
|
The rf-key-pressed signal is emitted when a rfkill key is pressed. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class Urfkill.Client(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Urfkill.Clientstruct contains only private fields and should not be directly accessed.- classmethod new()¶
- Returns:
a new
Urfkill.Clientobject.- Return type:
Creates a new
Urfkill.Clientobject.
- enumerate_devices_sync(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.CancellableorNone- Raises:
- Returns:
- Return type:
Enumerate the devices from the daemon.
New in version 0.3.0.
- get_daemon_version()¶
- Returns:
string containing the daemon version, e.g. 0.2.0
- Return type:
Get urfkill daemon version
New in version 0.2.0.
- get_devices()¶
- Returns:
a list of
Urfkill.Deviceobjects- Return type:
Get a list of the device objects.
You must have called
Urfkill.Client.enumerate_devices_syncbefore calling this function.New in version 0.2.0.
- inhibit(reason)¶
- Parameters:
reason (
str) – the reason to inhibit the key control- Raises:
- Returns:
the cookie and error is used
- Return type:
Inhibit the rfkill key handling function for this session.
New in version 0.2.0.
- is_inhibited()¶
- Raises:
- Returns:
Trueif the key control is inhibited- Return type:
Get whether the key control is inhibited or not,
New in version 0.2.0.
- set_block(type, block, cancellable)¶
- Parameters:
type (
Urfkill.EnumType) – the type of the devicesblock (
bool) –Trueto block the devices orFalseto unblockcancellable (
Gio.CancellableorNone) – aGio.CancellableorNone
- Raises:
- Returns:
- Return type:
Block or unblock the devices belonging to the type.
This function only changes soft block. Hard block is controlled by BIOS or the hardware and there is no way to change the state of hard block through kernel functions.
New in version 0.2.0.
- set_block_idx(index, block, cancellable)¶
- Parameters:
index (
int) – the index of the devicecancellable (
Gio.CancellableorNone) – aGio.CancellableorNone
- Raises:
- Returns:
- Return type:
Block or unblock the device by the index.
This function only changes soft block. Hard block is controlled by BIOS or the hardware and there is no way to change the state of hard block through kernel functions.
New in version 0.2.0.
- set_bluetooth_block(block)¶
- Parameters:
block (
bool) –Trueto block the bluetooth devices orFalseto unblock- Returns:
- Return type:
Block or unblock the bluetooth devices. This is a convenient function and the underlying function is
Urfkill.Client.set_block.New in version 0.2.0.
- set_wlan_block(block)¶
-
Block or unblock the WLAN devices. This is a convenient function and the underlying function is
Urfkill.Client.set_block.New in version 0.2.0.
- set_wwan_block(block)¶
-
Block or unblock the wireless WAN devices. This is a convenient function and the underlying function is
Urfkill.Client.set_block.New in version 0.2.0.
- uninhibit(cookie)¶
- Parameters:
cookie (
int) – the cookie
Cancel a previous call to
Urfkill.Client.inhibitidentified by the cookie.New in version 0.2.0.
- do_device_added(device) virtual¶
- Parameters:
device (
Urfkill.Device) –
- do_device_changed(device) virtual¶
- Parameters:
device (
Urfkill.Device) –
- do_device_removed(device) virtual¶
- Parameters:
device (
Urfkill.Device) –
Signal Details¶
- Urfkill.Client.signals.device_added(client, device)¶
- Signal Name:
device-added- Flags:
- Parameters:
client (
Urfkill.Client) – The object which received the signaldevice (
Urfkill.Device) – theUrfkill.Devicethat was added.
The device-added signal is emitted when a rfkill device is added.
New in version 0.2.0.
- Urfkill.Client.signals.device_changed(client, device)¶
- Signal Name:
device-changed- Flags:
- Parameters:
client (
Urfkill.Client) – The object which received the signaldevice (
Urfkill.Device) – theUrfkill.Devicethat was changed.
The device-changed signal is emitted when a rfkill device is changed.
New in version 0.2.0.
- Urfkill.Client.signals.device_removed(client, device)¶
- Signal Name:
device-removed- Flags:
- Parameters:
client (
Urfkill.Client) – The object which received the signaldevice (
Urfkill.Device) – theUrfkill.Devicethat was removed.
The device-removed signal is emitted when a rfkill device is removed.
New in version 0.2.0.
- Urfkill.Client.signals.rf_key_pressed(client, keycode)¶
- Signal Name:
rf-key-pressed- Flags:
- Parameters:
client (
Urfkill.Client) – The object which received the signalkeycode (
int) – the keycode from the input device
The rf-key-pressed signal is emitted when a rfkill key is pressed.
New in version 0.2.0.
Property Details¶
- Urfkill.Client.props.daemon_version¶
-
The running daemon version.
New in version 0.2.0.