FwupdRelease

FwupdRelease — a firmware release

Functions

FwupdRelease * fwupd_release_new ()
gchar * fwupd_release_to_string ()
const gchar * fwupd_release_get_version ()
void fwupd_release_set_version ()
const gchar * fwupd_release_get_uri ()
void fwupd_release_set_uri ()
GPtrArray * fwupd_release_get_locations ()
void fwupd_release_add_location ()
GPtrArray * fwupd_release_get_issues ()
void fwupd_release_add_issue ()
GPtrArray * fwupd_release_get_categories ()
void fwupd_release_add_category ()
gboolean fwupd_release_has_category ()
GPtrArray * fwupd_release_get_checksums ()
void fwupd_release_add_checksum ()
gboolean fwupd_release_has_checksum ()
GHashTable * fwupd_release_get_metadata ()
void fwupd_release_add_metadata ()
void fwupd_release_add_metadata_item ()
const gchar * fwupd_release_get_metadata_item ()
const gchar * fwupd_release_get_filename ()
void fwupd_release_set_filename ()
const gchar * fwupd_release_get_protocol ()
void fwupd_release_set_protocol ()
const gchar * fwupd_release_get_appstream_id ()
void fwupd_release_set_appstream_id ()
const gchar * fwupd_release_get_detach_caption ()
void fwupd_release_set_detach_caption ()
const gchar * fwupd_release_get_detach_image ()
void fwupd_release_set_detach_image ()
const gchar * fwupd_release_get_remote_id ()
void fwupd_release_set_remote_id ()
const gchar * fwupd_release_get_vendor ()
void fwupd_release_set_vendor ()
const gchar * fwupd_release_get_name ()
void fwupd_release_set_name ()
const gchar * fwupd_release_get_name_variant_suffix ()
void fwupd_release_set_name_variant_suffix ()
const gchar * fwupd_release_get_summary ()
void fwupd_release_set_summary ()
const gchar * fwupd_release_get_branch ()
void fwupd_release_set_branch ()
const gchar * fwupd_release_get_description ()
void fwupd_release_set_description ()
const gchar * fwupd_release_get_homepage ()
void fwupd_release_set_homepage ()
const gchar * fwupd_release_get_details_url ()
void fwupd_release_set_details_url ()
const gchar * fwupd_release_get_source_url ()
void fwupd_release_set_source_url ()
guint64 fwupd_release_get_size ()
void fwupd_release_set_size ()
guint64 fwupd_release_get_created ()
void fwupd_release_set_created ()
const gchar * fwupd_release_get_license ()
void fwupd_release_set_license ()
FwupdTrustFlags fwupd_release_get_trust_flags ()
void fwupd_release_set_trust_flags ()
FwupdReleaseFlags fwupd_release_get_flags ()
void fwupd_release_set_flags ()
void fwupd_release_add_flag ()
void fwupd_release_remove_flag ()
gboolean fwupd_release_has_flag ()
FwupdReleaseUrgency fwupd_release_get_urgency ()
void fwupd_release_set_urgency ()
guint32 fwupd_release_get_install_duration ()
void fwupd_release_set_install_duration ()
const gchar * fwupd_release_get_update_message ()
void fwupd_release_set_update_message ()
const gchar * fwupd_release_get_update_image ()
void fwupd_release_set_update_image ()
FwupdRelease * fwupd_release_from_variant ()
GPtrArray * fwupd_release_array_from_variant ()

Types and Values

Description

An object that represents a firmware release with a specific version. Devices can have more than one release, and the releases are typically ordered by their version.

See also: FwupdDevice

Functions

fwupd_release_new ()

FwupdRelease *
fwupd_release_new (void);

Creates a new release.

Returns

a new FwupdRelease

Since: 0.9.3


fwupd_release_to_string ()

gchar *
fwupd_release_to_string (FwupdRelease *release);

Builds a text representation of the object.

Parameters

release

A FwupdRelease

 

Returns

text, or NULL for invalid

Since: 0.9.3


fwupd_release_get_version ()

const gchar *
fwupd_release_get_version (FwupdRelease *release);

