summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2019-01-31 13:47:07 +1300
committerRichard Hughes <richard@hughsie.com>2019-01-31 07:45:20 +0000
commit2d640d042b19eb0e8a0ad7755c7f2a8c79740ad5 (patch)
treed2202b7fbc5d52e6e95012198b32595e30ef6038
parent2a780a1d68df4d7841a322a9e1b20e53aa0d0eea (diff)
downloadappstream-glib-2d640d042b19eb0e8a0ad7755c7f2a8c79740ad5.tar.gz
Add support for CONTACT URLs
-rw-r--r--libappstream-glib/as-enums.c4
-rw-r--r--libappstream-glib/as-enums.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/libappstream-glib/as-enums.c b/libappstream-glib/as-enums.c
index aa82498..d5ca7d0 100644
--- a/libappstream-glib/as-enums.c
+++ b/libappstream-glib/as-enums.c
@@ -99,6 +99,8 @@ as_url_kind_to_string (AsUrlKind url_kind)
return as_ref_string_new_static ("details");
if (url_kind == AS_URL_KIND_SOURCE)
return as_ref_string_new_static ("source");
+ if (url_kind == AS_URL_KIND_CONTACT)
+ return as_ref_string_new_static ("contact");
return as_ref_string_new_static ("unknown");
}
@@ -133,6 +135,8 @@ as_url_kind_from_string (const gchar *url_kind)
return AS_URL_KIND_DETAILS;
if (g_strcmp0 (url_kind, "source") == 0)
return AS_URL_KIND_SOURCE;
+ if (g_strcmp0 (url_kind, "contact") == 0)
+ return AS_URL_KIND_CONTACT;
return AS_URL_KIND_UNKNOWN;
}
diff --git a/libappstream-glib/as-enums.h b/libappstream-glib/as-enums.h
index 4f82d50..beeae7f 100644
--- a/libappstream-glib/as-enums.h
+++ b/libappstream-glib/as-enums.h
@@ -74,6 +74,7 @@ typedef enum {
* @AS_URL_KIND_TRANSLATE: Application translation page
* @AS_URL_KIND_DETAILS: Release details
* @AS_URL_KIND_SOURCE: Link to source code
+ * @AS_URL_KIND_CONTACT: URL to contact developer on
*
* The URL type.
**/
@@ -88,6 +89,7 @@ typedef enum {
AS_URL_KIND_TRANSLATE, /* Since: 0.6.1 */
AS_URL_KIND_DETAILS, /* Since: 0.7.15 */
AS_URL_KIND_SOURCE, /* Since: 0.7.15 */
+ AS_URL_KIND_CONTACT, /* Since: 0.7.15 */
/*< private >*/
AS_URL_KIND_LAST
} AsUrlKind;