summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-enums.c
diff options
context:
space:
mode:
authorJakobDev <jakobdev@gmx.de>2022-03-30 09:46:11 +0200
committerRichard Hughes <richard@hughsie.com>2022-03-30 09:05:21 +0100
commitc1b51dc28627efbe8ff0d48ecb70e45085a1a9f6 (patch)
tree9418029a90c65acd76727663e60786a19c87249f /libappstream-glib/as-enums.c
parent2e23a7780ea9c01be337d9bf05c7fdfbcd7d6ecc (diff)
downloadappstream-glib-c1b51dc28627efbe8ff0d48ecb70e45085a1a9f6.tar.gz
Add vcs-browser and contribute URL type
Diffstat (limited to 'libappstream-glib/as-enums.c')
-rw-r--r--libappstream-glib/as-enums.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libappstream-glib/as-enums.c b/libappstream-glib/as-enums.c
index 5e827d4..d2a6b04 100644
--- a/libappstream-glib/as-enums.c
+++ b/libappstream-glib/as-enums.c
@@ -87,6 +87,10 @@ as_url_kind_to_string (AsUrlKind url_kind)
return as_ref_string_new_static ("source");
if (url_kind == AS_URL_KIND_CONTACT)
return as_ref_string_new_static ("contact");
+ if (url_kind == AS_URL_KIND_VCS_BROWSER)
+ return as_ref_string_new_static ("vcs-browser");
+ if (url_kind == AS_URL_KIND_CONTRIBUTE)
+ return as_ref_string_new_static ("contribute");
return as_ref_string_new_static ("unknown");
}
@@ -123,6 +127,10 @@ as_url_kind_from_string (const gchar *url_kind)
return AS_URL_KIND_SOURCE;
if (g_strcmp0 (url_kind, "contact") == 0)
return AS_URL_KIND_CONTACT;
+ if (g_strcmp0 (url_kind, "vcs-browser") == 0)
+ return AS_URL_KIND_VCS_BROWSER;
+ if (g_strcmp0 (url_kind, "contribute") == 0)
+ return AS_URL_KIND_CONTRIBUTE;
return AS_URL_KIND_UNKNOWN;
}