manpagez: man pages & more
html files: goocanvas
Home | html | info | man

AsRelease

AsRelease — Object representing a single upstream release

Stability Level

Stable, unless otherwise indicated

Types and Values

Includes

#include <appstream-glib.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 AppData files.

See also: AsRelease

Functions

as_release_new ()

AsRelease *
as_release_new (void);

Creates a new AsRelease.

Returns

a AsRelease.

[transfer full]

Since: 0.1.0


as_release_vercmp ()

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

Compares two release.

Parameters

rel1

a AsRelease instance.

 

rel2

a AsRelease instance.

 

Returns

-1 if rel1 > rel2, +1 if rel1 < rel2, 0 otherwise

Since: 0.4.2


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.7.6


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.7.6


as_release_state_from_string ()

AsReleaseState
as_release_state_from_string (const gchar *state);

Converts the text representation to an enumerated value.

Parameters

state

a string

 

Since: 0.6.6


as_release_state_to_string ()

const gchar *
as_release_state_to_string (AsReleaseState state);

Converts the enumerated value to an text representation.

Parameters

Returns

string version of state , or NULL for unknown

Since: 0.6.6


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

Since: 0.1.0


as_release_get_blob ()

GBytes *
as_release_get_blob (AsRelease *release,
                     const gchar *filename);

Gets the release blob, which is typically firmware file data.

Parameters

release

a AsRelease instance.

 

filename

a filename

 

Returns

a GBytes, or NULL for not set

Since: 0.5.2


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

Since: 0.1.0


as_release_get_install_duration ()

guint64
as_release_get_install_duration (AsRelease *release);

Gets the typical install duration.

Parameters

release

a AsRelease instance.

 

Returns

install duration in seconds, or 0 for unset

Since: 0.7.15


as_release_get_description ()

const gchar *
as_release_get_description (AsRelease *release,
                            const gchar *locale);

Gets the release description markup for a given locale.

Parameters

release

a AsRelease instance.

 

locale

the locale. e.g. "en_GB".

[nullable]

Returns

markup, or NULL for not set or invalid

Since: 0.1.0


as_release_get_locations ()

GPtrArray *
as_release_get_locations (AsRelease *release);

Gets the release locations, typically URLs.

Parameters

release

a AsRelease instance.

 

Returns

list of locations.

[transfer none][element-type utf8]

Since: 0.3.5


as_release_get_location_default ()

const gchar *
as_release_get_location_default (AsRelease *release);

Gets the default release location, typically a URL.

Parameters

release

a AsRelease instance.

 

Returns

string, or NULL for not set or invalid

Since: 0.3.5


as_release_get_checksum_by_fn ()

AsChecksum *
as_release_get_checksum_by_fn (AsRelease *release,
                               const gchar *fn);

Gets the checksum for a release.

Parameters

release

a AsRelease instance

 

fn

a file basename

 

Returns

an AsChecksum, or NULL for not found.

[transfer none]

Since: 0.4.2


as_release_get_checksum_by_target ()

AsChecksum *
as_release_get_checksum_by_target (AsRelease *release,
                                   AsChecksumTarget target);

Gets the checksum for a release.

Parameters

release

a AsRelease instance

 

target

a AsChecksumTarget, e.g. AS_CHECKSUM_TARGET_CONTAINER

 

Returns

an AsChecksum, or NULL for not found.

[transfer none]

Since: 0.4.2


as_release_get_checksums ()

GPtrArray *
as_release_get_checksums (AsRelease *release);

Gets the release checksums.

Parameters

release

a AsRelease instance.

 

Returns

list of checksums.

[transfer none][element-type AsChecksum]

Since: 0.4.2


as_release_get_urgency ()

AsUrgencyKind
as_release_get_urgency (AsRelease *release);

Gets the release urgency.

Parameters

release

a AsRelease instance.

 

Returns

enumberated value, or AS_URGENCY_KIND_UNKNOWN for not set or invalid

Since: 0.5.1


as_release_get_kind ()

AsReleaseKind
as_release_get_kind (AsRelease *release);

Gets the type of the release.

Parameters

release

a AsRelease instance.

 

Returns

enumerated value, e.g. AS_RELEASE_KIND_STABLE

Since: 0.7.6


as_release_get_state ()

