AppStreamCompose.Result

g AppStreamCompose.Result AppStreamCompose.Result GObject.Object GObject.Object GObject.Object->AppStreamCompose.Result

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

add_component (cpt, bytes)

add_component_with_string (cpt, data)

add_hint (cpt, tag, kv)

add_hint_by_cid (component_id, tag, kv)

components_count ()

fetch_components ()

fetch_hints_all ()

gcid_for_cid (cid)

gcid_for_component (cpt)

get_bundle_id ()

get_bundle_kind ()

get_component (cid)

get_component_gcids ()

get_component_ids_with_hints ()

get_hints (cid)

has_hint (cpt, tag)

hints_count ()

is_ignored (cpt)

remove_component (cpt)

remove_component_by_id (cid)

remove_component_full (cpt, remove_gcid)

remove_hints_for_cid (cid)

set_bundle_id (id)

set_bundle_kind (kind)

unit_ignored ()

update_component_gcid (cpt, bytes)

update_component_gcid_with_string (cpt, data)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class AppStreamCompose.Result(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

AppStreamCompose.ResultClass

classmethod new()
Return type:

AppStreamCompose.Result

Creates a new AppStreamCompose.Result.

add_component(cpt, bytes)
Parameters:
Raises:

GLib.Error

Returns:

True on success.

Return type:

bool

Add component to the results set.

add_component_with_string(cpt, data)
Parameters:
Raises:

GLib.Error

Returns:

True on success.

Return type:

bool

Add component to the results set, using string data.

add_hint(cpt, tag, kv)
Parameters:
Returns:

True if the added hint did not cause the component to be invalidated.

Return type:

bool

Add an issue hint for a component.

add_hint_by_cid(component_id, tag, kv)
Parameters:
  • component_id (str) – The component-ID of the affected AppStream.Component

  • tag (str) – AppStream Compose Issue hint tag

  • kv (str) – List of key-value pairs for replacement variables.

Returns:

True if the added hint did not cause the component to be invalidated.

Return type:

bool

Add an issue hint for a component.

components_count()
Returns:

The amount of components found for this unit.

Return type:

int

fetch_components()
Returns:

An array of AppStream.Component

Return type:

[AppStream.Component]

Gets all components this #AsResult instance contains.

fetch_hints_all()
Returns:

An array of AppStreamCompose.Hint

Return type:

[AppStreamCompose.Hint]

Get a list of all hints for all components that are registered with this result.

gcid_for_cid(cid)
Parameters:

cid (str) – Component ID to look for.

Return type:

str

Retrieve the global component-ID string for the given component-ID, as long as component with the given ID is registered with this AppStreamCompose.Result. Otherwise, None is returned.

gcid_for_component(cpt)
Parameters:

cpt (AppStream.Component) –

Return type:

str

get_bundle_id()
Return type:

str

Gets the ID name of the bundle (a package / Flatpak / any entity containing metadata) that these these results are generated for.

get_bundle_kind()
Return type:

AppStream.BundleKind

Gets the bundle kind these results are for.

get_component(cid)
Parameters:

cid (str) – Component ID to look for.

Returns:

An AppStream.Component

Return type:

AppStream.Component

Gets the component by its component-id-

get_component_gcids()
Returns:

An array of global component IDs. Free with GLib.free

Return type:

[str]

Retrieve a list of all global component-IDs that this result knows of.

get_component_ids_with_hints()
Returns:

An array of component-IDs. Free container with GLib.free

Return type:

[str]

Gets list of component-IDs which do have issue hints associated with them.

get_hints(cid)
Parameters:

cid (str) – Component ID to look for.

Returns:

An array of AppStreamCompose.Hint or None

Return type:

[AppStreamCompose.Hint]

Gets hints for a component with the given component-id.

has_hint(cpt, tag)
Parameters:
Returns:

True if a hint with this tag exists for the selected component.

Return type:

bool

Test if a hint tag is associated with a given component in this result.

hints_count()
Returns:

The amount of hints emitted for this unit.

Return type:

int

is_ignored(cpt)
Parameters:

cpt (AppStream.Component) – the component to check for.

Returns:

True if the component is ignored.

Return type:

bool

Check if an AppStream.Component was set to be ignored in this result (usually due to errors).

remove_component(cpt)
Parameters:

cpt (AppStream.Component) – The AppStream.Component to remove.

Returns:

True if the component was found and removed.

Return type:

bool

Remove a component from the results set.

remove_component_by_id(cid)
Parameters:

cid (str) – a component-ID

Returns:

True if the component was found and removed.

Return type:

bool

Remove a component from the results set.

remove_component_full(cpt, remove_gcid)
Parameters:
Returns:

True if the component was found and removed.

Return type:

bool

Remove a component from the results set.

remove_hints_for_cid(cid)
Parameters:

cid (str) – The component ID

Remove all hints that we have associated with the selected component-ID.

set_bundle_id(id)
Parameters:

id (str) – The new ID.

Sets the name of the bundle these results are for.

set_bundle_kind(kind)
Parameters:

kind (AppStream.BundleKind) –

Sets the kind of the bundle these results are for.

unit_ignored()
Returns:

True if this result means the analyzed unit was ignored entirely.

Return type:

bool

update_component_gcid(cpt, bytes)
Parameters:
Returns:

True if the component existed and was updated.

Return type:

bool

Update the global component ID for the given component.

update_component_gcid_with_string(cpt, data)
Parameters:
Returns:

True if the component existed and was updated.

Return type:

bool

Update the global component ID for the given component. This is a convenience method for AppStreamCompose.Result.update_component_gcid