summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-02-25 20:59:37 +0000
committerRichard Hughes <richard@hughsie.com>2016-02-25 20:59:37 +0000
commit73d59b33b4896a72022f05e260236c41174d4b55 (patch)
treec680aad0a3501a6bc1d2d7c873b46cfbc5c56f0e
parentdb239198f49842d03bde09340ac8442ccbcb7da0 (diff)
downloadappstream-glib-73d59b33b4896a72022f05e260236c41174d4b55.tar.gz
Add AS_APP_KIND_DISTRO_UPGRADE
-rw-r--r--client/as-util.c1
-rw-r--r--libappstream-glib/as-app.c4
-rw-r--r--libappstream-glib/as-app.h2
3 files changed, 7 insertions, 0 deletions
diff --git a/client/as-util.c b/client/as-util.c
index 95243f9..5a255b9 100644
--- a/client/as-util.c
+++ b/client/as-util.c
@@ -2814,6 +2814,7 @@ as_util_check_root_app_icon (AsApp *app, GError **error)
case AS_APP_KIND_CODEC:
case AS_APP_KIND_RUNTIME:
case AS_APP_KIND_GENERIC:
+ case AS_APP_KIND_DISTRO_UPGRADE:
return TRUE;
default:
break;
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c
index 63112f6..cf65ec3 100644
--- a/libappstream-glib/as-app.c
+++ b/libappstream-glib/as-app.c
@@ -158,6 +158,8 @@ as_app_kind_to_string (AsAppKind kind)
return "runtime";
if (kind == AS_APP_KIND_GENERIC)
return "generic";
+ if (kind == AS_APP_KIND_DISTRO_UPGRADE)
+ return "distro-upgrade";
return "unknown";
}
@@ -194,6 +196,8 @@ as_app_kind_from_string (const gchar *kind)
return AS_APP_KIND_RUNTIME;
if (g_strcmp0 (kind, "generic") == 0)
return AS_APP_KIND_GENERIC;
+ if (g_strcmp0 (kind, "distro-upgrade") == 0)
+ return AS_APP_KIND_DISTRO_UPGRADE;
return AS_APP_KIND_UNKNOWN;
}
diff --git a/libappstream-glib/as-app.h b/libappstream-glib/as-app.h
index bd62de8..90133d8 100644
--- a/libappstream-glib/as-app.h
+++ b/libappstream-glib/as-app.h
@@ -182,6 +182,7 @@ typedef enum {
* @AS_APP_KIND_FIRMWARE: A firmware update
* @AS_APP_KIND_RUNTIME: Runtime platform
* @AS_APP_KIND_GENERIC: Generic component
+ * @AS_APP_KIND_DISTRO_UPGRADE: Distribution upgrade
*
* The component type.
**/
@@ -197,6 +198,7 @@ typedef enum {
AS_APP_KIND_FIRMWARE, /* Since: 0.5.10 */
AS_APP_KIND_RUNTIME, /* Since: 0.5.10 */
AS_APP_KIND_GENERIC, /* Since: 0.5.10 */
+ AS_APP_KIND_DISTRO_UPGRADE, /* Since: 0.5.10 */
/*< private >*/
AS_APP_KIND_LAST
} AsAppKind;