AppStreamGlib.App¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class AppStreamGlib.App(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod guess_source_kind(filename)[source]¶
- Parameters:
filename (
str
) – a file name- Returns:
A
AppStreamGlib.FormatKind
, e.g.AppStreamGlib.FormatKind.APPSTREAM
.- Return type:
Guesses the source kind based from the filename.
New in version 0.1.8.
- classmethod kind_from_string(kind)[source]¶
- Parameters:
kind (
str
) – the string.- Returns:
a
AppStreamGlib.AppKind
orAppStreamGlib.AppKind.UNKNOWN
for unknown- Return type:
Converts the text representation to an enumerated value.
New in version 0.5.10.
- classmethod kind_to_string(kind)[source]¶
- Parameters:
kind (
AppStreamGlib.AppKind
) – theAppStreamGlib.AppKind
.- Returns:
string version of kind
- Return type:
Converts the enumerated value to an text representation.
New in version 0.5.10.
- classmethod merge_kind_from_string(merge_kind)[source]¶
- Parameters:
merge_kind (
str
) – a source kind string- Returns:
A
AppStreamGlib.AppMergeKind
, e.g.AppStreamGlib.AppMergeKind.REPLACE
.- Return type:
Converts the text representation to an enumerated value.
New in version 0.6.1.
- classmethod merge_kind_to_string(merge_kind)[source]¶
- Parameters:
merge_kind (
AppStreamGlib.AppMergeKind
) – theAppStreamGlib.AppMergeKind
, e.g.AppStreamGlib.AppMergeKind.REPLACE
- Returns:
string version of merge_kind, or
None
for unknown- Return type:
Converts the enumerated value to an text representation.
New in version 0.6.1.
- classmethod new()[source]¶
- Returns:
- Return type:
Creates a new
AppStreamGlib.App
.New in version 0.1.0.
- classmethod scope_from_string(scope)[source]¶
- Parameters:
scope (
str
) – a source kind string- Returns:
A
AppStreamGlib.AppScope
, e.g.AppStreamGlib.AppScope.SYSTEM
.- Return type:
Converts the text representation to an enumerated value.
New in version 0.6.1.
- classmethod scope_to_string(scope)[source]¶
- Parameters:
scope (
AppStreamGlib.AppScope
) – theAppStreamGlib.AppScope
, e.g.AppStreamGlib.AppScope.SYSTEM
- Returns:
string version of scope, or
None
for unknown- Return type:
Converts the enumerated value to an text representation.
New in version 0.6.1.
- classmethod source_kind_from_string(source_kind)[source]¶
- Parameters:
source_kind (
str
) – a source kind string- Returns:
A
AppStreamGlib.FormatKind
, e.g.AppStreamGlib.FormatKind.APPSTREAM
.- Return type:
Converts the text representation to an enumerated value.
New in version 0.2.2.
- classmethod source_kind_to_string(source_kind)[source]¶
- Parameters:
source_kind (
AppStreamGlib.FormatKind
) – theAppStreamGlib.FormatKind
.- Returns:
string version of source_kind, or
None
for unknown- Return type:
Converts the enumerated value to an text representation.
New in version 0.2.2.
- classmethod state_to_string(state)[source]¶
- Parameters:
state (
AppStreamGlib.AppState
) – theAppStreamGlib.AppState
.- Returns:
string version of state, or
None
for unknown- Return type:
Converts the enumerated value to an text representation.
New in version 0.2.2.
- add_addon(addon)[source]¶
- Parameters:
addon (
AppStreamGlib.App
) – aAppStreamGlib.App
instance.
Adds a addon to an application.
New in version 0.1.7.
- add_agreement(agreement)[source]¶
- Parameters:
agreement (
AppStreamGlib.Agreement
) – aAppStreamGlib.Agreement
instance.
Adds a agreement to an application.
New in version 0.7.8.
- add_arch(arch)[source]¶
- Parameters:
arch (
str
) – the package name.
Adds a package name to an application.
New in version 0.1.1.
- add_bundle(bundle)[source]¶
- Parameters:
bundle (
AppStreamGlib.Bundle
) – aAppStreamGlib.Bundle
instance.
Adds a bundle to an application.
New in version 0.3.5.
- add_category(category)[source]¶
- Parameters:
category (
str
) – the category.
Adds a menu category to the application.
New in version 0.1.0.
- add_compulsory_for_desktop(compulsory_for_desktop)[source]¶
- Parameters:
compulsory_for_desktop (
str
) – the desktop string, e.g. “GNOME”.
Adds a desktop that requires this application to be installed.
New in version 0.1.0.
- add_content_rating(content_rating)[source]¶
- Parameters:
content_rating (
AppStreamGlib.ContentRating
) – aAppStreamGlib.ContentRating
instance.
Adds a content_rating to an application.
New in version 0.5.12.
- add_extends(extends)[source]¶
- Parameters:
extends (
str
) – the full ID, e.g. “eclipse.desktop”.
Adds a parent ID to the application.
New in version 0.1.7.
- add_format(format)[source]¶
- Parameters:
format (
AppStreamGlib.Format
) – theAppStreamGlib.Format
.
Add a format the application has been built from.
New in version 0.6.9.
- add_icon(icon)[source]¶
- Parameters:
icon (
AppStreamGlib.Icon
) – aAppStreamGlib.Icon
instance.
Adds a icon to an application.
New in version 0.3.1.
- add_keyword(locale, keyword)[source]¶
-
Add a keyword the application should match against.
New in version 0.3.0.
- add_kudo(kudo)[source]¶
- Parameters:
kudo (
str
) – the kudo.
Add a kudo the application has obtained.
New in version 0.2.2.
- add_kudo_kind(kudo_kind)[source]¶
- Parameters:
kudo_kind (
AppStreamGlib.KudoKind
) – theAppStreamGlib.KudoKind
.
Add a kudo the application has obtained.
New in version 0.2.2.
- add_language(percentage, locale)[source]¶
- Parameters:
Adds a language to the application.
New in version 0.1.0.
- add_launchable(launchable)[source]¶
- Parameters:
launchable (
AppStreamGlib.Launchable
) – aAppStreamGlib.Launchable
instance.
Adds a launchable to an application.
New in version 0.6.13.
- add_mimetype(mimetype)[source]¶
- Parameters:
mimetype (
str
) – the mimetype.
Adds a mimetype the application can process.
New in version 0.1.0.
- add_permission(permission)[source]¶
- Parameters:
permission (
str
) – the permission.
Add a permission the application has obtained.
New in version 0.3.5.
- add_pkgname(pkgname)[source]¶
- Parameters:
pkgname (
str
) – the package name.
Adds a package name to an application.
New in version 0.1.0.
- add_provide(provide)[source]¶
- Parameters:
provide (
AppStreamGlib.Provide
) – aAppStreamGlib.Provide
instance.
Adds a provide to an application.
New in version 0.1.6.
- add_quirk(quirk)[source]¶
- Parameters:
quirk (
AppStreamGlib.AppQuirk
) – theAppStreamGlib.AppQuirk
, e.g.AppStreamGlib.AppQuirk.PROVENANCE
Adds a specific attribute to an application.
New in version 0.5.10.
- add_release(release)[source]¶
- Parameters:
release (
AppStreamGlib.Release
) – aAppStreamGlib.Release
instance.
Adds a release to an application.
New in version 0.1.0.
- add_require(require)[source]¶
- Parameters:
require (
AppStreamGlib.Require
) – aAppStreamGlib.Require
instance.
Adds a require to an application.
New in version 0.6.7.
- add_review(review)[source]¶
- Parameters:
review (
AppStreamGlib.Review
) – aAppStreamGlib.Review
instance.
Adds a review to an application.
New in version 0.6.1.
- add_screenshot(screenshot)[source]¶
- Parameters:
screenshot (
AppStreamGlib.Screenshot
) – aAppStreamGlib.Screenshot
instance.
Adds a screenshot to an application.
New in version 0.1.0.
- add_suggest(suggest)[source]¶
- Parameters:
suggest (
AppStreamGlib.Suggest
) – aAppStreamGlib.Suggest
instance.
Adds a suggest to an application.
New in version 0.6.1.
- add_translation(translation)[source]¶
- Parameters:
translation (
AppStreamGlib.Translation
) – aAppStreamGlib.Translation
instance.
Adds a translation to an application.
New in version 0.5.8.
- add_url(url_kind, url)[source]¶
- Parameters:
url_kind (
AppStreamGlib.UrlKind
) – the URL kind, e.g.AppStreamGlib.UrlKind.HOMEPAGE
url (
str
) – the full URL.
Adds some URL data to the application.
New in version 0.1.0.
- convert_icons(kind)[source]¶
- Parameters:
kind (
AppStreamGlib.IconKind
) – theAppStreamGlib.IconKind
, e.g.AppStreamGlib.IconKind.EMBEDDED
.- Raises:
- Returns:
True
for success- Return type:
Converts all the icons in the application to a specific kind.
New in version 0.3.1.
- equal(app2)[source]¶
- Parameters:
app2 (
AppStreamGlib.App
) – anotherAppStreamGlib.App
instance.- Returns:
True
if the applications are equal- Return type:
Compare one application with another for equality using the following properties:
scope, e.g.
system
oruser
bundle kind, e.g.
package
orflatpak
origin, e.g.
fedora
orgnome-apps-nightly
kind, e.g.
app
orruntime
AppStream ID, e.g.
gimp.desktop
branch, e.g.
stable
ormaster
New in version 0.6.1.
- get_addons()[source]¶
- Returns:
an array
- Return type:
Gets all the addons the application has.
New in version 0.1.7.
- get_agreement_by_kind(kind)[source]¶
- Parameters:
kind (
AppStreamGlib.AgreementKind
) – an agreement kind, e.g.AppStreamGlib.AgreementKind.EULA
- Returns:
a
AppStreamGlib.Agreement
orNone
for not found- Return type:
Gets a agreement the application has defined of a specific type.
New in version 0.7.8.
- get_agreement_default()[source]¶
- Returns:
a
AppStreamGlib.Agreement
orNone
for not found- Return type:
Gets a privacy policys the application has defined of a specific type.
New in version 0.7.8.
- get_architectures()[source]¶
- Returns:
an array
- Return type:
[
str
]
Gets the supported architectures for the application, or an empty list if all architectures are supported.
New in version 0.1.1.
- get_bundle_default()[source]¶
- Returns:
a
AppStreamGlib.Bundle
, orNone
- Return type:
Finds the default bundle.
New in version 0.3.5.
- get_bundles()[source]¶
- Returns:
an array
- Return type:
Gets any bundles the application has defined.
New in version 0.3.5.
- get_categories()[source]¶
- Returns:
an array
- Return type:
[
str
]
Get the application categories.
New in version 0.1.0.
- get_comment(locale)[source]¶
- Parameters:
- Returns:
string, or
None
if unset- Return type:
Gets the application summary for a specific locale.
New in version 0.1.0.
- get_compulsory_for_desktops()[source]¶
- Returns:
an array
- Return type:
[
str
]
Returns the desktops where this application is compulsory.
New in version 0.1.0.
- get_content_rating(kind)[source]¶
- Parameters:
kind (
str
) – a ratings kind, e.g. “oars-1.0”- Returns:
a
AppStreamGlib.ContentRating
orNone
for not found- Return type:
Gets a content ratings the application has defined of a specific type.
New in version 0.5.12.
- get_content_ratings()[source]¶
- Returns:
an array
- Return type:
Gets any content_ratings the application has defined.
New in version 0.5.12.
- get_description(locale)[source]¶
- Parameters:
- Returns:
string, or
None
if unset- Return type:
Gets the application description markup for a specific locale.
New in version 0.1.0.
- get_developer_name(locale)[source]¶
- Parameters:
- Returns:
string, or
None
if unset- Return type:
Gets the application developer name for a specific locale.
New in version 0.1.8.
- get_developer_names()[source]¶
-
Gets the developer_names set for the application.
New in version 0.1.8.
- get_extends()[source]¶
- Returns:
an array
- Return type:
[
str
]
Gets the IDs that are extended from the addon.
New in version 0.1.7.
- get_format_by_filename(filename)[source]¶
- Parameters:
filename (
str
) – a filename, e.g. “/home/hughsie/dave.desktop”- Returns:
A
AppStreamGlib.Format
, orNone
if not found- Return type:
Searches the list of formats for a specific filename.
New in version 0.6.9.
- get_format_by_kind(kind)[source]¶
- Parameters:
kind (
AppStreamGlib.FormatKind
) – aAppStreamGlib.FormatKind
, e.g.AppStreamGlib.FormatKind.APPDATA
- Returns:
A
AppStreamGlib.Format
, orNone
if not found- Return type:
Searches the list of formats for a specific format kind.
New in version 0.6.9.
- get_format_default()[source]¶
- Returns:
A
AppStreamGlib.Format
, orNone
if not found- Return type:
Returns the default format.
New in version 0.6.9.
- get_formats()[source]¶
- Returns:
an array
- Return type:
[
str
]
Gets any formats that make up the application.
New in version 0.6.9.
- get_icon_default()[source]¶
- Returns:
a
AppStreamGlib.Icon
, orNone
- Return type:
Finds the default icon.
New in version 0.3.1.
- get_icon_for_size(width, height)[source]¶
- Parameters:
- Returns:
a
AppStreamGlib.Icon
, orNone
- Return type:
Finds an icon of a specific size.
New in version 0.3.1.
- get_icons()[source]¶
- Returns:
an array
- Return type:
Gets any icons the application has defined.
New in version 0.3.1.
- get_id()[source]¶
- Returns:
the ID, e.g. “org.gnome.Software.desktop”
- Return type:
Gets the full ID value.
New in version 0.1.0.
- get_id_filename()[source]¶
- Returns:
A utf8 filename
- Return type:
Returns a filename which represents the applications ID, e.g. “gimp.desktop” becomes “gimp” and is used for cache directories.
New in version 0.3.0.
- get_id_kind()[source]¶
- Returns:
enumerated value
- Return type:
Gets the ID kind.
New in version 0.1.0.
- get_id_no_prefix()[source]¶
- Returns:
the ID, e.g. “org.gnome.Software.desktop”
- Return type:
Gets the full ID value, stripping any prefix.
New in version 0.5.12.
- get_keywords(locale)[source]¶
-
Gets any keywords the application should match against.
New in version 0.3.0.
- get_kudos()[source]¶
- Returns:
an array
- Return type:
[
str
]
Gets any kudos the application has obtained.
New in version 0.2.2.
- get_language(locale)[source]¶
- Parameters:
- Returns:
a percentage value where 0 is unspecified, or -1 for not found
- Return type:
Gets the language coverage for the specific language.
New in version 0.1.0.
- get_languages()[source]¶
- Returns:
list of language values
- Return type:
[
str
]
Get a list of all languages.
New in version 0.1.0.
- get_launchable_by_kind(kind)[source]¶
- Parameters:
kind (
AppStreamGlib.LaunchableKind
) – aAppStreamGlib.LaunchableKind
, e.g.AppStreamGlib.FormatKind.APPDATA
- Returns:
A
AppStreamGlib.Launchable
, orNone
if not found- Return type:
Searches the list of launchables for a specific launchable kind.
New in version 0.6.13.
- get_launchable_default()[source]¶
- Returns:
A
AppStreamGlib.Launchable
, orNone
if not found- Return type:
Returns the default launchable.
New in version 0.6.13.
- get_launchables()[source]¶
- Returns:
an array
- Return type:
Gets all the launchables the application has.
New in version 0.6.13.
- get_merge_kind()[source]¶
- Returns:
enumerated value
- Return type:
Gets the merge_kind of the application.
New in version 0.6.1.
- get_mimetypes()[source]¶
- Returns:
an array
- Return type:
[
str
]
Gets any mimetypes the application will register.
New in version 0.2.0.
- get_name(locale)[source]¶
- Parameters:
- Returns:
string, or
None
if unset- Return type:
Gets the application name for a specific locale.
New in version 0.1.0.
- get_permissions()[source]¶
- Returns:
an array
- Return type:
[
str
]
Gets any permissions the application has obtained.
New in version 0.3.5.
- get_pkgnames()[source]¶
- Returns:
an array
- Return type:
[
str
]
Gets the package names (if any) for the application.
New in version 0.1.0.
- get_priority()[source]¶
- Returns:
priority value
- Return type:
Gets the application priority. Larger values trump smaller values.
New in version 0.1.0.
- get_provides()[source]¶
- Returns:
an array
- Return type:
Gets all the provides the application has.
New in version 0.1.6.
- get_release(version)[source]¶
-
Gets a specific release from the application.
New in version 0.3.5.
- get_release_by_version(version)[source]¶
- Parameters:
version (
str
) – a release version number, e.g. “1.2.3”- Returns:
a release, or
None
- Return type:
Gets a specific release from the application.
New in version 0.7.3.
- get_release_default()[source]¶
- Returns:
a release, or
None
- Return type:
Gets the default (newest) release from the application.
New in version 0.3.5.
- get_releases()[source]¶
- Returns:
an array
- Return type:
Gets all the releases the application has had.
New in version 0.1.0.
- get_require_by_value(kind, value)[source]¶
- Parameters:
- Returns:
A
AppStreamGlib.Require
, orNone
for not found- Return type:
Gets a specific requirement for the application.
New in version 0.6.7.
- get_requires()[source]¶
- Returns:
an array
- Return type:
Gets any requires the application has defined. A requirement could be that a firmware version has to be below a defined version or that another application is required to be installed.
New in version 0.6.7.
- get_reviews()[source]¶
- Returns:
an array
- Return type:
Gets any reviews the application has defined.
New in version 0.6.1.
- get_scope()[source]¶
- Returns:
enumerated value
- Return type:
Gets the scope of the application.
New in version 0.6.1.
- get_screenshot_default()[source]¶
- Returns:
a screenshot or
None
- Return type:
Gets the default screenshot for the component.
New in version 0.7.3.
- get_screenshots()[source]¶
- Returns:
an array
- Return type:
Gets any screenshots the application has defined.
New in version 0.1.0.
- get_search_match()[source]¶
- Returns:
a
AppStreamGlib.AppSearchMatch
, e.g.AppStreamGlib.AppSearchMatch.PKGNAME
- Return type:
Gets the token match fields. The bitfield given here is used to choose what is included in the token cache.
New in version 0.6.13.
- get_source_file()[source]¶
-
Gets the default source filename the instance was populated from.
New in version 0.2.2.
- get_source_kind()[source]¶
- Returns:
enumerated value
- Return type:
Gets the source kind, i.e. where the
AppStreamGlib.App
came from.New in version 0.1.4.
- get_source_pkgname()[source]¶
-
Gets the source package name that produced the binary package. Only source packages producing more than one binary package will have this entry set.
New in version 0.2.4.
- get_state()[source]¶
- Returns:
enumerated value
- Return type:
Gets the application state.
New in version 0.2.2.
- get_suggests()[source]¶
- Returns:
an array
- Return type:
Gets any suggests the application has defined.
New in version 0.6.1.
- get_translations()[source]¶
- Returns:
an array
- Return type:
Gets any translations the application has defined.
New in version 0.5.8.
- get_trust_flags()[source]¶
- Returns:
bitfield
- Return type:
Gets the trust flags, i.e. how trusted the incoming data is.
New in version 0.2.2.
- get_unique_id()[source]¶
- Returns:
the unique ID, e.g.
system/package/fedora/desktop/gimp.desktop/master
- Return type:
Gets the unique ID value to represent the component.
New in version 0.6.1.
- get_update_contact()[source]¶
-
Gets the application upstream update contact email.
New in version 0.1.4.
- get_url_item(url_kind)[source]¶
- Parameters:
url_kind (
AppStreamGlib.UrlKind
) – the URL kind, e.g.AppStreamGlib.UrlKind.HOMEPAGE
.- Returns:
string, or
None
if unset- Return type:
Gets a URL.
New in version 0.1.0.
- get_vetos()[source]¶
- Returns:
A list of vetos
- Return type:
[
str
]
Gets the list of vetos.
New in version 0.2.5.
- has_category(category)[source]¶
- Parameters:
category (
str
) – a category string, e.g. “DesktopSettings”- Returns:
True
if the application has got the specified category- Return type:
Searches the category list for a specific item.
New in version 0.1.5.
- has_compulsory_for_desktop(desktop)[source]¶
- Parameters:
desktop (
str
) – a desktop string, e.g. “GNOME”- Returns:
True
if the application is compulsory for a specific desktop- Return type:
Searches the compulsory for desktop list for a specific item.
New in version 0.5.12.
- has_kudo(kudo)[source]¶
- Parameters:
kudo (
str
) – a kudo string, e.g. “SearchProvider”- Returns:
True
if the application has got the specified kudo- Return type:
Searches the kudo list for a specific item.
New in version 0.2.2.
- has_kudo_kind(kudo)[source]¶
- Parameters:
kudo (
AppStreamGlib.KudoKind
) – aAppStreamGlib.KudoKind
, e.g.AppStreamGlib.KudoKind.SEARCH_PROVIDER
- Returns:
True
if the application has got the specified kudo- Return type:
Searches the kudo list for a specific item.
New in version 0.2.2.
- has_permission(permission)[source]¶
- Parameters:
permission (
str
) – a permission string, e.g. “Network”- Returns:
True
if the application has got the specified permission- Return type:
Searches the permission list for a specific item.
New in version 0.3.5.
- has_quirk(quirk)[source]¶
- Parameters:
quirk (
AppStreamGlib.AppQuirk
) – theAppStreamGlib.AppQuirk
, e.g.AppStreamGlib.AppQuirk.PROVENANCE
- Returns:
True
if the application has the attribute- Return type:
Queries to see if an application has a specific attribute.
New in version 0.5.10.
- parse_data(data, flags)[source]¶
- Parameters:
data (
GLib.Bytes
) – data to parse.flags (
int
) –AppStreamGlib.AppParseFlags
, e.g.AppStreamGlib.AppParseFlags.USE_HEURISTICS
- Raises:
- Returns:
True
for success- Return type:
Parses an AppData file and populates the application state.
New in version 0.7.5.
- parse_file(filename, flags)[source]¶
- Parameters:
filename (
str
) – file to load.flags (
int
) –AppStreamGlib.AppParseFlags
, e.g.AppStreamGlib.AppParseFlags.USE_HEURISTICS
- Raises:
- Returns:
True
for success- Return type:
Parses a desktop or AppData file and populates the application state.
Applications that are not suitable for the store will have vetos added.
New in version 0.1.2.
- remove_category(category)[source]¶
- Parameters:
category (
str
) – the category.
Removed a menu category from the application.
New in version 0.6.13.
- remove_format(format)[source]¶
- Parameters:
format (
AppStreamGlib.Format
) – theAppStreamGlib.Format
.
Removes a format the application has been built from.
New in version 0.6.9.
- remove_kudo(kudo)[source]¶
- Parameters:
kudo (
str
) – the kudo.
Remove a kudo the application has obtained.
New in version 0.6.13.
- remove_metadata(key)[source]¶
- Parameters:
key (
str
) – the metadata key.
Removes a metadata item from the application.
New in version 0.1.0.
- remove_veto(description)[source]¶
- Parameters:
description (
str
) – veto string
Removes a reason to not include the application in the metadata.
New in version 0.4.1.
- search_matches(search)[source]¶
- Parameters:
search (
str
) – the search term.- Returns:
a match scrore, where 0 is no match and 100 is the best match.
- Return type:
Searches application data for a specific keyword.
New in version 0.1.0.
- search_matches_all(search)[source]¶
- Parameters:
search (
str
) – the search terms.- Returns:
a match scrore, where 0 is no match and larger numbers are better matches.
It’s probably a good idea to use
AppStreamGlib.utils_search_tokenize
() to populate search as very short or common keywords will return a lot of matches.- Return type:
Searches application data for all the specific keywords.
New in version 0.1.3.
- set_branch(branch)[source]¶
- Parameters:
branch (
str
) – the branch, e.g. “master” or “3-16”.
Set the branch that the instance was sourced from.
New in version 0.6.1.
- set_comment(locale, comment)[source]¶
- Parameters:
Sets the application summary for a specific locale.
New in version 0.1.0.
- set_description(locale, description)[source]¶
- Parameters:
Sets the application description markup for a specific locale.
New in version 0.1.0.
- set_developer_name(locale, developer_name)[source]¶
- Parameters:
Sets the application developer name for a specific locale.
New in version 0.1.0.
- set_icon_path(icon_path)[source]¶
- Parameters:
icon_path (
str
) – the local path.
Sets the icon path, where local icons would be found.
New in version 0.1.0.
- set_id(id)[source]¶
- Parameters:
id (
str
) – the new _full_ application ID, e.g. “org.gnome.Software.desktop”.
Sets a new application ID. Any invalid characters will be automatically replaced.
New in version 0.1.0.
- set_id_kind(id_kind)[source]¶
- Parameters:
id_kind (
AppStreamGlib.IdKind
) – theAppStreamGlib.AppKind
.
Sets the application kind.
New in version 0.1.0.
- set_kind(kind)[source]¶
- Parameters:
kind (
AppStreamGlib.AppKind
) – theAppStreamGlib.AppKind
.
Sets the application kind.
New in version 0.5.10.
- set_merge_kind(merge_kind)[source]¶
- Parameters:
merge_kind (
AppStreamGlib.AppMergeKind
) – theAppStreamGlib.AppMergeKind
.
Sets the merge kind of the application.
New in version 0.6.1.
- set_metadata_license(metadata_license)[source]¶
- Parameters:
metadata_license (
str
) – the project license string.
Set the project license.
New in version 0.1.4.
- set_name(locale, name)[source]¶
-
Sets the application name for a specific locale.
New in version 0.1.0.
- set_origin(origin)[source]¶
- Parameters:
origin (
str
) – the origin, e.g. “fedora-21”
Sets the application origin.
New in version 0.3.2.
- set_priority(priority)[source]¶
- Parameters:
priority (
int
) – the priority.
Sets the application priority, where 0 is default and positive numbers are better than negative numbers.
New in version 0.1.0.
- set_project_group(project_group)[source]¶
- Parameters:
project_group (
str
) – the project group, e.g. “GNOME”.
Set any project affiliation.
New in version 0.1.0.
- set_project_license(project_license)[source]¶
- Parameters:
project_license (
str
) – the project license string.
Set the project license.
New in version 0.1.0.
- set_scope(scope)[source]¶
- Parameters:
scope (
AppStreamGlib.AppScope
) – theAppStreamGlib.AppScope
.
Sets the scope of the application.
New in version 0.6.1.
- set_search_match(search_match)[source]¶
- Parameters:
search_match (
int
) – theAppStreamGlib.AppSearchMatch
, e.g.AppStreamGlib.AppSearchMatch.PKGNAME
Sets the token match fields. The bitfield given here is used to choose what is included in the token cache.
New in version 0.6.13.
- set_source_file(source_file)[source]¶
- Parameters:
source_file (
str
) – the filename.
Set the file that the instance was sourced from.
New in version 0.2.2.
- set_source_kind(source_kind)[source]¶
- Parameters:
source_kind (
AppStreamGlib.FormatKind
) – theAppStreamGlib.FormatKind
.
Sets the source kind.
New in version 0.1.4.
- set_source_pkgname(source_pkgname)[source]¶
- Parameters:
source_pkgname (
str
) – the project license string.
Set the project license.
New in version 0.2.4.
- set_state(state)[source]¶
- Parameters:
state (
AppStreamGlib.AppState
) – theAppStreamGlib.AppState
.
Sets the application state.
New in version 0.2.2.
- set_trust_flags(trust_flags)[source]¶
- Parameters:
trust_flags (
int
) – theAppStreamGlib.AppTrustFlags
.
Sets the check flags, where
AppStreamGlib.AppTrustFlags.COMPLETE
is completely trusted input.New in version 0.2.2.
- set_update_contact(update_contact)[source]¶
- Parameters:
update_contact (
str
) – the project license string.
Set the project license.
New in version 0.1.4.
- subsume(donor)[source]¶
- Parameters:
donor (
AppStreamGlib.App
) – the donor.
Copies information from the donor to the application object.
New in version 0.1.0.
- subsume_full(donor, flags)[source]¶
- Parameters:
donor (
AppStreamGlib.App
) – the donor.flags (
int
) – any optionalAppStreamGlib.AppSubsumeFlags
, e.g.AppStreamGlib.AppSubsumeFlags.NO_OVERWRITE
Copies information from the donor to the application object.
New in version 0.1.4.
- to_file(file, cancellable)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Exports a DOM tree to an XML file.
New in version 0.2.0.
- to_xml()[source]¶
- Raises:
- Returns:
an XML string, or
None
- Return type:
Exports a DOM tree to an XML string.
New in version 0.7.14.
- validate(flags)[source]¶
- Parameters:
flags (
int
) – theAppStreamGlib.AppValidateFlags
to use, e.g.AppStreamGlib.AppValidateFlags.NONE
- Raises:
- Returns:
A list of problems, or
None
- Return type:
Validates data in the instance for style and consistency.
New in version 0.1.4.