doc: Fixed typo.
[ashd.git] / lib / cf.h
CommitLineData
06c1a718
FT
1#ifndef _ASHCONF_H
2#define _ASHCONF_H
3
b008ba9e 4#include "req.h"
06c1a718
FT
5
6struct cfstate {
7 struct muth *pf;
8 int expstart;
9 char **res, **argv;
10 int argc;
11 int lno;
12 char *file;
13};
14
15struct child {
16 struct child *next;
17 char *name;
1924fe8c
FT
18 struct chandler *iface;
19 void *pdata;
20};
21
22struct chandler {
23 int (*handle)(struct child *ch, struct hthead *req, int fd, void (*chinit)(void *), void *idata);
24 void (*merge)(struct child *dst, struct child *src);
25 void (*destroy)(struct child *ch);
06c1a718
FT
26};
27
28void skipcfblock(struct cfstate *s);
29struct cfstate *mkcfparser(FILE *in, char *name);
30void freecfparser(struct cfstate *s);
31char **getcfline(struct cfstate *s);
0fc6fd13 32char *findstdconf(char *name);
06c1a718 33
1924fe8c 34struct child *newchild(char *name, struct chandler *iface, void *pdata);
06c1a718 35void freechild(struct child *ch);
1924fe8c 36void mergechildren(struct child *dst, struct child *src);
06c1a718 37struct child *parsechild(struct cfstate *s);
6a7a868e 38int childhandle(struct child *ch, struct hthead *req, int fd, void (*chinit)(void *), void *idata);
06c1a718
FT
39
40#endif