AppStream.ReleaseList

g AppStream.ReleaseList AppStream.ReleaseList GObject.Object GObject.Object GObject.Object->AppStream.ReleaseList

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

add (release)

clear ()

get_context ()

get_entries ()

get_kind ()

get_size ()

get_url ()

index_safe (index)

is_empty ()

load_from_bytes (context, bytes)

set_context (context)

set_kind (kind)

set_size (size)

set_url (url)

sort ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

entries

[object]

r

parent_instance

GObject.Object

r

Class Details

class AppStream.ReleaseList(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

AppStream.ReleaseListClass

classmethod new()
Returns:

an AppStream.ReleaseList

Return type:

AppStream.ReleaseList

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 or None

Return type:

AppStream.Context or None

Get the AppStream.Context associated with these releases. This function may return None if no context is set

get_entries()
Returns:

an array of AppStream.Release instances.

Return type:

[AppStream.Release]

Get the release entries as GLib.PtrArray.

get_kind()
Returns:

The kind.

Return type:

AppStream.ReleaseListKind

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:

int

Get the amount of components in this box.

get_url()
Returns:

The URL of external release data, or None

Return type:

str or None

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 or None

Return type:

AppStream.Release

Retrieve a release entry at the respective index from the release entry list.

is_empty()
Returns:

True if this component box is empty.

Return type:

bool

Check if there are any components present.

load_from_bytes(context, bytes)
Parameters:
Raises:

GLib.Error

Returns:

True on success.

Return type:

bool

Load release information from XML bytes.

New in version 0.16.0.

set_context(context)
Parameters:

context (AppStream.Context) – the AppStream.Context.

Sets the document context these releases are associated with.

set_kind(kind)
Parameters:

kind (AppStream.ReleaseListKind) – the AppStream.ComponentKind.

Sets the AppStream.ReleaseListKind of the release metadata associated with this component.

New in version 0.16.0.

set_size(size)
Parameters:

size (int) –

Set the amount of release entries stored.

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.