Fwupd.Client
Description: Reference for Fwupd.Client

### Class

# FwupdClient

#### Description [src]

    class Fwupd.Client : GObject.Object {
      parent_instance: GObject
    }

Allow client code to call the daemon methods.

See also: `FwupdDevice`

#### Hierarchy

#### Ancestors

- GObject

#### Constructors

###### fwupd_client_new

Creates a new client.

Available since: 0.7.0

#### Instance methods

###### fwupd_client_activate

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.

Available since: 1.2.6

###### fwupd_client_activate_async

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.

Available since: 1.5.0

###### fwupd_client_activate_finish

Gets the result of `fwupd_client_activate_async()`.

Available since: 1.5.0

###### fwupd_client_add_hint

Sets optional hints from the client that may affect the list of devices.

Available since: 1.7.1

###### fwupd_client_clear_results

Clears the results for a specific device.

Available since: 0.7.0

###### fwupd_client_clear_results_async

Clears the results for a specific device.

Available since: 1.5.0

###### fwupd_client_clear_results_finish

Gets the result of `fwupd_client_clear_results_async()`.

Available since: 1.5.0

###### fwupd_client_connect

Sets up the client ready for use. Most other methods call this for you, and do you only need to call this if you are just watching the client.

Available since: 0.7.1

###### fwupd_client_connect_async

Sets up the client ready for use. This is probably the first method you call when wanting to use libfwupd in an asynchronous manner.

Available since: 1.5.0

###### fwupd_client_connect_finish

Gets the result of `fwupd_client_connect_async()`.

Available since: 1.5.0

###### fwupd_client_disconnect

Tears down client after use. You only need to call this method if you are:

Available since: 1.8.0

###### fwupd_client_download_bytes

Downloads data from a remote server. The `fwupd_client_set_user_agent()` function should be called before this method is used.

Available since: 1.4.5

###### fwupd_client_download_bytes_async

Downloads data from a remote server. The `fwupd_client_set_user_agent()` function should be called before this method is used.

Available since: 1.5.0

###### fwupd_client_download_bytes_finish

Gets the result of `fwupd_client_download_bytes_async()`.

Available since: 1.5.0

###### fwupd_client_download_file

Downloads data from a remote server. The `fwupd_client_set_user_agent()` function should be called before this method is used.

Available since: 1.5.2

###### fwupd_client_ensure_networking

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 `FwupdClient`.

Available since: 1.4.5

###### fwupd_client_get_approved_firmware

Gets the list of approved firmware.

Available since: 1.2.6

###### fwupd_client_get_approved_firmware_async

Gets the list of approved firmware.

Available since: 1.5.0

###### fwupd_client_get_approved_firmware_finish

Gets the result of `fwupd_client_get_approved_firmware_async()`.

Available since: 1.5.0

###### fwupd_client_get_battery_level

Returns the system battery level.

Available since: 1.8.1

###### fwupd_client_get_battery_threshold

Returns the system battery threshold under which a firmware update cannot be performed.

Available since: 1.8.1

###### fwupd_client_get_bios_settings

Gets all the BIOS settings from the daemon.

Available since: 1.8.4

###### fwupd_client_get_bios_settings_async

Gets all the host security attributes from the daemon.

Available since: 1.8.4

###### fwupd_client_get_bios_settings_finish

Gets the result of `fwupd_client_get_bios_settings_async()`.

Available since: 1.8.4

###### fwupd_client_get_blocked_firmware

Gets the list of blocked firmware.

Available since: 1.4.6

###### fwupd_client_get_blocked_firmware_async

Gets the list of blocked firmware.

Available since: 1.5.0

###### fwupd_client_get_blocked_firmware_finish

Gets the result of `fwupd_client_get_blocked_firmware_async()`.

Available since: 1.5.0

###### fwupd_client_get_daemon_interactive

Gets if the daemon is running in an interactive terminal.

Available since: 1.3.4

###### fwupd_client_get_daemon_version

Gets the daemon version number.

Available since: 0.9.6

###### fwupd_client_get_details

Gets details about a specific firmware file.

Available since: 1.0.0

###### fwupd_client_get_details_bytes

Gets details about a specific firmware file.

Available since: 1.5.0

###### fwupd_client_get_details_bytes_async

Gets details about a specific firmware file.

Available since: 1.5.0

###### fwupd_client_get_details_bytes_finish

Gets the result of `fwupd_client_get_details_bytes_async()`.

Available since: 1.5.0

###### fwupd_client_get_device_by_id

Gets a device by its device ID.

Available since: 0.9.3

