/* Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos for given @content_type or NULL on error.  */
GList* g_app_info_get_all_for_type(const char *content_type)
/* Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos for given @content_type or NULL on error.  */
GList* g_app_info_get_all_for_type(const char *content_type)
{
  gchar **desktop_ids;
  GList *infos;
  gint i;
  g_return_val_if_fail (content_type != NULL, NULL);
  desktop_ids = g_desktop_app_info_get_desktop_ids_for_content_type (content_type, TRUE);
  infos = NULL;
  for (i = 0; desktop_ids[i]; i++)
    {
      GDesktopAppInfo *info;
      info = g_desktop_app_info_new (desktop_ids[i]);
      if (info)
        infos = g_list_prepend (infos, info);
    }
  g_strfreev (desktop_ids);
  return g_list_reverse (infos);
}