source: trunk/third/gnome-vfs/libgnomevfs/gnome-vfs-mime.h @ 17128

Revision 17128, 2.4 KB checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r17127, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2 * Copyright (C) 1997-2001 Free Software Foundation
3 * Copyright (C) 2000, 2001 Eazel, Inc.
4 * All rights reserved.
5 *
6 * This file is part of the Gnome Library.
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_H
25#define GNOME_VFS_MIME_H
26
27#include <ctype.h>
28#include <dirent.h>
29#include <libgnomevfs/gnome-vfs-uri.h>
30#include <stdio.h>
31#include <string.h>
32#include <sys/stat.h>
33#include <sys/types.h>
34
35#ifdef __cplusplus
36extern "C" {
37#endif /*__cplusplus*/
38
39#define GNOME_VFS_MIME_TYPE_UNKNOWN "application/octet-stream"
40
41void         gnome_vfs_mime_shutdown                            (void);
42
43/* do not free any of the returned gchar* values */
44const char  *gnome_vfs_mime_type_from_name                      (const gchar* filename);
45const char  *gnome_vfs_mime_type_from_name_or_default           (const gchar *filename,
46                                                                 const gchar *defaultv);
47
48const char  *gnome_vfs_get_mime_type                            (GnomeVFSURI *uri);
49/* FIXME: This function should be named more clearly, maybe
50   to show that it gets the mime type only using the uri information. */
51const char  *gnome_vfs_get_mime_type_from_uri                   (GnomeVFSURI *uri);
52 
53/* FIXME: These two functions should be deprecated after Gnome 1.4.  */
54const char  *gnome_vfs_get_mime_type_from_file_data             (GnomeVFSURI *uri);
55const char  *gnome_vfs_get_mime_type_for_data                   (gconstpointer data,
56                                                                 int data_size);
57
58const char  *gnome_vfs_get_file_mime_type                       (const char *path,
59                                                                 const struct stat *optional_stat_info,
60                                                                 gboolean suffix_only);
61
62gboolean    gnome_vfs_mime_type_is_supertype                    (const char *mime_type);
63char        *gnome_vfs_get_supertype_from_mime_type             (const char *mime_type);                                                         
64
65#ifdef __cplusplus
66}
67#endif /*__cplusplus*/
68
69#endif
Note: See TracBrowser for help on using the repository browser.