###### fwupd_client_get_device_by_id_async

Gets a device by it’s device ID.

Available since: 1.5.0

###### fwupd_client_get_device_by_id_finish

Gets the result of `fwupd_client_get_device_by_id_async()`.

Available since: 1.5.0

###### fwupd_client_get_devices

Gets all the devices registered with the daemon.

Available since: 0.9.2

###### fwupd_client_get_devices_async

Gets all the devices registered with the daemon.

Available since: 1.5.0

###### fwupd_client_get_devices_by_guid

Gets any devices that provide a specific GUID. An error is returned if no devices contains this GUID.

Available since: 1.4.1

###### fwupd_client_get_devices_by_guid_async

Gets any devices that provide a specific GUID. An error is returned if no devices contains this GUID.

Available since: 1.5.0

###### fwupd_client_get_devices_by_guid_finish

Gets the result of `fwupd_client_get_devices_by_guid_async()`.

Available since: 1.5.0

###### fwupd_client_get_devices_finish

Gets the result of `fwupd_client_get_devices_async()`.

Available since: 1.5.0

###### fwupd_client_get_downgrades

Gets all the downgrades for a specific device.

Available since: 0.9.8

###### fwupd_client_get_downgrades_async

Gets all the downgrades for a specific device.

Available since: 1.5.0

###### fwupd_client_get_downgrades_finish

Gets the result of `fwupd_client_get_downgrades_async()`.

Available since: 1.5.0

###### fwupd_client_get_history

Gets all the history.

Available since: 1.0.4

###### fwupd_client_get_history_async

Gets all the history.

Available since: 1.5.0

###### fwupd_client_get_history_finish

Gets the result of `fwupd_client_get_history_async()`.

Available since: 1.5.0

###### fwupd_client_get_host_bkc

Gets the daemon version number.

Available since: 1.7.3

###### fwupd_client_get_host_machine_id

Gets the string that represents the host machine ID.

Available since: 1.3.2

###### fwupd_client_get_host_product

Gets the string that represents the host running fwupd.

Available since: 1.3.1

###### fwupd_client_get_host_security_attrs

Gets all the host security attributes from the daemon.

Available since: 1.5.0

###### fwupd_client_get_host_security_attrs_async

Gets all the host security attributes from the daemon.

Available since: 1.5.0

###### fwupd_client_get_host_security_attrs_finish

Gets the result of `fwupd_client_get_host_security_attrs_async()`.

Available since: 1.5.0

###### fwupd_client_get_host_security_events

Gets all the host security events from the daemon.

Available since: 1.7.1

###### fwupd_client_get_host_security_events_async

Gets all the host security events from the daemon.

Available since: 1.7.1

###### fwupd_client_get_host_security_events_finish

Gets the result of `fwupd_client_get_host_security_events_async()`.

Available since: 1.7.1

###### fwupd_client_get_host_security_id

Gets the string that represents the host machine ID.

Available since: 1.5.0

###### fwupd_client_get_host_vendor

Gets the string that represents the vendor of the host running fwupd.

Available since: 1.8.2

###### fwupd_client_get_main_context

Gets the internal `GMainContext` to use for synchronous methods. By default the value is set a new `GMainContext`.

Available since: 1.5.3

###### fwupd_client_get_only_trusted

Gets if the daemon is verifying signatures from a trusted authority.

Available since: 1.8.0

###### fwupd_client_get_percentage

Gets the last returned percentage value.

Available since: 0.7.3

###### fwupd_client_get_plugins

Gets all the plugins being used the daemon.

Available since: 1.5.0

###### fwupd_client_get_plugins_async

Gets all the plugins being used by the daemon.

Available since: 1.5.0

###### fwupd_client_get_plugins_finish

Gets the result of `fwupd_client_get_plugins_async()`.

Available since: 1.5.0

###### fwupd_client_get_releases

Gets all the releases for a specific device.

Available since: 0.9.3

###### fwupd_client_get_releases_async

Gets all the releases for a specific device.

Available since: 1.5.0

###### fwupd_client_get_releases_finish

Gets the result of `fwupd_client_get_releases_async()`.

Available since: 1.5.0

###### fwupd_client_get_remote_by_id

Gets a specific remote that has been configured for the system.

Available since: 0.9.3

###### fwupd_client_get_remote_by_id_async

Gets a specific remote that has been configured for the system.

Available since: 1.5.0

###### fwupd_client_get_remote_by_id_finish

Gets the result of `fwupd_client_get_remote_by_id_async()`.

Available since: 1.5.0

