AsRelease

AsRelease — Object representing a single upstream release

Functions

Types and Values

Includes

#include <appstream.h>

Description

This object represents a single upstream release, typically a minor update. Releases can contain a localized description of paragraph and list elements and also have a version number and timestamp.

Releases can be automatically generated by parsing upstream ChangeLogs or .spec files, or can be populated using MetaInfo files.

See also: AsComponent

Functions

as_release_kind_to_string ()

const gchar *
as_release_kind_to_string (AsReleaseKind kind);

Converts the enumerated value to an text representation.

Parameters

kind

the AsReleaseKind.

 

Returns

string version of kind

Since: 0.12.0

as_release_kind_from_string ()

AsReleaseKind
as_release_kind_from_string (const gchar *kind_str);

Converts the text representation to an enumerated value.

Parameters

kind_str

the string.

 

Returns

an AsReleaseKind or AS_RELEASE_KIND_UNKNOWN for unknown

Since: 0.12.0

as_urgency_kind_to_string ()

const gchar *
as_urgency_kind_to_string (AsUrgencyKind urgency_kind);

Converts the enumerated value to an text representation.

Parameters

urgency_kind

the AsUrgencyKind.

 

Returns

string version of urgency_kind

Since: 0.6.5

as_urgency_kind_from_string ()

AsUrgencyKind
as_urgency_kind_from_string (const gchar *urgency_kind);

Converts the text representation to an enumerated value.

Parameters

urgency_kind

the string.

 

Returns

a AsUrgencyKind or AS_URGENCY_KIND_UNKNOWN for unknown

Since: 0.6.5

as_release_url_kind_to_string ()

const gchar *
as_release_url_kind_to_string (AsReleaseUrlKind kind);

Converts the enumerated value to an text representation.

Parameters

kind

the AsReleaseUrlKind.

 

Returns

string version of kind

Since: 0.12.5

as_release_url_kind_from_string ()

AsReleaseUrlKind
as_release_url_kind_from_string (const gchar *kind_str);

Converts the text representation to an enumerated value.

Parameters

kind_str

the string.

 

Returns

an AsReleaseUrlKind or AS_RELEASE_URL_KIND_UNKNOWN for unknown

Since: 0.12.5

as_release_new ()

AsRelease *
as_release_new (void);

Creates a new AsRelease.

Returns

a AsRelease.

[transfer full]

as_release_get_context ()

AsContext *
as_release_get_context (AsRelease *release);

Parameters

release

An instance of AsRelease.

 

Returns

the AsContext associated with this release. This function may return NULL if no context is set.

[transfer none][nullable]

Since: 0.11.2

as_release_set_context ()

void
as_release_set_context (AsRelease *release,
                        AsContext *context);

Sets the document context this release is associated with.

Parameters

release

An instance of AsRelease.

 

context

the AsContext.

 

Since: 0.11.2

as_release_get_kind ()

AsReleaseKind
as_release_get_kind (AsRelease *release);

Gets the type of the release. (development or stable release)

Parameters

release

a AsRelease instance.

 

Since: 0.12.0

as_release_set_kind ()

void
as_release_set_kind (AsRelease *release,
                     AsReleaseKind kind);

Sets the release kind to distinguish between end-user ready stable releases and development prereleases..

Parameters

release

a AsRelease instance.

 

kind

the AsReleaseKind

 

Since: 0.12.0

as_release_get_version ()

const gchar *
as_release_get_version (AsRelease *release);

Gets the release version.

Parameters

release

a AsRelease instance.

 

Returns

string, or NULL for not set or invalid.

[nullable]

as_release_set_version ()

void
as_release_set_version (AsRelease *release,
                        const gchar *version);

Sets the release version.

Parameters

release

a AsRelease instance.

 

version

the version string.

 

as_release_vercmp ()

gint
as_release_vercmp (AsRelease *rel1,
                   AsRelease *rel2);

Compare the version numbers of two releases.

Parameters

rel1

an AsRelease

 

rel2

an AsRelease

 

Returns

1 if rel1 version is higher than rel2 , 0 if versions are equal, -1 if rel2 version is higher than rel1 .

as_release_get_date ()

const gchar *
as_release_get_date (AsRelease *release);

Gets the release date.

Parameters

release

a AsRelease instance.

 

Returns

The date in ISO8601 format.

[nullable]

Since: 0.12.5

as_release_set_date ()

void
as_release_set_date (AsRelease *release,
                     const gchar *date);

Sets the release date.

Parameters

release

a AsRelease instance.

 

date

the date in ISO8601 format.

 

Since: 0.12.5

as_release_get_timestamp ()

guint64
as_release_get_timestamp (AsRelease *release);

Gets the release timestamp.

Parameters

release

a AsRelease instance.

 

Returns

timestamp, or 0 for unset

as_release_set_timestamp ()

void
as_release_set_timestamp (AsRelease *release,
                          guint64 timestamp);

Sets the release timestamp.

Parameters

release

a AsRelease instance.

 

timestamp

the timestamp value.

 

as_release_get_date_eol ()

const gchar *
as_release_get_date_eol (AsRelease *release);

Gets the end-of-life date for this release.

Parameters

release

a AsRelease instance.

 

Returns

