+ * g_content_type_get_generic_icon_name:
+ * @type: a content type string
+ *
+ * Gets the generic icon name for a content type.
+ *
+ * See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
+ * specification for more on the generic icon name.
+ *
+ * Returns: (allow-none): the registered generic icon name for the given @type,
+ * or %NULL if unknown. Free with g_free()
+ *
+ * Since: 2.34
+ */
+gchar *
+g_content_type_get_generic_icon_name (const gchar *type)
+{
+ const gchar *xdg_icon_name;
+ gchar *icon_name;
+
+ G_LOCK (gio_xdgmime);
+ xdg_icon_name = xdg_mime_get_generic_icon (type);
+ G_UNLOCK (gio_xdgmime);
+
+ if (!xdg_icon_name)
+ {
+ const char *p;
+ const char *suffix = "-x-generic";
+
+ p = strchr (type, '/');
+ if (p == NULL)
+ p = type + strlen (type);
+
+ icon_name = g_malloc (p - type + strlen (suffix) + 1);
+ memcpy (icon_name, type, p - type);
+ memcpy (icon_name + (p - type), suffix, strlen (suffix));
+ icon_name[(p - type) + strlen (suffix)] = 0;
+ }
+ else
+ {
+ icon_name = g_strdup (xdg_icon_name);
+ }
+
+ return icon_name;
+}
+
+/**