You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/include/llarp/config.h

37 lines
733 B
C

7 years ago
#ifndef LLARP_CONFIG_H_
#define LLARP_CONFIG_H_
#ifdef __cplusplus
extern "C" {
#endif
7 years ago
struct llarp_config;
7 years ago
void
llarp_new_config(struct llarp_config **conf);
void
llarp_free_config(struct llarp_config **conf);
7 years ago
7 years ago
/** @brief return -1 on fail otherwiwse 0 */
int
llarp_load_config(struct llarp_config *conf, const char *fname);
7 years ago
struct llarp_config_iterator
{
7 years ago
void *user;
/** set by llarp_config_iter */
struct llarp_config *conf;
/** visit (self, section, key, value) */
void (*visit)(struct llarp_config_iterator *, const char *, const char *,
const char *);
};
void
llarp_config_iter(struct llarp_config *conf,
struct llarp_config_iterator *iter);
7 years ago
#ifdef __cplusplus
}
#endif
#endif