AsApp

AsApp — An object for an AppStream application or add-on

Stability Level

Stable, unless otherwise indicated

Synopsis

#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);
AsIconKind          as_app_get_icon_kind                (AsApp *app);
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);
GPtrArray *         as_app_get_kudos                    (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);
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                     (AsApp *app);
const gchar *       as_app_get_icon_path                (AsApp *app);
const gchar *       as_app_get_id                       (AsApp *app);
const gchar *       as_app_get_id_full                  (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_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);
void                as_app_set_id_full                  (AsApp *app,
                                                         const gchar *id_full,
                                                         gssize id_full_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_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                     (AsApp *app,
                                                         const gchar *icon,
                                                         gssize icon_len);
void                as_app_set_icon_path                (AsApp *app,
                                                         const gchar *icon_path,
                                                         gssize icon_path_len);
void                as_app_set_icon_kind                (AsApp *app,
                                                         AsIconKind icon_kind);
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 *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_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_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);

Description

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

Details

enum AsAppParseFlags

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.

AS_APP_PARSE_FLAG_NONE

No special actions to use

AS_APP_PARSE_FLAG_USE_HEURISTICS

Use heuristic to infer properties

AS_APP_PARSE_FLAG_KEEP_COMMENTS

Save comments from the file

AS_APP_PARSE_FLAG_CONVERT_TRANSLATABLE

Allow translatable flags like <_p>

AS_APP_PARSE_FLAG_APPEND_DATA

Append new data rather than replacing

AS_APP_PARSE_FLAG_ALLOW_VETO

Do not return errors for vetoed apps

enum AsAppSubsumeFlags

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.

AS_APP_SUBSUME_FLAG_NONE

No special actions to use

AS_APP_SUBSUME_FLAG_NO_OVERWRITE

Do not overwrite already set properties

AS_APP_SUBSUME_FLAG_BOTH_WAYS

Copy unset properties both ways

AS_APP_SUBSUME_FLAG_PARTIAL

Only subsume a safe subset

enum AsAppError

typedef enum {
	AS_APP_ERROR_FAILED,
	AS_APP_ERROR_INVALID_TYPE,
} AsAppError;

The error type.

AS_APP_ERROR_FAILED

Generic failure

AS_APP_ERROR_INVALID_TYPE

Invalid type

enum AsAppValidateFlags

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 */
} AsAppValidateFlags;

The flags to use when validating.

AS_APP_VALIDATE_FLAG_NONE

No extra flags to use

AS_APP_VALIDATE_FLAG_RELAX

Relax the checks

AS_APP_VALIDATE_FLAG_STRICT

Make the checks more strict

AS_APP_VALIDATE_FLAG_NO_NETWORK

Do not use the network

enum AsAppTrustFlags

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.

AS_APP_TRUST_FLAG_COMPLETE

Trusted data with no validation

AS_APP_TRUST_FLAG_CHECK_DUPLICATES

Check for duplicates

AS_APP_TRUST_FLAG_CHECK_VALID_UTF8

Check for valid UTF-8

enum AsAppSourceKind

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 */
} AsAppSourceKind;

The source kind.

AS_APP_SOURCE_KIND_UNKNOWN

Not sourced from a file

AS_APP_SOURCE_KIND_APPSTREAM

Sourced from a AppStream file

AS_APP_SOURCE_KIND_DESKTOP

Sourced from a desktop file

AS_APP_SOURCE_KIND_APPDATA

Sourced from a AppData file

AS_APP_SOURCE_KIND_METAINFO

Sourced from a MetaInfo file

enum AsAppState

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.

AS_APP_STATE_UNKNOWN

Unknown state

AS_APP_STATE_INSTALLED

Application is installed

AS_APP_STATE_AVAILABLE

Application is available

AS_APP_STATE_AVAILABLE_LOCAL

Application is locally available as a file

AS_APP_STATE_UPDATABLE

Application is installed and updatable

AS_APP_STATE_UNAVAILABLE

Application is referenced, but not available

AS_APP_STATE_QUEUED_FOR_INSTALL

Application is queued for install

AS_APP_STATE_INSTALLING

Application is being installed

AS_APP_STATE_REMOVING

Application is being removed

AS_APP_ERROR

#define AS_APP_ERROR				as_app_error_quark ()


as_app_new ()

AsApp *             as_app_new                          (void);

Creates a new AsApp.

Returns :

