43 lines
755 B
C
43 lines
755 B
C
#ifndef CORE_CONFIG_H
|
|
#define CORE_CONFIG_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <mongoose.h>
|
|
#include <confini.h>
|
|
|
|
typedef struct
|
|
{
|
|
char *file;
|
|
char *include;
|
|
char *database;
|
|
char *user;
|
|
char *group;
|
|
int log_level;
|
|
FILE *log_file;
|
|
uint16_t server_port;
|
|
uint16_t discovery_port;
|
|
uint16_t mqtt_port;
|
|
char *content_dir;
|
|
char *not_found_file;
|
|
char *not_found_file_type;
|
|
char *not_found_content;
|
|
char *not_found_content_type;
|
|
struct mg_serve_http_opts http_server_opts;
|
|
} config_t;
|
|
|
|
extern config_t *global_config;
|
|
|
|
void
|
|
config_init();
|
|
|
|
void
|
|
config_free();
|
|
|
|
void
|
|
config_load_string(char **holder, const char *value);
|
|
|
|
int
|
|
config_load(IniDispatch *disp, void *config_void);
|
|
|
|
#endif /* CORE_CONFIG_H */
|