| AppStream-glib Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <appstream-glib.h> enum AsAppParseFlags; enum AsAppSubsumeFlags; enum AsAppError; enum AsAppValidateFlags; enum AsAppTrustFlags; enum AsAppSourceKind; enum AsAppState; #define AS_APP_ERROR AsApp * as_app_new (void); GQuark as_app_error_quark (void); AsAppSourceKind as_app_guess_source_kind (const gchar *filename); AsAppSourceKind as_app_source_kind_from_string (const gchar *source_kind); const gchar * as_app_source_kind_to_string (AsAppSourceKind source_kind); const gchar * as_app_state_to_string (AsAppState state); AsIdKind as_app_get_id_kind (AsApp *app); AsAppSourceKind as_app_get_source_kind (AsApp *app); AsAppState as_app_get_state (AsApp *app); AsAppTrustFlags as_app_get_trust_flags (AsApp *app); GList * as_app_get_languages (AsApp *app); GPtrArray * as_app_get_addons (AsApp *app); GPtrArray * as_app_get_categories (AsApp *app); GPtrArray * as_app_get_compulsory_for_desktops (AsApp *app); GPtrArray * as_app_get_extends (AsApp *app); GPtrArray * as_app_get_keywords (AsApp *app,const gchar *locale); GPtrArray * as_app_get_kudos (AsApp *app); GPtrArray * as_app_get_permissions (AsApp *app); GPtrArray * as_app_get_mimetypes (AsApp *app); GPtrArray * as_app_get_pkgnames (AsApp *app); GPtrArray * as_app_get_architectures (AsApp *app); GPtrArray * as_app_get_releases (AsApp *app); GPtrArray * as_app_get_provides (AsApp *app); GPtrArray * as_app_get_screenshots (AsApp *app); GPtrArray * as_app_get_icons (AsApp *app); GPtrArray * as_app_get_bundles (AsApp *app); GHashTable * as_app_get_names (AsApp *app); GHashTable * as_app_get_comments (AsApp *app); GHashTable * as_app_get_developer_names (AsApp *app); GHashTable * as_app_get_metadata (AsApp *app); GHashTable * as_app_get_descriptions (AsApp *app); GHashTable * as_app_get_urls (AsApp *app); GPtrArray * as_app_get_vetos (AsApp *app); const gchar * as_app_get_icon_path (AsApp *app); const gchar * as_app_get_id_filename (AsApp *app); const gchar * as_app_get_id (AsApp *app); const gchar * as_app_get_pkgname_default (AsApp *app); const gchar * as_app_get_source_pkgname (AsApp *app); const gchar * as_app_get_origin (AsApp *app); const gchar * as_app_get_project_group (AsApp *app); const gchar * as_app_get_project_license (AsApp *app); const gchar * as_app_get_metadata_license (AsApp *app); const gchar * as_app_get_update_contact (AsApp *app); const gchar * as_app_get_source_file (AsApp *app); const gchar * as_app_get_name (AsApp *app,const gchar *locale); const gchar * as_app_get_comment (AsApp *app,const gchar *locale); const gchar * as_app_get_developer_name (AsApp *app,const gchar *locale); const gchar * as_app_get_description (AsApp *app,const gchar *locale); gint as_app_get_priority (AsApp *app); gint as_app_get_language (AsApp *app,const gchar *locale); const gchar * as_app_get_metadata_item (AsApp *app,const gchar *key); const gchar * as_app_get_url_item (AsApp *app,AsUrlKind url_kind); gboolean as_app_has_category (AsApp *app,const gchar *category); gboolean as_app_has_kudo (AsApp *app,const gchar *kudo); gboolean as_app_has_kudo_kind (AsApp *app,AsKudoKind kudo); gboolean as_app_has_permission (AsApp *app,const gchar *permission); void as_app_set_id (AsApp *app,const gchar *id,gssize id_len); void as_app_set_id_kind (AsApp *app,AsIdKind id_kind); void as_app_set_source_kind (AsApp *app,AsAppSourceKind source_kind); void as_app_set_state (AsApp *app,AsAppState state); void as_app_set_trust_flags (AsApp *app,AsAppTrustFlags trust_flags); void as_app_set_origin (AsApp *app,const gchar *origin); void as_app_set_project_group (AsApp *app,const gchar *project_group,gssize project_group_len); void as_app_set_project_license (AsApp *app,const gchar *project_license,gssize project_license_len); void as_app_set_metadata_license (AsApp *app,const gchar *metadata_license,gssize metadata_license_len); void as_app_set_source_pkgname (AsApp *app,const gchar *source_pkgname,gssize source_pkgname_len); void as_app_set_update_contact (AsApp *app,const gchar *update_contact,gssize update_contact_len); void as_app_set_icon_path (AsApp *app,const gchar *icon_path,gssize icon_path_len); void as_app_set_name (AsApp *app,const gchar *locale,const gchar *name,gssize name_len); void as_app_set_comment (AsApp *app,const gchar *locale,const gchar *comment,gssize comment_len); void as_app_set_developer_name (AsApp *app,const gchar *locale,const gchar *developer_name,gssize developer_name_len); void as_app_set_description (AsApp *app,const gchar *locale,const gchar *description,gssize description_len); void as_app_set_source_file (AsApp *app,const gchar *source_file); void as_app_set_priority (AsApp *app,gint priority); void as_app_add_category (AsApp *app,const gchar *category,gssize category_len); void as_app_add_keyword (AsApp *app,const gchar *locale,const gchar *keyword,gssize keyword_len); void as_app_add_kudo (AsApp *app,const gchar *kudo,gssize kudo_len); void as_app_add_kudo_kind (AsApp *app,AsKudoKind kudo_kind); void as_app_add_permission (AsApp *app,const gchar *permission,gssize permission_len); void as_app_add_mimetype (AsApp *app,const gchar *mimetype,gssize mimetype_len); void as_app_add_pkgname (AsApp *app,const gchar *pkgname,gssize pkgname_len); void as_app_add_arch (AsApp *app,const gchar *arch,gssize arch_len); void as_app_add_release (AsApp *app,AsRelease *release); void as_app_add_provide (AsApp *app,AsProvide *provide); void as_app_add_screenshot (AsApp *app,AsScreenshot *screenshot); void as_app_add_icon (AsApp *app,AsIcon *icon); void as_app_add_bundle (AsApp *app,AsBundle *bundle); void as_app_add_language (AsApp *app,gint percentage,const gchar *locale,gssize locale_len); void as_app_add_compulsory_for_desktop (AsApp *app,const gchar *compulsory_for_desktop,gssize compulsory_for_desktop_len); void as_app_add_url (AsApp *app,AsUrlKind url_kind,const gchar *url,gssize url_len); void as_app_add_metadata (AsApp *app,const gchar *key,const gchar *value,gssize value_len); void as_app_remove_metadata (AsApp *app,const gchar *key); void as_app_add_addon (AsApp *app,AsApp *addon); void as_app_add_extends (AsApp *app,const gchar *extends,gssize extends_len); GPtrArray * as_app_validate (AsApp *app,AsAppValidateFlags flags,GError **error); void as_app_subsume (AsApp *app,AsApp *donor); void as_app_subsume_full (AsApp *app,AsApp *donor,AsAppSubsumeFlags flags); void as_app_add_veto (AsApp *app,const gchar *fmt,...); guint as_app_search_matches_all (AsApp *app,gchar **search); guint as_app_search_matches (AsApp *app,const gchar *search); gboolean as_app_parse_file (AsApp *app,const gchar *filename,AsAppParseFlags flags,GError **error); gboolean as_app_to_file (AsApp *app,GFile *file,GCancellable *cancellable,GError **error); AsIcon * as_app_get_icon_default (AsApp *app); AsIcon * as_app_get_icon_for_size (AsApp *app,guint width,guint height); AsBundle * as_app_get_bundle_default (AsApp *app); AsRelease * as_app_get_release (AsApp *app,const gchar *version); AsRelease * as_app_get_release_default (AsApp *app); gboolean as_app_convert_icons (AsApp *app,AsIconKind kind,GError **error);
This object represents the base object of all AppStream, the application. Although called AsApp, this object also represents components like fonts, codecs and input methods.
See also: AsScreenshot, AsRelease
typedef enum {
AS_APP_PARSE_FLAG_NONE,
AS_APP_PARSE_FLAG_USE_HEURISTICS = 1, /* Since: 0.1.2 */
AS_APP_PARSE_FLAG_KEEP_COMMENTS = 2, /* Since: 0.1.6 */
AS_APP_PARSE_FLAG_CONVERT_TRANSLATABLE = 4, /* Since: 0.1.6 */
AS_APP_PARSE_FLAG_APPEND_DATA = 8, /* Since: 0.1.8 */
AS_APP_PARSE_FLAG_ALLOW_VETO = 16, /* Since: 0.2.5 */
} AsAppParseFlags;
The flags to use when parsing resources.
| No special actions to use | |
| Use heuristic to infer properties | |
| Save comments from the file | |
| Allow translatable flags like <_p> | |
| Append new data rather than replacing | |
| Do not return errors for vetoed apps |
typedef enum {
AS_APP_SUBSUME_FLAG_NONE,
AS_APP_SUBSUME_FLAG_NO_OVERWRITE = 1, /* Since: 0.1.4 */
AS_APP_SUBSUME_FLAG_BOTH_WAYS = 2, /* Since: 0.1.4 */
AS_APP_SUBSUME_FLAG_PARTIAL = 4, /* Since: 0.2.2 */
} AsAppSubsumeFlags;
The flags to use when subsuming applications.
typedef enum {
AS_APP_ERROR_FAILED,
AS_APP_ERROR_INVALID_TYPE,
} AsAppError;
The error type.
typedef enum {
AS_APP_VALIDATE_FLAG_NONE = 0, /* Since: 0.1.4 */
AS_APP_VALIDATE_FLAG_RELAX = 1, /* Since: 0.1.4 */
AS_APP_VALIDATE_FLAG_STRICT = 2, /* Since: 0.1.4 */
AS_APP_VALIDATE_FLAG_NO_NETWORK = 4, /* Since: 0.1.4 */
AS_APP_VALIDATE_FLAG_ALL_APPS = 8, /* Since: 0.2.6 */
} AsAppValidateFlags;
The flags to use when validating.
typedef enum {
AS_APP_TRUST_FLAG_COMPLETE = 0, /* Since: 0.2.2 */
AS_APP_TRUST_FLAG_CHECK_DUPLICATES = 1, /* Since: 0.2.2 */
AS_APP_TRUST_FLAG_CHECK_VALID_UTF8 = 2, /* Since: 0.2.2 */
} AsAppTrustFlags;
The flags to use when checking input.
typedef enum {
AS_APP_SOURCE_KIND_UNKNOWN, /* Since: 0.1.4 */
AS_APP_SOURCE_KIND_APPSTREAM, /* Since: 0.1.4 */
AS_APP_SOURCE_KIND_DESKTOP, /* Since: 0.1.4 */
AS_APP_SOURCE_KIND_APPDATA, /* Since: 0.1.4 */
AS_APP_SOURCE_KIND_METAINFO, /* Since: 0.1.7 */
AS_APP_SOURCE_KIND_INF, /* Since: 0.3.5 */
} AsAppSourceKind;
The source kind.
| Not sourced from a file | |
| Sourced from a AppStream file | |
| Sourced from a desktop file | |
| Sourced from a AppData file | |
| Sourced from a MetaInfo file | |
| Sourced from a inf file |
typedef enum {
AS_APP_STATE_UNKNOWN, /* Since: 0.2.2 */
AS_APP_STATE_INSTALLED, /* Since: 0.2.2 */
AS_APP_STATE_AVAILABLE, /* Since: 0.2.2 */
AS_APP_STATE_AVAILABLE_LOCAL, /* Since: 0.2.2 */
AS_APP_STATE_UPDATABLE, /* Since: 0.2.2 */
AS_APP_STATE_UNAVAILABLE, /* Since: 0.2.2 */
AS_APP_STATE_QUEUED_FOR_INSTALL, /* Since: 0.2.2 */
AS_APP_STATE_INSTALLING, /* Since: 0.2.2 */
AS_APP_STATE_REMOVING, /* Since: 0.2.2 */
} AsAppState;
The application state.
| Unknown state | |
| Application is installed | |
| Application is available | |
| Application is locally available as a file | |
| Application is installed and updatable | |
| Application is referenced, but not available | |
| Application is queued for install | |
| Application is being installed | |
| Application is being removed |
AsApp * as_app_new (void);
Creates a new AsApp.
Returns : |
a AsApp. [transfer full] |
Since 0.1.0
AsAppSourceKind as_app_guess_source_kind (const gchar *filename);
Guesses the source kind based from the filename.
|
a file name |
Returns : |
A AsAppSourceKind, e.g. AS_APP_SOURCE_KIND_APPSTREAM. |
Since 0.1.8
AsAppSourceKind as_app_source_kind_from_string (const gchar *source_kind);
Converts the text representation to an enumerated value.
|
a source kind string |
Returns : |
A AsAppSourceKind, e.g. AS_APP_SOURCE_KIND_APPSTREAM. |
Since 0.2.2
const gchar * as_app_source_kind_to_string (AsAppSourceKind source_kind);
Converts the enumerated value to an text representation.
|
the AsAppSourceKind. |
Returns : |
string version of source_kind, or NULL for unknown |
Since 0.2.2
const gchar * as_app_state_to_string (AsAppState state);
Converts the enumerated value to an text representation.
|
the AsAppState. |
Returns : |
string version of state, or NULL for unknown |
Since 0.2.2
AsIdKind as_app_get_id_kind (AsApp *app);
Gets the ID kind.
|
a AsApp instance. |
Returns : |
enumerated value |
Since 0.1.0
AsAppSourceKind as_app_get_source_kind (AsApp *app);
Gets the source kind, i.e. where the AsApp came from.
|
a AsApp instance. |
Returns : |
enumerated value |
Since 0.1.4
AsAppState as_app_get_state (AsApp *app);
Gets the application state.
|
a AsApp instance. |
Returns : |
enumerated value |
Since 0.2.2
AsAppTrustFlags as_app_get_trust_flags (AsApp *app);
Gets the trust flags, i.e. how trusted the incoming data is.
|
a AsApp instance. |
Returns : |
bitfield |
Since 0.2.2
GList * as_app_get_languages (AsApp *app);
Get a list of all languages.
|
a AsApp instance. |
Returns : |
list of language values. [transfer container][element-type utf8] |
Since 0.1.0
GPtrArray * as_app_get_addons (AsApp *app);
Gets all the addons the application has.
|
a AsApp instance. |
Returns : |
an array. [element-type AsApp][transfer none] |
Since 0.1.7
GPtrArray * as_app_get_categories (AsApp *app);
Get the application categories.
|
a AsApp instance. |
Returns : |
an array. [element-type utf8][transfer none] |
Since 0.1.0
GPtrArray * as_app_get_compulsory_for_desktops (AsApp *app);
Returns the desktops where this application is compulsory.
|
a AsApp instance. |
Returns : |
an array. [element-type utf8][transfer none] |
Since 0.1.0
GPtrArray * as_app_get_extends (AsApp *app);
Gets the IDs that are extended from the addon.
|
a AsApp instance. |
Returns : |
an array. [element-type utf8][transfer none] |
Since 0.1.7
GPtrArray * as_app_get_keywords (AsApp *app,const gchar *locale);
Gets any keywords the application should match against.
|
a AsApp instance. |
|
the locale, or NULL. e.g. "en_GB" |
Returns : |
an array, or NULL. [element-type utf8][transfer none]
|
Since 0.3.0
GPtrArray * as_app_get_kudos (AsApp *app);
Gets any kudos the application has obtained.
|
a AsApp instance. |
Returns : |
an array. [element-type utf8][transfer none] |
Since 0.2.2
GPtrArray * as_app_get_permissions (AsApp *app);
Gets any permissions the application has obtained.
|
a AsApp instance. |
Returns : |
an array. [element-type utf8][transfer none] |
Since 0.3.5
GPtrArray * as_app_get_mimetypes (AsApp *app);
Gets any mimetypes the application will register.
|
a AsApp instance. |
Returns : |
an array. [transfer none][element-type utf8] |
Since 0.2.0
GPtrArray * as_app_get_pkgnames (AsApp *app);
Gets the package names (if any) for the application.
|
a AsApp instance. |
Returns : |
an array. [element-type utf8][transfer none] |
Since 0.1.0
GPtrArray * as_app_get_architectures (AsApp *app);
Gets the supported architectures for the application, or an empty list if all architectures are supported.
|
a AsApp instance. |
Returns : |
an array. [element-type utf8][transfer none] |
Since 0.1.1
GPtrArray * as_app_get_releases (AsApp *app);
Gets all the releases the application has had.
|
a AsApp instance. |
Returns : |
an array. [element-type AsRelease][transfer none] |
Since 0.1.0
GPtrArray * as_app_get_provides (AsApp *app);
Gets all the provides the application has.
|
a AsApp instance. |
Returns : |
an array. [element-type AsProvide][transfer none] |
Since 0.1.6
GPtrArray * as_app_get_screenshots (AsApp *app);
Gets any screenshots the application has defined.
|
a AsApp instance. |
Returns : |
an array. [element-type AsScreenshot][transfer none] |
Since 0.1.0
GPtrArray * as_app_get_icons (AsApp *app);
Gets any icons the application has defined.
|
a AsApp instance. |
Returns : |
an array. [element-type AsIcon][transfer none] |
Since 0.3.1
GPtrArray * as_app_get_bundles (AsApp *app);
Gets any bundles the application has defined.
|
a AsApp instance. |
Returns : |
an array. [element-type AsBundle][transfer none] |
Since 0.3.5
GHashTable * as_app_get_names (AsApp *app);
Gets the names set for the application.
|
a AsApp instance. |
Returns : |
hash table of names. [transfer none] |
Since 0.1.6
GHashTable * as_app_get_comments (AsApp *app);
Gets the comments set for the application.
|
a AsApp instance. |
Returns : |
hash table of comments. [transfer none] |
Since 0.1.6
GHashTable * as_app_get_developer_names (AsApp *app);
Gets the developer_names set for the application.
|
a AsApp instance. |
Returns : |
hash table of developer_names. [transfer none] |
Since 0.1.8
GHashTable * as_app_get_metadata (AsApp *app);
Gets the metadata set for the application.
|
a AsApp instance. |
Returns : |
hash table of metadata. [transfer none] |
Since 0.1.6
GHashTable * as_app_get_descriptions (AsApp *app);
Gets the descriptions set for the application.
|
a AsApp instance. |
Returns : |
hash table of descriptions. [transfer none] |
Since 0.1.6
GHashTable * as_app_get_urls (AsApp *app);
Gets the URLs set for the application.
|
a AsApp instance. |
Returns : |
hash table of URLs. [transfer none] |
Since 0.1.0
GPtrArray * as_app_get_vetos (AsApp *app);
Gets the list of vetos.
|
A AsApp |
Returns : |
A list of vetos. [transfer none][element-type utf8] |
Since 0.2.5
const gchar * as_app_get_icon_path (AsApp *app);
Gets the application icon path.
|
a AsApp instance. |
Returns : |
string, or NULL if unset |
Since 0.1.0
const gchar * as_app_get_id_filename (AsApp *app);
Returns a filename which represents the applications ID, e.g. "gimp.desktop" becomes "gimp" and is used for cache directories.
|
a AsApp instance. |
Returns : |
A utf8 filename |
Since 0.3.0
const gchar * as_app_get_id (AsApp *app);
Gets the full ID value.
|
a AsApp instance. |
Returns : |
the ID, e.g. "org.gnome.Software.desktop" |
Since 0.1.0
const gchar * as_app_get_pkgname_default (AsApp *app);
Gets the default package name.
|
a AsApp instance. |
Returns : |
string, or NULL if unset |
Since 0.2.0
const gchar * as_app_get_source_pkgname (AsApp *app);
Gets the source package name that produced the binary package. Only source packages producing more than one binary package will have this entry set.
|
a AsApp instance. |
Returns : |
string, or NULL if unset |
Since 0.2.4
const gchar * as_app_get_origin (AsApp *app);
Gets the application origin.
|
a AsApp instance. |
Returns : |
the origin string, or NULL if unset |
Since 0.3.2
const gchar * as_app_get_project_group (AsApp *app);
Gets an application project group.
|
a AsApp instance. |
Returns : |
string, or NULL if unset |
Since 0.1.0
const gchar * as_app_get_project_license (AsApp *app);
Gets the application project license.
|
a AsApp instance. |
Returns : |
string, or NULL if unset |
Since 0.1.0
const gchar * as_app_get_metadata_license (AsApp *app);
Gets the application project license.
|
a AsApp instance. |
Returns : |
string, or NULL if unset |
Since 0.1.4
const gchar * as_app_get_update_contact (AsApp *app);
Gets the application upstream update contact email.
|
a AsApp instance. |
Returns : |
string, or NULL if unset |
Since 0.1.4
const gchar * as_app_get_source_file (AsApp *app);
Gets the source filename the instance was populated from.
NOTE: this is not set for AS_APP_SOURCE_KIND_APPSTREAM entries.
|
a AsApp instance. |
Returns : |
string, or NULL if unset |
Since 0.2.2
const gchar * as_app_get_name (AsApp *app,const gchar *locale);
Gets the application name for a specific locale.
|
a AsApp instance. |
|
the locale, or NULL. e.g. "en_GB" |
Returns : |
string, or NULL if unset |
Since 0.1.0
const gchar * as_app_get_comment (AsApp *app,const gchar *locale);
Gets the application summary for a specific locale.
|
a AsApp instance. |
|
the locale, or NULL. e.g. "en_GB" |
Returns : |
string, or NULL if unset |
Since 0.1.0
const gchar * as_app_get_developer_name (AsApp *app,const gchar *locale);
Gets the application developer name for a specific locale.
|
a AsApp instance. |
|
the locale, or NULL. e.g. "en_GB" |
Returns : |
string, or NULL if unset |
Since 0.1.8
const gchar * as_app_get_description (AsApp *app,const gchar *locale);
Gets the application description markup for a specific locale.
|
a AsApp instance. |
|
the locale, or NULL. e.g. "en_GB" |
Returns : |
string, or NULL if unset |
Since 0.1.0
gint as_app_get_priority (AsApp *app);
Gets the application priority. Larger values trump smaller values.
|
a AsApp instance. |
Returns : |
priority value |
Since 0.1.0
gint as_app_get_language (AsApp *app,const gchar *locale);
Gets the language coverage for the specific language.
|
a AsApp instance. |
|
the locale, or NULL. e.g. "en_GB" |
Returns : |
a percentage value where 0 is unspecified, or -1 for not found |
Since 0.1.0
const gchar * as_app_get_metadata_item (AsApp *app,const gchar *key);
Gets some metadata item.
|
a AsApp instance. |
|
the metadata key. |
Returns : |
string, or NULL if unset |
Since 0.1.0
const gchar * as_app_get_url_item (AsApp *app,AsUrlKind url_kind);
Gets a URL.
|
a AsApp instance. |
|
the URL kind, e.g. AS_URL_KIND_HOMEPAGE. |
Returns : |
string, or NULL if unset |
Since 0.1.0
gboolean as_app_has_category (AsApp *app,const gchar *category);
Searches the category list for a specific item.
|
a AsApp instance. |
|
a category string, e.g. "DesktopSettings" |
Returns : |
TRUE if the application has got the specified category |
Since 0.1.5
gboolean as_app_has_kudo (AsApp *app,const gchar *kudo);
Searches the kudo list for a specific item.
|
a AsApp instance. |
|
a kudo string, e.g. "SearchProvider" |
Returns : |
TRUE if the application has got the specified kudo |
Since 0.2.2
gboolean as_app_has_kudo_kind (AsApp *app,AsKudoKind kudo);
Searches the kudo list for a specific item.
|
a AsApp instance. |
|
a AsKudoKind, e.g. AS_KUDO_KIND_SEARCH_PROVIDER
|
Returns : |
TRUE if the application has got the specified kudo |
Since 0.2.2
gboolean as_app_has_permission (AsApp *app,const gchar *permission);
Searches the permission list for a specific item.
|
a AsApp instance. |
|
a permission string, e.g. "Network" |
Returns : |
TRUE if the application has got the specified permission |
Since 0.3.5
void as_app_set_id (AsApp *app,const gchar *id,gssize id_len);
Sets a new application ID. Any invalid characters will be automatically replaced.
|
a AsApp instance. |
|
the new _full_ application ID, e.g. "org.gnome.Software.desktop". |
|
the size of id, or -1 if NULL-terminated. |
Since 0.1.0
void as_app_set_id_kind (AsApp *app,AsIdKind id_kind);
Sets the application kind.
|
a AsApp instance. |
|
the AsIdKind. |
Since 0.1.0
void as_app_set_source_kind (AsApp *app,AsAppSourceKind source_kind);
Sets the source kind.
|
a AsApp instance. |
|
the AsAppSourceKind. |
Since 0.1.4
void as_app_set_state (AsApp *app,AsAppState state);
Sets the application state.
|
a AsApp instance. |
|
the AsAppState. |
Since 0.2.2
void as_app_set_trust_flags (AsApp *app,AsAppTrustFlags trust_flags);
Sets the check flags, where AS_APP_TRUST_FLAG_COMPLETE is completely
trusted input.
|
a AsApp instance. |
|
the AsAppSourceKind. |
Since 0.2.2
void as_app_set_origin (AsApp *app,const gchar *origin);
Sets the application origin.
|
a AsApp instance. |
|
the origin, e.g. "fedora-21" |
Since 0.3.2
void as_app_set_project_group (AsApp *app,const gchar *project_group,gssize project_group_len);
Set any project affiliation.
|
a AsApp instance. |
|
the project group, e.g. "GNOME". |
|
the size of project_group, or -1 if NULL-terminated. |
Since 0.1.0
void as_app_set_project_license (AsApp *app,const gchar *project_license,gssize project_license_len);
Set the project license.
|
a AsApp instance. |
|
the project license string. |
|
the size of project_license, or -1 if NULL-terminated. |
Since 0.1.0
void as_app_set_metadata_license (AsApp *app,const gchar *metadata_license,gssize metadata_license_len);
Set the project license.
|
a AsApp instance. |
|
the project license string. |
|
the size of metadata_license, or -1 if NULL-terminated. |
Since 0.1.4
void as_app_set_source_pkgname (AsApp *app,const gchar *source_pkgname,gssize source_pkgname_len);
Set the project license.
|
a AsApp instance. |
|
the project license string. |
|
the size of source_pkgname, or -1 if NULL-terminated. |
Since 0.2.4
void as_app_set_update_contact (AsApp *app,const gchar *update_contact,gssize update_contact_len);
Set the project license.
|
a AsApp instance. |
|
the project license string. |
|
the size of update_contact, or -1 if NULL-terminated. |
Since 0.1.4
void as_app_set_icon_path (AsApp *app,const gchar *icon_path,gssize icon_path_len);
Sets the icon path, where local icons would be found.
|
a AsApp instance. |
|
the local path. |
|
the size of icon_path, or -1 if NULL-terminated. |
Since 0.1.0
void as_app_set_name (AsApp *app,const gchar *locale,const gchar *name,gssize name_len);
Sets the application name for a specific locale.
|
a AsApp instance. |
|
the locale, or NULL. e.g. "en_GB" |
|
the application name. |
|
the size of name, or -1 if NULL-terminated. |
Since 0.1.0
void as_app_set_comment (AsApp *app,const gchar *locale,const gchar *comment,gssize comment_len);
Sets the application summary for a specific locale.
|
a AsApp instance. |
|
the locale, or NULL. e.g. "en_GB" |
|
the application summary. |
|
the size of comment, or -1 if NULL-terminated. |
Since 0.1.0
void as_app_set_developer_name (AsApp *app,const gchar *locale,const gchar *developer_name,gssize developer_name_len);
Sets the application developer name for a specific locale.
|
a AsApp instance. |
|
the locale, or NULL. e.g. "en_GB" |
|
the application developer name. |
|
the size of developer_name, or -1 if NULL-terminated. |
Since 0.1.0
void as_app_set_description (AsApp *app,const gchar *locale,const gchar *description,gssize description_len);
Sets the application descrption markup for a specific locale.
|
a AsApp instance. |
|
the locale, or NULL. e.g. "en_GB" |
|
the application description. |
|
the size of description, or -1 if NULL-terminated. |
Since 0.1.0
void as_app_set_source_file (AsApp *app,const gchar *source_file);
Set the file that the instance was sourced from.
|
a AsApp instance. |
|
the filename. |
Since 0.2.2
void as_app_set_priority (AsApp *app,gint priority);
Sets the application priority, where 0 is default and positive numbers are better than negative numbers.
|
a AsApp instance. |
|
the priority. |
Since 0.1.0
void as_app_add_category (AsApp *app,const gchar *category,gssize category_len);
Adds a menu category to the application.
|
a AsApp instance. |
|
the category. |
|
the size of category, or -1 if NULL-terminated. |
Since 0.1.0
void as_app_add_keyword (AsApp *app,const gchar *locale,const gchar *keyword,gssize keyword_len);
Add a keyword the application should match against.
|
a AsApp instance. |
|
the locale, or NULL. e.g. "en_GB" |
|
the keyword. |
|
the size of keyword, or -1 if NULL-terminated. |
Since 0.3.0
void as_app_add_kudo (AsApp *app,const gchar *kudo,gssize kudo_len);
Add a kudo the application has obtained.
|
a AsApp instance. |
|
the kudo. |
|
the size of kudo, or -1 if NULL-terminated. |
Since 0.2.2
void as_app_add_kudo_kind (AsApp *app,AsKudoKind kudo_kind);
Add a kudo the application has obtained.
|
a AsApp instance. |
|
the AsKudoKind. |
Since 0.2.2
void as_app_add_permission (AsApp *app,const gchar *permission,gssize permission_len);
Add a permission the application has obtained.
|
a AsApp instance. |
|
the permission. |
|
the size of permission, or -1 if NULL-terminated. |
Since 0.3.5
void as_app_add_mimetype (AsApp *app,const gchar *mimetype,gssize mimetype_len);
Adds a mimetype the application can process.
|
a AsApp instance. |
|
the mimetype. |
|
the size of mimetype, or -1 if NULL-terminated. |
Since 0.1.0
void as_app_add_pkgname (AsApp *app,const gchar *pkgname,gssize pkgname_len);
Adds a package name to an application.
|
a AsApp instance. |
|
the package name. |
|
the size of pkgname, or -1 if NULL-terminated. |
Since 0.1.0
void as_app_add_arch (AsApp *app,const gchar *arch,gssize arch_len);
Adds a package name to an application.
|
a AsApp instance. |
|
the package name. |
|
the size of arch, or -1 if NULL-terminated. |
Since 0.1.1
void as_app_add_release (AsApp *app,AsRelease *release);
Adds a release to an application.
|
a AsApp instance. |
|
a AsRelease instance. |
Since 0.1.0
void as_app_add_provide (AsApp *app,AsProvide *provide);
Adds a provide to an application.
|
a AsApp instance. |
|
a AsProvide instance. |
Since 0.1.6
void as_app_add_screenshot (AsApp *app,AsScreenshot *screenshot);
Adds a screenshot to an application.
|
a AsApp instance. |
|
a AsScreenshot instance. |
Since 0.1.0
void as_app_add_icon (AsApp *app,AsIcon *icon);
Adds a icon to an application.
|
a AsApp instance. |
|
a AsIcon instance. |
Since 0.3.1
void as_app_add_bundle (AsApp *app,AsBundle *bundle);
Adds a bundle to an application.
|
a AsApp instance. |
|
a AsBundle instance. |
Since 0.3.5
void as_app_add_language (AsApp *app,gint percentage,const gchar *locale,gssize locale_len);
Adds a language to the application.
|
a AsApp instance. |
|
the percentage completion of the translation, or 0 for unknown |
|
the locale, or NULL. e.g. "en_GB" |
|
the size of locale, or -1 if NULL-terminated. |
Since 0.1.0
void as_app_add_compulsory_for_desktop (AsApp *app,const gchar *compulsory_for_desktop,gssize compulsory_for_desktop_len);
Adds a desktop that requires this application to be installed.
|
a AsApp instance. |
|
the desktop string, e.g. "GNOME". |
|
the size of compulsory_for_desktop, or -1 if NULL-terminated. |
Since 0.1.0
void as_app_add_url (AsApp *app,AsUrlKind url_kind,const gchar *url,gssize url_len);
Adds some URL data to the application.
|
a AsApp instance. |
|
the URL kind, e.g. AS_URL_KIND_HOMEPAGE
|
|
the full URL. |
|
the size of url, or -1 if NULL-terminated. |
Since 0.1.0
void as_app_add_metadata (AsApp *app,const gchar *key,const gchar *value,gssize value_len);
Adds a metadata entry to the application.
|
a AsApp instance. |
|
the metadata key. |
|
the value to store. |
|
the size of value, or -1 if NULL-terminated. |
Since 0.1.0
void as_app_remove_metadata (AsApp *app,const gchar *key);
Removes a metadata item from the application.
|
a AsApp instance. |
|
the metadata key. |
Since 0.1.0
void as_app_add_addon (AsApp *app,AsApp *addon);
Adds a addon to an application.
|
a AsApp instance. |
|
a AsApp instance. |
Since 0.1.7
void as_app_add_extends (AsApp *app,const gchar *extends,gssize extends_len);
Adds a parent ID to the application.
|
a AsApp instance. |
|
the full ID, e.g. "eclipse.desktop". |
|
the size of extends, or -1 if NULL-terminated. |
Since 0.1.7
GPtrArray * as_app_validate (AsApp *app,AsAppValidateFlags flags,GError **error);
Validates data in the instance for style and consitency.
|
a AsApp instance. |
|
the AsAppValidateFlags to use, e.g. AS_APP_VALIDATE_FLAG_NONE
|
|
A GError or NULL. |
Returns : |
A list of problems, or NULL. [transfer container][element-type AsProblem]
|
Since 0.1.4
void as_app_subsume (AsApp *app,AsApp *donor);
Copies information from the donor to the application object.
|
a AsApp instance. |
|
the donor. |
Since 0.1.0
void as_app_subsume_full (AsApp *app,AsApp *donor,AsAppSubsumeFlags flags);
Copies information from the donor to the application object.
|
a AsApp instance. |
|
the donor. |
|
any optional flags, e.g. AS_APP_SUBSUME_FLAG_NO_OVERWRITE
|
Since 0.1.4
void as_app_add_veto (AsApp *app,const gchar *fmt,...);
Adds a reason to not include the application in the metadata.
|
A AsApp |
|
format string |
|
varargs |
Since 0.2.5
guint as_app_search_matches_all (AsApp *app,gchar **search);
Searches application data for all the specific keywords.
|
a AsApp instance. |
|
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 as_utils_search_tokenize() to populate
search as very short or common keywords will return a lot of matches. |
Since 0.1.3
guint as_app_search_matches (AsApp *app,const gchar *search);
Searches application data for a specific keyword.
|
a AsApp instance. |
|
the search term. |
Returns : |
a match scrore, where 0 is no match and 100 is the best match. |
Since 0.1.0
gboolean as_app_parse_file (AsApp *app,const gchar *filename,AsAppParseFlags flags,GError **error);
Parses a desktop or AppData file and populates the application state.
Applications that are not suitable for the store will have vetos added.
|
a AsApp instance. |
|
file to load. |
|
AsAppParseFlags, e.g. AS_APP_PARSE_FLAG_USE_HEURISTICS
|
|
A GError or NULL. |
Returns : |
TRUE for success |
Since 0.1.2
gboolean as_app_to_file (AsApp *app,GFile *file,GCancellable *cancellable,GError **error);
Exports a DOM tree to an XML file.
|
a AsApp instance. |
|
a GFile |
|
A GCancellable, or NULL
|
|
A GError or NULL
|
Returns : |
TRUE for success |
Since 0.2.0
AsIcon * as_app_get_icon_default (AsApp *app);
Finds the default icon.
|
A AsApp |
Returns : |
a AsIcon, or NULL. [transfer none]
|
Since 0.3.1
AsIcon * as_app_get_icon_for_size (AsApp *app,guint width,guint height);
Finds an icon of a specific size.
|
A AsApp |
|
Size in pixels |
|
Size in pixels |
Returns : |
a AsIcon, or NULL. [transfer none]
|
Since 0.3.1
AsBundle * as_app_get_bundle_default (AsApp *app);
Finds the default bundle.
|
A AsApp |
Returns : |
a AsBundle, or NULL. [transfer none]
|
Since 0.3.5
AsRelease * as_app_get_release (AsApp *app,const gchar *version);
Gets a specific release from the application.
|
a AsApp instance. |
|
a version string |
Returns : |
a release, or NULL. [transfer none]
|
Since 0.3.5
AsRelease * as_app_get_release_default (AsApp *app);
Gets the default (newest) release from the application.
|
a AsApp instance. |
Returns : |
a release, or NULL. [transfer none]
|
Since 0.3.5
gboolean as_app_convert_icons (AsApp *app,AsIconKind kind,GError **error);
Converts all the icons in the application to a specific kind.
|
A AsApp. |
|
the AsIconKind, e.g. AS_ICON_KIND_EMBEDDED. |
|
A GError or NULL
|
Returns : |
TRUE for success |
Since 0.3.1