Merge branch 'test-ip_mreq_source-android-only' into 'master'
[glib.git] / gio / xdgmime / xdgmimemagic.h
blobc990acee865293607ff41dbc71ed5198f9e3f000
1 /* -*- mode: C; c-file-style: "gnu" -*- */
2 /* xdgmimemagic.h: Private file. Datastructure for storing the magic files.
4 * More info can be found at http://www.freedesktop.org/standards/
6 * Copyright (C) 2003 Red Hat, Inc.
7 * Copyright (C) 2003 Jonathan Blandford <jrb@alum.mit.edu>
9 * Licensed under the Academic Free License version 2.0
10 * Or under the following terms:
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
26 #ifndef __XDG_MIME_MAGIC_H__
27 #define __XDG_MIME_MAGIC_H__
29 #include <unistd.h>
30 #include "xdgmime.h"
31 typedef struct XdgMimeMagic XdgMimeMagic;
33 #ifdef XDG_PREFIX
34 #define _xdg_mime_glob_read_from_file XDG_RESERVED_ENTRY(glob_read_from_file)
35 #define _xdg_mime_magic_new XDG_RESERVED_ENTRY(magic_new)
36 #define _xdg_mime_magic_read_from_file XDG_RESERVED_ENTRY(magic_read_from_file)
37 #define _xdg_mime_magic_free XDG_RESERVED_ENTRY(magic_free)
38 #define _xdg_mime_magic_get_buffer_extents XDG_RESERVED_ENTRY(magic_get_buffer_extents)
39 #define _xdg_mime_magic_lookup_data XDG_RESERVED_ENTRY(magic_lookup_data)
40 #endif
43 XdgMimeMagic *_xdg_mime_magic_new (void);
44 void _xdg_mime_magic_read_from_file (XdgMimeMagic *mime_magic,
45 const char *file_name);
46 void _xdg_mime_magic_free (XdgMimeMagic *mime_magic);
47 int _xdg_mime_magic_get_buffer_extents (XdgMimeMagic *mime_magic);
48 const char *_xdg_mime_magic_lookup_data (XdgMimeMagic *mime_magic,
49 const void *data,
50 size_t len,
51 int *result_prio,
52 const char *mime_types[],
53 int n_mime_types);
55 #endif /* __XDG_MIME_MAGIC_H__ */