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_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_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_summary ()
void fwupd_release_set_summary ()
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 ()
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 ()
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 ()

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);

Gets the 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);

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_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_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_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_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_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_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

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;