AppStream.ReleaseList¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
entries |
[ |
r |
|
parent_instance |
r |
Class Details¶
- class AppStream.ReleaseList(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
- Return type:
Creates a new
AppStream.ReleaseList
.New in version 1.0.
- add(release)¶
- Parameters:
release (
AppStream.Release
) –
Append a release entry to this
AppStream.ReleaseList
container.
- clear()¶
Remove all release entries from this releases object.
- get_context()¶
- Returns:
the associated
AppStream.Context
orNone
- Return type:
Get the
AppStream.Context
associated with these releases. This function may returnNone
if no context is set
- get_entries()¶
- Returns:
an array of
AppStream.Release
instances.- Return type:
Get the release entries as
GLib.PtrArray
.
- get_kind()¶
- Returns:
The kind.
- Return type:
Returns the
AppStream.ReleaseListKind
of the release metadata associated with this component.New in version 0.16.0.
- get_size()¶
- Returns:
Amount of components.
- Return type:
Get the amount of components in this box.
- get_url()¶
-
Get the remote URL to obtain release information from.
New in version 0.16.0.
- index_safe(index)¶
- Parameters:
index (
int
) – The release entry index.- Returns:
An
AppStream.Release
orNone
- Return type:
Retrieve a release entry at the respective index from the release entry list.
- is_empty()¶
-
Check if there are any components present.
- load_from_bytes(context, bytes)¶
- Parameters:
context (
AppStream.Context
orNone
) – the attachedAppStream.Context
orNone
to use the current contextbytes (
GLib.Bytes
) – the release XML data asGLib.Bytes
- Raises:
- Returns:
True
on success.- Return type:
Load release information from XML bytes.
New in version 0.16.0.
- set_context(context)¶
- Parameters:
context (
AppStream.Context
) – theAppStream.Context
.
Sets the document context these releases are associated with.
- set_kind(kind)¶
- Parameters:
kind (
AppStream.ReleaseListKind
) – theAppStream.ComponentKind
.
Sets the
AppStream.ReleaseListKind
of the release metadata associated with this component.New in version 0.16.0.
- set_url(url)¶
- Parameters:
url (
str
) – the web URL where release data is found.
Set a remote URL pointing to an AppStream release info file.
New in version 0.16.0.
- sort()¶
Sort releases by their release version, starting with the most recent release.