--- mqtt/inc/rtlm.h 2011/11/23 01:07:17 1.1.2.2 +++ mqtt/inc/rtlm.h 2012/02/01 15:04:24 1.2.2.1 @@ -10,8 +10,32 @@ void mqttUnloadRTLM(int); inline int mqttMkDir(sl_config *); -sqlite3 *(*mqttOpenDB)(sl_config *cfg, int modtype); -void (*mqttCloseDB)(sqlite3 *sql); +struct tagCallbacks { + /* mqtt_acc.so */ + void *(*OpenACC)(sl_config *); + void (*CloseACC)(void *); + int (*LoginACC)(sl_config *, void *, const char*, const char*); + + /* mqtt_pub.so */ + void *(*OpenPUB)(sl_config *); + void (*ClosePUB)(void *); + int (*InitSessPUB)(sl_config *, void *, const char*, const char*, const char*, char, ...); + int (*FiniSessPUB)(sl_config *, void *, const char*, const char*, const char*); + int (*ChkSessPUB)(sl_config *, void *, const char*, const char*, const char*); + + int (*WritePUB_topic)(sl_config *, void *, u_short, const char*, const char*, const char*, const char*, char); + mqtt_subscr_t *(*ReadPUB_topic)(sl_config *, void *, u_short, const char*, char); + int (*DeletePUB_topic)(sl_config *, void *, u_short, const char*, const char*, const char*, char); + + int (*WritePUB_subscribe)(sl_config *, void *, u_short, const char*, const char*, const char*); + mqtt_subscr_t *(*ReadPUB_subscribe)(sl_config *, void *, u_short, const char*); + int (*DeletePUB_subscribe)(sl_config *, void *, u_short, const char*, const char*, const char*); + + /* mqtt_log.so */ + void *(*OpenLOG)(sl_config *); + void (*CloseLOG)(void *); + int (*LOG)(void *, const char *, ...); +}; #endif