FwupdRelease: fwupd Reference Manual

## 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_checksums ()
void | fwupd_release_add_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_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 ()
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 ()
guint32 | fwupd_release_get_install_duration ()
void | fwupd_release_set_install_duration ()

## Types and Values

#define | FWUPD_TYPE_RELEASE
struct | FwupdReleaseClass
| FwupdRelease

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

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

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

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