X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=lib%2Fcf.h;h=35529c2332d1d07c2578b4aa7501d1bc0ca8b8c3;hp=a1eadb0113b15dc7f0dab46c429dd755a3b564d1;hb=1924fe8c26de2861744fd576631ad15da2759f51;hpb=09c82f9c7bc563c081425141853e6ff8e402e358 diff --git a/lib/cf.h b/lib/cf.h index a1eadb0..35529c2 100644 --- a/lib/cf.h +++ b/lib/cf.h @@ -15,9 +15,14 @@ struct cfstate { struct child { struct child *next; char *name; - int type; - char **argv; - int fd; + struct chandler *iface; + void *pdata; +}; + +struct chandler { + int (*handle)(struct child *ch, struct hthead *req, int fd, void (*chinit)(void *), void *idata); + void (*merge)(struct child *dst, struct child *src); + void (*destroy)(struct child *ch); }; void skipcfblock(struct cfstate *s); @@ -26,7 +31,9 @@ void freecfparser(struct cfstate *s); char **getcfline(struct cfstate *s); char *findstdconf(char *name); +struct child *newchild(char *name, struct chandler *iface, void *pdata); void freechild(struct child *ch); +void mergechildren(struct child *dst, struct child *src); struct child *parsechild(struct cfstate *s); int childhandle(struct child *ch, struct hthead *req, int fd, void (*chinit)(void *), void *idata);