forked from owntracks/recorder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
udata.h
60 lines (55 loc) · 1.96 KB
/
udata.h
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef UDATA_H_INCLUDED
# define UDATA_H_INCLUDED
#include "json.h"
#ifdef WITH_HTTP
# include <stdarg.h>
# include "mongoose.h"
#endif
// #include "gcache.h"
struct udata {
JsonNode *topics; /* Array of topics to subscribe to */
int ignoreretained; /* True if retained messages should be ignored */
#if WITH_MQTT
struct mosquitto *mosq; /* MQTT connection */
char *pubprefix; /* If not NULL (default), republish modified payload to <pubprefix>/topic */
int qos; /* Subscribe QoS */
char *hostname; /* MQTT broker */
int port; /* MQTT port */
char *username; /* MQTT user */
char *password; /* MQTT password */
char *clientid; /* MQTT clientid */
char *cafile; /* path to CA PEM for MQTT */
char *capath; /* CA path */
char *certfile; /* certificate (client) */
char *keyfile; /* client key */
char *identity; /* PSK identity (hint) */
char *psk; /* PSK */
#endif
int skipdemo; /* True if _demo users are to be skipped */
int revgeo; /* True (default) if we should do reverse Geo lookups */
int verbose; /* TRUE if print verbose messages to stdout */
int norec; /* If TRUE, no .REC files are written to */
struct gcache *gc;
struct gcache *t2t; /* topic to tid */
#ifdef WITH_HTTP
struct mg_server *mgserver; /* Mongoose */
char *http_host; /* address of http bind */
int http_port; /* port number for above */
char *http_logdir; /* full path to http access log */
char *browser_apikey; /* Google maps browser API key */
#endif
#ifdef WITH_LUA
char *luascript; /* Path to Lua script */
struct luadata *luadata; /* Lua stuff */
struct gcache *luadb; /* lmdb named database 'luadb' */
#endif
#ifdef WITH_ENCRYPT
struct gcache *keydb; /* encryption keys */
#endif
char *label; /* Server label */
char *geokey; /* reverse-geo API key */
int debug; /* enable for debugging */
struct gcache *httpfriends; /* lmdb named database 'friends' */
struct gcache *wpdb; /* lmdb named database 'wp' (waypoints) */
};
#endif