specfile: Use import's ability to find logfiles by parsing nagios.cfg
[nagios-reports-module.git] / sql.h
blobb89cd05bfa8cfabca6e5c383e397240ecea00378
1 #ifndef _SQL_H_
2 #define _SQL_H_
4 #include "nagios/nebstructs.h"
5 #include <mysql/mysql.h>
7 typedef MYSQL_RES SQL_RESULT;
8 typedef MYSQL_ROW SQL_ROW;
10 extern int sql_config(const char *key, const char *value);
11 extern int sql_init(void);
12 extern int sql_close(void);
13 extern char *sql_escape(const char *str);
14 extern const char *sql_error(void);
15 extern int sql_errno(void);
16 extern SQL_RESULT *sql_get_result(void);
17 extern SQL_ROW sql_fetch_row(SQL_RESULT *result);
18 extern void sql_free_result(SQL_RESULT *result);
19 extern int sql_query(const char *fmt, ...)
20 __attribute__((__format__(__printf__, 1, 2)));
22 extern const char *sql_db_name();
23 extern const char *sql_table_name();
25 #endif