AppStreamCompose.Result¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class AppStreamCompose.Result(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Return type:
Creates a new
AppStreamCompose.Result
.
- add_component(cpt, bytes)¶
- Parameters:
cpt (
AppStream.Component
) – TheAppStream.Component
to add.bytes (
GLib.Bytes
) – Source data used to generate the GCID hash, orNone
if nonexistent.
- Raises:
- Returns:
True
on success.- Return type:
Add component to the results set.
- add_component_with_string(cpt, data)¶
- Parameters:
cpt (
AppStream.Component
) – TheAppStream.Component
to add.data (
str
) – Source data used to generate the GCID hash, orNone
if nonexistent.
- Raises:
- Returns:
True
on success.- Return type:
Add component to the results set, using string data.
- add_hint(cpt, tag, kv)¶
- Parameters:
cpt (
AppStream.Component
) – The affectedAppStream.Component
tag (
str
) – AppStream Compose Issue hint tagkv (
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:
Add an issue hint for a component.
- add_hint_by_cid(component_id, tag, kv)¶
- Parameters:
component_id (
str
) – The component-ID of the affectedAppStream.Component
tag (
str
) – AppStream Compose Issue hint tagkv (
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:
Add an issue hint for a component.
- fetch_components()¶
- Returns:
An array of
AppStream.Component
- Return type:
Gets all components this #AsResult instance contains.
- fetch_hints_all()¶
- Returns:
An array of
AppStreamCompose.Hint
- Return type:
Get a list of all hints for all components that are registered with this result.
- gcid_for_cid(cid)¶
-
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:
- get_bundle_id()¶
- Return type:
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:
Gets the bundle kind these results are for.
- get_component(cid)¶
- Parameters:
cid (
str
) – Component ID to look for.- Returns:
- Return type:
Gets the component by its component-id-
- get_component_gcids()¶
-
Retrieve a list of all global component-IDs that this result knows of.
- get_component_ids_with_hints()¶
-
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
orNone
- Return type:
Gets hints for a component with the given component-id.
- has_hint(cpt, tag)¶
- Parameters:
cpt (
AppStream.Component
) – theAppStream.Component
to checktag (
str
) – the hint tag to check for
- Returns:
True
if a hint with this tag exists for the selected component.- Return type:
Test if a hint tag is associated with a given component in this result.
- is_ignored(cpt)¶
- Parameters:
cpt (
AppStream.Component
) – the component to check for.- Returns:
True
if the component is ignored.- Return type:
Check if an
AppStream.Component
was set to be ignored in this result (usually due to errors).
- remove_component(cpt)¶
- Parameters:
cpt (
AppStream.Component
) – TheAppStream.Component
to remove.- Returns:
True
if the component was found and removed.- Return type:
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:
Remove a component from the results set.
- remove_component_full(cpt, remove_gcid)¶
- Parameters:
cpt (
AppStream.Component
) – TheAppStream.Component
to remove.remove_gcid (
bool
) –True
if global component ID should be unregistered as well.
- Returns:
True
if the component was found and removed.- Return type:
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()¶
- update_component_gcid(cpt, bytes)¶
- Parameters:
cpt (
AppStream.Component
) – TheAppStream.Component
to edit.bytes (
GLib.Bytes
orNone
) – The data to include in the global component ID, orNone
- Returns:
True
if the component existed and was updated.- Return type:
Update the global component ID for the given component.
- update_component_gcid_with_string(cpt, data)¶
- Parameters:
cpt (
AppStream.Component
) – TheAppStream.Component
to edit.data (
str
orNone
) – The data as string to include in the global component ID, orNone
- Returns:
True
if the component existed and was updated.- Return type:
Update the global component ID for the given component. This is a convenience method for
AppStreamCompose.Result.update_component_gcid