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)

add_hint_simple (cpt, tag)

components_count ()

fetch_component_gcids ()

fetch_component_ids_with_hints ()

fetch_components ()

fetch_hints_all ()

gcid_for_cid (cid)

gcid_for_component (cpt)

get_bundle_id ()

get_bundle_kind ()

get_component (cid)

get_hints (cid)

has_hint (cpt, tag)

hints_count ()

is_ignored (cpt)

remove_component (cpt)

remove_component_full (cpt, remove_gcid)

remove_hints_for_cid (cid)

set_bundle_id (id)

set_bundle_kind (kind)

unit_ignored ()

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.

Added in version 0.13.0.

add_component(cpt, bytes)
Parameters:
Raises:

GLib.Error

Returns:

True on success.

Return type:

bool

Add component to the results set.

Added in version 0.13.0.

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.

Added in version 0.14.0.

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.

Added in version 0.13.0.

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.

Added in version 0.13.0.

add_hint_simple(cpt, tag)
Parameters:
Returns:

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

Return type:

bool

Add an issue hint which does not have any variables to replace in its explanation text for a component.

Added in version 0.14.0.

components_count()
Returns:

The amount of components found for this unit.

Return type:

int

Added in version 0.13.0.

fetch_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.

Added in version 0.14.0.

fetch_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.

Added in version 0.14.0.

fetch_components()
Returns:

An array of AppStream.Component

Return type:

[AppStream.Component]

Gets all components this #AsResult instance contains.

Added in version 0.13.0.

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.

Added in version 0.14.5.

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.

Added in version 0.14.0.

gcid_for_component(cpt)
Parameters:

cpt (AppStream.Component) – Component to look for.

Returns:

The global component ID, or None if cpt is not registered with this result.

Return type:

str or None

Retrieve the global component-ID string for the given AppStream.Component, as long as component with the given ID is registered with this AppStreamCompose.Result.

Added in version 0.14.0.

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.

Added in version 0.13.0.

get_bundle_kind()
Return type:

AppStream.BundleKind

Gets the bundle kind these results are for.

Added in version 0.13.0.

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-

Added in version 0.13.0.

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.

Added in version 0.13.0.

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.

Added in version 0.15.1.

hints_count()
Returns:

The amount of hints emitted for this unit.

Return type:

int

Added in version 0.13.0.

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).

Added in version 0.13.0.

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.

Added in version 0.13.0.

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.

Added in version 0.15.1.

remove_hints_for_cid(cid)
Parameters:

cid (str) – The component ID

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

Added in version 0.14.5.

set_bundle_id(id)
Parameters:

id (str) – The new ID.

Sets the name of the bundle these results are for.

Added in version 0.13.0.

set_bundle_kind(kind)
Parameters:

kind (AppStream.BundleKind)

Sets the kind of the bundle these results are for.

Added in version 0.13.0.

unit_ignored()
Returns:

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

Return type:

bool

Added in version 0.13.0.