Gets the update version.

Parameters

release

A FwupdRelease

 

Returns

the update version, or NULL if unset

Since: 0.9.3


fwupd_release_set_version ()

void
fwupd_release_set_version (FwupdRelease *release,
                           const gchar *version);

Sets the update version.

Parameters

release

A FwupdRelease

 

version

the update version, e.g. 1.2.4

 

Since: 0.9.3


fwupd_release_get_uri ()

const gchar *
fwupd_release_get_uri (FwupdRelease *release);

fwupd_release_get_uri has been deprecated since version 1.5.6 and should not be used in newly-written code.

Use fwupd_release_get_locations() instead.

Gets the default update URI.

Parameters

release

A FwupdRelease

 

Returns

the update URI, or NULL if unset

Since: 0.9.3


fwupd_release_set_uri ()

void
fwupd_release_set_uri (FwupdRelease *release,
                       const gchar *uri);

fwupd_release_set_uri has been deprecated since version 1.5.6 and should not be used in newly-written code.

Use fwupd_release_add_location() instead.

Sets the update URI, i.e. where you can download the firmware from.

Parameters

release

A FwupdRelease

 

uri

the update URI

 

Since: 0.9.3


fwupd_release_get_locations ()

GPtrArray *
fwupd_release_get_locations (FwupdRelease *release);

Gets the update URI, i.e. where you can download the firmware from.

Typically the first URI will be the main HTTP mirror, but all URIs may not be valid HTTP URIs. For example, "ipns://QmSrPmba" is valid here.

Parameters

release

A FwupdRelease

 

Returns

the URIs.

[element-type utf8][transfer none]

Since: 1.5.6


fwupd_release_add_location ()

void
fwupd_release_add_location (FwupdRelease *release,
                            const gchar *location);

Adds an update URI, i.e. where you can download the firmware from.

Parameters

release

A FwupdRelease

 

location

the update URI

 

Since: 1.5.6


fwupd_release_get_issues ()

GPtrArray *
fwupd_release_get_issues (FwupdRelease *release);

Gets the list of issues fixed in this release.

Parameters

release

A FwupdRelease

 

Returns

the issues, which may be empty.

[element-type utf8][transfer none]

Since: 1.3.2


fwupd_release_add_issue ()

void
fwupd_release_add_issue (FwupdRelease *release,
                         const gchar *issue);

Adds an resolved issue to this release.

Parameters

release

A FwupdRelease

 

issue

the update issue, e.g. CVE-2019-12345

 

Since: 1.3.2


fwupd_release_get_categories ()

GPtrArray *
fwupd_release_get_categories (FwupdRelease *release);

Gets the release categories.

Parameters

release

A FwupdRelease

 

Returns

the categories, which may be empty.

[element-type utf8][transfer none]

Since: 1.2.7


fwupd_release_add_category ()

void
fwupd_release_add_category (FwupdRelease *release,
                            const gchar *category);

Adds the update category.

Parameters

release

A FwupdRelease

 

category

the update category, e.g. X-EmbeddedController

 

Since: 1.2.7


fwupd_release_has_category ()

gboolean
fwupd_release_has_category (FwupdRelease *release,
                            const gchar *category);

Finds out if the release has the update category.

Parameters

release

A FwupdRelease

 

category

the update category, e.g. X-EmbeddedController

 

Returns

TRUE if the release matches

Since: 1.2.7


fwupd_release_get_checksums ()

GPtrArray *
fwupd_release_get_checksums (FwupdRelease *release);

Gets the release checksums.

Parameters

release

A FwupdRelease

 

Returns

the checksums, which may be empty.

[element-type utf8][transfer none]

Since: 0.9.3


fwupd_release_add_checksum ()

void
fwupd_release_add_checksum (FwupdRelease *release,
                            const gchar *checksum);

Sets the update checksum.

Parameters

release

A FwupdRelease

 

checksum

the update checksum

 

Since: 0.9.3


fwupd_release_has_checksum ()

gboolean
fwupd_release_has_checksum (FwupdRelease *release,
                            const gchar *checksum);

Finds out if the release has the update checksum.

