James Kuszmaul | 82f6c04 | 2021-01-17 11:30:16 -0800 | [diff] [blame^] | 1 | /** |
| 2 | * @file re_conf.h Interface to configuration |
| 3 | * |
| 4 | * Copyright (C) 2010 Creytiv.com |
| 5 | */ |
| 6 | |
| 7 | |
| 8 | struct conf; |
| 9 | |
| 10 | typedef int (conf_h)(const struct pl *val, void *arg); |
| 11 | |
| 12 | int conf_alloc(struct conf **confp, const char *filename); |
| 13 | int conf_alloc_buf(struct conf **confp, const uint8_t *buf, size_t sz); |
| 14 | int conf_get(const struct conf *conf, const char *name, struct pl *pl); |
| 15 | int conf_get_str(const struct conf *conf, const char *name, char *str, |
| 16 | size_t size); |
| 17 | int conf_get_u32(const struct conf *conf, const char *name, uint32_t *num); |
| 18 | int conf_get_bool(const struct conf *conf, const char *name, bool *val); |
| 19 | int conf_apply(const struct conf *conf, const char *name, |
| 20 | conf_h *ch, void *arg); |