#pragma once #include "AgentInfo.h" #include #include #include class ServerSession; class ServerInfo; class UserSession; class AgentInfoManager : public Singleton { 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& setAgentKey ); VOID ExecuteServer( ServerSession* pAgentSession, ServerInfo* pServerInfo ); VOID ExecutePatchList( std::set& setAgentKey, UserSession* pUserSession, BYTE byServerType, DWORD dwPatchKey ); BOOL ExecutePatch( ServerSession* pAgentSession, BYTE byServerType, DWORD dwPatchKey ); };