diff options
author | JakobDev <jakobdev@gmx.de> | 2022-03-30 09:46:11 +0200 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2022-03-30 09:05:21 +0100 |
commit | c1b51dc28627efbe8ff0d48ecb70e45085a1a9f6 (patch) | |
tree | 9418029a90c65acd76727663e60786a19c87249f | |
parent | 2e23a7780ea9c01be337d9bf05c7fdfbcd7d6ecc (diff) | |
download | appstream-glib-c1b51dc28627efbe8ff0d48ecb70e45085a1a9f6.tar.gz |
Add vcs-browser and contribute URL type
-rw-r--r-- | libappstream-glib/as-enums.c | 8 | ||||
-rw-r--r-- | libappstream-glib/as-enums.h | 4 |
2 files changed, 12 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; } diff --git a/libappstream-glib/as-enums.h b/libappstream-glib/as-enums.h index 73fc556..f8532eb 100644 --- a/libappstream-glib/as-enums.h +++ b/libappstream-glib/as-enums.h @@ -60,6 +60,8 @@ typedef enum { * @AS_URL_KIND_DETAILS: Release details * @AS_URL_KIND_SOURCE: Link to source code * @AS_URL_KIND_CONTACT: URL to contact developer on + * @AS_URL_KIND_VCS_BROWSER: Browse the source code + * @AS_URL_KIND_CONTRIBUTE: Help developing * * The URL type. **/ @@ -75,6 +77,8 @@ typedef enum { AS_URL_KIND_DETAILS, /* Since: 0.7.15 */ AS_URL_KIND_SOURCE, /* Since: 0.7.15 */ AS_URL_KIND_CONTACT, /* Since: 0.7.15 */ + AS_URL_KIND_VCS_BROWSER, + AS_URL_KIND_CONTRIBUTE, /*< private >*/ AS_URL_KIND_LAST } AsUrlKind; |