#ifndef _STRUCTS_H_67656401_ #define _STRUCTS_H_67656401_ #include typedef enum { DT_UNSET = 1, DT_INT, DT_FLOAT, } DATATYPE; typedef enum { SPRV_GOOD = 1, SPRV_UNKNOWN, SPRV_ERROR, } SPRV; typedef unsigned long long int TIMEINTVL; typedef struct config CONFIG; typedef struct repo REPO; typedef struct listen LISTEN; typedef struct lep LEP; typedef struct lepfd LEPFD; typedef struct lep_ops LEP_OPS; typedef struct map MAP; typedef struct map_ops MAP_OPS; typedef struct sect_ops SECT_OPS; typedef struct config_parse_temp CONFIG_PARSE_TEMP; struct config { REPO *repos; LISTEN *listens; struct stat confstat; CONFIG_PARSE_TEMP *pt; } ; struct config_parse_temp { SECT_OPS *ops; void *priv; void (*err_throw)(char *); } ; struct listen { LISTEN *link; unsigned int permit; #define OP_NEW 0x00000001 #define OP_FETCH 0x00000002 LEP *endpoints; MAP *mappings; } ; struct lep { LEP *link; LEP_OPS *ops; void *priv; } ; struct map { MAP *link; MAP_OPS *ops; void *priv; } ; struct lep_ops { int (*add)(CONFIG *, LISTEN *, const char *, int, const char *); } ; #define LEP_OPS_INIT(name) { &lep_##name##_add } struct map_ops { void *(*match)(const char *); } ; struct sect_ops { void *(*start)(const char *, CONFIG *); SPRV (*parse)(void *, const char *); void (*done)(void *); } ; #define SECT_OPS_INIT(name) { §_##name##_start, §_##name##_parse, §_##name##_done } #endif