#ifndef MIMECONF_H
#define MIMECONF_H
#include "conf.h"
#ifdef __cplusplus
extern "C" {
#endif
#define CFG_MIME_ADD(list_begin, list_end, directive) \
cx_linked_list_add((
void**)list_begin, (
void**)list_end, -
1, offsetof(MimeDirective, next), directive)
typedef struct _mime_dir MimeDirective;
typedef struct _mime_conf {
ConfigParser parser;
MimeDirective *directives_begin;
MimeDirective *directives_end;
int ntypes;
} MimeConfig;
struct _mime_dir {
cxmutstr type;
ssize_t nextensions;
cxstring *extensions;
MimeDirective *next;
};
MimeConfig *load_mime_config(
const char *file);
void free_mime_config(MimeConfig *conf);
int mimeconf_parse(
void *p, ConfigLine *begin, ConfigLine *end, cxmutstr line);
#ifdef __cplusplus
}
#endif
#endif