Top | ![]() |
![]() |
![]() |
![]() |
void | device-added | Run Last |
void | device-changed | Run Last |
void | device-removed | Run Last |
void | rf-key-pressed | Run Last |
A helper GObject to use for accessing urfkill information, and to be notified when it is changed.
gboolean urf_client_enumerate_devices_sync (UrfClient *client
,GCancellable *cancellable
,GError **error
);
Enumerate the devices from the daemon.
Since 0.3.0
const char *
urf_client_get_daemon_version (UrfClient *client
);
Get urfkill daemon version
Since 0.2.0
GList *
urf_client_get_devices (UrfClient *client
);
Get a list of the device objects.
You must have called urf_client_enumerate_devices_sync before calling this function.
Since 0.2.0
guint urf_client_inhibit (UrfClient *client
,const char *reason
,GError **error
);
Inhibit the rfkill key handling function for this session.
Since 0.2.0
gboolean urf_client_is_inhibited (UrfClient *client
,GError **error
);
Get whether the key control is inhibited or not,
Since 0.2.0
gboolean urf_client_set_block (UrfClient *client
,UrfEnumType type
,const gboolean block
,GCancellable *cancellable
,GError **error
);
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.
Since 0.2.0
gboolean urf_client_set_block_idx (UrfClient *client
,const guint index
,const gboolean block
,GCancellable *cancellable
,GError **error
);
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.
Since 0.2.0
gboolean urf_client_set_bluetooth_block (UrfClient *client
,const gboolean block
);
Block or unblock the bluetooth devices. This is a convenient function and the underlying function is urf_client_set_block.
Since 0.2.0
gboolean urf_client_set_wlan_block (UrfClient *client
,const gboolean block
);
Block or unblock the WLAN devices. This is a convenient function and the underlying function is urf_client_set_block.
Since 0.2.0
gboolean urf_client_set_wwan_block (UrfClient *client
,const gboolean block
);
Block or unblock the wireless WAN devices. This is a convenient function and the underlying function is urf_client_set_block.
Since 0.2.0
void urf_client_uninhibit (UrfClient *client
,const guint cookie
);
Cancel a previous call to urf_client_inhibit identified by the cookie.
Since 0.2.0
struct UrfClient;
The UrfClient struct contains only private fields and should not be directly accessed.
“daemon-version”
property“daemon-version” gchar *
The running daemon version.
Flags: Read
Default value: NULL
Since 0.2.0
“key-control”
property“key-control” gboolean
Whether the key control in the daemon is enabled or not
Flags: Read
Default value: FALSE
Since 0.2.0
“device-added”
signalvoid user_function (UrfClient *client, UrfDevice *device, gpointer user_data)
The device-added signal is emitted when a rfkill device is added.
Since 0.2.0
Flags: Run Last
“device-changed”
signalvoid user_function (UrfClient *client, UrfDevice *device, gpointer user_data)
The device-changed signal is emitted when a rfkill device is changed.
Since 0.2.0
Flags: Run Last
“device-removed”
signalvoid user_function (UrfClient *client, UrfDevice *device, gpointer user_data)
The device-removed signal is emitted when a rfkill device is removed.
Since 0.2.0
Flags: Run Last
“rf-key-pressed”
signalvoid user_function (UrfClient *client, gint keycode, gpointer user_data)
The rf-key-pressed signal is emitted when a rfkill key is pressed.
Since 0.2.0
client |
the UrfClient instance that emitted the signal |
|
keycode |
the keycode from the input device |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last