summaryrefslogtreecommitdiffstats
path: root/src/cfg.h
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2020-06-26 20:13:42 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-06-26 20:13:42 +0200
commit37e91b2ebb14082e366ed4a9b09d76a2f6163818 (patch)
tree71b10fc0e6452d3c5e12e167c55ac3f9aace63a8 /src/cfg.h
parent8215e0c6c1465eca8ec93cbf3f1f835e8bb7495b (diff)
#971 rename sources folder to src
Use the same folder as in ogClient.
Diffstat (limited to 'src/cfg.h')
-rw-r--r--src/cfg.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/cfg.h b/src/cfg.h
new file mode 100644
index 0000000..cfb37bd
--- /dev/null
+++ b/src/cfg.h
@@ -0,0 +1,33 @@
+#ifndef _OG_SERVER_CFG_H
+#define _OG_SERVER_CFG_H
+
+struct og_server_cfg {
+ struct {
+ const char *user;
+ const char *pass;
+ const char *ip;
+ 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);
+
+extern char auth_token[4096];
+extern char usuario[4096];
+extern char pasguor[4096];
+extern char catalog[4096];
+extern char datasource[4096];
+extern char interface[4096];
+extern char api_token[4096];
+
+void from_json_to_legacy(struct og_server_cfg *cfg);
+
+#endif