/* Returns: (element-type utf8) (transfer full): list of the registered content types  */
GList* g_content_types_get_registered(void)
/* Returns: (element-type utf8) (transfer full): list of the registered content types  */
GList* g_content_types_get_registered(void)
{
  const char * const* dirs;
  GHashTable *mimetypes;
  GHashTableIter iter;
  gpointer key;
  int i;
  GList *l;
  mimetypes = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
  enumerate_mimetypes_dir (g_get_user_data_dir (), mimetypes);
  dirs = g_get_system_data_dirs ();
  for (i = 0; dirs[i] != NULL; i++)
    enumerate_mimetypes_dir (dirs[i], mimetypes);
  l = NULL;
  g_hash_table_iter_init (&iter, mimetypes);
  while (g_hash_table_iter_next (&iter, &key, NULL))
    {
      l = g_list_prepend (l, key);
      g_hash_table_iter_steal (&iter);
    }
  g_hash_table_destroy (mimetypes);
  return l;
}