Parameters

release

A FwupdRelease

 

checksum

the update checksum

 

Returns

TRUE if the release matches

Since: 1.2.6


fwupd_release_get_metadata ()

GHashTable *
fwupd_release_get_metadata (FwupdRelease *release);

Gets the release metadata.

Parameters

release

A FwupdRelease

 

Returns

the metadata, which may be empty.

[transfer none]

Since: 1.0.4


fwupd_release_add_metadata ()

void
fwupd_release_add_metadata (FwupdRelease *release,
                            GHashTable *hash);

Sets multiple release metadata items.

Parameters

release

A FwupdRelease

 

hash

the key-values

 

Since: 1.0.4


fwupd_release_add_metadata_item ()

void
fwupd_release_add_metadata_item (FwupdRelease *release,
                                 const gchar *key,
                                 const gchar *value);

Sets a release metadata item.

Parameters

release

A FwupdRelease

 

key

the key

 

value

the value

 

Since: 1.0.4


fwupd_release_get_metadata_item ()

const gchar *
fwupd_release_get_metadata_item (FwupdRelease *release,
                                 const gchar *key);

Gets a release metadata item.

Parameters

release

A FwupdRelease

 

key

the key

 

Returns

the value, or NULL if unset

Since: 1.0.4


fwupd_release_get_filename ()

const gchar *
fwupd_release_get_filename (FwupdRelease *release);

Gets the update filename.

Parameters

release

A FwupdRelease

 

Returns

the update filename, or NULL if unset

Since: 0.9.3


fwupd_release_set_filename ()

void
fwupd_release_set_filename (FwupdRelease *release,
                            const gchar *filename);

Sets the update filename.

Parameters

release

A FwupdRelease

 

filename

the update filename on disk

 

Since: 0.9.3


fwupd_release_get_protocol ()

const gchar *
fwupd_release_get_protocol (FwupdRelease *release);

Gets the update protocol.

Parameters

release

A FwupdRelease

 

Returns

the update protocol, or NULL if unset

Since: 1.2.2


fwupd_release_set_protocol ()

void
fwupd_release_set_protocol (FwupdRelease *release,
                            const gchar *protocol);

Sets the update protocol.

Parameters

release

A FwupdRelease

 

protocol

the update protocol, e.g. org.usb.dfu

 

Since: 1.2.2


fwupd_release_get_appstream_id ()

const gchar *
fwupd_release_get_appstream_id (FwupdRelease *release);

Gets the AppStream ID.

Parameters

release

A FwupdRelease

 

Returns

the AppStream ID, or NULL if unset

Since: 0.9.3


fwupd_release_set_appstream_id ()

void
fwupd_release_set_appstream_id (FwupdRelease *release,
                                const gchar *appstream_id);

Sets the AppStream ID.

Parameters

release

A FwupdRelease

 

appstream_id

the AppStream component ID, e.g. org.hughski.ColorHug2.firmware

 

Since: 0.9.3


fwupd_release_get_detach_caption ()

const gchar *
fwupd_release_get_detach_caption (FwupdRelease *release);

Gets the optional text caption used to manually detach the device.

Parameters

release

A FwupdRelease

 

Returns

the string caption, or NULL if unset

Since: 1.3.3


fwupd_release_set_detach_caption ()

void
fwupd_release_set_detach_caption (FwupdRelease *release,
                                  const gchar *detach_caption);

Sets the optional text caption used to manually detach the device.

Parameters

release

A FwupdRelease

 

detach_caption

string caption

 

Since: 1.3.3


fwupd_release_get_detach_image ()

const gchar *
fwupd_release_get_detach_image (FwupdRelease *release);

Gets the optional image used to manually detach the device.

Parameters

release

A FwupdRelease

 

Returns

the URI, or NULL if unset

Since: 1.3.3


fwupd_release_set_detach_image ()

void
fwupd_release_set_detach_image (FwupdRelease *release,
                                const gchar *detach_image);

Sets the optional image used to manually detach the device.

Parameters

release

A FwupdRelease

 

detach_image

a fully qualified URI

 

Since: 1.3.3