###### fwupd_client_get_remotes

Gets the list of remotes that have been configured for the system.

Available since: 0.9.3

###### fwupd_client_get_remotes_async

Gets the list of remotes that have been configured for the system.

Available since: 1.5.0

###### fwupd_client_get_remotes_finish

Gets the result of `fwupd_client_get_remotes_async()`.

Available since: 1.5.0

###### fwupd_client_get_report_metadata

Gets all the report metadata from the daemon.

Available since: 1.5.0

###### fwupd_client_get_report_metadata_async

Gets all the report metadata from the daemon.

Available since: 1.5.0

###### fwupd_client_get_report_metadata_finish

Gets the result of `fwupd_client_get_report_metadata_async()`.

Available since: 1.5.0

###### fwupd_client_get_results

Gets the results of a previous firmware update for a specific device.

Available since: 0.7.0

###### fwupd_client_get_results_async

Gets the results of a previous firmware update for a specific device.

Available since: 1.5.0

###### fwupd_client_get_results_finish

Gets the result of `fwupd_client_get_results_async()`.

Available since: 1.5.0

###### fwupd_client_get_status

Gets the last returned status value.

Available since: 0.7.3

###### fwupd_client_get_tainted

Gets if the daemon has been tainted by 3rd party code.

Available since: 1.2.4

###### fwupd_client_get_upgrades

Gets all the upgrades for a specific device.

Available since: 0.9.8

###### fwupd_client_get_upgrades_async

Gets all the upgrades for a specific device.

Available since: 1.5.0

###### fwupd_client_get_upgrades_finish

Gets the result of `fwupd_client_get_upgrades_async()`.

Available since: 1.5.0

###### fwupd_client_get_user_agent

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.

Available since: 1.5.2

###### fwupd_client_install

Install a file onto a specific device.

Available since: 0.7.0

###### fwupd_client_install_async

Install firmware onto a specific device.

Available since: 1.5.0

###### fwupd_client_install_bytes

Install firmware onto a specific device.

Available since: 1.4.5

###### fwupd_client_install_bytes_async

Install firmware onto a specific device.

Available since: 1.5.0

###### fwupd_client_install_bytes_finish

Gets the result of `fwupd_client_install_bytes_async()`.

Available since: 1.5.0

###### fwupd_client_install_finish

Gets the result of `fwupd_client_install_async()`.

Available since: 1.5.0

###### fwupd_client_install_release

Installs a new release on a device, downloading the firmware if required.

Available since: 1.4.5

Deprecated since: 1.5.6

###### fwupd_client_install_release2

Installs a new release on a device, downloading the firmware if required.

Available since: 1.5.6

###### fwupd_client_install_release2_async

Installs a new release on a device, downloading the firmware if required.

Available since: 1.5.6

###### fwupd_client_install_release_async

Installs a new release on a device, downloading the firmware if required.

Available since: 1.5.0

Deprecated since: 1.5.6

###### fwupd_client_install_release_finish

Gets the result of `fwupd_client_install_release_async()`.

Available since: 1.5.0

###### fwupd_client_modify_bios_setting

Modifies a BIOS setting using kernel API. The daemon will only respond to this request with proper permissions.

Available since: 1.8.4

###### fwupd_client_modify_bios_setting_async

Modifies a BIOS setting using kernel API. The daemon will only respond to this request with proper permissions.

Available since: 1.8.4

###### fwupd_client_modify_bios_setting_finish

Gets the result of `fwupd_client_modify_bios_setting_async()`.

Available since: 1.8.4

###### fwupd_client_modify_config

Modifies a daemon config option. The daemon will only respond to this request with proper permissions.

Available since: 1.2.8

###### fwupd_client_modify_config_async

Modifies a daemon config option. The daemon will only respond to this request with proper permissions.

Available since: 1.5.0

###### fwupd_client_modify_config_finish

Gets the result of `fwupd_client_modify_config_async()`.

Available since: 1.5.0

###### fwupd_client_modify_device

Modifies a device in a specific way. Not all properties on the `FwupdDevice` are settable by the client, and some may have other restrictions on `value`.

Available since: 1.0.4

###### fwupd_client_modify_device_async

Modifies a device in a specific way. Not all properties on the `FwupdDevice` are settable by the client, and some may have other restrictions on `value`.

Available since: 1.5.0

###### fwupd_client_modify_device_finish

Gets the result of `fwupd_client_modify_device_async()`.

Available since: 1.5.0

###### fwupd_client_modify_remote

Modifies a system remote in a specific way.

Available since: 0.9.8

