2015-08-15 01:46:46 -07:00
|
|
|
#ifndef UDATA_H_INCLUDED
|
|
|
|
# define UDATA_H_INCLUDED
|
|
|
|
|
2015-09-17 23:23:10 -07:00
|
|
|
#include "json.h"
|
2015-08-14 09:40:35 -07:00
|
|
|
|
2015-09-28 10:04:37 -07:00
|
|
|
#ifdef WITH_HTTP
|
2015-08-27 14:42:18 -07:00
|
|
|
# include "mongoose.h"
|
|
|
|
#endif
|
2015-09-28 10:04:37 -07:00
|
|
|
#ifdef WITH_LMDB
|
2015-09-01 04:31:49 -07:00
|
|
|
# include "gcache.h"
|
|
|
|
#endif
|
2015-08-27 14:42:18 -07:00
|
|
|
|
2015-08-14 09:40:35 -07:00
|
|
|
|
|
|
|
struct udata {
|
2015-09-17 23:23:10 -07:00
|
|
|
JsonNode *topics; /* Array of topics to subscribe to */
|
2015-08-14 09:40:35 -07:00
|
|
|
int ignoreretained; /* True if retained messages should be ignored */
|
|
|
|
char *pubprefix; /* If not NULL (default), republish modified payload to <pubprefix>/topic */
|
|
|
|
int skipdemo; /* True if _demo users are to be skipped */
|
2015-08-19 08:27:49 -07:00
|
|
|
int revgeo; /* True (default) if we should do reverse Geo lookups */
|
2015-08-19 09:24:24 -07:00
|
|
|
int qos; /* Subscribe QoS */
|
2015-09-21 02:34:00 -07:00
|
|
|
int verbose; /* TRUE if print verbose messages to stdout */
|
2015-10-23 08:03:19 -07:00
|
|
|
int norec; /* If TRUE, no .REC files are written to */
|
2015-09-28 10:04:37 -07:00
|
|
|
#ifdef WITH_LMDB
|
2015-09-01 04:31:49 -07:00
|
|
|
struct gcache *gc;
|
2015-09-24 04:18:16 -07:00
|
|
|
struct gcache *t2t; /* topic to tid */
|
2015-10-22 01:48:13 -07:00
|
|
|
# ifdef WITH_RONLY
|
|
|
|
struct gcache *ronlydb; /* RONLY db */
|
|
|
|
# endif
|
2015-09-01 04:31:49 -07:00
|
|
|
#endif
|
2015-09-28 10:04:37 -07:00
|
|
|
#ifdef WITH_HTTP
|
2015-09-03 10:11:20 -07:00
|
|
|
struct mg_server *mgserver; /* Mongoose */
|
2015-08-27 14:42:18 -07:00
|
|
|
#endif
|
2015-09-19 07:11:53 -07:00
|
|
|
#ifdef WITH_LUA
|
|
|
|
struct luadata *luadata; /* Lua stuff */
|
2015-10-22 12:10:15 -07:00
|
|
|
# ifdef WITH_LMDB
|
2015-09-25 08:43:17 -07:00
|
|
|
struct gcache *luadb; /* lmdb named database 'luadb' */
|
|
|
|
# endif
|
2015-09-19 07:11:53 -07:00
|
|
|
#endif
|
2015-10-01 03:06:00 -07:00
|
|
|
char *label; /* Server label */
|
2016-01-05 01:59:49 -07:00
|
|
|
char *geokey; /* Google reverse-geo API key */
|
2015-08-14 09:40:35 -07:00
|
|
|
};
|
2015-08-15 01:46:46 -07:00
|
|
|
|
|
|
|
#endif
|