summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2017-10-23 13:31:15 +0100
committerRichard Hughes <richard@hughsie.com>2017-10-23 13:31:15 +0100
commitbbceeafde6115328353ff93eb0551f50744c85cf (patch)
tree11724ee2f3f222063aa5d4bd39d61590422d7e67
parentf7d001735ba9f0ac1f79e470149e894c819a4a5f (diff)
downloadappstream-glib-bbceeafde6115328353ff93eb0551f50744c85cf.tar.gz
Add support for URL launchable types
-rw-r--r--libappstream-glib/as-launchable.c4
-rw-r--r--libappstream-glib/as-launchable.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/libappstream-glib/as-launchable.c b/libappstream-glib/as-launchable.c
index c235e9b..51704f7 100644
--- a/libappstream-glib/as-launchable.c
+++ b/libappstream-glib/as-launchable.c
@@ -94,6 +94,8 @@ as_launchable_kind_from_string (const gchar *kind)
return AS_LAUNCHABLE_KIND_SERVICE;
if (g_strcmp0 (kind, "cockpit-manifest") == 0)
return AS_LAUNCHABLE_KIND_COCKPIT_MANIFEST;
+ if (g_strcmp0 (kind, "url") == 0)
+ return AS_LAUNCHABLE_KIND_URL;
return AS_LAUNCHABLE_KIND_UNKNOWN;
}
@@ -116,6 +118,8 @@ as_launchable_kind_to_string (AsLaunchableKind kind)
return "service";
if (kind == AS_LAUNCHABLE_KIND_COCKPIT_MANIFEST)
return "cockpit-manifest";
+ if (kind == AS_LAUNCHABLE_KIND_URL)
+ return "url";
return NULL;
}
diff --git a/libappstream-glib/as-launchable.h b/libappstream-glib/as-launchable.h
index 16ec4d2..56d1b1a 100644
--- a/libappstream-glib/as-launchable.h
+++ b/libappstream-glib/as-launchable.h
@@ -53,6 +53,7 @@ struct _AsLaunchableClass
* @AS_LAUNCHABLE_KIND_DESKTOP_ID: A desktop ID
* @AS_LAUNCHABLE_KIND_SERVICE: A system service
* @AS_LAUNCHABLE_KIND_COCKPIT_MANIFEST: A manifest run by the cockpit project
+ * @AS_LAUNCHABLE_KIND_URL: A web-app
*
* The launchable type.
**/
@@ -61,6 +62,7 @@ typedef enum {
AS_LAUNCHABLE_KIND_DESKTOP_ID, /* Since: 0.6.13 */
AS_LAUNCHABLE_KIND_SERVICE, /* Since: 0.7.3 */
AS_LAUNCHABLE_KIND_COCKPIT_MANIFEST, /* Since: 0.7.3 */
+ AS_LAUNCHABLE_KIND_URL, /* Since: 0.7.3 */
/*< private >*/
AS_LAUNCHABLE_KIND_LAST
} AsLaunchableKind;