###### fwupd_client_modify_remote_async

Modifies a system remote in a specific way.

Available since: 1.5.0

###### fwupd_client_modify_remote_finish

Gets the result of `fwupd_client_modify_remote_async()`.

Available since: 1.5.0

###### fwupd_client_refresh_remote

Refreshes a remote by downloading new metadata.

Available since: 1.4.5

###### fwupd_client_refresh_remote_async

Refreshes a remote by downloading new metadata.

Available since: 1.5.0

###### fwupd_client_refresh_remote_finish

Gets the result of `fwupd_client_refresh_remote_async()`.

Available since: 1.5.0

###### fwupd_client_self_sign

Signs the data using the client self-signed certificate.

Available since: 1.2.6

###### fwupd_client_self_sign_async

Signs the data using the client self-signed certificate.

Available since: 1.5.0

###### fwupd_client_self_sign_finish

Gets the result of `fwupd_client_self_sign_async()`.

Available since: 1.5.0

###### fwupd_client_set_approved_firmware

Sets the list of approved firmware.

Available since: 1.2.6

###### fwupd_client_set_approved_firmware_async

Sets the list of approved firmware.

Available since: 1.5.0

###### fwupd_client_set_approved_firmware_finish

Gets the result of `fwupd_client_set_approved_firmware_async()`.

Available since: 1.5.0

###### fwupd_client_set_blocked_firmware

Sets the list of approved firmware.

Available since: 1.4.6

###### fwupd_client_set_blocked_firmware_async

Sets the list of blocked firmware.

Available since: 1.5.0

###### fwupd_client_set_blocked_firmware_finish

Gets the result of `fwupd_client_set_blocked_firmware_async()`.

Available since: 1.5.0

###### fwupd_client_set_feature_flags

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.

Available since: 1.4.5

###### fwupd_client_set_feature_flags_async

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.

Available since: 1.5.0

###### fwupd_client_set_feature_flags_finish

Gets the result of `fwupd_client_set_feature_flags_async()`.

Available since: 1.5.0

###### fwupd_client_set_main_context

Sets the internal main context to use for returning progress signals.

Available since: 1.5.3

###### fwupd_client_set_user_agent

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.

Available since: 1.4.5

###### fwupd_client_set_user_agent_for_package

Builds a user-agent to use for the download.

Available since: 1.4.5

###### fwupd_client_unlock

Unlocks a specific device so firmware can be read or wrote.

Available since: 0.7.0

###### fwupd_client_unlock_async

Unlocks a specific device so firmware can be read or wrote.

Available since: 1.5.0

###### fwupd_client_unlock_finish

Gets the result of `fwupd_client_unlock_async()`.

Available since: 1.5.0

###### fwupd_client_update_metadata

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.

Available since: 1.0.0

###### fwupd_client_update_metadata_bytes

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.

Available since: 1.4.5

###### fwupd_client_update_metadata_bytes_async

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.

Available since: 1.5.0

###### fwupd_client_update_metadata_bytes_finish

Gets the result of `fwupd_client_update_metadata_bytes_async()`.

Available since: 1.5.0

###### fwupd_client_upload_bytes

Uploads data to a remote server. The `fwupd_client_set_user_agent()` function should be called before this method is used.

Available since: 1.4.5

###### fwupd_client_upload_bytes_async

Uploads data to a remote server. The `fwupd_client_set_user_agent()` function should be called before this method is used.

Available since: 1.5.0

###### fwupd_client_upload_bytes_finish

Gets the result of `fwupd_client_upload_bytes_async()`.

Available since: 1.5.0

###### fwupd_client_verify

Verify a specific device.

Available since: 0.7.0

###### fwupd_client_verify_async

Verify a specific device.

Available since: 1.5.0

###### fwupd_client_verify_finish

Gets the result of `fwupd_client_verify_async()`.

Available since: 1.5.0

###### fwupd_client_verify_update

Update the verification record for a specific device.

Available since: 0.8.0

###### fwupd_client_verify_update_async

Update the verification record for a specific device.

Available since: 1.5.0

###### fwupd_client_verify_update_finish

Gets the result of `fwupd_client_verify_update_async()`.

Available since: 1.5.0

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Fwupd.Client:battery-level

The system battery level in percent.

Available since: 1.8.1

###### Fwupd.Client:battery-threshold

The system battery threshold in percent.

Available since: 1.8.1

###### Fwupd.Client:daemon-version

The daemon version number.

Available since: 0.9.6

###### Fwupd.Client:host-bkc

The host best known configuration.

Available since: 1.7.3

