version 1.1, 2011/11/22 20:22:57
|
version 1.1.2.2, 2011/11/23 00:42:16
|
Line 0
|
Line 1
|
|
#ifndef __DBMQTT_H |
|
#define __DBMQTT_H |
|
|
|
|
|
/* |
|
* mqtt_db_open() Open database connection |
|
* |
|
* @csCfgName = config filename |
|
* @modtype = RTL module type, 0== mqtt_acc or !=0 mqtt_pub |
|
* return: NULL error or SQL handle |
|
*/ |
|
sqlite3 *mqtt_db_open(sl_config *cfg, int modtype); |
|
/* |
|
* mqtt_db_close() Close database connection |
|
* |
|
* @sql = SQL handle |
|
* return: none |
|
*/ |
|
void mqtt_db_close(sqlite3 *sql); |
|
/* |
|
* mqtt_db_log() Log database connection message |
|
* |
|
* @fmt = format string |
|
* @... = argument list |
|
* return: none |
|
*/ |
|
void mqtt_db_log(const char *fmt, ...); |
|
#define MQTT_DB_LOG(_sql) (assert((_sql)), mqtt_db_log("Error:: SQL #%d - %s", \ |
|
sqlite3_errcode((_sql)), sqlite3_errmsg((_sql)))) |
|
|
|
|
|
#endif |