a AsApp. [transfer full]

Since 0.1.0


as_app_error_quark ()

GQuark              as_app_error_quark                  (void);

Returns :

An error quark.

Since 0.1.2


as_app_guess_source_kind ()

AsAppSourceKind     as_app_guess_source_kind            (const gchar *filename);

Guesses the source kind based from the filename.

filename :

a file name

Returns :

A AsAppSourceKind, e.g. AS_APP_SOURCE_KIND_APPSTREAM.

Since 0.1.8


as_app_source_kind_from_string ()

AsAppSourceKind     as_app_source_kind_from_string      (const gchar *source_kind);

Converts the text representation to an enumerated value.

source_kind :

a source kind string

Returns :

A AsAppSourceKind, e.g. AS_APP_SOURCE_KIND_APPSTREAM.

Since 0.2.2


as_app_source_kind_to_string ()

const gchar *       as_app_source_kind_to_string        (AsAppSourceKind source_kind);

Converts the enumerated value to an text representation.

source_kind :

the AsAppSourceKind.

Returns :

string version of source_kind, or NULL for unknown

Since 0.2.2


as_app_state_to_string ()

const gchar *       as_app_state_to_string              (AsAppState state);

Converts the enumerated value to an text representation.

state :

the AsAppState.

Returns :

string version of state, or NULL for unknown

Since 0.2.2


as_app_get_icon_kind ()

AsIconKind          as_app_get_icon_kind                (AsApp *app);

Gets the icon kind.

app :

a AsApp instance.

Returns :

enumerated value

Since 0.1.0


as_app_get_id_kind ()

AsIdKind            as_app_get_id_kind                  (AsApp *app);

Gets the ID kind.

app :

a AsApp instance.

Returns :

enumerated value

Since 0.1.0


as_app_get_source_kind ()

AsAppSourceKind     as_app_get_source_kind              (AsApp *app);

Gets the source kind, i.e. where the AsApp came from.

app :

a AsApp instance.

Returns :

enumerated value

Since 0.1.4


as_app_get_state ()

AsAppState          as_app_get_state                    (AsApp *app);

Gets the application state.

app :

a AsApp instance.

Returns :

enumerated value

Since 0.2.2


as_app_get_trust_flags ()

AsAppTrustFlags     as_app_get_trust_flags              (AsApp *app);

Gets the trust flags, i.e. how trusted the incoming data is.

app :

a AsApp instance.

Returns :

bitfield

Since 0.2.2


as_app_get_languages ()

GList *             as_app_get_languages                (AsApp *app);

Get a list of all languages.

app :

a AsApp instance.

Returns :

list of language values. [transfer container][element-type utf8]

Since 0.1.0


as_app_get_addons ()

GPtrArray *         as_app_get_addons                   (AsApp *app);

Gets all the addons the application has.

app :

a AsApp instance.

Returns :

an array. [element-type AsApp][transfer none]

Since 0.1.7


as_app_get_categories ()

GPtrArray *         as_app_get_categories               (AsApp *app);

Get the application categories.

app :

a AsApp instance.

Returns :

an array. [element-type utf8][transfer none]

Since 0.1.0


as_app_get_compulsory_for_desktops ()

GPtrArray *         as_app_get_compulsory_for_desktops  (AsApp *app);

Returns the desktops where this application is compulsory.

app :

a AsApp instance.

Returns :

an array. [element-type utf8][transfer none]

Since 0.1.0


as_app_get_extends ()

GPtrArray *         as_app_get_extends                  (AsApp *app);

Gets the IDs that are extended from the addon.

app :

a AsApp instance.

Returns :

an array. [element-type utf8][transfer none]

Since 0.1.7


as_app_get_keywords ()

GPtrArray *         as_app_get_keywords                 (AsApp *app);

Gets any keywords the application should match against.

app :

a AsApp instance.

Returns :

an array. [element-type utf8][transfer none]

Since 0.1.0


as_app_get_kudos ()

GPtrArray *         as_app_get_kudos                    (AsApp *app);

Gets any kudos the application has obtained.

app :

a AsApp instance.

Returns :

an array. [element-type utf8][transfer none]

Since 0.2.2


as_app_get_mimetypes ()

GPtrArray *         as_app_get_mimetypes                (AsApp *app);

Gets any mimetypes the application will register.

app :

a AsApp instance.

Returns :

an array. [transfer none][element-type utf8]

