Implement g_content_type_is_mime_type() (clone of win32's)

Add missing function, copying from gcontenttype-win32.c per Patrick
Griffis (Comment #55 of bug report)

https://bugzilla.gnome.org/show_bug.cgi?id=734946
This commit is contained in:
Daniel Macks 2017-04-24 01:52:27 -04:00 committed by Patrick Griffis
parent ecc27a0cba
commit ea586b47a3

View File

@ -132,6 +132,23 @@ g_content_type_is_a (const gchar *ctype,
return ret;
}
gboolean
g_content_type_is_mime_type (const gchar *type,
const gchar *mime_type)
{
gchar *content_type;
gboolean ret;
g_return_val_if_fail (type != NULL, FALSE);
g_return_val_if_fail (mime_type != NULL, FALSE);
content_type = g_content_type_from_mime_type (mime_type);
ret = g_content_type_is_a (type, content_type);
g_free (content_type);
return ret;
}
gboolean
g_content_type_is_unknown (const gchar *type)
{