AsReleaseState
as_release_get_state (AsRelease *release);

Gets the release state.

Parameters

release

a AsRelease instance.

 

Returns

enumberated value, or AS_RELEASE_STATE_UNKNOWN for not set or invalid

Since: 0.5.8


as_release_get_size ()

guint64
as_release_get_size (AsRelease *release,
                     AsSizeKind kind);

Gets the release size.

Parameters

release

a AsRelease instance

 

kind

a AsSizeKind, e.g. AS_SIZE_KIND_DOWNLOAD

 

Returns

The size in bytes, or 0 for unknown.

Since: 0.5.2


as_release_get_url ()

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

Gets a URL.

Parameters

release

a AsRelease instance.

 

url_kind

the URL kind, e.g. AS_URL_KIND_HOMEPAGE.

 

Returns

string, or NULL if unset

Since: 0.7.15


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.

 

Since: 0.1.0


as_release_set_blob ()

void
as_release_set_blob (AsRelease *release,
                     const gchar *filename,
                     GBytes *blob);

Sets a release blob, which is typically firmware data or a detached signature.

NOTE: This is not stored in the XML file, and is only available in-memory.

Parameters

release

a AsRelease instance.

 

filename

a filename

 

blob

the GBytes data blob

 

Since: 0.5.2


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.

 

Since: 0.1.0


as_release_set_install_duration ()

void
as_release_set_install_duration (AsRelease *release,
                                 guint64 install_duration);

Sets the typical duration of the install.

Parameters

release

a AsRelease instance.

 

install_duration

the install duration in seconds

 

Since: 0.7.15


as_release_set_description ()

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

Sets the description release markup.

Parameters

release

a AsRelease instance.

 

locale

the locale. e.g. "en_GB".

[nullable]

description

the description markup.

 

Since: 0.1.0


as_release_add_location ()

void
as_release_add_location (AsRelease *release,
                         const gchar *location);

Adds a release location.

Parameters

release

a AsRelease instance.

 

location

the location string.

 

Since: 0.3.5


as_release_add_checksum ()

void
as_release_add_checksum (AsRelease *release,
                         AsChecksum *checksum);

Adds a release checksum.

Parameters

release

a AsRelease instance.

 

checksum

a AsChecksum instance.

 

Since: 0.4.2


as_release_set_urgency ()

void
as_release_set_urgency (AsRelease *release,
                        AsUrgencyKind urgency);

Sets the release urgency.

Parameters

release

a AsRelease instance.

 

urgency

the release urgency, e.g. AS_URGENCY_KIND_CRITICAL

 

Since: 0.5.1


as_release_set_kind ()

void
as_release_set_kind (AsRelease *release,
                     AsReleaseKind kind);

Sets the release kind.

Parameters

release

a AsRelease instance.

 

kind

the AsReleaseKind

 

Since: 0.7.6


as_release_set_state ()

void
as_release_set_state (AsRelease *release,
                      AsReleaseState state);

Sets the release state.

Parameters

release

a AsRelease instance.

 

state

the release state, e.g. AS_RELEASE_STATE_INSTALLED

 

Since: 0.5.8


as_release_set_size ()

void
as_release_set_size (AsRelease *release,
                     AsSizeKind kind,
                     guint64 size);

Sets the release size.

Parameters

release

a AsRelease instance

 

kind

a AsSizeKind, e.g. AS_SIZE_KIND_DOWNLOAD

 

size

a size in bytes, or 0 for unknown

 

Since: 0.5.2


as_release_set_url ()

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

Adds some URL data to the application.

Parameters

release

a AsRelease instance.

 

url_kind

the URL kind, e.g. AS_URL_KIND_DETAILS

 

url

the full URL.

 

Since: 0.7.15

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 size kind.

Members

AS_RELEASE_KIND_UNKNOWN

Unknown release type

 

AS_RELEASE_KIND_STABLE

A stable release

 

AS_RELEASE_KIND_DEVELOPMENT

A development release

 

Since: 0.7.6


enum AsReleaseState

The release state.

Members

AS_RELEASE_STATE_UNKNOWN

Unknown state

 

AS_RELEASE_STATE_INSTALLED

Release is installed

 

AS_RELEASE_STATE_AVAILABLE

Release is available

 

AsRelease

typedef struct _AsRelease AsRelease;
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.