]>
jfr.im git - irc/rqf/shadowircd.git/blob - bandb/rsdb.h
1 /* $Id: rsdb.h 26164 2008-10-26 19:52:43Z androsyn $ */
2 #ifndef INCLUDED_rsdb_h
3 #define INCLUDED_rsdb_h
5 /* error handler callback */
6 typedef void rsdb_error_cb(const char *);
8 typedef int (*rsdb_callback
) (int, const char **);
10 typedef enum rsdb_transtype
25 int rsdb_init(rsdb_error_cb
*);
26 void rsdb_shutdown(void);
28 const char *rsdb_quote(const char *src
);
30 void rsdb_exec(rsdb_callback cb
, const char *format
, ...);
32 void rsdb_exec_fetch(struct rsdb_table
*data
, const char *format
, ...);
33 void rsdb_exec_fetch_end(struct rsdb_table
*data
);
35 void rsdb_transaction(rsdb_transtype type
);
38 int rs_vsnprintf(char *dest
, const size_t bytes
, const char *format
, va_list args
);
39 int rs_snprintf(char *dest
, const size_t bytes
, const char *format
, ...);