#ifndef TS3DB_H
#define TS3DB_H
typedef enum {
LOG_CRITICAL = 0,
LOG_ERROR = 1,
LOG_WARNING = 2,
LOG_DEBUG = 3,
LOG_INFO = 4,
LOG_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