Since 0.2.0


as_app_get_pkgnames ()

GPtrArray *         as_app_get_pkgnames                 (AsApp *app);

Gets the package names (if any) for the application.

app :

a AsApp instance.

Returns :

an array. [element-type utf8][transfer none]

Since 0.1.0


as_app_get_architectures ()

GPtrArray *         as_app_get_architectures            (AsApp *app);

Gets the supported architectures for the application, or an empty list if all architectures are supported.

app :

a AsApp instance.

Returns :

an array. [element-type utf8][transfer none]

Since 0.1.1


as_app_get_releases ()

GPtrArray *         as_app_get_releases                 (AsApp *app);

Gets all the releases the application has had.

app :

a AsApp instance.

Returns :

an array. [element-type AsRelease][transfer none]

Since 0.1.0


as_app_get_provides ()

GPtrArray *         as_app_get_provides                 (AsApp *app);

Gets all the provides the application has.

app :

a AsApp instance.

Returns :

an array. [element-type AsProvide][transfer none]

Since 0.1.6


as_app_get_screenshots ()

GPtrArray *         as_app_get_screenshots              (AsApp *app);

Gets any screenshots the application has defined.

app :

a AsApp instance.

Returns :

an array. [element-type AsScreenshot][transfer none]

Since 0.1.0


as_app_get_names ()

GHashTable *        as_app_get_names                    (AsApp *app);

Gets the names set for the application.

app :

a AsApp instance.

Returns :

hash table of names. [transfer none]

Since 0.1.6


as_app_get_comments ()

GHashTable *        as_app_get_comments                 (AsApp *app);

Gets the comments set for the application.

app :

a AsApp instance.

Returns :

hash table of comments. [transfer none]

Since 0.1.6


as_app_get_developer_names ()

GHashTable *        as_app_get_developer_names          (AsApp *app);

Gets the developer_names set for the application.

app :

a AsApp instance.

Returns :

hash table of developer_names. [transfer none]

Since 0.1.8


as_app_get_metadata ()

GHashTable *        as_app_get_metadata                 (AsApp *app);

Gets the metadata set for the application.

app :

a AsApp instance.

Returns :

hash table of metadata. [transfer none]

Since 0.1.6


as_app_get_descriptions ()

GHashTable *        as_app_get_descriptions             (AsApp *app);

Gets the descriptions set for the application.

app :

a AsApp instance.

Returns :

hash table of descriptions. [transfer none]

Since 0.1.6


as_app_get_urls ()

GHashTable *        as_app_get_urls                     (AsApp *app);

Gets the URLs set for the application.

app :

a AsApp instance.

Returns :

hash table of URLs. [transfer none]

Since 0.1.0


as_app_get_vetos ()

GPtrArray *         as_app_get_vetos                    (AsApp *app);

Gets the list of vetos.

app :

A AsApp

Returns :

A list of vetos. [transfer none][element-type utf8]

Since 0.2.5


as_app_get_icon ()

const gchar *       as_app_get_icon                     (AsApp *app);

Gets the application icon. Use as_app_get_icon_path() if you need the create a full filename.

app :

a AsApp instance.

Returns :

string, or NULL if unset

Since 0.1.0


as_app_get_icon_path ()

const gchar *       as_app_get_icon_path                (AsApp *app);

Gets the application icon path.

app :

a AsApp instance.

Returns :

string, or NULL if unset

Since 0.1.0


as_app_get_id ()

const gchar *       as_app_get_id                       (AsApp *app);

Returns the short version of the ID.

app :

a AsApp instance.

Returns :

the short ID, e.g. "org.gnome.Software"

Since 0.1.0


as_app_get_id_full ()

const gchar *       as_app_get_id_full                  (AsApp *app);

Gets the full ID value.

app :

a AsApp instance.

Returns :

the ID, e.g. "org.gnome.Software.desktop"

Since 0.1.0


as_app_get_pkgname_default ()

const gchar *       as_app_get_pkgname_default          (AsApp *app);

Gets the default package name.

app :

a AsApp instance.

Returns :

string, or NULL if unset

Since 0.2.0


as_app_get_source_pkgname ()

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.

app :

a AsApp instance.

Returns :

string, or NULL if unset

Since 0.2.4


as_app_get_project_group ()

const gchar *       as_app_get_project_group            (AsApp *app);

Gets an application project group.

app :

a AsApp instance.