fwupd_release_get_remote_id ()

const gchar *
fwupd_release_get_remote_id (FwupdRelease *release);

Gets the remote ID that can be used for downloading.

Parameters

release

A FwupdRelease

 

Returns

the ID, or NULL if unset

Since: 0.9.3


fwupd_release_set_remote_id ()

void
fwupd_release_set_remote_id (FwupdRelease *release,
                             const gchar *remote_id);

Sets the remote ID that can be used for downloading.

Parameters

release

A FwupdRelease

 

remote_id

the release ID, e.g. USB:foo

 

Since: 0.9.3


fwupd_release_get_vendor ()

const gchar *
fwupd_release_get_vendor (FwupdRelease *release);

Gets the update vendor.

Parameters

release

A FwupdRelease

 

Returns

the update vendor, or NULL if unset

Since: 0.9.3


fwupd_release_set_vendor ()

void
fwupd_release_set_vendor (FwupdRelease *release,
                          const gchar *vendor);

Sets the update vendor.

Parameters

release

A FwupdRelease

 

vendor

the vendor name, e.g. Hughski Limited

 

Since: 0.9.3


fwupd_release_get_name ()

const gchar *
fwupd_release_get_name (FwupdRelease *release);

Gets the update name.

Parameters

release

A FwupdRelease

 

Returns

the update name, or NULL if unset

Since: 0.9.3


fwupd_release_set_name ()

void
fwupd_release_set_name (FwupdRelease *release,
                        const gchar *name);

Sets the update name.

Parameters

release

A FwupdRelease

 

name

the description

 

Since: 0.9.3


fwupd_release_get_name_variant_suffix ()

const gchar *
fwupd_release_get_name_variant_suffix (FwupdRelease *release);

Gets the update variant suffix.

Parameters

release

A FwupdRelease

 

Returns

the update variant, or NULL if unset

Since: 1.3.2


fwupd_release_set_name_variant_suffix ()

void
fwupd_release_set_name_variant_suffix (FwupdRelease *release,
                                       const gchar *name_variant_suffix);

Sets the update variant suffix.

Parameters

release

A FwupdRelease

 

name_variant_suffix

the description

 

Since: 1.3.2


fwupd_release_get_summary ()

const gchar *
fwupd_release_get_summary (FwupdRelease *release);

Gets the update summary.

Parameters

release

A FwupdRelease

 

Returns

the update summary, or NULL if unset

Since: 0.9.3


fwupd_release_set_summary ()

void
fwupd_release_set_summary (FwupdRelease *release,
                           const gchar *summary);

Sets the update summary.

Parameters

release

A FwupdRelease

 

summary

the update one line summary

 

Since: 0.9.3


fwupd_release_get_branch ()

const gchar *
fwupd_release_get_branch (FwupdRelease *release);

Gets the update branch.

Parameters

release

A FwupdRelease

 

Returns

the alternate branch, or NULL if unset

Since: 1.5.0


fwupd_release_set_branch ()

void
fwupd_release_set_branch (FwupdRelease *release,
                          const gchar *branch);

Sets the alternate branch.

Parameters

release

A FwupdRelease

 

branch

the update one line branch

 

Since: 1.5.0


fwupd_release_get_description ()

const gchar *
fwupd_release_get_description (FwupdRelease *release);

Gets the update description in AppStream markup format.

Parameters

release

A FwupdRelease

 

Returns

the update description, or NULL if unset

Since: 0.9.3


fwupd_release_set_description ()

void
fwupd_release_set_description (FwupdRelease *release,
                               const gchar *description);

Sets the update description.

Parameters

release

A FwupdRelease

 

description

the update description in AppStream markup format

 

Since: 0.9.3


fwupd_release_get_homepage ()

const gchar *
fwupd_release_get_homepage (FwupdRelease *release);

Gets the update homepage.

Parameters

release

A FwupdRelease

 

Returns

the update homepage, or NULL if unset

Since: 0.9.3


fwupd_release_set_homepage ()

void
fwupd_release_set_homepage (FwupdRelease *release,
                            const gchar *homepage);

