diff options
Diffstat (limited to '')
-rw-r--r-- | ts3db.h | 48 |
1 files changed, 48 insertions, 0 deletions
@@ -0,0 +1,48 @@ +#ifndef TS3DB_H +#define TS3DB_H + +typedef enum { + CRITICAL = 0, + ERROR = 1, + WARNING = 2, + DEBUG = 3, + INFO = 4, + DEVELOP = 5 +} loglevel; + +// common/log/log.cpp:73: +// void Log::logging(const std::string&, LogLevel, const std::string&, uint64) +// Assertion `lvl >= LogLevel_CRITICAL && lvl <= LogLevel_DEVEL' failed. +typedef int(*log_callback) (const char *msg, loglevel level); + +typedef void(*field_callback) (unsigned int res_nr, char* fieldname, void *context); +typedef void(*value_callback) (unsigned int index, char *value, void* context); +typedef void(*row_callback) (void* context); + +char *ts3dbplugin_version(); + +char *ts3dbplugin_name(); + +int ts3dbplugin_disconnect(); + +void ts3dbplugin_shutdown(); + +int ts3dbplugin_init(log_callback log, char *parameter); + +int ts3dbplugin_connect(unsigned int *connection_nr); + +char *ts3dbplugin_getlasterror(unsigned int connection_nr); + +unsigned int ts3dbplugin_tableexists(unsigned int connection_nr, const char* table_name); + +unsigned long long ts3dbplugin_getmodifiedrowcount(unsigned int connection_nr); + +unsigned long long ts3dbplugin_getlastinsertid(unsigned int connection_nr); + +unsigned int ts3dbplugin_open(unsigned int connection_nr, const char* query, + field_callback new_field, value_callback new_value, + row_callback new_row, void *context); + +unsigned int ts3dbplugin_exec(unsigned int connection_nr, const char* query); + +#endif |