Returns :

string, or NULL if unset

Since 0.1.0


as_app_get_project_license ()

const gchar *       as_app_get_project_license          (AsApp *app);

Gets the application project license.

app :

a AsApp instance.

Returns :

string, or NULL if unset

Since 0.1.0


as_app_get_metadata_license ()

const gchar *       as_app_get_metadata_license         (AsApp *app);

Gets the application project license.

app :

a AsApp instance.

Returns :

string, or NULL if unset

Since 0.1.4


as_app_get_update_contact ()

const gchar *       as_app_get_update_contact           (AsApp *app);

Gets the application upstream update contact email.

app :

a AsApp instance.

Returns :

string, or NULL if unset

Since 0.1.4


as_app_get_source_file ()

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.

app :

a AsApp instance.

Returns :

string, or NULL if unset

Since 0.2.2


as_app_get_name ()

const gchar *       as_app_get_name                     (AsApp *app,
                                                         const gchar *locale);

Gets the application name for a specific locale.

app :

a AsApp instance.

locale :

the locale, or NULL. e.g. "en_GB"

Returns :

string, or NULL if unset

Since 0.1.0


as_app_get_comment ()

const gchar *       as_app_get_comment                  (AsApp *app,
                                                         const gchar *locale);

Gets the application summary for a specific locale.

app :

a AsApp instance.

locale :

the locale, or NULL. e.g. "en_GB"

Returns :

string, or NULL if unset

Since 0.1.0


as_app_get_developer_name ()

const gchar *       as_app_get_developer_name           (AsApp *app,
                                                         const gchar *locale);

Gets the application developer name for a specific locale.

app :

a AsApp instance.

locale :

the locale, or NULL. e.g. "en_GB"

Returns :

string, or NULL if unset

Since 0.1.8


as_app_get_description ()

const gchar *       as_app_get_description              (AsApp *app,
                                                         const gchar *locale);

Gets the application description markup for a specific locale.

app :

a AsApp instance.

locale :

the locale, or NULL. e.g. "en_GB"

Returns :

string, or NULL if unset

Since 0.1.0


as_app_get_priority ()

gint                as_app_get_priority                 (AsApp *app);

Gets the application priority. Larger values trump smaller values.

app :

a AsApp instance.

Returns :

priority value

Since 0.1.0


as_app_get_language ()

gint                as_app_get_language                 (AsApp *app,
                                                         const gchar *locale);

Gets the language coverage for the specific language.

app :

a AsApp instance.

locale :

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


as_app_get_metadata_item ()

const gchar *       as_app_get_metadata_item            (AsApp *app,
                                                         const gchar *key);

Gets some metadata item.

app :

a AsApp instance.

key :

the metadata key.

Returns :

string, or NULL if unset

Since 0.1.0


as_app_get_url_item ()

const gchar *       as_app_get_url_item                 (AsApp *app,
                                                         AsUrlKind url_kind);

Gets a URL.

app :

a AsApp instance.

url_kind :

the URL kind, e.g. AS_URL_KIND_HOMEPAGE.

Returns :

string, or NULL if unset

Since 0.1.0


as_app_has_category ()

gboolean            as_app_has_category                 (AsApp *app,
                                                         const gchar *category);

Searches the category list for a specific item.

app :

a AsApp instance.

category :

a category string, e.g. "DesktopSettings"

Returns :

TRUE if the application has got the specified category

Since 0.1.5


as_app_has_kudo ()

gboolean            as_app_has_kudo                     (AsApp *app,
                                                         const gchar *kudo);

Searches the kudo list for a specific item.

app :

a AsApp instance.

kudo :

a kudo string, e.g. "SearchProvider"

Returns :

TRUE if the application has got the specified kudo

Since 0.2.2


as_app_has_kudo_kind ()

gboolean            as_app_has_kudo_kind                (AsApp *app,
                                                         AsKudoKind kudo);

Searches the kudo list for a specific item.

app :

a AsApp instance.

kudo :

a AsKudoKind, e.g. AS_KUDO_KIND_SEARCH_PROVIDER

Returns :

TRUE if the application has got the specified kudo

Since 0.2.2


as_app_set_id_full ()

void                as_app_set_id_full                  (AsApp *app,
                                                         const gchar *id_full,
                                                         gssize id_full_len);

Sets a new application ID. Any invalid characters will be automatically replaced.

app :

a AsApp instance.

id_full :

