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