ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/gnome-vfs2-2.3.8-1.src.rpm
[gnome-vfs-httpcaptive.git] / libgnomevfs / gnome-vfs-mime-info.h
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2
3 /* gnome-vfs-mime-info.h
4  *
5  * Copyright (C) 1998 Miguel de Icaza
6  * Copyright (C) 2000 Eazel, Inc
7  *
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.
12  *
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.
17  *
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. 
22  */
23
24 #ifndef GNOME_VFS_MIME_INFO_H
25 #define GNOME_VFS_MIME_INFO_H
26
27 #include <glib/glist.h>
28 #include <libgnomevfs/gnome-vfs-result.h>
29
30 G_BEGIN_DECLS
31         
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.
36          */
37 void             gnome_vfs_mime_freeze                          (void);
38 void             gnome_vfs_mime_thaw                            (void);
39
40         /* forces a reload of the config files */
41 void             gnome_vfs_mime_info_reload                     (void);
42
43
44 gboolean         gnome_vfs_mime_type_is_known                   (const char *mime_type);
45
46         /* functions which access to the .keys files */
47 const char      *gnome_vfs_mime_get_value                       (const char *mime_type,
48                                                                  const char *key);
49 GnomeVFSResult   gnome_vfs_mime_set_value                       (const char *mime_type, 
50                                                                  const char *key, 
51                                                                  const char *value);
52 GList           *gnome_vfs_mime_get_key_list                    (const char *mime_type);
53 void             gnome_vfs_mime_keys_list_free                  (GList *mime_type_list);
54
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, 
63                                                                  const char *key, 
64                                                                  const char *data);
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);
69
70
71 G_END_DECLS
72
73 #endif /* GNOME_VFS_MIME_INFO_H */
74
75
76
77
78
79
80
81
82
83
84
85
86
87