AppStreamGlib.Release¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class AppStreamGlib.Release(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod kind_from_string(kind_str)[source]¶
- Parameters:
kind_str (
str
) – the string.- Returns:
an
AppStreamGlib.ReleaseKind
orAppStreamGlib.ReleaseKind.UNKNOWN
for unknown- Return type:
Converts the text representation to an enumerated value.
New in version 0.7.6.
- classmethod kind_to_string(kind)[source]¶
- Parameters:
kind (
AppStreamGlib.ReleaseKind
) – theAppStreamGlib.ReleaseKind
.- Returns:
string version of kind
- Return type:
Converts the enumerated value to an text representation.
New in version 0.7.6.
- classmethod new()[source]¶
- Returns:
- Return type:
Creates a new
AppStreamGlib.Release
.New in version 0.1.0.
- classmethod state_from_string(state)[source]¶
- Parameters:
state (
str
) – a string- Returns:
A
AppStreamGlib.ReleaseState
, e.g.AppStreamGlib.ReleaseState.INSTALLED
.- Return type:
Converts the text representation to an enumerated value.
New in version 0.6.6.
- classmethod state_to_string(state)[source]¶
- Parameters:
state (
AppStreamGlib.ReleaseState
) – theAppStreamGlib.ReleaseState
, e.g.AppStreamGlib.ReleaseState.INSTALLED
- Returns:
string version of state, or
None
for unknown- Return type:
Converts the enumerated value to an text representation.
New in version 0.6.6.
- add_checksum(checksum)[source]¶
- Parameters:
checksum (
AppStreamGlib.Checksum
) – aAppStreamGlib.Checksum
instance.
Adds a release checksum.
New in version 0.4.2.
- add_location(location)[source]¶
- Parameters:
location (
str
) – the location string.
Adds a release location.
New in version 0.3.5.
- get_blob(filename)[source]¶
- Parameters:
filename (
str
) – a filename- Returns:
a
GLib.Bytes
, orNone
for not set- Return type:
Gets the release blob, which is typically firmware file data.
New in version 0.5.2.
- get_checksum_by_fn(fn)[source]¶
- Parameters:
fn (
str
) – a file basename- Returns:
an
AppStreamGlib.Checksum
, orNone
for not found- Return type:
Gets the checksum for a release.
New in version 0.4.2.
- get_checksum_by_target(target)[source]¶
- Parameters:
target (
AppStreamGlib.ChecksumTarget
) – aAppStreamGlib.ChecksumTarget
, e.g.AppStreamGlib.ChecksumTarget.CONTAINER
- Returns:
an
AppStreamGlib.Checksum
, orNone
for not found- Return type:
Gets the checksum for a release.
New in version 0.4.2.
- get_checksums()[source]¶
- Returns:
list of checksums
- Return type:
Gets the release checksums.
New in version 0.4.2.
- get_description(locale)[source]¶
- Parameters:
- Returns:
markup, or
None
for not set or invalid- Return type:
Gets the release description markup for a given locale.
New in version 0.1.0.
- get_install_duration()[source]¶
- Returns:
install duration in seconds, or 0 for unset
- Return type:
Gets the typical install duration.
New in version 0.7.15.
- get_kind()[source]¶
- Returns:
enumerated value, e.g.
AppStreamGlib.ReleaseKind.STABLE
- Return type:
Gets the type of the release.
New in version 0.7.6.
- get_location_default()[source]¶
-
Gets the default release location, typically a URL.
New in version 0.3.5.
- get_locations()[source]¶
- Returns:
list of locations
- Return type:
[
str
]
Gets the release locations, typically URLs.
New in version 0.3.5.
- get_size(kind)[source]¶
- Parameters:
kind (
AppStreamGlib.SizeKind
) – aAppStreamGlib.SizeKind
, e.g.AppStreamGlib.SizeKind.DOWNLOAD
- Returns:
The size in bytes, or 0 for unknown.
- Return type:
Gets the release size.
New in version 0.5.2.
- get_state()[source]¶
- Returns:
enumberated value, or
AppStreamGlib.ReleaseState.UNKNOWN
for not set or invalid- Return type:
Gets the release state.
New in version 0.5.8.
- get_timestamp()[source]¶
- Returns:
timestamp, or 0 for unset
- Return type:
Gets the release timestamp.
New in version 0.1.0.
- get_urgency()[source]¶
- Returns:
enumberated value, or
AppStreamGlib.UrgencyKind.UNKNOWN
for not set or invalid- Return type:
Gets the release urgency.
New in version 0.5.1.
- get_url(url_kind)[source]¶
- Parameters:
url_kind (
AppStreamGlib.UrlKind
) – the URL kind, e.g.AppStreamGlib.UrlKind.HOMEPAGE
.- Returns:
string, or
None
if unset- Return type:
Gets a URL.
New in version 0.7.15.
- set_blob(filename, blob)[source]¶
- Parameters:
filename (
str
) – a filenameblob (
GLib.Bytes
) – theGLib.Bytes
data 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.
New in version 0.5.2.
- set_description(locale, description)[source]¶
- Parameters:
Sets the description release markup.
New in version 0.1.0.
- set_install_duration(install_duration)[source]¶
- Parameters:
install_duration (
int
) – the install duration in seconds
Sets the typical duration of the install.
New in version 0.7.15.
- set_kind(kind)[source]¶
- Parameters:
kind (
AppStreamGlib.ReleaseKind
) – theAppStreamGlib.ReleaseKind
Sets the release kind.
New in version 0.7.6.
- set_size(kind, size)[source]¶
- Parameters:
kind (
AppStreamGlib.SizeKind
) – aAppStreamGlib.SizeKind
, e.g.AppStreamGlib.SizeKind.DOWNLOAD
size (
int
) – a size in bytes, or 0 for unknown
Sets the release size.
New in version 0.5.2.
- set_state(state)[source]¶
- Parameters:
state (
AppStreamGlib.ReleaseState
) – the release state, e.g.AppStreamGlib.ReleaseState.INSTALLED
Sets the release state.
New in version 0.5.8.
- set_timestamp(timestamp)[source]¶
- Parameters:
timestamp (
int
) – the timestamp value.
Sets the release timestamp.
New in version 0.1.0.
- set_urgency(urgency)[source]¶
- Parameters:
urgency (
AppStreamGlib.UrgencyKind
) – the release urgency, e.g.AppStreamGlib.UrgencyKind.CRITICAL
Sets the release urgency.
New in version 0.5.1.
- set_url(url_kind, url)[source]¶
- Parameters:
url_kind (
AppStreamGlib.UrlKind
) – the URL kind, e.g.AppStreamGlib.UrlKind.DETAILS
url (
str
) – the full URL.
Adds some URL data to the application.
New in version 0.7.15.
- set_version(version)[source]¶
- Parameters:
version (
str
) – the version string.
Sets the release version.
New in version 0.1.0.
- vercmp(rel2)[source]¶
- Parameters:
rel2 (
AppStreamGlib.Release
) – aAppStreamGlib.Release
instance.- Returns:
-1 if rel1 > rel2, +1 if rel1 < rel2, 0 otherwise
- Return type:
Compares two release.
New in version 0.4.2.