AMPS_DBEngine.h
#ifndef __HEADER_AMPS_DB_ENGINE_H
#define __HEADER_AMPS_DB_ENGINE_H
#ifdef __cplusplus
extern "C" {
#endif
#include "AMPS_Defines.h"
#include "AMPS_LinkList.h"
#include "AMPS_MemMgt.h"
#include "AMPS_EventSystem.h"
#include "AMPS_Core.h"
#include "AMPS_API.h"
typedef struct _BDEngineContext t_BDEngineContext;
struct _BDEngineContext
{
void* poDBHandle;
void* pvAMPSContext; //pointer to framework context
e_AMPSDBType oAMPSDBType;
char pchHostName[AMPS_MAX_IP_STRING_LENGTH];
char pchUserName[AMPS_SIZE_OF_DB_USER_NAME];
char pchPassword[AMPS_SIZE_OF_DB_PWD];
char pchDataBaseName[AMPS_SIZE_OF_DB_NAME];
unsigned int unDBPort;
char pchUnixSocket[AMPS_SIZE_OF_DB_UNIX_SOCKET];
unsigned long ulClientFlag;
};
void* DBEngine_Init(void* r_pvAMPSContext, e_AMPSDBType r_oAMPSDBType, char* r_pchHostName, char* r_pchUserName, char* r_pchPassword, char* r_pchDataBaseName);
void DBEngine_Cleanup(void* r_pvAMPSContext, void* r_pvBDEngineContext);
int DBEngine_Query(void* r_pvAMPSContext, void* r_pvBDEngineContext, const char* r_pcchQueryStatement, unsigned long r_ulLengthOfQuery, t_AMPSDBEngineResult* r_poAMPSDBEngineResult);
void DBEngine_FreeResults(void* r_pvAMPSContext, void* r_pvBDEngineContext, t_AMPSDBEngineResult* r_poAMPSDBEngineResult);
#ifdef __cplusplus
}
#endif
#endif //__HEADER_AMPS_DB_ENGINE_H
#ifndef __HEADER_AMPS_DB_ENGINE_H
#define __HEADER_AMPS_DB_ENGINE_H
#ifdef __cplusplus
extern "C" {
#endif
#include "AMPS_Defines.h"
#include "AMPS_LinkList.h"
#include "AMPS_MemMgt.h"
#include "AMPS_EventSystem.h"
#include "AMPS_Core.h"
#include "AMPS_API.h"
typedef struct _BDEngineContext
t_BDEngineContext;
struct _BDEngineContext
{
void*
poDBHandle;
void*
pvAMPSContext;
//pointer to framework context
e_AMPSDBType
oAMPSDBType;
char
pchHostName[AMPS_MAX_IP_STRING_LENGTH];
char
pchUserName[AMPS_SIZE_OF_DB_USER_NAME];
char
pchPassword[AMPS_SIZE_OF_DB_PWD];
char
pchDataBaseName[AMPS_SIZE_OF_DB_NAME];
unsigned int
unDBPort;
char
pchUnixSocket[AMPS_SIZE_OF_DB_UNIX_SOCKET];
unsigned long
ulClientFlag;
};
void* DBEngine_Init(void* r_pvAMPSContext, e_AMPSDBType r_oAMPSDBType, char* r_pchHostName, char* r_pchUserName, char* r_pchPassword, char* r_pchDataBaseName);
void DBEngine_Cleanup(void* r_pvAMPSContext, void* r_pvBDEngineContext);
int DBEngine_Query(void* r_pvAMPSContext, void* r_pvBDEngineContext, const char* r_pcchQueryStatement, unsigned long r_ulLengthOfQuery, t_AMPSDBEngineResult* r_poAMPSDBEngineResult);
void DBEngine_FreeResults(void* r_pvAMPSContext, void* r_pvBDEngineContext, t_AMPSDBEngineResult* r_poAMPSDBEngineResult);
#ifdef __cpl