Fwupd.Client¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
|||
r/w |
|||
r |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r |
|||
r |
|||
r/w |
|||
r |
|||
r/w |
|||
r |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
|
The |
|
The |
|
The |
|
The |
|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Fwupd.Client(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Allow client code to call the daemon methods.
See also: [class`FwupdDevice`]
- classmethod new()[source]¶
- Returns:
a new
Fwupd.Client
- Return type:
Creates a new client.
New in version 0.7.0.
- activate(cancellable, device_id)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
device_id (
str
) – a device
- Raises:
- Returns:
True
for success- Return type:
Activates up a device, which normally means the device switches to a new firmware version. This should only be called when data loss cannot occur.
New in version 1.2.6.
- activate_async(device_id, cancellable, callback, *callback_data)[source]¶
- Parameters:
device_id (
str
) – a devicecancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Activates up a device, which normally means the device switches to a new firmware version. This should only be called when data loss cannot occur.
New in version 1.5.0.
- activate_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.activate_async].
New in version 1.5.0.
- add_hint(key, value)[source]¶
-
Sets optional hints from the client that may affect the list of devices.
New in version 1.7.1.
- build_report_devices(devices, metadata)[source]¶
- Parameters:
devices ([
Fwupd.Device
]) – devices
- Raises:
- Returns:
a string, or
None
if the ID is not present- Return type:
Builds a JSON report for the list of devices.
This function should be called *before* asking the interactive user if they want to upload a report – as this function filters devices and may return an error if there is nothing to do.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.9.20.
- clear_results(device_id, cancellable)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Clears the results for a specific device.
New in version 0.7.0.
- clear_results_async(device_id, cancellable, callback, *callback_data)[source]¶
- Parameters:
device_id (
str
) – a devicecancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Clears the results for a specific device.
New in version 1.5.0.
- clear_results_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.clear_results_async].
New in version 1.5.0.
- connect_async(cancellable, callback, *callback_data)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Sets up the client ready for use. This is probably the first method you call when wanting to use libfwupd in an asynchronous manner.
Other methods such as [method`FwupdClient`.get_devices_async] should only be called after [method`FwupdClient`.connect_finish] has been called without an error.
New in version 1.5.0.
- connect_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`Client`.connect_async].
New in version 1.5.0.
- download_bytes(url, flags, cancellable)[source]¶
- Parameters:
url (
str
) – the remote URLflags (
Fwupd.ClientDownloadFlags
) – download flags, e.g.Fwupd.ClientDownloadFlags.NONE
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
downloaded data, or
None
for error- Return type:
Downloads data from a remote server. The [method`Client`.set_user_agent] function should be called before this method is used.
New in version 1.4.5.
- download_bytes_async(url, flags, cancellable, callback, *callback_data)[source]¶
- Parameters:
url (
str
) – the remote URLflags (
Fwupd.ClientDownloadFlags
) – download flags, e.g.Fwupd.ClientDownloadFlags.NONE
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Downloads data from a remote server. The [method`Client`.set_user_agent] function should be called before this method is used.
You must have called [method`Client`.connect_async] on self before using this method.
NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with [method`Client`.set_main_context].
New in version 1.5.0.
- download_bytes_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
downloaded data, or
None
for error- Return type:
Gets the result of [method`FwupdClient`.download_bytes_async].
New in version 1.5.0.
- download_file(url, file, flags, cancellable)[source]¶
- Parameters:
url (
str
) – the remote URLfile (
Gio.File
) – a fileflags (
Fwupd.ClientDownloadFlags
) – download flags, e.g.Fwupd.ClientDownloadFlags.NONE
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
if the file was written- Return type:
Downloads data from a remote server. The [method`Client`.set_user_agent] function should be called before this method is used.
New in version 1.5.2.
- download_set_retries(retries)[source]¶
- Parameters:
retries (
int
) – number of tries, defaulting to 0
Sets the number of retries should be attempted on transient download errors.
New in version 1.9.19.
- emulation_load(data, cancellable)[source]¶
- Parameters:
data (
GLib.Bytes
) – archive data of JSON filescancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Loads an emulated device into the daemon backend that has the phases set by the JSON data, for instance, having one USB device emulated for the bootloader and another emulated for the runtime interface.
New in version 1.8.11.
- emulation_load_async(data, cancellable, callback, *callback_data)[source]¶
- Parameters:
data (
GLib.Bytes
) – archive data of JSON filescancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Loads an emulated device into the daemon backend that has the phases set by the JSON data, for instance, having one USB device emulated for the bootloader and another emulated for the runtime interface.
New in version 1.8.11.
- emulation_load_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.emulation_load_async].
New in version 1.8.11.
- emulation_save(cancellable)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
archive data
- Return type:
Gets the captured data from all filtered devices for all recorded phases. The data is returned in a ZIP archive of JSON output.
NOTE: Device events are not automatically recorded for all devices. You must call something like
ModifyDevice(device_id, 'flags','emulation-tag')
to start the recording the backend.Once the device has been re-inserted then the emulation data will be available using this API call.
New in version 1.8.11.
- emulation_save_async(cancellable, callback, *callback_data)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets the captured data from all filtered devices for all recorded phases. The data is returned in a ZIP archive of JSON output.
NOTE: Device events are not automatically recorded for all devices. You must call something like
ModifyDevice(device_id, 'flags','emulation-tag')
to start the recording the backend.Once the device has been re-inserted then the emulation data will be available using this API call.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.8.11.
- emulation_save_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
archive data
- Return type:
Gets the result of [method`FwupdClient`.emulation_save_async].
New in version 1.8.11.
- ensure_networking()[source]¶
- Raises:
- Returns:
True
for success- Return type:
Sets up the client networking support ready for use. Most other download and upload methods call this automatically, and do you only need to call this if the session is being used outside the [class`FwupdClient`].
New in version 1.4.5.
- fix_host_security_attr(appstream_id, cancellable)[source]¶
- Parameters:
appstream_id (
str
) – the HSI AppStream IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Fix one specific security attribute.
New in version 1.9.6.
- fix_host_security_attr_async(appstream_id, cancellable, callback, *callback_data)[source]¶
- Parameters:
appstream_id (
str
) – HSI AppStream IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Fix one specific security attribute.
New in version 1.9.6.
- fix_host_security_attr_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.fix_host_security_attr_async].
New in version 1.9.6.
- get_approved_firmware(cancellable)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
checksums, or
None
for error- Return type:
[
str
]
Gets the list of approved firmware.
New in version 1.2.6.
- get_approved_firmware_async(cancellable, callback, *callback_data)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets the list of approved firmware.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.5.0.
- get_approved_firmware_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
checksums, or
None
for error- Return type:
[
str
]
Gets the result of [method`FwupdClient`.get_approved_firmware_async].
New in version 1.5.0.
- get_battery_level()[source]¶
- Returns:
value in percent
- Return type:
Returns the system battery level.
New in version 1.8.1.
- get_battery_threshold()[source]¶
- Returns:
value in percent
- Return type:
Returns the system battery threshold under which a firmware update cannot be performed.
New in version 1.8.1.
- get_bios_settings(cancellable)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
attributes
- Return type:
Gets all the BIOS settings from the daemon.
New in version 1.8.4.
- get_bios_settings_async(cancellable, callback, *callback_data)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets all the host security attributes from the daemon.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.8.4.
- get_bios_settings_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
attributes
- Return type:
Gets the result of [method`FwupdClient`.get_bios_settings_async].
New in version 1.8.4.
- get_blocked_firmware(cancellable)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
checksums, or
None
for error- Return type:
[
str
]
Gets the list of blocked firmware.
New in version 1.4.6.
- get_blocked_firmware_async(cancellable, callback, *callback_data)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets the list of blocked firmware.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.5.0.
- get_blocked_firmware_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
checksums, or
None
for error- Return type:
[
str
]
Gets the result of [method`FwupdClient`.get_blocked_firmware_async].
New in version 1.5.0.
- get_daemon_interactive()[source]¶
-
Gets if the daemon is running in an interactive terminal.
New in version 1.3.4.
- get_details(filename, cancellable)[source]¶
- Parameters:
filename (
str
) – the firmware filename, e.g.firmware.cab
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
an array of results
- Return type:
Gets details about a specific firmware file.
New in version 1.0.0.
- get_details_bytes(bytes, cancellable)[source]¶
- Parameters:
bytes (
GLib.Bytes
) – the firmware archivecancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
an array of results
- Return type:
Gets details about a specific firmware file.
New in version 1.5.0.
- get_details_bytes_async(bytes, cancellable, callback, *callback_data)[source]¶
- Parameters:
bytes (
GLib.Bytes
) – firmware archivecancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets details about a specific firmware file.
New in version 1.5.0.
- get_details_bytes_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
an array of results
- Return type:
Gets the result of [method`FwupdClient`.get_details_bytes_async].
New in version 1.5.0.
- get_device_by_id(device_id, cancellable)[source]¶
- Parameters:
device_id (
str
) – the device ID, e.g.usb:00:01:03:03
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
a device or
None
- Return type:
Gets a device by its device ID.
New in version 0.9.3.
- get_device_by_id_async(device_id, cancellable, callback, *callback_data)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets a device by it’s device ID.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.5.0.
- get_device_by_id_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
a device, or
None
for failure- Return type:
Gets the result of [method`FwupdClient`.get_device_by_id_async].
New in version 1.5.0.
- get_devices(cancellable)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
results
- Return type:
Gets all the devices registered with the daemon.
New in version 0.9.2.
- get_devices_async(cancellable, callback, *callback_data)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets all the devices registered with the daemon.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.5.0.
- get_devices_by_guid(guid, cancellable)[source]¶
- Parameters:
guid (
str
) – the GUID, e.g.e22c4520-43dc-5bb3-8245-5787fead9b63
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
devices or
None
- Return type:
Gets any devices that provide a specific GUID. An error is returned if no devices contains this GUID.
New in version 1.4.1.
- get_devices_by_guid_async(guid, cancellable, callback, *callback_data)[source]¶
- Parameters:
guid (
str
) – the GUID, e.g.e22c4520-43dc-5bb3-8245-5787fead9b63
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets any devices that provide a specific GUID. An error is returned if no devices contains this GUID.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.5.0.
- get_devices_by_guid_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
results
- Return type:
Gets the result of [method`FwupdClient`.get_devices_by_guid_async].
New in version 1.5.0.
- get_devices_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
results
- Return type:
Gets the result of [method`FwupdClient`.get_devices_async].
New in version 1.5.0.
- get_downgrades(device_id, cancellable)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
results
- Return type:
Gets all the downgrades for a specific device.
New in version 0.9.8.
- get_downgrades_async(device_id, cancellable, callback, *callback_data)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets all the downgrades for a specific device.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.5.0.
- get_downgrades_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
results
- Return type:
Gets the result of [method`FwupdClient`.get_downgrades_async].
New in version 1.5.0.
- get_history(cancellable)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
results
- Return type:
Gets all the history.
New in version 1.0.4.
- get_history_async(cancellable, callback, *callback_data)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets all the history.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.5.0.
- get_history_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
results
- Return type:
Gets the result of [method`FwupdClient`.get_history_async].
New in version 1.5.0.
- get_host_bkc()[source]¶
-
Gets the host best known configuration, e.g.
vendor-factory-2021q1,mycompany-2023
.New in version 1.7.3.
- get_host_machine_id()[source]¶
-
Gets the string that represents the host machine ID
New in version 1.3.2.
- get_host_product()[source]¶
-
Gets the string that represents the host running fwupd
New in version 1.3.1.
- get_host_security_attrs(cancellable)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
attributes
- Return type:
Gets all the host security attributes from the daemon.
New in version 1.5.0.
- get_host_security_attrs_async(cancellable, callback, *callback_data)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets all the host security attributes from the daemon.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.5.0.
- get_host_security_attrs_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
attributes
- Return type:
Gets the result of [method`FwupdClient`.get_host_security_attrs_async].
New in version 1.5.0.
- get_host_security_events(limit, cancellable)[source]¶
- Parameters:
limit (
int
) – maximum number of events, or 0 for no limitcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
attributes
- Return type:
Gets all the host security events from the daemon.
New in version 1.7.1.
- get_host_security_events_async(limit, cancellable, callback, *callback_data)[source]¶
- Parameters:
limit (
int
) – maximum number of events, or 0 for no limitcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets all the host security events from the daemon.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.7.1.
- get_host_security_events_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
attributes
- Return type:
Gets the result of [method`FwupdClient`.get_host_security_events_async].
New in version 1.7.1.
- get_host_security_id()[source]¶
-
Gets the string that represents the host machine ID
New in version 1.5.0.
- get_host_vendor()[source]¶
-
Gets the string that represents the vendor of the host running fwupd
New in version 1.8.2.
- get_main_context()[source]¶
- Returns:
the main context
- Return type:
Gets the internal
GLib.MainContext
to use for synchronous methods. By default the value is set a newGLib.MainContext
.New in version 1.5.3.
- get_only_trusted()[source]¶
-
Gets if the daemon is verifying signatures from a trusted authority.
New in version 1.8.0.
- get_percentage()[source]¶
- Returns:
a percentage, or 0 for unknown.
- Return type:
Gets the last returned percentage value.
New in version 0.7.3.
- get_plugins(cancellable)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
results
- Return type:
Gets all the plugins being used the daemon.
New in version 1.5.0.
- get_plugins_async(cancellable, callback, *callback_data)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets all the plugins being used by the daemon.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.5.0.
- get_plugins_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
results
- Return type:
Gets the result of [method`FwupdClient`.get_plugins_async].
New in version 1.5.0.
- get_releases(device_id, cancellable)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
results
- Return type:
Gets all the releases for a specific device
New in version 0.9.3.
- get_releases_async(device_id, cancellable, callback, *callback_data)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets all the releases for a specific device
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.5.0.
- get_releases_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
results
- Return type:
Gets the result of [method`FwupdClient`.get_releases_async].
New in version 1.5.0.
- get_remote_by_id(remote_id, cancellable)[source]¶
- Parameters:
remote_id (
str
) – the remote ID, e.g.lvfs-testing
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
a
Fwupd.Remote
, orNone
if not found- Return type:
Gets a specific remote that has been configured for the system.
New in version 0.9.3.
- get_remote_by_id_async(remote_id, cancellable, callback, *callback_data)[source]¶
- Parameters:
remote_id (
str
) – the remote ID, e.g.lvfs-testing
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets a specific remote that has been configured for the system.
New in version 1.5.0.
- get_remote_by_id_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
a
Fwupd.Remote
, orNone
if not found- Return type:
Gets the result of [method`FwupdClient`.get_remote_by_id_async].
New in version 1.5.0.
- get_remotes(cancellable)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
list of remotes, or
None
- Return type:
Gets the list of remotes that have been configured for the system.
New in version 0.9.3.
- get_remotes_async(cancellable, callback, *callback_data)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets the list of remotes that have been configured for the system.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.5.0.
- get_remotes_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
results
- Return type:
Gets the result of [method`FwupdClient`.get_remotes_async].
New in version 1.5.0.
- get_report_metadata(cancellable)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
attributes
- Return type:
Gets all the report metadata from the daemon.
New in version 1.5.0.
- get_report_metadata_async(cancellable, callback, *callback_data)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets all the report metadata from the daemon.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.5.0.
- get_report_metadata_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
attributes
- Return type:
Gets the result of [method`FwupdClient`.get_report_metadata_async].
New in version 1.5.0.
- get_results(device_id, cancellable)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
a device, or
None
for failure- Return type:
Gets the results of a previous firmware update for a specific device.
New in version 0.7.0.
- get_results_async(device_id, cancellable, callback, *callback_data)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets the results of a previous firmware update for a specific device.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.5.0.
- get_results_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
a device, or
None
for failure- Return type:
Gets the result of [method`FwupdClient`.get_results_async].
New in version 1.5.0.
- get_status()[source]¶
- Returns:
a
Fwupd.Status
, orFwupd.Status.UNKNOWN
for unknown.- Return type:
Gets the last returned status value.
New in version 0.7.3.
- get_upgrades(device_id, cancellable)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
results
- Return type:
Gets all the upgrades for a specific device.
New in version 0.9.8.
- get_upgrades_async(device_id, cancellable, callback, *callback_data)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Gets all the upgrades for a specific device.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.5.0.
- get_upgrades_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
results
- Return type:
Gets the result of [method`FwupdClient`.get_upgrades_async].
New in version 1.5.0.
- get_user_agent()[source]¶
-
Gets the string that represents the user agent that is used for uploading and downloading. The user agent will contain the runtime version of fwupd somewhere in the provided string.
New in version 1.5.2.
- inhibit(reason, cancellable)[source]¶
- Parameters:
reason (
str
) – the inhibit reason, e.g.user active
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
a string to use for [method`FwupdClient`.uninhibit_async], or
None
for failure- Return type:
Marks all devices as unavailable for update. Update is only available if there is no other inhibit imposed by other applications or by the system (e.g. low power state).
The same application can inhibit the system multiple times.
New in version 1.8.11.
- inhibit_async(reason, cancellable, callback, *callback_data)[source]¶
- Parameters:
reason (
str
) – the inhibit reason, e.g.user active
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Marks all devices as unavailable for update. Update is only available if there is no other inhibit imposed by other applications or by the system (e.g. low power state).
The same application can inhibit the system multiple times.
New in version 1.8.11.
- inhibit_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
a string to use for [method`FwupdClient`.uninhibit_async], or
None
for failure- Return type:
Gets the result of [method`FwupdClient`.inhibit_async].
New in version 1.8.11.
- install(device_id, filename, install_flags, cancellable)[source]¶
- Parameters:
device_id (
str
) – the device IDfilename (
str
) – the filename to installinstall_flags (
Fwupd.InstallFlags
) – install flags, e.g.Fwupd.InstallFlags.ALLOW_REINSTALL
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Install a file onto a specific device.
New in version 0.7.0.
- install_async(device_id, filename, install_flags, cancellable, callback, *callback_data)[source]¶
- Parameters:
device_id (
str
) – the device IDfilename (
str
) – the filename to installinstall_flags (
Fwupd.InstallFlags
) – install flags, e.g.Fwupd.InstallFlags.ALLOW_REINSTALL
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Install firmware onto a specific device.
NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with [method`Client`.set_main_context].
New in version 1.5.0.
- install_bytes(device_id, bytes, install_flags, cancellable)[source]¶
- Parameters:
device_id (
str
) – the device IDbytes (
GLib.Bytes
) – cabinet archiveinstall_flags (
Fwupd.InstallFlags
) – install flags, e.g.Fwupd.InstallFlags.ALLOW_REINSTALL
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Install firmware onto a specific device.
New in version 1.4.5.
- install_bytes_async(device_id, bytes, install_flags, cancellable, callback, *callback_data)[source]¶
- Parameters:
device_id (
str
) – the device IDbytes (
GLib.Bytes
) – cabinet archiveinstall_flags (
Fwupd.InstallFlags
) – install flags, e.g.Fwupd.InstallFlags.ALLOW_REINSTALL
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Install firmware onto a specific device.
NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with [method`Client`.set_main_context].
New in version 1.5.0.
- install_bytes_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.install_bytes_async].
New in version 1.5.0.
- install_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.install_async].
New in version 1.5.0.
- install_release(device, release, install_flags, cancellable)[source]¶
- Parameters:
device (
Fwupd.Device
) – a devicerelease (
Fwupd.Release
) – a releaseinstall_flags (
Fwupd.InstallFlags
) – install flags, e.g.Fwupd.InstallFlags.ALLOW_REINSTALL
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Installs a new release on a device, downloading the firmware if required.
New in version 1.4.5.
Deprecated since version 1.5.6.
- install_release2(device, release, install_flags, download_flags, cancellable)[source]¶
- Parameters:
device (
Fwupd.Device
) – a devicerelease (
Fwupd.Release
) – a releaseinstall_flags (
Fwupd.InstallFlags
) – install flags, e.g.Fwupd.InstallFlags.ALLOW_REINSTALL
download_flags (
Fwupd.ClientDownloadFlags
) – download flags, e.g.Fwupd.ClientDownloadFlags.NONE
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Installs a new release on a device, downloading the firmware if required.
New in version 1.5.6.
- install_release2_async(device, release, install_flags, download_flags, cancellable, callback, *callback_data)[source]¶
- Parameters:
device (
Fwupd.Device
) – a devicerelease (
Fwupd.Release
) – a releaseinstall_flags (
Fwupd.InstallFlags
) – install flags, e.g.Fwupd.InstallFlags.ALLOW_REINSTALL
download_flags (
Fwupd.ClientDownloadFlags
) – download flags, e.g.Fwupd.ClientDownloadFlags.ONLY_P2P
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Installs a new release on a device, downloading the firmware if required.
NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with [method`Client`.set_main_context].
New in version 1.5.6.
- install_release_async(device, release, install_flags, cancellable, callback, *callback_data)[source]¶
- Parameters:
device (
Fwupd.Device
) – a devicerelease (
Fwupd.Release
) – a releaseinstall_flags (
Fwupd.InstallFlags
) – install flags, e.g.Fwupd.InstallFlags.ALLOW_REINSTALL
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Installs a new release on a device, downloading the firmware if required.
NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with [method`Client`.set_main_context].
New in version 1.5.0.
Deprecated since version 1.5.6.
- install_release_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.install_release_async].
New in version 1.5.0.
- modify_bios_setting(settings, cancellable)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Modifies a BIOS setting using kernel API. The daemon will only respond to this request with proper permissions.
New in version 1.8.4.
- modify_bios_setting_async(settings, cancellable, callback, *callback_data)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Modifies a BIOS setting using kernel API. The daemon will only respond to this request with proper permissions.
New in version 1.8.4.
- modify_bios_setting_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.modify_bios_setting_async].
New in version 1.8.4.
- modify_config(key, value, cancellable)[source]¶
- Parameters:
key (
str
) – config key, e.g.DisabledPlugins
value (
str
) – config value, e.g.*
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Modifies a daemon config option. The daemon will only respond to this request with proper permissions.
New in version 1.2.8.
- modify_config_async(key, value, cancellable, callback, *callback_data)[source]¶
- Parameters:
key (
str
) – config key, e.g.DisabledPlugins
value (
str
) – config value, e.g.*
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Modifies a daemon config option. The daemon will only respond to this request with proper permissions.
New in version 1.5.0.
- modify_config_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.modify_config_async].
New in version 1.5.0.
- modify_device(device_id, key, value, cancellable)[source]¶
- Parameters:
device_id (
str
) – the device IDkey (
str
) – the key, e.g.Flags
value (
str
) – the key, e.g.reported
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Modifies a device in a specific way. Not all properties on the
Fwupd.Device
are settable by the client, and some may have other restrictions on value.NOTE: User authentication may be required to complete this action.
New in version 1.0.4.
- modify_device_async(device_id, key, value, cancellable, callback, *callback_data)[source]¶
- Parameters:
device_id (
str
) – the device IDkey (
str
) – the key, e.g.Flags
value (
str
) – the value, e.g.reported
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Modifies a device in a specific way. Not all properties on the
Fwupd.Device
are settable by the client, and some may have other restrictions on value.New in version 1.5.0.
- modify_device_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.modify_device_async].
New in version 1.5.0.
- modify_remote(remote_id, key, value, cancellable)[source]¶
- Parameters:
remote_id (
str
) – the remote ID, e.g.lvfs-testing
key (
str
) – the key, e.g.Enabled
value (
str
) – the key, e.g.true
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Modifies a system remote in a specific way.
NOTE: User authentication may be required to complete this action.
New in version 0.9.8.
- modify_remote_async(remote_id, key, value, cancellable, callback, *callback_data)[source]¶
- Parameters:
remote_id (
str
) – the remote ID, e.g.lvfs-testing
key (
str
) – the key, e.g.Enabled
value (
str
) – the key, e.g.true
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Modifies a system remote in a specific way.
New in version 1.5.0.
- modify_remote_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.modify_remote_async].
New in version 1.5.0.
- quit_async(cancellable, callback, *callback_data)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Asks the daemon to quit. This can only be called by the root user.
NOTE: This will only actually quit if an install is not already in progress.
New in version 1.8.11.
- quit_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.quit_async].
New in version 1.8.11.
- refresh_remote(remote, cancellable)[source]¶
- Parameters:
remote (
Fwupd.Remote
) – aFwupd.Remote
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Refreshes a remote by downloading new metadata.
New in version 1.4.5.
- refresh_remote2(remote, download_flags, cancellable)[source]¶
- Parameters:
remote (
Fwupd.Remote
) – aFwupd.Remote
download_flags (
Fwupd.ClientDownloadFlags
) – download flags, e.g.Fwupd.ClientDownloadFlags.ONLY_P2P
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Refreshes a remote by downloading new metadata.
New in version 1.9.4.
- refresh_remote2_async(remote, download_flags, cancellable, callback, *callback_data)[source]¶
- Parameters:
remote (
Fwupd.Remote
) – aFwupd.Remote
download_flags (
Fwupd.ClientDownloadFlags
) – download flags, e.g.Fwupd.ClientDownloadFlags.ONLY_P2P
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Refreshes a remote by downloading new metadata.
NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with [method`Client`.set_main_context].
New in version 1.9.4.
- refresh_remote_async(remote, cancellable, callback, *callback_data)[source]¶
- Parameters:
remote (
Fwupd.Remote
) – aFwupd.Remote
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Refreshes a remote by downloading new metadata.
NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with [method`Client`.set_main_context].
New in version 1.5.0.
- refresh_remote_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.refresh_remote_async].
New in version 1.5.0.
- self_sign(value, flags, cancellable)[source]¶
- Parameters:
value (
str
) – a string to sign, typically a JSON blobflags (
Fwupd.SelfSignFlags
) – signing flags, e.g.Fwupd.SelfSignFlags.ADD_TIMESTAMP
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
a signature, or
None
for failure- Return type:
Signs the data using the client self-signed certificate.
New in version 1.2.6.
- self_sign_async(value, flags, cancellable, callback, *callback_data)[source]¶
- Parameters:
value (
str
) – a string to sign, typically a JSON blobflags (
Fwupd.SelfSignFlags
) – signing flags, e.g.Fwupd.SelfSignFlags.ADD_TIMESTAMP
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Signs the data using the client self-signed certificate.
You must have called [method`Client`.connect_async] on self before using this method.
New in version 1.5.0.
- self_sign_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
a signature, or
None
for failure- Return type:
Gets the result of [method`FwupdClient`.self_sign_async].
New in version 1.5.0.
- set_approved_firmware(checksums, cancellable)[source]¶
- Parameters:
checksums (
str
) – Array of checksumscancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Sets the list of approved firmware.
New in version 1.2.6.
- set_approved_firmware_async(checksums, cancellable, callback, *callback_data)[source]¶
- Parameters:
checksums ([
str
]) – firmware checksumscancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Sets the list of approved firmware.
New in version 1.5.0.
- set_approved_firmware_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.set_approved_firmware_async].
New in version 1.5.0.
- set_blocked_firmware(checksums, cancellable)[source]¶
- Parameters:
checksums (
str
) – Array of checksumscancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Sets the list of approved firmware.
New in version 1.4.6.
- set_blocked_firmware_async(checksums, cancellable, callback, *callback_data)[source]¶
- Parameters:
checksums ([
str
]) – firmware checksumscancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Sets the list of blocked firmware.
New in version 1.5.0.
- set_blocked_firmware_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.set_blocked_firmware_async].
New in version 1.5.0.
- set_daemon_version(daemon_version)[source]¶
- Parameters:
daemon_version (
str
) – A semantic version, e.g. “1.2.3”
Sets the daemon version number.
New in version 1.8.11.
- set_feature_flags(feature_flags, cancellable)[source]¶
- Parameters:
feature_flags (
Fwupd.FeatureFlags
) – feature flags, e.g. %FWUPD_FEATURE_FLAG_UPDATE_TEXTcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Sets the features the client supports. This allows firmware to depend on specific front-end features, for instance showing the user an image on how to detach the hardware.
Clients can call this none or multiple times.
New in version 1.4.5.
- set_feature_flags_async(feature_flags, cancellable, callback, *callback_data)[source]¶
- Parameters:
feature_flags (
Fwupd.FeatureFlags
) – feature flags, e.g. %FWUPD_FEATURE_FLAG_UPDATE_TEXTcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Sets the features the client supports. This allows firmware to depend on specific front-end features, for instance showing the user an image on how to detach the hardware.
New in version 1.5.0.
- set_feature_flags_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.set_feature_flags_async].
New in version 1.5.0.
- set_main_context(main_ctx)[source]¶
- Parameters:
main_ctx (
GLib.MainContext
orNone
) – the global default main context to use
Sets the internal main context to use for returning progress signals.
New in version 1.5.3.
- set_user_agent(user_agent)[source]¶
- Parameters:
user_agent (
str
) – the user agent ID, e.g.gnome-software/3.34.1
Manually sets the user agent that is used for downloading. The user agent should contain the runtime version of fwupd somewhere in the provided string.
New in version 1.4.5.
- set_user_agent_for_package(package_name, package_version)[source]¶
- Parameters:
Builds a user-agent to use for the download.
Supplying harmless details to the server means it knows more about each client. This allows the web service to respond in a different way, for instance sending a different metadata file for old versions of fwupd, or returning an error for Solaris machines.
Before freaking out about theoretical privacy implications, much more data than this is sent to each and every website you visit.
New in version 1.4.5.
- undo_host_security_attr(appstream_id, cancellable)[source]¶
- Parameters:
appstream_id (
str
) – the HSI AppStream IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Revert the fix to one specific security attribute.
New in version 1.9.6.
- undo_host_security_attr_async(appstream_id, cancellable, callback, *callback_data)[source]¶
- Parameters:
appstream_id (
str
) – HSI AppStream IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Reverts the fix to one specific security attribute.
New in version 1.9.6.
- undo_host_security_attr_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.undo_host_security_attr_async].
New in version 1.9.6.
- uninhibit(inhibit_id, cancellable)[source]¶
- Parameters:
inhibit_id (
str
) – the inhibit IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Removes the inhibit token added by the application.
New in version 1.8.11.
- uninhibit_async(inhibit_id, cancellable, callback, *callback_data)[source]¶
- Parameters:
inhibit_id (
str
) – the inhibit IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Removes the inhibit token added by the application.
New in version 1.8.11.
- uninhibit_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.uninhibit_async].
New in version 1.8.11.
- unlock(device_id, cancellable)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Unlocks a specific device so firmware can be read or wrote.
New in version 0.7.0.
- unlock_async(device_id, cancellable, callback, *callback_data)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Unlocks a specific device so firmware can be read or wrote.
New in version 1.5.0.
- unlock_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.unlock_async].
New in version 1.5.0.
- update_metadata(remote_id, metadata_fn, signature_fn, cancellable)[source]¶
- Parameters:
remote_id (
str
) – the remote ID, e.g.lvfs-testing
metadata_fn (
str
) – the XML metadata filenamesignature_fn (
str
) – the GPG signature filecancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Updates the metadata. This allows a session process to download the metadata and metadata signing file to be passed into the daemon to be checked and parsed.
The remote_id allows the firmware to be tagged so that the remote can be matched when the firmware is downloaded.
New in version 1.0.0.
- update_metadata_bytes(remote_id, metadata, signature, cancellable)[source]¶
- Parameters:
remote_id (
str
) – remote ID, e.g.lvfs-testing
metadata (
GLib.Bytes
) – XML metadata datasignature (
GLib.Bytes
) – signature datacancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Updates the metadata. This allows a session process to download the metadata and metadata signing file to be passed into the daemon to be checked and parsed.
The remote_id allows the firmware to be tagged so that the remote can be matched when the firmware is downloaded.
New in version 1.4.5.
- update_metadata_bytes_async(remote_id, metadata, signature, cancellable, callback, *callback_data)[source]¶
- Parameters:
remote_id (
str
) – remote ID, e.g.lvfs-testing
metadata (
GLib.Bytes
) – XML metadata datasignature (
GLib.Bytes
) – signature datacancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Updates the metadata. This allows a session process to download the metadata and metadata signing file to be passed into the daemon to be checked and parsed.
The remote_id allows the firmware to be tagged so that the remote can be matched when the firmware is downloaded.
NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with [method`Client`.set_main_context].
New in version 1.5.0.
- update_metadata_bytes_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.update_metadata_bytes_async].
New in version 1.5.0.
- upload_bytes(url, payload, signature, flags, cancellable)[source]¶
- Parameters:
url (
str
) – the remote URLpayload (
str
) – payload stringflags (
Fwupd.ClientUploadFlags
) – download flags, e.g.Fwupd.ClientDownloadFlags.NONE
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
response data, or
None
for error- Return type:
Uploads data to a remote server. The [method`Client`.set_user_agent] function should be called before this method is used.
New in version 1.4.5.
- upload_bytes_async(url, payload, signature, flags, cancellable, callback, *callback_data)[source]¶
- Parameters:
url (
str
) – the remote URLpayload (
str
) – payload stringflags (
Fwupd.ClientUploadFlags
) – download flags, e.g.Fwupd.ClientDownloadFlags.NONE
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Uploads data to a remote server. The [method`Client`.set_user_agent] function should be called before this method is used.
You must have called [method`Client`.connect_async] on self before using this method.
NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with [method`Client`.set_main_context].
New in version 1.5.0.
- upload_bytes_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
response data, or
None
for error- Return type:
Gets the result of [method`FwupdClient`.upload_bytes_async].
New in version 1.5.0.
- upload_report(url, payload, signature, flags, cancellable)[source]¶
- Parameters:
url (
str
) – the remote URLpayload (
str
) – payload stringflags (
Fwupd.ClientUploadFlags
) – download flags, e.g.Fwupd.ClientDownloadFlags.NONE
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
a URI (perhaps an empty string), or
None
for error- Return type:
Uploads a report to a remote server. The [method`Client`.set_user_agent] function should be called before this method is used.
New in version 1.9.20.
- upload_report_async(url, payload, signature, flags, cancellable, callback, *callback_data)[source]¶
- Parameters:
url (
str
) – the remote URLpayload (
str
) – payload stringflags (
Fwupd.ClientUploadFlags
) – download flags, e.g.Fwupd.ClientDownloadFlags.NONE
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Uploads a report to a remote server. The [method`Client`.set_user_agent] function should be called before this method is used.
You must have called [method`Client`.connect_async] on self before using this method.
NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with [method`Client`.set_main_context].
New in version 1.9.20.
- upload_report_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
a URI (perhaps an empty string), or
None
for error- Return type:
Gets the result of [method`FwupdClient`.upload_report_async].
New in version 1.9.20.
- verify(device_id, cancellable)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for verification success- Return type:
Verify a specific device.
New in version 0.7.0.
- verify_async(device_id, cancellable, callback, *callback_data)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Verify a specific device.
New in version 1.5.0.
- verify_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.verify_async].
New in version 1.5.0.
- verify_update(device_id, cancellable)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for verification success- Return type:
Update the verification record for a specific device.
New in version 0.8.0.
- verify_update_async(device_id, cancellable, callback, *callback_data)[source]¶
- Parameters:
device_id (
str
) – the device IDcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
callback (
Gio.AsyncReadyCallback
orNone
) – the function to run on completioncallback_data (
object
orNone
) – the data to pass to callback
Update the verification record for a specific device.
New in version 1.5.0.
- verify_update_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
True
for success- Return type:
Gets the result of [method`FwupdClient`.verify_update_async].
New in version 1.5.0.
- do_changed() virtual¶
- do_device_added(result) virtual¶
- Parameters:
result (
Fwupd.Device
) –
- do_device_changed(result) virtual¶
- Parameters:
result (
Fwupd.Device
) –
- do_device_removed(result) virtual¶
- Parameters:
result (
Fwupd.Device
) –
- do_device_request(request) virtual¶
- Parameters:
request (
Fwupd.Request
) –
- do_status_changed(status) virtual¶
- Parameters:
status (
Fwupd.Status
) –
Signal Details¶
- Fwupd.Client.signals.changed(client)¶
- Signal Name:
changed
- Flags:
- Parameters:
client (
Fwupd.Client
) – The object which received the signal
The
::changed
signal is emitted when the daemon internal has changed, for instance when a device has been added or removed.New in version 0.7.0.
- Fwupd.Client.signals.device_added(client, result)¶
- Signal Name:
device-added
- Flags:
- Parameters:
client (
Fwupd.Client
) – The object which received the signalresult (
Fwupd.Device
) – theFwupd.Device
The
::device-added
signal is emitted when a device has been added.New in version 0.7.1.
- Fwupd.Client.signals.device_changed(client, result)¶
- Signal Name:
device-changed
- Flags:
- Parameters:
client (
Fwupd.Client
) – The object which received the signalresult (
Fwupd.Device
) – theFwupd.Device
The
::device-changed
signal is emitted when a device has been changed in some way, e.g. the version number is updated.New in version 0.7.1.
- Fwupd.Client.signals.device_removed(client, result)¶
- Signal Name:
device-removed
- Flags:
- Parameters:
client (
Fwupd.Client
) – The object which received the signalresult (
Fwupd.Device
) – theFwupd.Device
The
::device-removed
signal is emitted when a device has been removed.New in version 0.7.1.
- Fwupd.Client.signals.device_request(client, msg)¶
- Signal Name:
device-request
- Flags:
- Parameters:
client (
Fwupd.Client
) – The object which received the signalmsg (
Fwupd.Request
) – theFwupd.Request
The
::device-request
signal is emitted when a device has been emitted some kind of event, e.g. a manual action is required.New in version 1.6.2.
- Fwupd.Client.signals.status_changed(client, object)¶
- Signal Name:
status-changed
- Flags:
- Parameters:
client (
Fwupd.Client
) – The object which received the signalobject (
int
) –
Property Details¶
- Fwupd.Client.props.battery_level¶
-
The system battery level in percent.
New in version 1.8.1.
- Fwupd.Client.props.battery_threshold¶
-
The system battery threshold in percent.
New in version 1.8.1.
- Fwupd.Client.props.daemon_version¶
-
The daemon version number.
New in version 0.9.6.
- Fwupd.Client.props.host_bkc¶
-
The host best known configuration.
New in version 1.7.3.
- Fwupd.Client.props.host_machine_id¶
-
The host machine-id string
New in version 1.3.2.
- Fwupd.Client.props.host_product¶
-
The host product string
New in version 1.3.1.
- Fwupd.Client.props.host_security_id¶
-
The host machine-id string
New in version 1.5.0.
- Fwupd.Client.props.host_vendor¶
-
The host vendor string
New in version 1.8.2.
- Fwupd.Client.props.interactive¶
-
If the daemon is running in an interactive terminal
New in version 1.3.4.
- Fwupd.Client.props.only_trusted¶
-
If the daemon is verifying signatures from a trusted authority.
New in version 1.8.0.
- Fwupd.Client.props.percentage¶
-
The last-reported percentage of the daemon.
New in version 0.7.3.
- Fwupd.Client.props.soup_session¶
- Name:
soup-session
- Type:
- Default Value:
- Flags:
The libsoup session, now unused.
New in version 1.4.5.
- Fwupd.Client.props.status¶
-
The last-reported status of the daemon.
New in version 0.7.0.