Top | ![]() |
![]() |
![]() |
![]() |
#define | FWUPD_TYPE_CLIENT |
struct | FwupdClientClass |
enum | FwupdClientDownloadFlags |
enum | FwupdClientUploadFlags |
FwupdClient |
An object that allows client code to call the daemon methods synchronously.
See also: FwupdDevice
GMainContext *
fwupd_client_get_main_context (FwupdClient *self
);
Gets the internal GMainContext to use for synchronous methods. By default the value is set a new GMainContext.
Since: 1.5.3
void fwupd_client_set_main_context (FwupdClient *self
,GMainContext *main_ctx
);
Sets the internal GMainContext to use for returning progress signals.
Since: 1.5.3
void fwupd_client_connect_async (FwupdClient *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
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 fwupd_client_get_devices_async()
should only be called
after fwupd_client_connect_finish()
has been called without an error.
self |
||
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_connect_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_connect_async()
.
Since: 1.5.0
void fwupd_client_get_devices_async (FwupdClient *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets all the devices registered with the daemon.
You must have called fwupd_client_connect_async()
on self
before using
this method.
self |
||
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
GPtrArray * fwupd_client_get_devices_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_devices_async()
.
Since: 1.5.0
void fwupd_client_get_plugins_async (FwupdClient *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets all the plugins being used by the daemon.
You must have called fwupd_client_connect_async()
on self
before using
this method.
self |
||
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
GPtrArray * fwupd_client_get_plugins_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_plugins_async()
.
Since: 1.5.0
void fwupd_client_get_history_async (FwupdClient *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets all the history.
You must have called fwupd_client_connect_async()
on self
before using
this method.
self |
||
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
GPtrArray * fwupd_client_get_history_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_history_async()
.
Since: 1.5.0
void fwupd_client_get_releases_async (FwupdClient *self
,const gchar *device_id
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets all the releases for a specific device
You must have called fwupd_client_connect_async()
on self
before using
this method.
self |
||
device_id |
the device ID |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
GPtrArray * fwupd_client_get_releases_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_releases_async()
.
Since: 1.5.0
void fwupd_client_get_downgrades_async (FwupdClient *self
,const gchar *device_id
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets all the downgrades for a specific device.
You must have called fwupd_client_connect_async()
on self
before using
this method.
self |
||
device_id |
the device ID |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
GPtrArray * fwupd_client_get_downgrades_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_downgrades_async()
.
Since: 1.5.0
void fwupd_client_get_upgrades_async (FwupdClient *self
,const gchar *device_id
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets all the upgrades for a specific device.
You must have called fwupd_client_connect_async()
on self
before using
this method.
self |
||
device_id |
the device ID |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
GPtrArray * fwupd_client_get_upgrades_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_upgrades_async()
.
Since: 1.5.0
void fwupd_client_get_details_bytes_async (FwupdClient *self
,GBytes *bytes
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets details about a specific firmware file.
self |
||
bytes |
a GBytes for the firmware, e.g. |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
GPtrArray * fwupd_client_get_details_bytes_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_details_bytes_async()
.
Since: 1.5.0
void fwupd_client_verify_async (FwupdClient *self
,const gchar *device_id
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Verify a specific device.
self |
||
device_id |
the device ID |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_verify_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_verify_async()
.
Since: 1.5.0
void fwupd_client_verify_update_async (FwupdClient *self
,const gchar *device_id
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Update the verification record for a specific device.
self |
||
device_id |
the device ID |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_verify_update_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_verify_update_async()
.
Since: 1.5.0
void fwupd_client_unlock_async (FwupdClient *self
,const gchar *device_id
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Unlocks a specific device so firmware can be read or wrote.
self |
||
device_id |
the device ID |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_unlock_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_unlock_async()
.
Since: 1.5.0
void fwupd_client_modify_config_async (FwupdClient *self
,const gchar *key
,const gchar *value
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Modifies a daemon config option. The daemon will only respond to this request with proper permissions
self |
||
key |
key, e.g. |
|
value |
value, e.g. |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_modify_config_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_modify_config_async()
.
Since: 1.5.0
void fwupd_client_activate_async (FwupdClient *self
,const gchar *device_id
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
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.
self |
||
device_id |
a device |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_activate_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_activate_async()
.
Since: 1.5.0
void fwupd_client_clear_results_async (FwupdClient *self
,const gchar *device_id
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Clears the results for a specific device.
self |
||
device_id |
a device |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_clear_results_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_clear_results_async()
.
Since: 1.5.0
void fwupd_client_get_results_async (FwupdClient *self
,const gchar *device_id
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets the results of a previous firmware update for a specific device.
You must have called fwupd_client_connect_async()
on self
before using
this method.
self |
||
device_id |
the device ID |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
FwupdDevice * fwupd_client_get_results_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_results_async()
.
Since: 1.5.0
void fwupd_client_get_host_security_attrs_async (FwupdClient *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets all the host security attributes from the daemon.
You must have called fwupd_client_connect_async()
on self
before using
this method.
self |
||
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
GPtrArray * fwupd_client_get_host_security_attrs_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_host_security_attrs_async()
.
Since: 1.5.0
void fwupd_client_get_device_by_id_async (FwupdClient *self
,const gchar *device_id
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets a device by it's device ID.
You must have called fwupd_client_connect_async()
on self
before using
this method.
self |
||
device_id |
the device ID |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
FwupdDevice * fwupd_client_get_device_by_id_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_device_by_id_async()
.
Since: 1.5.0
void fwupd_client_get_devices_by_guid_async (FwupdClient *self
,const gchar *guid
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets any devices that provide a specific GUID. An error is returned if no devices contains this GUID.
You must have called fwupd_client_connect_async()
on self
before using
this method.
self |
||
guid |
the GUID, e.g. |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
GPtrArray * fwupd_client_get_devices_by_guid_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_devices_by_guid_async()
.
Since: 1.5.0
void fwupd_client_install_async (FwupdClient *self
,const gchar *device_id
,const gchar *filename
,FwupdInstallFlags install_flags
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
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
fwupd_client_set_main_context()
.
self |
||
device_id |
the device ID |
|
filename |
the filename to install |
|
install_flags |
the FwupdInstallFlags, e.g. |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_install_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_install_async()
.
Since: 1.5.0
void fwupd_client_install_bytes_async (FwupdClient *self
,const gchar *device_id
,GBytes *bytes
,FwupdInstallFlags install_flags
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
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
fwupd_client_set_main_context()
.
self |
||
device_id |
the device ID |
|
bytes |
GBytes |
|
install_flags |
the FwupdInstallFlags, e.g. |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_install_bytes_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_install_bytes_async()
.
Since: 1.5.0
void fwupd_client_install_release_async (FwupdClient *self
,FwupdDevice *device
,FwupdRelease *release
,FwupdInstallFlags install_flags
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
fwupd_client_install_release_async
has been deprecated since version 1.5.6 and should not be used in newly-written code.
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
fwupd_client_set_main_context()
.
self |
||
device |
||
release |
||
install_flags |
the FwupdInstallFlags, e.g. |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
void fwupd_client_install_release2_async (FwupdClient *self
,FwupdDevice *device
,FwupdRelease *release
,FwupdInstallFlags install_flags
,FwupdClientDownloadFlags download_flags
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
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
fwupd_client_set_main_context()
.
self |
||
device |
||
release |
||
install_flags |
the FwupdInstallFlags, e.g. |
|
download_flags |
the FwupdClientDownloadFlags, e.g. |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.6
gboolean fwupd_client_install_release_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_install_release_async()
.
Since: 1.5.0
void fwupd_client_update_metadata_bytes_async (FwupdClient *self
,const gchar *remote_id
,GBytes *metadata
,GBytes *signature
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
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
fwupd_client_set_main_context()
.
self |
||
remote_id |
remote ID, e.g. |
|
metadata |
XML metadata data |
|
signature |
signature data |
|
cancellable |
GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_update_metadata_bytes_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_update_metadata_bytes_async()
.
Since: 1.5.0
void fwupd_client_refresh_remote_async (FwupdClient *self
,FwupdRemote *remote
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
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
fwupd_client_set_main_context()
.
self |
||
remote |
||
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_refresh_remote_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_refresh_remote_async()
.
Since: 1.5.0
void fwupd_client_modify_remote_async (FwupdClient *self
,const gchar *remote_id
,const gchar *key
,const gchar *value
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Modifies a system remote in a specific way.
self |
||
remote_id |
the remote ID, e.g. |
|
key |
the key, e.g. |
|
value |
the key, e.g. |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_modify_remote_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_modify_remote_async()
.
Since: 1.5.0
void fwupd_client_modify_device_async (FwupdClient *self
,const gchar *device_id
,const gchar *key
,const gchar *value
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
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
.
self |
||
device_id |
the device ID |
|
key |
the key, e.g. |
|
value |
the key, e.g. |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_modify_device_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_modify_device_async()
.
Since: 1.5.0
void fwupd_client_get_report_metadata_async (FwupdClient *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets all the report metadata from the daemon.
You must have called fwupd_client_connect_async()
on self
before using
this method.
self |
||
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
GHashTable * fwupd_client_get_report_metadata_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_report_metadata_async()
.
Since: 1.5.0
FwupdStatus
fwupd_client_get_status (FwupdClient *self
);
Gets the last returned status value.
Since: 0.7.3
gboolean
fwupd_client_get_tainted (FwupdClient *self
);
Gets if the daemon has been tainted by 3rd party code.
Since: 1.2.4
gboolean
fwupd_client_get_daemon_interactive (FwupdClient *self
);
Gets if the daemon is running in an interactive terminal.
Since: 1.3.4
guint
fwupd_client_get_percentage (FwupdClient *self
);
Gets the last returned percentage value.
Since: 0.7.3
const gchar *
fwupd_client_get_daemon_version (FwupdClient *self
);
Gets the daemon version number.
Since: 0.9.6
const gchar *
fwupd_client_get_host_product (FwupdClient *self
);
Gets the string that represents the host running fwupd
Since: 1.3.1
const gchar *
fwupd_client_get_host_machine_id (FwupdClient *self
);
Gets the string that represents the host machine ID
Since: 1.3.2
const gchar *
fwupd_client_get_host_security_id (FwupdClient *self
);
Gets the string that represents the host machine ID
Since: 1.5.0
void fwupd_client_get_remotes_async (FwupdClient *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets the list of remotes that have been configured for the system.
You must have called fwupd_client_connect_async()
on self
before using
this method.
self |
||
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
GPtrArray * fwupd_client_get_remotes_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_remotes_async()
.
Since: 1.5.0
void fwupd_client_get_remote_by_id_async (FwupdClient *self
,const gchar *remote_id
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets a specific remote that has been configured for the system.
self |
||
remote_id |
the remote ID, e.g. |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
FwupdRemote * fwupd_client_get_remote_by_id_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_remote_by_id_async()
.
Since: 1.5.0
void fwupd_client_get_approved_firmware_async (FwupdClient *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets the list of approved firmware.
You must have called fwupd_client_connect_async()
on self
before using
this method.
self |
||
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
GPtrArray * fwupd_client_get_approved_firmware_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_approved_firmware_async()
.
Since: 1.5.0
void fwupd_client_set_approved_firmware_async (FwupdClient *self
,GPtrArray *checksums
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Sets the list of approved firmware.
self |
||
checksums |
firmware checksums. |
[element-type utf8] |
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_set_approved_firmware_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_set_approved_firmware_async()
.
Since: 1.5.0
void fwupd_client_get_blocked_firmware_async (FwupdClient *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Gets the list of blocked firmware.
You must have called fwupd_client_connect_async()
on self
before using
this method.
self |
||
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
GPtrArray * fwupd_client_get_blocked_firmware_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_get_blocked_firmware_async()
.
Since: 1.5.0
void fwupd_client_set_blocked_firmware_async (FwupdClient *self
,GPtrArray *checksums
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Sets the list of blocked firmware.
self |
||
checksums |
firmware checksums. |
[element-type utf8] |
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_set_blocked_firmware_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_set_blocked_firmware_async()
.
Since: 1.5.0
void fwupd_client_self_sign_async (FwupdClient *self
,const gchar *value
,FwupdSelfSignFlags flags
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Signs the data using the client self-signed certificate.
You must have called fwupd_client_connect_async()
on self
before using
this method.
self |
||
value |
A string to sign, typically a JSON blob |
|
flags |
||
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gchar * fwupd_client_self_sign_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_self_sign_async()
.
Since: 1.5.0
void fwupd_client_set_feature_flags_async (FwupdClient *self
,FwupdFeatureFlags feature_flags
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
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.
self |
||
feature_flags |
FwupdFeatureFlags, e.g. |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
gboolean fwupd_client_set_feature_flags_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_set_feature_flags_async()
.
Since: 1.5.0
const gchar *
fwupd_client_get_user_agent (FwupdClient *self
);
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.
Since: 1.5.2
void fwupd_client_set_user_agent (FwupdClient *self
,const gchar *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.
Since: 1.4.5
void fwupd_client_set_user_agent_for_package (FwupdClient *self
,const gchar *package_name
,const gchar *package_version
);
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.
self |
||
package_name |
client program name, e.g. "gnome-software" |
|
package_version |
client program version, e.g. "3.28.1" |
Since: 1.4.5
void fwupd_client_download_bytes_async (FwupdClient *self
,const gchar *url
,FwupdClientDownloadFlags flags
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Downloads data from a remote server. The fwupd_client_set_user_agent()
function
should be called before this method is used.
You must have called fwupd_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
fwupd_client_set_main_context()
.
self |
||
url |
the remote URL |
|
flags |
FwupdClientDownloadFlags, e.g. |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
GBytes * fwupd_client_download_bytes_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_download_bytes_async()
.
Since: 1.5.0
void fwupd_client_upload_bytes_async (FwupdClient *self
,const gchar *url
,const gchar *payload
,const gchar *signature
,FwupdClientUploadFlags flags
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer callback_data
);
Uploads data to a remote server. The fwupd_client_set_user_agent()
function
should be called before this method is used.
You must have called fwupd_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
fwupd_client_set_main_context()
.
self |
||
url |
the remote URL |
|
payload |
payload string |
|
signature |
signature string. |
[nullable] |
flags |
FwupdClientDownloadFlags, e.g. |
|
cancellable |
the GCancellable, or |
|
callback |
the function to run on completion |
|
callback_data |
the data to pass to |
Since: 1.5.0
GBytes * fwupd_client_upload_bytes_finish (FwupdClient *self
,GAsyncResult *res
,GError **error
);
Gets the result of fwupd_client_upload_bytes_async()
.
Since: 1.5.0
gboolean fwupd_client_ensure_networking (FwupdClient *self
,GError **error
);
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.
Since: 1.4.5
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); };