]> git.proxmox.com Git - libxdgmime-perl.git/blame - xdgmime-source/src/xdgmimeglob.h
Merge commit '73d5a30a1d93eb79761f2472c685afb8e42a8646' from upstream
[libxdgmime-perl.git] / xdgmime-source / src / xdgmimeglob.h
CommitLineData
cf31d981
SI
1/* -*- mode: C; c-file-style: "gnu" -*- */
2/* xdgmimeglob.h: Private file. Datastructure for storing the globs.
3 *
4 * More info can be found at http://www.freedesktop.org/standards/
5 *
6 * Copyright (C) 2003 Red Hat, Inc.
7 * Copyright (C) 2003 Jonathan Blandford <jrb@alum.mit.edu>
8 *
73d5a30a 9 * SPDX-License-Identifier: LGPL-2.1-or-later or AFL-2.0
cf31d981
SI
10 */
11
12#ifndef __XDG_MIME_GLOB_H__
13#define __XDG_MIME_GLOB_H__
14
15#include "xdgmime.h"
16
17typedef struct XdgGlobHash XdgGlobHash;
18
19typedef enum
20{
21 XDG_GLOB_LITERAL, /* Makefile */
22 XDG_GLOB_SIMPLE, /* *.gif */
23 XDG_GLOB_FULL /* x*.[ch] */
24} XdgGlobType;
25
26
27#ifdef XDG_PREFIX
28#define _xdg_mime_glob_read_from_file XDG_RESERVED_ENTRY(glob_read_from_file)
29#define _xdg_glob_hash_new XDG_RESERVED_ENTRY(hash_new)
30#define _xdg_glob_hash_free XDG_RESERVED_ENTRY(hash_free)
31#define _xdg_glob_hash_lookup_file_name XDG_RESERVED_ENTRY(hash_lookup_file_name)
32#define _xdg_glob_hash_append_glob XDG_RESERVED_ENTRY(hash_append_glob)
33#define _xdg_glob_determine_type XDG_RESERVED_ENTRY(determine_type)
34#define _xdg_glob_hash_dump XDG_RESERVED_ENTRY(hash_dump)
35#endif
36
37void _xdg_mime_glob_read_from_file (XdgGlobHash *glob_hash,
38 const char *file_name,
39 int version_two);
40XdgGlobHash *_xdg_glob_hash_new (void);
41void _xdg_glob_hash_free (XdgGlobHash *glob_hash);
42int _xdg_glob_hash_lookup_file_name (XdgGlobHash *glob_hash,
43 const char *text,
44 const char *mime_types[],
45 int n_mime_types);
46void _xdg_glob_hash_append_glob (XdgGlobHash *glob_hash,
47 const char *glob,
48 const char *mime_type,
49 int weight,
50 int case_sensitive);
51XdgGlobType _xdg_glob_determine_type (const char *glob);
52void _xdg_glob_hash_dump (XdgGlobHash *glob_hash);
53
54#endif /* __XDG_MIME_GLOB_H__ */