summaryrefslogtreecommitdiffstats
path: root/src/cfg.h
blob: d65782c77d0695091421eddb4c8c427dcca560e8 (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
26
27
28
29
30
31
#ifndef _OG_SERVER_CFG_H
#define _OG_SERVER_CFG_H

#include <jansson.h>
#include "dbi.h"

struct og_server_cfg {
        struct og_dbi_config	db;
        struct {
                const char      *ip;
                const char      *port;
                const char      *api_token;
        } rest;
        struct {
                const char      *user;
                const char      *pass;
        } smb;
        struct {
                const char      *interface;
        } wol;
        struct {
                const char      *dir;
        } repo;
	json_t			*json;
};

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

extern struct og_server_cfg ogconfig;

#endif