recorder/udata.h

44 lines
1.1 KiB
C
Raw Normal View History

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 */
int revgeo; /* True (default) if we should do reverse Geo lookups */
int qos; /* Subscribe QoS */
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
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
char *label; /* Server label */
char *geokey; /* Google reverse-geo API key */
2015-08-14 09:40:35 -07:00
};
2015-08-15 01:46:46 -07:00
#endif