Files
mir_server/server/DBServer/DBConfig.h
aixianling 5c9f1dae4a init
2025-01-09 17:45:40 +08:00

61 lines
1.0 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef _DB_CONFIG_H_
#define _DB_CONFIG_H_
class CCustomLuaConfig;
typedef struct AddrPortConf
{
char szAddr[20];
int nPort;
} ADDRPORTCONF,*PADDRPORTCONF;
typedef struct DbConf{
char szHost[20];
int nPort;
char szDbName[20];
char szUser[20];
char szPassWord[128];
char szKey[17];//用于解密的key16位
int boUtf8;
}DBCONF,*PDBCONF;
class CDBConfig:
public CCustomLuaConfig
{
public:
/*
* 只读取同目录下的指定配置文件
*/
bool ReadConfig(const char *pszConfigFileName);
//装置跨服配置文件
bool LoadCrossServerConfig();
public:
CDBConfig(void);
~CDBConfig(void);
public:
char ServerName[128];
int ServerIndex;
ADDRPORTCONF GateAddr;
ADDRPORTCONF DataAddr;
ADDRPORTCONF LogAddr;
ADDRPORTCONF SessionAddr;
ADDRPORTCONF NameAddr;
ADDRPORTCONF DBCenterAddr;
DBCONF DbConf;
CHAR m_EsqlToolPath[128]; //esqltool的配置路径
CHAR m_sPrefixList[32];
//CHAR m_sConnectList[32];
CHAR m_sStuffixList[32];
protected:
void ShowError(const LPCTSTR sError);
};
#endif