libxputty 0.1
Loading...
Searching...
No Matches
xdgmimecache.h
Go to the documentation of this file.
1/* -*- mode: C; c-file-style: "gnu" -*- */
2/* xdgmimecache.h: Private file. Datastructure for mmapped caches.
3 *
4 * More info can be found at http://www.freedesktop.org/standards/
5 *
6 * Copyright (C) 2005 Matthias Clasen <mclasen@redhat.com>
7 *
8 * Licensed under the Academic Free License version 2.0
9 * Or under the following terms:
10 *
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.
15 *
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.
20 *
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.
25 */
26
27#ifndef __XDG_MIME_CACHE_H__
28#define __XDG_MIME_CACHE_H__
29
30#include "xdgmime.h"
31
33
34#ifdef XDG_PREFIX
35#define _xdg_mime_cache_new_from_file XDG_RESERVED_ENTRY(cache_new_from_file)
36#define _xdg_mime_cache_ref XDG_RESERVED_ENTRY(cache_ref)
37#define _xdg_mime_cache_unref XDG_RESERVED_ENTRY(cache_unref)
38#define _xdg_mime_cache_get_max_buffer_extents XDG_RESERVED_ENTRY(cache_get_max_buffer_extents)
39#define _xdg_mime_cache_get_mime_type_for_data XDG_RESERVED_ENTRY(cache_get_mime_type_for_data)
40#define _xdg_mime_cache_get_mime_type_for_file XDG_RESERVED_ENTRY(cache_get_mime_type_for_file)
41#define _xdg_mime_cache_get_mime_type_from_file_name XDG_RESERVED_ENTRY(cache_get_mime_type_from_file_name)
42#define _xdg_mime_cache_get_mime_types_from_file_name XDG_RESERVED_ENTRY(cache_get_mime_types_from_file_name)
43#define _xdg_mime_cache_list_mime_parents XDG_RESERVED_ENTRY(cache_list_mime_parents)
44#define _xdg_mime_cache_mime_type_subclass XDG_RESERVED_ENTRY(cache_mime_type_subclass)
45#define _xdg_mime_cache_unalias_mime_type XDG_RESERVED_ENTRY(cache_unalias_mime_type)
46#define _xdg_mime_cache_get_icon XDG_RESERVED_ENTRY(cache_get_icon)
47#define _xdg_mime_cache_get_generic_icon XDG_RESERVED_ENTRY(cache_get_generic_icon)
48#define _xdg_mime_cache_glob_dump XDG_RESERVED_ENTRY(cache_glob_dump)
49#endif
50
51extern XdgMimeCache **_caches;
52
53XdgMimeCache *_xdg_mime_cache_new_from_file (const char *file_name);
56
57
58const char *_xdg_mime_cache_get_mime_type_for_data (const void *data,
59 size_t len,
60 int *result_prio);
61const char *_xdg_mime_cache_get_mime_type_for_file (const char *file_name,
62 struct stat *statbuf);
63int _xdg_mime_cache_get_mime_types_from_file_name (const char *file_name,
64 const char *mime_types[],
65 int n_mime_types);
66const char *_xdg_mime_cache_get_mime_type_from_file_name (const char *file_name);
67int _xdg_mime_cache_is_valid_mime_type (const char *mime_type);
68int _xdg_mime_cache_mime_type_equal (const char *mime_a,
69 const char *mime_b);
70int _xdg_mime_cache_media_type_equal (const char *mime_a,
71 const char *mime_b);
72int _xdg_mime_cache_mime_type_subclass (const char *mime_a,
73 const char *mime_b);
74char **_xdg_mime_cache_list_mime_parents (const char *mime);
75const char *_xdg_mime_cache_unalias_mime_type (const char *mime);
77const char *_xdg_mime_cache_get_icon (const char *mime);
78const char *_xdg_mime_cache_get_generic_icon (const char *mime);
80
81#endif /* __XDG_MIME_CACHE_H__ */
int _xdg_mime_cache_media_type_equal(const char *mime_a, const char *mime_b)
const char * _xdg_mime_cache_get_icon(const char *mime)
XdgMimeCache ** _caches
Definition xdgmime.c:63
int _xdg_mime_cache_get_mime_types_from_file_name(const char *file_name, const char *mime_types[], int n_mime_types)
XdgMimeCache * _xdg_mime_cache_new_from_file(const char *file_name)
int _xdg_mime_cache_is_valid_mime_type(const char *mime_type)
int _xdg_mime_cache_get_max_buffer_extents(void)
const char * _xdg_mime_cache_get_mime_type_from_file_name(const char *file_name)
XdgMimeCache * _xdg_mime_cache_ref(XdgMimeCache *cache)
void _xdg_mime_cache_glob_dump(void)
int _xdg_mime_cache_mime_type_equal(const char *mime_a, const char *mime_b)
const char * _xdg_mime_cache_get_mime_type_for_file(const char *file_name, struct stat *statbuf)
const char * _xdg_mime_cache_unalias_mime_type(const char *mime)
const char * _xdg_mime_cache_get_mime_type_for_data(const void *data, size_t len, int *result_prio)
const char * _xdg_mime_cache_get_generic_icon(const char *mime)
int _xdg_mime_cache_mime_type_subclass(const char *mime_a, const char *mime_b)
void _xdg_mime_cache_unref(XdgMimeCache *cache)
char ** _xdg_mime_cache_list_mime_parents(const char *mime)