Version: 1.0.0
mysql_interface.h
Go to the documentation of this file.
1 #ifndef _WX_DATABASE_MYSQL_INTERFACES_H_
2 #define _WX_DATABASE_MYSQL_INTERFACES_H_
3 
4 #include "wx/database/wxprec.h"
5 #include <wx/dynlib.h>
6 
7 typedef void (STDCALL *MysqlServerEndType)(void);
8 typedef MYSQL* (STDCALL *MysqlInitType)(MYSQL*);
9 typedef MYSQL* (STDCALL *MysqlRealConnectType)(MYSQL*, const char*, const char*,
10  const char*, const char*, unsigned int, const char*, unsigned long);
11 typedef int (STDCALL *MysqlRealQueryType)(MYSQL*, const char*, unsigned long);
12 typedef const char* (STDCALL *MysqlErrorType)(MYSQL*);
13 typedef unsigned int (STDCALL *MysqlErrnoType)(MYSQL*);
14 typedef void (STDCALL *MysqlCloseType)(MYSQL*);
15 typedef my_bool (STDCALL *MysqlAutoCommitType)(MYSQL*, my_bool);
16 typedef my_bool (STDCALL *MysqlCommitType)(MYSQL*);
17 typedef my_bool (STDCALL *MysqlRollbackType)(MYSQL*);
18 typedef int (STDCALL *MysqlQueryType)(MYSQL*, const char*);
19 typedef my_ulonglong(STDCALL *MysqlAffectedRowsType)(MYSQL*);
20 typedef MYSQL_STMT* (STDCALL *MysqlStmtInitType)(MYSQL*);
21 typedef int (STDCALL *MysqlStmtPrepareType)(MYSQL_STMT*, const char*, unsigned long);
22 typedef int (STDCALL *MysqlStmtExecuteType)(MYSQL_STMT*);
23 typedef const char* (STDCALL *MysqlStmtErrorType)(MYSQL_STMT*);
24 typedef unsigned int (STDCALL *MysqlStmtErrnoType)(MYSQL_STMT*);
25 typedef my_bool (STDCALL *MysqlStmtFreeResultType)(MYSQL_STMT*);
26 typedef my_bool (STDCALL *MysqlStmtCloseType)(MYSQL_STMT*);
27 typedef MYSQL_RES* (STDCALL *MysqlListTablesType)(MYSQL*, const char*);
28 
29 typedef MYSQL_ROW (STDCALL *MysqlFetchRowType)(MYSQL_RES*);
30 typedef MYSQL_FIELD * (STDCALL *MysqlFetchFieldType)(MYSQL_RES*);
31 
32 typedef void (STDCALL *MysqlFreeResultType)(MYSQL_RES*);
33 typedef unsigned long (STDCALL *MysqlGetServerVersionType)(MYSQL*);
34 typedef MYSQL_RES* (STDCALL *MysqlStmtResultMetadataType)(MYSQL_STMT*);
35 typedef unsigned int (STDCALL *MysqlNumFieldsType)(MYSQL_RES*);
36 typedef unsigned long (STDCALL *MysqlStmtParamCountType)(MYSQL_STMT*);
37 typedef my_bool (STDCALL *MysqlStmtBindParamType)(MYSQL_STMT*, MYSQL_BIND*);
38 typedef int (STDCALL *MysqlStmtFetchType)(MYSQL_STMT*);
39 typedef my_bool (STDCALL *MysqlStmtBindResultType)(MYSQL_STMT*, MYSQL_BIND*);
40 typedef int (STDCALL *MysqlSelectDatabaseType)(MYSQL *mysql, const char *db);
41 typedef int (STDCALL *MysqlStmtAffectedRows)(MYSQL_STMT*);
42 
43 
45 {
46 public:
48  bool Init();
49 
71 
74 
84 
85 private:
86  wxDynamicLibrary m_MysqlDLL;
87 
120 };
121 
122 #endif//_WX_DATABASE_MYSQL_INTERFACES_H_
MysqlStmtBindParamType m_pMysqlStmtBindParam
int(STDCALL * MysqlStmtAffectedRows)(MYSQL_STMT *)
int(STDCALL * MysqlStmtExecuteType)(MYSQL_STMT *)
MysqlCloseType GetMysqlClose()
int(STDCALL * MysqlQueryType)(MYSQL *, const char *)
MysqlQueryType GetMysqlQuery()
MYSQL_FIELD *(STDCALL * MysqlFetchFieldType)(MYSQL_RES *)
MysqlStmtResultMetadataType m_pMysqlStmtResultMetadata
my_bool(STDCALL * MysqlRollbackType)(MYSQL *)
my_bool(STDCALL * MysqlStmtCloseType)(MYSQL_STMT *)
wxDynamicLibrary m_MysqlDLL
MYSQL_ROW(STDCALL * MysqlFetchRowType)(MYSQL_RES *)
MysqlRealConnectType m_pMysqlRealConnect
MysqlFreeResultType GetMysqlFreeResult()
MysqlRealQueryType GetMysqlRealQuery()
MysqlStmtBindResultType GetMysqlStmtBindResult()
MysqlServerEndType m_pMysqlServerEnd
MysqlStmtFreeResultType m_pMysqlStmtFreeResult
MysqlSelectDatabaseType m_pMysqlSelectDatabase
MysqlStmtErrnoType GetMysqlStmtErrno()
MysqlErrnoType GetMysqlErrno()
MysqlStmtExecuteType GetMysqlStmtExecute()
void(STDCALL * MysqlCloseType)(MYSQL *)
MYSQL_STMT *(STDCALL * MysqlStmtInitType)(MYSQL *)
MysqlFetchFieldType GetMysqlFetchField()
const char *(STDCALL * MysqlStmtErrorType)(MYSQL_STMT *)
MysqlStmtExecuteType m_pMysqlStmtExecute
unsigned int(STDCALL * MysqlStmtErrnoType)(MYSQL_STMT *)
void(STDCALL * MysqlFreeResultType)(MYSQL_RES *)
MysqlNumFieldsType GetMysqlNumFields()
MysqlStmtBindResultType m_pMysqlStmtBindResult
const char *(STDCALL * MysqlErrorType)(MYSQL *)
MysqlCommitType GetMysqlCommit()
my_bool(STDCALL * MysqlStmtFreeResultType)(MYSQL_STMT *)
MysqlStmtCloseType GetMysqlStmtClose()
MysqlRealQueryType m_pMysqlRealQuery
MysqlInitType GetMysqlInit()
MysqlErrnoType m_pMysqlErrno
MysqlAutoCommitType m_pMysqlAutoCommit
MysqlFetchRowType m_pMysqlFetchRow
MysqlStmtErrnoType m_pMysqlStmtErrno
MysqlStmtAffectedRows m_pMysqlStmtAffectedRows
MysqlStmtParamCountType m_pMysqlStmtParamCount
MysqlListTablesType GetMysqlListTables()
MysqlQueryType m_pMysqlQuery
MysqlStmtParamCountType GetMysqlStmtParamCount()
unsigned long(STDCALL * MysqlGetServerVersionType)(MYSQL *)
MysqlStmtFreeResultType GetMysqlStmtFreeResult()
MysqlStmtFetchType GetMysqlStmtFetch()
MysqlCloseType m_pMysqlClose
MysqlStmtInitType GetMysqlStmtInit()
MysqlStmtBindParamType GetMysqlStmtBindParam()
MysqlFetchFieldType m_pMysqlFetchField
MysqlNumFieldsType m_pMysqlNumFields
MysqlGetServerVersionType GetMysqlGetServerVersion()
MysqlStmtAffectedRows GetMysqlStmtAffectedRows()
MysqlStmtFetchType m_pMysqlStmtFetch
MysqlStmtErrorType m_pMysqlStmtError
my_bool(STDCALL * MysqlCommitType)(MYSQL *)
MysqlFreeResultType m_pMysqlFreeResult
MysqlListTablesType m_pMysqlListTables
MYSQL_RES *(STDCALL * MysqlListTablesType)(MYSQL *, const char *)
MYSQL_RES *(STDCALL * MysqlStmtResultMetadataType)(MYSQL_STMT *)
MysqlSelectDatabaseType GetMysqlSelectDatabase()
MysqlErrorType m_pMysqlError
MysqlStmtResultMetadataType GetMysqlStmtResultMetadata()
MysqlCommitType m_pMysqlCommit
unsigned int(STDCALL * MysqlErrnoType)(MYSQL *)
my_bool(STDCALL * MysqlStmtBindResultType)(MYSQL_STMT *, MYSQL_BIND *)
my_bool(STDCALL * MysqlStmtBindParamType)(MYSQL_STMT *, MYSQL_BIND *)
MysqlStmtPrepareType GetMysqlStmtPrepare()
void(STDCALL * MysqlServerEndType)(void)
MysqlServerEndType GetMysqlServerEnd()
MysqlGetServerVersionType m_pMysqlGetServerVersion
MysqlAutoCommitType GetMysqlAutoCommit()
MysqlAffectedRowsType GetMysqlAffectedRows()
MYSQL *(STDCALL * MysqlInitType)(MYSQL *)
unsigned long(STDCALL * MysqlStmtParamCountType)(MYSQL_STMT *)
MysqlRollbackType m_pMysqlRollback
MysqlStmtCloseType m_pMysqlStmtClose
unsigned int(STDCALL * MysqlNumFieldsType)(MYSQL_RES *)
int(STDCALL * MysqlStmtFetchType)(MYSQL_STMT *)
int(STDCALL * MysqlSelectDatabaseType)(MYSQL *mysql, const char *db)
my_ulonglong(STDCALL * MysqlAffectedRowsType)(MYSQL *)
MysqlAffectedRowsType m_pMysqlAffectedRows
MysqlInitType m_pMysqlInit
MysqlStmtPrepareType m_pMysqlStmtPrepare
MysqlStmtInitType m_pMysqlStmtInit
MysqlErrorType GetMysqlError()
MysqlFetchRowType GetMysqlFetchRow()
MysqlRollbackType GetMysqlRollback()
MysqlStmtErrorType GetMysqlStmtError()
MysqlRealConnectType GetMysqlRealConnect()
my_bool(STDCALL * MysqlAutoCommitType)(MYSQL *, my_bool)
MYSQL *(STDCALL * MysqlRealConnectType)(MYSQL *, const char *, const char *, const char *, const char *, unsigned int, const char *, unsigned long)
int(STDCALL * MysqlStmtPrepareType)(MYSQL_STMT *, const char *, unsigned long)
int(STDCALL * MysqlRealQueryType)(MYSQL *, const char *, unsigned long)