the new _full_ application ID, e.g. "org.gnome.Software.desktop".

id_full_len :

the size of id_full, or -1 if NULL-terminated.

Since 0.1.0


as_app_set_id_kind ()

void                as_app_set_id_kind                  (AsApp *app,
                                                         AsIdKind id_kind);

Sets the application kind.

app :

a AsApp instance.

id_kind :

the AsIdKind.

Since 0.1.0


as_app_set_source_kind ()

void                as_app_set_source_kind              (AsApp *app,
                                                         AsAppSourceKind source_kind);

Sets the source kind.

app :

a AsApp instance.

source_kind :

the AsAppSourceKind.

Since 0.1.4


as_app_set_state ()

void                as_app_set_state                    (AsApp *app,
                                                         AsAppState state);

Sets the application state.

app :

a AsApp instance.

state :

the AsAppState.

Since 0.2.2


as_app_set_trust_flags ()

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.

app :

a AsApp instance.

trust_flags :

the AsAppSourceKind.

Since 0.2.2


as_app_set_project_group ()

void                as_app_set_project_group            (AsApp *app,
                                                         const gchar *project_group,
                                                         gssize project_group_len);

Set any project affiliation.

app :

a AsApp instance.

project_group :

the project group, e.g. "GNOME".

project_group_len :

the size of project_group, or -1 if NULL-terminated.

Since 0.1.0


as_app_set_project_license ()

void                as_app_set_project_license          (AsApp *app,
                                                         const gchar *project_license,
                                                         gssize project_license_len);

Set the project license.

app :

a AsApp instance.

project_license :

the project license string.

project_license_len :

the size of project_license, or -1 if NULL-terminated.

Since 0.1.0


as_app_set_metadata_license ()

void                as_app_set_metadata_license         (AsApp *app,
                                                         const gchar *metadata_license,
                                                         gssize metadata_license_len);

Set the project license.

app :

a AsApp instance.

metadata_license :

the project license string.

metadata_license_len :

the size of metadata_license, or -1 if NULL-terminated.

Since 0.1.4


as_app_set_source_pkgname ()

void                as_app_set_source_pkgname           (AsApp *app,
                                                         const gchar *source_pkgname,
                                                         gssize source_pkgname_len);

Set the project license.

app :

a AsApp instance.

source_pkgname :

the project license string.

source_pkgname_len :

the size of source_pkgname, or -1 if NULL-terminated.

Since 0.2.4


as_app_set_update_contact ()

void                as_app_set_update_contact           (AsApp *app,
                                                         const gchar *update_contact,
                                                         gssize update_contact_len);

Set the project license.

app :

a AsApp instance.

update_contact :

the project license string.

update_contact_len :

the size of update_contact, or -1 if NULL-terminated.

Since 0.1.4


as_app_set_icon ()

void                as_app_set_icon                     (AsApp *app,
                                                         const gchar *icon,
                                                         gssize icon_len);

Set the application icon.

app :

a AsApp instance.

icon :

the icon filename or URL.

icon_len :

the size of icon, or -1 if NULL-terminated.

Since 0.1.0


as_app_set_icon_path ()

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.

app :

a AsApp instance.

icon_path :

the local path.

icon_path_len :

the size of icon_path, or -1 if NULL-terminated.

Since 0.1.0


as_app_set_icon_kind ()

void                as_app_set_icon_kind                (AsApp *app,
                                                         AsIconKind icon_kind);

Sets the icon kind.

app :

a AsApp instance.

icon_kind :

the AsIconKind.

Since 0.1.0


as_app_set_name ()

void                as_app_set_name                     (AsApp *app,
                                                         const gchar *locale,
                                                         const gchar *name,
                                                         gssize name_len);

Sets the application name for a specific locale.

app :

a AsApp instance.

locale :

the locale, or NULL. e.g. "en_GB"

name :

the application name.

name_len :

the size of name, or -1 if NULL-terminated.

Since 0.1.0


as_app_set_comment ()

void                as_app_set_comment                  (AsApp *app,
                                                         const gchar *locale,
                                                         const gchar *comment,
                                                         gssize comment_len);

Sets the application summary for a specific locale.

app :

a AsApp instance.

locale :

the locale, or NULL. e.g. "en_GB"

comment :

the application summary.

comment_len :

the size of comment, or -1 if NULL-terminated.

Since 0.1.0


as_app_set_developer_name ()

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.

