1 /* -*- mode: C; c-file-style: "gnu" -*- */
2 /* xdgmimecache.h: Private file. Datastructure for mmapped caches.
4 * More info can be found at http://www.freedesktop.org/standards/
6 * Copyright (C) 2005 Matthias Clasen <mclasen@redhat.com>
8 * Licensed under the Academic Free License version 2.0
9 * Or under the following terms:
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the
23 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 * Boston, MA 02111-1307, USA.
27 #ifndef __XDG_MIME_CACHE_H__
28 #define __XDG_MIME_CACHE_H__
32 typedef struct _XdgMimeCache XdgMimeCache
;
35 #define _xdg_mime_cache_new_from_file XDG_ENTRY(cache_new_from_file)
36 #define _xdg_mime_cache_ref XDG_ENTRY(cache_ref)
37 #define _xdg_mime_cache_unref XDG_ENTRY(cache_unref)
40 XdgMimeCache
*_xdg_mime_cache_new_from_file (const char *file_name
);
41 XdgMimeCache
*_xdg_mime_cache_ref (XdgMimeCache
*cache
);
42 void _xdg_mime_cache_unref (XdgMimeCache
*cache
);
45 const char *_xdg_mime_cache_get_mime_type_for_data (const void *data
,
47 const char *_xdg_mime_cache_get_mime_type_for_file (const char *file_name
);
48 const char *_xdg_mime_cache_get_mime_type_from_file_name (const char *file_name
);
49 int _xdg_mime_cache_is_valid_mime_type (const char *mime_type
);
50 int _xdg_mime_cache_mime_type_equal (const char *mime_a
,
52 int _xdg_mime_cache_media_type_equal (const char *mime_a
,
54 int _xdg_mime_cache_mime_type_subclass (const char *mime_a
,
56 char **_xdg_mime_cache_list_mime_parents (const char *mime
);
57 const char *_xdg_mime_cache_unalias_mime_type (const char *mime
);
58 int _xdg_mime_cache_get_max_buffer_extents (void);
60 #endif /* __XDG_MIME_CACHE_H__ */