#ifndef	__MODMYSQL_H__
#define	__MODMYSQL_H__

#ifdef WIN32
# include <windows.h>
# include <stdio.h>
# define strcasecmp _stricmp 
#else
# include <stdlib.h>
# include <string.h>
# include <stdio.h>
# include <unistd.h>
#endif

#include <ctype.h>

/*  mysql lib */
#include <mysql.h>

#include "../mdamodule.h"

typedef	struct {
	MYSQL *mysqlhandle;
	const char *lasterrormessage;
	char *string;
	mod_result *mod_result_head;
	mod_result *mod_result_tail;
	mod_config *cfg;
	size_t stringlen;
	char *ssl_crl;
	char *ssl_crlpath;
	char *ssl_mode;
	char *unix_socket;
	unsigned int port;
	unsigned int timeout_connection;
	unsigned int timeout_write;
	int lasterrno;
	uint8_t status;
} mod_t;

#endif

