Files
2022-10-26 12:25:11 +08:00

41 lines
1.0 KiB
C++

#pragma once
#include "AgentInfo.h"
#include <Singleton.h>
#include <map>
#include <set>
class ServerSession;
class ServerInfo;
class UserSession;
class AgentInfoManager : public Singleton<AgentInfoManager>
{
public:
AgentInfoManager(void);
~AgentInfoManager(void);
private:
typedef std::map< DWORD, AgentInfo* > AGENTINFO_MAP;
typedef AGENTINFO_MAP::iterator AGENTINFO_ITER;
private:
AGENTINFO_MAP m_mapAgentInfo;
public:
BOOL AddAgentInfo( AgentInfo* pAgentInfo );
WORD GetAgentInfoNum(){ m_mapAgentInfo.size(); }
VOID Release();
AgentInfo* FindAgentInfo( DWORD dwAgentKey );
BOOL AddNewAgentInfo( DWORD dwAgentKey );
DWORD GetAgentKey( const TCHAR* pszIP );
VOID ExecuteServerList( std::set<DWORD>& setAgentKey );
VOID ExecuteServer( ServerSession* pAgentSession, ServerInfo* pServerInfo );
VOID ExecutePatchList( std::set<DWORD>& setAgentKey, UserSession* pUserSession, BYTE byServerType, DWORD dwPatchKey );
BOOL ExecutePatch( ServerSession* pAgentSession, BYTE byServerType, DWORD dwPatchKey );
};