82 lines
2.7 KiB
C++
82 lines
2.7 KiB
C++
#pragma once
|
|
|
|
#include <PublicStruct.h>
|
|
#include <ServerStruct.h>
|
|
#include <BaseParser.h>
|
|
#include <Singleton.h>
|
|
#include <string>
|
|
#include <map>
|
|
|
|
#ifdef __20101123__UPDATE_AGENT_AUTO_RESTART
|
|
#include "Schedule.h"
|
|
#endif
|
|
|
|
typedef std::map< BYTE, std::string > GAMESERVER_MAP;
|
|
typedef GAMESERVER_MAP::iterator GAMESERVER_MAP_ITER;
|
|
typedef std::map< BYTE, std::string > GAMEPROCESS_MAP;
|
|
typedef GAMEPROCESS_MAP::iterator GAMEPROCESS_MAP_ITER;
|
|
|
|
class AgentInfoParser : public Singleton<AgentInfoParser>, public BaseParser
|
|
{
|
|
#ifdef _NA_006662_20130423_SVNPATCH
|
|
public:
|
|
enum ePATCH_STYLE {
|
|
PATCHSTYLE_FTP =0,
|
|
PATCHSTYLE_SVN,
|
|
};
|
|
#endif //_NA_006662_20130423_SVNPATCH
|
|
public:
|
|
AgentInfoParser(void);
|
|
~AgentInfoParser(void);
|
|
|
|
private:
|
|
SERVER_ENV m_ServerEnv;
|
|
AddressInfo m_UpdateServer;
|
|
TCHAR m_szToolPath[MAX_PATH];
|
|
GAMESERVER_MAP m_mapGameServer;
|
|
GAMEPROCESS_MAP m_mapGameProcess;
|
|
DWORD m_dwCheckTime;
|
|
TCHAR m_szAuthSystemLogViewPath[MAX_PATH];
|
|
TCHAR m_szLogViewPath[MAX_PATH];
|
|
TCHAR m_szNoticePath[MAX_PATH];
|
|
TCHAR m_szBasicServerPath[MAX_PATH];
|
|
#ifdef __20080312__SOLARAUTH_SERVER_PATCH
|
|
TCHAR m_szSCFolderPath[MAX_PATH];
|
|
#endif
|
|
#ifdef __20101123__UPDATE_AGENT_AUTO_RESTART
|
|
Schedule m_AutoStopSchedule;
|
|
Schedule m_AutoStartSchedule;
|
|
#endif
|
|
#ifdef _NA_006662_20130423_SVNPATCH
|
|
DWORD patch_style_;
|
|
#endif //_NA_006662_20130423_SVNPATCH
|
|
|
|
public:
|
|
BOOL Load( const TCHAR* pszFileName );
|
|
SERVER_ENV* GetServerEnv(){ return &m_ServerEnv; }
|
|
AddressInfo& GetUpdateServerInfo(){ return m_UpdateServer; }
|
|
TCHAR* GetToolPath(){ return m_szToolPath; }
|
|
BOOL GetGameServerPath( BYTE byServerType, OUT std::string& strPath );
|
|
GAMEPROCESS_MAP& GetGameProcess(){ return m_mapGameProcess; }
|
|
BOOL GetGameProcessName( BYTE byServerType, OUT std::string& strName );
|
|
DWORD GetIntervalTime(){ return m_dwCheckTime; }
|
|
TCHAR* GetAuthSystemLogViewPath(){ return m_szAuthSystemLogViewPath; }
|
|
TCHAR* GetLogViewPath(){ return m_szLogViewPath; }
|
|
TCHAR* GetNoticePath(){ return m_szNoticePath; }
|
|
TCHAR* GetBasicServerPath(){ return m_szBasicServerPath; }
|
|
#ifdef __20080312__SOLARAUTH_SERVER_PATCH
|
|
const TCHAR* GetSCFolderPath() const { return m_szSCFolderPath; }
|
|
#endif
|
|
#ifdef __20101123__UPDATE_AGENT_AUTO_RESTART
|
|
bool ScheduleNextStop(ScheduleToken& token) const {
|
|
return m_AutoStopSchedule.FindNearestAhead(token);
|
|
}
|
|
bool ScheduleNextStart(ScheduleToken& token) const {
|
|
return m_AutoStartSchedule.FindNearestAhead(token);
|
|
}
|
|
#endif
|
|
#ifdef _NA_006662_20130423_SVNPATCH
|
|
DWORD GetPatchStyle() { return patch_style_;} // 패치방식 / 0: 기존의 ftp방식, 1: svn update방식(bat파일 실행)
|
|
#endif //_NA_006662_20130423_SVNPATCH
|
|
};
|