1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
3 /* gnome-vfs-mime-info.h
5 * Copyright (C) 1998 Miguel de Icaza
6 * Copyright (C) 2000 Eazel, Inc
8 * The Gnome Library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
13 * The Gnome Library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with the Gnome Library; see the file COPYING.LIB. If not,
20 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #ifndef GNOME_VFS_MIME_INFO_H
25 #define GNOME_VFS_MIME_INFO_H
27 #include <glib/glist.h>
28 #include <libgnomevfs/gnome-vfs-result.h>
32 /* functions to freeze/thaw the internal hash tables to
33 avoid writing them back to disk everytime you modify
34 them through the _set_ functions, or accidentally
35 reloading them from disk during an edit.
37 void gnome_vfs_mime_freeze (void);
38 void gnome_vfs_mime_thaw (void);
40 /* forces a reload of the config files */
41 void gnome_vfs_mime_info_reload (void);
44 gboolean gnome_vfs_mime_type_is_known (const char *mime_type);
46 /* functions which access to the .keys files */
47 const char *gnome_vfs_mime_get_value (const char *mime_type,
49 GnomeVFSResult gnome_vfs_mime_set_value (const char *mime_type,
52 GList *gnome_vfs_mime_get_key_list (const char *mime_type);
53 void gnome_vfs_mime_keys_list_free (GList *mime_type_list);
55 /* functions to access the .mime files */
56 GList *gnome_vfs_mime_get_extensions_list (const char *mime_type);
57 void gnome_vfs_mime_extensions_list_free (GList *list);
58 char *gnome_vfs_mime_get_extensions_string (const char *mime_type);
59 char *gnome_vfs_mime_get_extensions_pretty_string (const char *mime_type);
60 GList *gnome_vfs_get_registered_mime_types (void);
61 void gnome_vfs_mime_registered_mime_type_list_free (GList *list);
62 GnomeVFSResult gnome_vfs_mime_set_registered_type_key (const char *mime_type,
65 GnomeVFSResult gnome_vfs_mime_set_extensions_list (const char *mime_type,
66 const char *extensions_list);
67 void gnome_vfs_mime_registered_mime_type_delete (const char *mime_type);
68 void gnome_vfs_mime_reset (void);
73 #endif /* GNOME_VFS_MIME_INFO_H */