summaryrefslogtreecommitdiffstats
path: root/src/cfg.h
blob: 5b89db2606c24edc024729c8d3cef8c2cb33bd0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef _OG_SERVER_CFG_H
#define _OG_SERVER_CFG_H

struct og_server_cfg {
        struct {
                const char *user;
                const char *pass;
                const char *ip;
                unsigned int port;
                const char *name;
        } db;
        struct {
                const char      *ip;
                const char      *port;
                const char      *api_token;
        } rest;
        struct {
                const char      *interface;
        } wol;
};

int parse_json_config(const char *filename, struct og_server_cfg *cfg);
void from_json_to_legacy(struct og_server_cfg *cfg);

#endif