| AppStream-glib Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <appstream-glib.h> AsRelease * as_release_new (void); const gchar * as_release_get_version (AsRelease *release); guint64 as_release_get_timestamp (AsRelease *release); const gchar * as_release_get_description (AsRelease *release,const gchar *locale); GPtrArray * as_release_get_locations (AsRelease *release); const gchar * as_release_get_location_default (AsRelease *release); const gchar * as_release_get_checksum (AsRelease *release,GChecksumType checksum_type); void as_release_set_version (AsRelease *release,const gchar *version,gssize version_len); void as_release_set_timestamp (AsRelease *release,guint64 timestamp); void as_release_set_description (AsRelease *release,const gchar *locale,const gchar *description,gssize description_len); void as_release_add_location (AsRelease *release,const gchar *location,gssize location_len); void as_release_set_checksum (AsRelease *release,GChecksumType checksum_type,const gchar *checksum,gssize checksum_len);
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: AsApp
AsRelease * as_release_new (void);
Creates a new AsRelease.
Returns : |
a AsRelease. [transfer full] |
Since 0.1.0
const gchar * as_release_get_version (AsRelease *release);
Gets the release version.
|
a AsRelease instance. |
Returns : |
string, or NULL for not set or invalid |
Since 0.1.0
guint64 as_release_get_timestamp (AsRelease *release);
Gets the release timestamp.
|
a AsRelease instance. |
Returns : |
timestamp, or 0 for unset |
Since 0.1.0
const gchar * as_release_get_description (AsRelease *release,const gchar *locale);
Gets the release description markup for a given locale.
|
a AsRelease instance. |
|
the locale, or NULL. e.g. "en_GB" |
Returns : |
markup, or NULL for not set or invalid |
Since 0.1.0
GPtrArray * as_release_get_locations (AsRelease *release);
Gets the release locations, typically URLs.
|
a AsRelease instance. |
Returns : |
list of locations. [transfer none][element-type utf8] |
Since 0.3.5
const gchar * as_release_get_location_default (AsRelease *release);
Gets the default release location, typically a URL.
|
a AsRelease instance. |
Returns : |
string, or NULL for not set or invalid |
Since 0.3.5
const gchar * as_release_get_checksum (AsRelease *release,GChecksumType checksum_type);
Gets the release checksum, typically a SHA1 hash.
|
a AsRelease instance. |
Returns : |
string, or NULL for not set or invalid |
Since 0.3.5
void as_release_set_version (AsRelease *release,const gchar *version,gssize version_len);
Sets the release version.
|
a AsRelease instance. |
|
the version string. |
|
the size of version, or -1 if NULL-terminated. |
Since 0.1.0
void as_release_set_timestamp (AsRelease *release,guint64 timestamp);
Sets the release timestamp.
|
a AsRelease instance. |
|
the timestamp value. |
Since 0.1.0
void as_release_set_description (AsRelease *release,const gchar *locale,const gchar *description,gssize description_len);
Sets the description release markup.
|
a AsRelease instance. |
|
the locale, or NULL. e.g. "en_GB" |
|
the description markup. |
|
the size of description, or -1 if NULL-terminated. |
Since 0.1.0
void as_release_add_location (AsRelease *release,const gchar *location,gssize location_len);
Adds a release location.
|
a AsRelease instance. |
|
the location string. |
|
the size of location, or -1 if NULL-terminated. |
Since 0.3.5
void as_release_set_checksum (AsRelease *release,GChecksumType checksum_type,const gchar *checksum,gssize checksum_len);
Sets the release checksum.
|
a AsRelease instance. |
|
a GChecksumType, e.g. G_CHECKSUM_SHA1
|
|
the checksum string. |
|
the size of checksum, or -1 if NULL-terminated. |
Since 0.3.5