summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-app.h
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-02-26 14:29:14 +0000
committerRichard Hughes <richard@hughsie.com>2016-02-26 14:45:57 +0000
commite80e47382780c366c0801315dddfb66ae7252fdb (patch)
tree5b4412a2a857df6796a3179f6cb05f8d598436ee /libappstream-glib/as-app.h
parent21473242f967514558f3b603ed1dd3ee65e58afd (diff)
downloadappstream-glib-e80e47382780c366c0801315dddfb66ae7252fdb.tar.gz
Add AsAppQuirk
This allows us to get rid of several boolean fields in UI software.
Diffstat (limited to 'libappstream-glib/as-app.h')
-rw-r--r--libappstream-glib/as-app.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/libappstream-glib/as-app.h b/libappstream-glib/as-app.h
index 3ce1d01..3c1987e 100644
--- a/libappstream-glib/as-app.h
+++ b/libappstream-glib/as-app.h
@@ -208,6 +208,22 @@ typedef enum {
} AsAppKind;
/**
+ * AsAppQuirk:
+ * @AS_APP_QUIRK_NONE: No special attributes
+ * @AS_APP_QUIRK_PROVENANCE: Installed by OS vendor
+ * @AS_APP_QUIRK_COMPULSORY: Cannot be removed
+ *
+ * The component attributes.
+ **/
+typedef enum {
+ AS_APP_QUIRK_NONE = 0, /* Since: 0.5.10 */
+ AS_APP_QUIRK_PROVENANCE = 1 << 0, /* Since: 0.5.10 */
+ AS_APP_QUIRK_COMPULSORY = 1 << 1, /* Since: 0.5.10 */
+ /*< private >*/
+ AS_APP_QUIRK_LAST
+} AsAppQuirk;
+
+/**
* AsAppState:
* @AS_APP_STATE_UNKNOWN: Unknown state
* @AS_APP_STATE_INSTALLED: Application is installed
@@ -312,6 +328,8 @@ gboolean as_app_has_kudo_kind (AsApp *app,
AsKudoKind kudo);
gboolean as_app_has_permission (AsApp *app,
const gchar *permission);
+gboolean as_app_has_quirk (AsApp *app,
+ AsAppQuirk quirk);
/* setters */
void as_app_set_id (AsApp *app,
@@ -400,6 +418,8 @@ void as_app_add_addon (AsApp *app,
AsApp *addon);
void as_app_add_extends (AsApp *app,
const gchar *extends);
+void as_app_add_quirk (AsApp *app,
+ AsAppQuirk quirk);
/* object methods */
GPtrArray *as_app_validate (AsApp *app,