Sets the update homepage.

Parameters

release

A FwupdRelease

 

homepage

the description

 

Since: 0.9.3


fwupd_release_get_details_url ()

const gchar *
fwupd_release_get_details_url (FwupdRelease *release);

Gets the URL for the online update notes.

Parameters

release

A FwupdRelease

 

Returns

the update URL, or NULL if unset

Since: 1.2.4


fwupd_release_set_details_url ()

void
fwupd_release_set_details_url (FwupdRelease *release,
                               const gchar *details_url);

Sets the URL for the online update notes.

Parameters

release

A FwupdRelease

 

details_url

the URL

 

Since: 1.2.4


fwupd_release_get_source_url ()

const gchar *
fwupd_release_get_source_url (FwupdRelease *release);

Gets the URL of the source code used to build this release.

Parameters

release

A FwupdRelease

 

Returns

the update source_url, or NULL if unset

Since: 1.2.4


fwupd_release_set_source_url ()

void
fwupd_release_set_source_url (FwupdRelease *release,
                              const gchar *source_url);

Sets the URL of the source code used to build this release.

Parameters

release

A FwupdRelease

 

source_url

the URL

 

Since: 1.2.4


fwupd_release_get_size ()

guint64
fwupd_release_get_size (FwupdRelease *release);

Gets the update size.

Parameters

release

A FwupdRelease

 

Returns

the update size in bytes, or 0 if unset

Since: 0.9.3


fwupd_release_set_size ()

void
fwupd_release_set_size (FwupdRelease *release,
                        guint64 size);

Sets the update size.

Parameters

release

A FwupdRelease

 

size

the update size in bytes

 

Since: 0.9.3


fwupd_release_get_created ()

guint64
fwupd_release_get_created (FwupdRelease *release);

Gets when the update was created.

Parameters

release

A FwupdRelease

 

Returns

UTC timestamp in UNIX format, or 0 if unset

Since: 1.4.0


fwupd_release_set_created ()

void
fwupd_release_set_created (FwupdRelease *release,
                           guint64 created);

Sets when the update was created.

Parameters

release

A FwupdRelease

 

created

UTC timestamp in UNIX format

 

Since: 1.4.0


fwupd_release_get_license ()

const gchar *
fwupd_release_get_license (FwupdRelease *release);

Gets the update license.

Parameters

release

A FwupdRelease

 

Returns

the update license, or NULL if unset

Since: 0.9.3


fwupd_release_set_license ()

void
fwupd_release_set_license (FwupdRelease *release,
                           const gchar *license);

Sets the update license.

Parameters

release

A FwupdRelease

 

license

the description

 

Since: 0.9.3


fwupd_release_get_trust_flags ()

FwupdTrustFlags
fwupd_release_get_trust_flags (FwupdRelease *release);

fwupd_release_get_trust_flags is deprecated and should not be used in newly-written code.

Gets the trust level of the release.

Parameters

release

A FwupdRelease

 

Returns

the trust bitfield, e.g. FWUPD_TRUST_FLAG_PAYLOAD

Since: 0.9.8


fwupd_release_set_trust_flags ()

void
fwupd_release_set_trust_flags (FwupdRelease *release,
                               FwupdTrustFlags trust_flags);

fwupd_release_set_trust_flags is deprecated and should not be used in newly-written code.

Sets the trust level of the release.

Parameters

release

A FwupdRelease

 

trust_flags

the bitfield, e.g. FWUPD_TRUST_FLAG_PAYLOAD

 

Since: 0.9.8


fwupd_release_get_flags ()

FwupdReleaseFlags
fwupd_release_get_flags (FwupdRelease *release);

Gets the release flags.

Parameters

release

A FwupdRelease

 

Returns

the release flags, or 0 if unset

Since: 1.2.6


fwupd_release_set_flags ()

void
fwupd_release_set_flags (FwupdRelease *release,
                         FwupdReleaseFlags flags);

Sets the release flags.

Parameters

release

A FwupdRelease

 

flags

the release flags, e.g. FWUPD_RELEASE_FLAG_TRUSTED_PAYLOAD

 