###### Fwupd.Client:host-machine-id

The host machine-id string.

Available since: 1.3.2

###### Fwupd.Client:host-product

The host product string.

Available since: 1.3.1

###### Fwupd.Client:host-security-id

The host machine-id string.

Available since: 1.5.0

###### Fwupd.Client:host-vendor

The host vendor string.

Available since: 1.8.2

###### Fwupd.Client:interactive

If the daemon is running in an interactive terminal.

Available since: 1.3.4

###### Fwupd.Client:only-trusted

If the daemon is verifying signatures from a trusted authority.

Available since: 1.8.0

###### Fwupd.Client:percentage

The last-reported percentage of the daemon.

Available since: 0.7.3

###### Fwupd.Client:soup-session

The libsoup session, now unused.

Available since: 1.4.5

###### Fwupd.Client:status

The last-reported status of the daemon.

Available since: 0.7.0

###### Fwupd.Client:tainted

If the daemon is tainted by 3rd party code.

Available since: 1.2.4

#### Signals

###### Fwupd.Client::changed

The ::changed signal is emitted when the daemon internal has changed, for instance when a device has been added or removed.

Available since: 0.7.0

###### Fwupd.Client::device-added

The ::device-added signal is emitted when a device has been added.

Available since: 0.7.1

###### Fwupd.Client::device-changed

The ::device-changed signal is emitted when a device has been changed in some way, e.g. the version number is updated.

Available since: 0.7.1

###### Fwupd.Client::device-removed

The ::device-removed signal is emitted when a device has been removed.

Available since: 0.7.1

###### Fwupd.Client::device-request

The ::device-request signal is emitted when a device has been emitted some kind of event, e.g. a manual action is required.

Available since: 1.6.2

###### Fwupd.Client::status-changed

No description available.

##### Signals inherited from GObject (1)

###### GObject.Object::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct FwupdClientClass {
      GObjectClass parent_class;
      void (* changed) (
        FwupdClient* client
      );
      void (* status_changed) (
        FwupdClient* client,
        FwupdStatus status
      );
      void (* device_added) (
        FwupdClient* client,
        FwupdDevice* result
      );
      void (* device_removed) (
        FwupdClient* client,
        FwupdDevice* result
      );
      void (* device_changed) (
        FwupdClient* client,
        FwupdDevice* result
      );
      void (* device_request) (
        FwupdClient* client,
        FwupdRequest* request
      );
      void (* _fwupd_reserved1) (
    void
      );
      void (* _fwupd_reserved2) (
    void
      );
      void (* _fwupd_reserved3) (
    void
      );
      void (* _fwupd_reserved4) (
    void
      );
      void (* _fwupd_reserved5) (
    void
      );
      void (* _fwupd_reserved6) (
    void
      );

    }

###### Class members

`parent_class` |
    GObjectClass
| No description available.
`changed` |
    void (* changed) (
        FwupdClient* client
      )
| No description available.
`status_changed` |
    void (* status_changed) (
        FwupdClient* client,
        FwupdStatus status
      )
| No description available.
`device_added` |
    void (* device_added) (
        FwupdClient* client,
        FwupdDevice* result
      )
| No description available.
`device_removed` |
    void (* device_removed) (
        FwupdClient* client,
        FwupdDevice* result
      )
| No description available.
`device_changed` |
    void (* device_changed) (
        FwupdClient* client,
        FwupdDevice* result
      )
| No description available.
`device_request` |
    void (* device_request) (
        FwupdClient* client,
        FwupdRequest* request
      )
| No description available.
`_fwupd_reserved1` |
    void (* _fwupd_reserved1) (
    void
      )
| No description available.
`_fwupd_reserved2` |
    void (* _fwupd_reserved2) (
    void
      )
| No description available.
`_fwupd_reserved3` |
    void (* _fwupd_reserved3) (
    void
      )
| No description available.
`_fwupd_reserved4` |
    void (* _fwupd_reserved4) (
    void
      )
| No description available.
`_fwupd_reserved5` |
    void (* _fwupd_reserved5) (
    void
      )
| No description available.
`_fwupd_reserved6` |
    void (* _fwupd_reserved6) (
    void
      )
| No description available.

#### Virtual methods

###### Fwupd.ClientClass.changed

No description available.

###### Fwupd.ClientClass.device_added

No description available.

###### Fwupd.ClientClass.device_changed

No description available.

###### Fwupd.ClientClass.device_removed

No description available.

###### Fwupd.ClientClass.device_request

No description available.

###### Fwupd.ClientClass.status_changed

No description available.