The EOL date in ISO8601 format.

[nullable]

Since: 0.12.5

as_release_set_date_eol ()

void
as_release_set_date_eol (AsRelease *release,
                         const gchar *date);

Sets the end-of-life date for this release.

Parameters

release

a AsRelease instance.

 

date

the EOL date in ISO8601 format.

 

Since: 0.12.5

as_release_get_timestamp_eol ()

guint64
as_release_get_timestamp_eol (AsRelease *release);

Gets the UNIX timestamp for the date when this release is out of support (end-of-life).

Parameters

release

a AsRelease instance.

 

Returns

UNIX timestamp, or 0 for unset or invalid.

Since: 0.12.5

as_release_set_timestamp_eol ()

void
as_release_set_timestamp_eol (AsRelease *release,
                              guint64 timestamp);

Sets the UNIX timestamp for the date when this release is out of support (end-of-life).

Parameters

release

a AsRelease instance.

 

timestamp

the timestamp value.

 

Since: 0.12.5

as_release_get_description ()

const gchar *
as_release_get_description (AsRelease *release);

Gets the release description markup for a given locale.

Parameters

release

a AsRelease instance.

 

Returns

markup, or NULL for not set or invalid.

[nullable]

as_release_set_description ()

void
as_release_set_description (AsRelease *release,
                            const gchar *description,
                            const gchar *locale);

Sets the description release markup.

Parameters

release

a AsRelease instance.

 

description

the description markup.

 

locale

the BCP47 locale, or NULL. e.g. "en-GB".

[nullable]

as_release_get_urgency ()

AsUrgencyKind
as_release_get_urgency (AsRelease *release);

Gets the urgency of the release (showing how important it is to update to a more recent release)

Parameters

release

a AsRelease instance.

 

Returns

AsUrgencyKind, or AS_URGENCY_KIND_UNKNOWN for not set

Since: 0.6.5

as_release_set_urgency ()

void
as_release_set_urgency (AsRelease *release,
                        AsUrgencyKind urgency);

Sets the release urgency.

Parameters

release

a AsRelease instance.

 

urgency

the urgency of this release/update (as AsUrgencyKind)

 

Since: 0.6.5

as_release_get_issues ()

GPtrArray *
as_release_get_issues (AsRelease *release);

Get a list of all issues resolved by this release.

Returns

an array of AsIssue objects.

[transfer none][element-type AsIssue]

Since: 0.12.9

as_release_add_issue ()

void
as_release_add_issue (AsRelease *release,
                      AsIssue *issue);

Add information about a (resolved) issue to this release.

Parameters

release

An instance of AsRelease.

 

issue

The AsIssue.

 

Since: 0.12.9

as_release_get_artifacts ()

GPtrArray *
as_release_get_artifacts (AsRelease *release);

Get a list of all downloadable artifacts that are associated with this release.

Returns

an array of AsArtifact objects.

[transfer none][element-type AsArtifact]

Since: 0.12.6

as_release_add_artifact ()

void
as_release_add_artifact (AsRelease *release,
                         AsArtifact *artifact);

Add an artifact (binary / source download) for this release.

Parameters

release

An instance of AsRelease.

 

artifact

The AsArtifact.

 

Since: 0.12.6

as_release_get_url ()

const gchar *
as_release_get_url (AsRelease *release,
                    AsReleaseUrlKind url_kind);

Gets an URL.

Parameters

release

a AsRelease instance.

 

url_kind

the URL kind, e.g. AS_RELEASE_URL_KIND_DETAILS.

 

Returns

string, or NULL if unset.

[nullable]

Since: 0.12.5

as_release_set_url ()

void
as_release_set_url (AsRelease *release,
                    AsReleaseUrlKind url_kind,
                    const gchar *url);

Sets an URL for this release.

Parameters

release

a AsRelease instance.

 

url_kind

the URL kind, e.g. AS_RELEASE_URL_KIND_DETAILS

 

url

the full URL.

 

Since: 0.12.5

Types and Values

AS_TYPE_RELEASE

#define AS_TYPE_RELEASE (as_release_get_type ())

struct AsReleaseClass

struct AsReleaseClass {
	GObjectClass parent_class;
};

enum AsReleaseKind

The release kind.

Members

AS_RELEASE_KIND_UNKNOWN

Unknown release type

 

AS_RELEASE_KIND_STABLE

A stable release for end-users

 

AS_RELEASE_KIND_DEVELOPMENT

A development release or pre-release for testing

 

Since: 0.12.0

enum AsUrgencyKind

The urgency of an AsRelease

Members

AS_URGENCY_KIND_UNKNOWN

Urgency is unknown or not set

 

AS_URGENCY_KIND_LOW

Low urgency

 

AS_URGENCY_KIND_MEDIUM

Medium urgency

 

AS_URGENCY_KIND_HIGH

High urgency

 

AS_URGENCY_KIND_CRITICAL

Critical urgency

 

enum AsReleaseUrlKind

The release URL kinds.

Members

AS_RELEASE_URL_KIND_UNKNOWN

   

AS_RELEASE_URL_KIND_DETAILS

Weblink to detailed release notes.

 

Since: 0.12.5

AsRelease

typedef struct _AsRelease AsRelease;