/* Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfos.  */
GList* g_app_info_get_all(void)
/* Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfos.  */
GList* g_app_info_get_all(void)
{
  GHashTable *apps;
  GHashTableIter iter;
  gpointer value;
  int i;
  GList *infos;
  apps = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
  desktop_file_dirs_lock ();
  for (i = 0; i < n_desktop_file_dirs; i++)
    desktop_file_dir_get_all (&desktop_file_dirs[i], apps);
  desktop_file_dirs_unlock ();
  infos = NULL;
  g_hash_table_iter_init (&iter, apps);
  while (g_hash_table_iter_next (&iter, NULL, &value))
    {
      if (value)
        infos = g_list_prepend (infos, value);
    }
  g_hash_table_destroy (apps);
  return infos;
}