--- mqtt/inc/rtlm.h 2011/11/23 00:42:16 1.1.2.1 +++ mqtt/inc/rtlm.h 2012/05/08 13:04:02 1.2.2.4 @@ -4,11 +4,38 @@ void mqttLog(const char *, ...); -void *mqttLoadRTLM(sl_config*, int); +void *mqttLoadRTLM(cfg_root_t*, int); void mqttUnloadRTLM(int); -sqlite3 *(*mqttOpenDB)(sl_config *cfg, int modtype); -void (*mqttCloseDB)(sqlite3 *sql); +inline int mqttMkDir(cfg_root_t *); + + +struct tagCallbacks { + /* mqtt_acc.so */ + void *(*OpenACC)(cfg_root_t *); + void (*CloseACC)(void *); + int (*LoginACC)(cfg_root_t *, void *, const char*, const char*); + + /* mqtt_pub.so */ + void *(*OpenPUB)(cfg_root_t *); + void (*ClosePUB)(void *); + int (*InitSessPUB)(cfg_root_t *, void *, const char*, const char*, const char*, char, ...); + int (*FiniSessPUB)(cfg_root_t *, void *, const char*, const char*, const char*); + int (*ChkSessPUB)(cfg_root_t *, void *, const char*, const char*, const char*); + + int (*WritePUB_topic)(cfg_root_t *, void *, u_short, const char*, const char*, const char*, const char*, char); + mqtt_subscr_t *(*ReadPUB_topic)(cfg_root_t *, void *, u_short, const char*, char); + int (*DeletePUB_topic)(cfg_root_t *, void *, u_short, const char*, const char*, const char*, char); + + int (*WritePUB_subscribe)(cfg_root_t *, void *, u_short, const char*, const char*, const char*, char); + mqtt_subscr_t *(*ReadPUB_subscribe)(cfg_root_t *, void *, const char*); + int (*DeletePUB_subscribe)(cfg_root_t *, void *, const char*, const char*, const char*); + + /* mqtt_log.so */ + void *(*OpenLOG)(cfg_root_t *); + void (*CloseLOG)(void *); + int (*LOG)(void *, const char *, ...); +}; #endif