app :

a AsApp instance.

locale :

the locale, or NULL. e.g. "en_GB"

developer_name :

the application developer name.

developer_name_len :

the size of developer_name, or -1 if NULL-terminated.

Since 0.1.0


as_app_set_description ()

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.

app :

a AsApp instance.

locale :

the locale, or NULL. e.g. "en_GB"

description :

the application description.

description_len :

the size of description, or -1 if NULL-terminated.

Since 0.1.0


as_app_set_source_file ()

void                as_app_set_source_file              (AsApp *app,
                                                         const gchar *source_file);

Set the file that the instance was sourced from.

app :

a AsApp instance.

source_file :

the filename.

Since 0.2.2


as_app_set_priority ()

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.

app :

a AsApp instance.

priority :

the priority.

Since 0.1.0


as_app_add_category ()

void                as_app_add_category                 (AsApp *app,
                                                         const gchar *category,
                                                         gssize category_len);

Adds a menu category to the application.

app :

a AsApp instance.

category :

the category.

category_len :

the size of category, or -1 if NULL-terminated.

Since 0.1.0


as_app_add_keyword ()

void                as_app_add_keyword                  (AsApp *app,
                                                         const gchar *keyword,
                                                         gssize keyword_len);

Add a keyword the application should match against.

app :

a AsApp instance.

keyword :

the keyword.

keyword_len :

the size of keyword, or -1 if NULL-terminated.

Since 0.1.0


as_app_add_kudo ()

void                as_app_add_kudo                     (AsApp *app,
                                                         const gchar *kudo,
                                                         gssize kudo_len);

Add a kudo the application has obtained.

app :

a AsApp instance.

kudo :

the kudo.

kudo_len :

the size of kudo, or -1 if NULL-terminated.

Since 0.2.2


as_app_add_kudo_kind ()

void                as_app_add_kudo_kind                (AsApp *app,
                                                         AsKudoKind kudo_kind);

Add a kudo the application has obtained.

app :

a AsApp instance.

kudo_kind :

the AsKudoKind.

Since 0.2.2


as_app_add_mimetype ()

void                as_app_add_mimetype                 (AsApp *app,
                                                         const gchar *mimetype,
                                                         gssize mimetype_len);

Adds a mimetype the application can process.

app :

a AsApp instance.

mimetype :

the mimetype.

mimetype_len :

the size of mimetype, or -1 if NULL-terminated.

Since 0.1.0


as_app_add_pkgname ()

void                as_app_add_pkgname                  (AsApp *app,
                                                         const gchar *pkgname,
                                                         gssize pkgname_len);

Adds a package name to an application.

app :

a AsApp instance.

pkgname :

the package name.

pkgname_len :

the size of pkgname, or -1 if NULL-terminated.

Since 0.1.0


as_app_add_arch ()

void                as_app_add_arch                     (AsApp *app,
                                                         const gchar *arch,
                                                         gssize arch_len);

Adds a package name to an application.

app :

a AsApp instance.

arch :

the package name.

arch_len :

the size of arch, or -1 if NULL-terminated.

Since 0.1.1


as_app_add_release ()

void                as_app_add_release                  (AsApp *app,
                                                         AsRelease *release);

Adds a release to an application.

app :

a AsApp instance.

release :

a AsRelease instance.

Since 0.1.0


as_app_add_provide ()

void                as_app_add_provide                  (AsApp *app,
                                                         AsProvide *provide);

Adds a provide to an application.

app :

a AsApp instance.

provide :

a AsProvide instance.

Since 0.1.6


as_app_add_screenshot ()

void                as_app_add_screenshot               (AsApp *app,
                                                         AsScreenshot *screenshot);

Adds a screenshot to an application.

app :

a AsApp instance.

screenshot :

a AsScreenshot instance.

Since 0.1.0


as_app_add_language ()

void                as_app_add_language                 (AsApp *app,
                                                         gint percentage,
                                                         const gchar *locale,
                                                         gssize locale_len);

Adds a language to the application.

app :

a AsApp instance.

percentage :

the percentage completion of the translation, or 0 for unknown

locale :

the locale, or NULL. e.g. "en_GB"

locale_len :

the size of locale, or -1 if NULL-terminated.

Since 0.1.0


as_app_add_compulsory_for_desktop ()

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.

app :

a AsApp instance.

compulsory_for_desktop :

