Files
recorder/udata.h
2016-02-23 12:05:46 +01:00

45 lines
1.3 KiB
C

#ifndef UDATA_H_INCLUDED
# define UDATA_H_INCLUDED
#include "json.h"
#ifdef WITH_HTTP
# 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
char *pubprefix; /* If not NULL (default), republish modified payload to <pubprefix>/topic */
int qos; /* Subscribe QoS */
#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_RONLY
struct gcache *ronlydb; /* RONLY db */
#endif
#ifdef WITH_HTTP
struct mg_server *mgserver; /* Mongoose */
#endif
#ifdef WITH_LUA
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; /* Google reverse-geo API key */
int debug; /* enable for debugging */
struct gcache *httpfriends; /* lmdb named database 'friends' */
};
#endif