Since: 1.2.6


fwupd_release_add_flag ()

void
fwupd_release_add_flag (FwupdRelease *release,
                        FwupdReleaseFlags flag);

Adds a specific release flag to the release.

Parameters

release

A FwupdRelease

 

flag

the FwupdReleaseFlags

 

Since: 1.2.6


fwupd_release_remove_flag ()

void
fwupd_release_remove_flag (FwupdRelease *release,
                           FwupdReleaseFlags flag);

Removes a specific release flag from the release.

Parameters

release

A FwupdRelease

 

flag

the FwupdReleaseFlags

 

Since: 1.2.6


fwupd_release_has_flag ()

gboolean
fwupd_release_has_flag (FwupdRelease *release,
                        FwupdReleaseFlags flag);

Finds if the release has a specific release flag.

Parameters

release

A FwupdRelease

 

flag

the FwupdReleaseFlags

 

Returns

TRUE if the flag is set

Since: 1.2.6


fwupd_release_get_urgency ()

FwupdReleaseUrgency
fwupd_release_get_urgency (FwupdRelease *release);

Gets the release urgency.

Parameters

release

A FwupdRelease

 

Returns

the release urgency, or 0 if unset

Since: 1.4.0


fwupd_release_set_urgency ()

void
fwupd_release_set_urgency (FwupdRelease *release,
                           FwupdReleaseUrgency urgency);

Sets the release urgency.

Parameters

release

A FwupdRelease

 

urgency

the release urgency, e.g. FWUPD_RELEASE_FLAG_TRUSTED_PAYLOAD

 

Since: 1.4.0


fwupd_release_get_install_duration ()

guint32
fwupd_release_get_install_duration (FwupdRelease *release);

Gets the time estimate for firmware installation (in seconds)

Parameters

release

A FwupdRelease

 

Returns

the estimated time to flash this release (or 0 if unset)

Since: 1.2.1


fwupd_release_set_install_duration ()

void
fwupd_release_set_install_duration (FwupdRelease *release,
                                    guint32 duration);

Sets the time estimate for firmware installation (in seconds)

Parameters

release

A FwupdRelease

 

duration

The amount of time

 

Since: 1.2.1


fwupd_release_get_update_message ()

const gchar *
fwupd_release_get_update_message (FwupdRelease *release);

Gets the update message.

Parameters

release

A FwupdRelease

 

Returns

the update message, or NULL if unset

Since: 1.2.4


fwupd_release_set_update_message ()

void
fwupd_release_set_update_message (FwupdRelease *release,
                                  const gchar *update_message);

Sets the update message.

Parameters

release

A FwupdRelease

 

update_message

the update message string

 

Since: 1.2.4


fwupd_release_get_update_image ()

const gchar *
fwupd_release_get_update_image (FwupdRelease *release);

Gets the update image.

Parameters

release

A FwupdRelease

 

Returns

the update image URL, or NULL if unset

Since: 1.4.5


fwupd_release_set_update_image ()

void
fwupd_release_set_update_image (FwupdRelease *release,
                                const gchar *update_image);

Sets the update image.

Parameters

release

A FwupdRelease

 

update_image

the update image URL

 

Since: 1.4.5


fwupd_release_from_variant ()

FwupdRelease *
fwupd_release_from_variant (GVariant *value);

Creates a new release using packed data.

Parameters

value

a GVariant

 

Returns

a new FwupdRelease, or NULL if value was invalid.

[transfer full]

Since: 1.0.0


fwupd_release_array_from_variant ()

GPtrArray *
fwupd_release_array_from_variant (GVariant *value);

Creates an array of new releases using packed data.

Parameters

value

a GVariant

 

Returns

releases, or NULL if value was invalid.

[transfer container][element-type FwupdRelease]

Since: 1.2.10

Types and Values

FWUPD_TYPE_RELEASE

#define FWUPD_TYPE_RELEASE (fwupd_release_get_type ())

struct FwupdReleaseClass

struct FwupdReleaseClass {
	GObjectClass			 parent_class;
};

FwupdRelease

typedef struct _FwupdRelease FwupdRelease;