the desktop string, e.g. "GNOME".

compulsory_for_desktop_len :

the size of compulsory_for_desktop, or -1 if NULL-terminated.

Since 0.1.0


as_app_add_url ()

void                as_app_add_url                      (AsApp *app,
                                                         AsUrlKind url_kind,
                                                         const gchar *url,
                                                         gssize url_len);

Adds some URL data to the application.

app :

a AsApp instance.

url_kind :

the URL kind, e.g. AS_URL_KIND_HOMEPAGE

url :

the full URL.

url_len :

the size of url, or -1 if NULL-terminated.

Since 0.1.0


as_app_add_metadata ()

void                as_app_add_metadata                 (AsApp *app,
                                                         const gchar *key,
                                                         const gchar *value,
                                                         gssize value_len);

Adds a metadata entry to the application.

app :

a AsApp instance.

key :

the metadata key.

value :

the value to store.

value_len :

the size of value, or -1 if NULL-terminated.

Since 0.1.0


as_app_remove_metadata ()

void                as_app_remove_metadata              (AsApp *app,
                                                         const gchar *key);

Removes a metadata item from the application.

app :

a AsApp instance.

key :

the metadata key.

Since 0.1.0


as_app_add_addon ()

void                as_app_add_addon                    (AsApp *app,
                                                         AsApp *addon);

Adds a addon to an application.

app :

a AsApp instance.

addon :

a AsApp instance.

Since 0.1.7


as_app_add_extends ()

void                as_app_add_extends                  (AsApp *app,
                                                         const gchar *extends,
                                                         gssize extends_len);

Adds a parent ID to the application.

app :

a AsApp instance.

extends :

the full ID, e.g. "eclipse.desktop".

extends_len :

the size of extends, or -1 if NULL-terminated.

Since 0.1.7


as_app_validate ()

GPtrArray *         as_app_validate                     (AsApp *app,
                                                         AsAppValidateFlags flags,
                                                         GError **error);

Validates data in the instance for style and consitency.

app :

a AsApp instance.

flags :

the AsAppValidateFlags to use, e.g. AS_APP_VALIDATE_FLAG_NONE

error :

A GError or NULL.

Returns :

A list of problems, or NULL. [transfer container][element-type AsProblem]

Since 0.1.4


as_app_subsume ()

void                as_app_subsume                      (AsApp *app,
                                                         AsApp *donor);

Copies information from the donor to the application object.

app :

a AsApp instance.

donor :

the donor.

Since 0.1.0


as_app_subsume_full ()

void                as_app_subsume_full                 (AsApp *app,
                                                         AsApp *donor,
                                                         AsAppSubsumeFlags flags);

Copies information from the donor to the application object.

app :

a AsApp instance.

donor :

the donor.

flags :

any optional flags, e.g. AS_APP_SUBSUME_FLAG_NO_OVERWRITE

Since 0.1.4


as_app_add_veto ()

void                as_app_add_veto                     (AsApp *app,
                                                         const gchar *fmt,
                                                         ...);

Adds a reason to not include the application in the metadata.

app :

A AsApp

fmt :

format string

... :

varargs

Since 0.2.5


as_app_search_matches_all ()

guint               as_app_search_matches_all           (AsApp *app,
                                                         gchar **search);

Searches application data for all the specific keywords.

app :

a AsApp instance.

search :

the search terms.

Returns :

a match scrore, where 0 is no match and larger numbers are better matches.

Since 0.1.3


as_app_search_matches ()

guint               as_app_search_matches               (AsApp *app,
                                                         const gchar *search);

Searches application data for a specific keyword.

app :

a AsApp instance.

search :

the search term.

Returns :

a match scrore, where 0 is no match and 100 is the best match.

Since 0.1.0


as_app_parse_file ()

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.

app :

a AsApp instance.

filename :

file to load.

flags :

AsAppParseFlags, e.g. AS_APP_PARSE_FLAG_USE_HEURISTICS

error :

A GError or NULL.

Returns :

TRUE for success

Since 0.1.2


as_app_to_file ()

gboolean            as_app_to_file                      (AsApp *app,
                                                         GFile *file,
                                                         GCancellable *cancellable,
                                                         GError **error);

Exports a DOM tree to an XML file.

app :

a AsApp instance.

file :

a GFile

cancellable :

A GCancellable, or NULL

error :

A GError or NULL

Returns :

TRUE for success

Since 0.2.0