summaryrefslogtreecommitdiff
path: root/src/config/config.h
blob: 508d5ae05aeb24bdc04bc05926a25c94512c9706 (plain) (blame)
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
30
31
32
33
34
35
36
#ifndef CONFIG_H
#define CONFIG_H

#include "str/str.h"
#include "log/log.h"
#include "list/list.h"
#include "mime/mime.h"
#include "rewrites/rewrites.h"
#include <errno.h>


typedef struct config {
	str file;
	str name;
	str port;
	int backlog;
	str root;
	str bundle;
	str cert;
	str key;
	uint secure : 1;
	uint ipv4 : 1;
	uint ipv6 : 1;
	str *files;
} config;


config read_config(char *filename);

str get_key(str file, str key);

void free_config(config *conf);

void print_config(config conf);

#endif