diff options
Diffstat (limited to 'utility/logparse.h')
-rw-r--r-- | utility/logparse.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/utility/logparse.h b/utility/logparse.h new file mode 100644 index 0000000..7ca0958 --- /dev/null +++ b/utility/logparse.h | |||
@@ -0,0 +1,37 @@ | |||
1 | #ifndef LOGPARSE_H_ | ||
2 | #define LOGPARSE_H_ | ||
3 | |||
4 | #include "config.h" | ||
5 | |||
6 | typedef apr_status_t (*parser_func_f)(apr_pool_t *p, config_t *cfg, | ||
7 | config_output_field_t *field, const char *value, const char **ret); | ||
8 | |||
9 | struct parser_func_t { | ||
10 | parser_func_f func; | ||
11 | int pos; | ||
12 | void *data; | ||
13 | void ***linedata; | ||
14 | }; | ||
15 | |||
16 | #define parser_get_linedata(f) (*f->linedata)[f->pos] | ||
17 | |||
18 | #define parser_set_linedata(f, v) (*f->linedata)[f->pos] = v | ||
19 | |||
20 | parser_func_t *parser_get_func(const char *name); | ||
21 | |||
22 | void parser_init(apr_pool_t *p); | ||
23 | |||
24 | void parser_find_logs(config_t *cfg); | ||
25 | |||
26 | void parser_split_logs(config_t *cfg); | ||
27 | |||
28 | apr_status_t parser_tokenize_line(const char *arg_str, char ***argv_out, | ||
29 | apr_pool_t *token_context); | ||
30 | |||
31 | apr_status_t parser_parsefile(config_t *cfg, config_dbd_t *dbconn, | ||
32 | config_filestat_t *fstat); | ||
33 | |||
34 | apr_status_t parser_processline(apr_pool_t *ptemp, config_t *cfg, | ||
35 | config_dbd_t *dbconn, config_filestat_t *line, char **argv, int argc); | ||
36 | |||
37 | #endif /*LOGPARSE_H_*/ | ||