1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 #ifndef MIMECONF_H
30 #define MIMECONF_H
31
32 #include "conf.h"
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 typedef struct _mime_conf {
39 ConfigParser parser;
40 char *file;
41 UcxList *directives;
42 int ntypes;
43 } MimeConfig;
44
45 typedef struct _mime_dir {
46 sstr_t type;
47 UcxList *exts;
48 } MimeDirective;
49
50 MimeConfig *load_mime_config(
char *file);
51
52 void free_mime_config(MimeConfig *conf);
53
54 int mimeconf_parse(
void *p, ConfigLine *begin, ConfigLine *end,
sstr_t line);
55
56 #ifdef __cplusplus
57 }
58 #endif
59
60 #endif
61
62