// MonitoringTool.h : main header file for the PROJECT_NAME application #pragma once #ifndef __AFXWIN_H__ #error include 'stdafx.h' before including this file for PCH #endif #include "resource.h" // main symbols #include "MonitoringToolDlg.h" #include #include /** \mainpage "RylMonitoringTool" ÀÛ¼ºÀÏÀÚ: 2005-11-10\n ÀÛ¼ºÀÚ: ÀÓÁØÇ¥\n\n - RylMonitoringTool: äÆÃ¼­¹ö¿Í ¿¬°áÇÏ¿© À¯ÀúµéÀÇ Ã¤ÆÃ³»¿ëÀ» ½Ç½Ã°£À¸·Î ¸ð´ÏÅ͸µ\n ¡Ø °£´ÜÇÑ ÄÚµåÀÇ ¼³¸íÀº »ý·«ÇÏ¿´½À´Ï´Ù.*/ namespace ClientNet { class CManagerServerEventHandler; class CChatServerEventHandler; class CClientEventHandlerMgr; }; class CBufferFactory; class CCommand; class CServerLog; /** \class CMonitoringToolApp ¸ð´ÏÅ͸µ Åø ¸ÞÀΠŬ·¡½º*/ class CMonitoringToolApp : public CWinApp { public: CMonitoringToolApp(); virtual BOOL InitInstance(); virtual int ExitInstance(); ClientNet::CClientEventHandlerMgr& GetEventHandlerMgr() { return *m_lpEventHandlerMgr; } ClientNet::CManagerServerEventHandler* GetManagerHandler() { return m_lpManageServerEventHandler; } void RegisterManagerHandler(ClientNet::CManagerServerEventHandler* lpHandler); void RemoveManagerHandler(ClientNet::CManagerServerEventHandler* lpHandler); ClientNet::CChatServerEventHandler* GetChatServerHandler(unsigned int nServerGroup); void RegisterChatHandler(unsigned int nServerGroup, ClientNet::CChatServerEventHandler* lpHandler); void RemoveChatHandler(unsigned int nServerGroup, ClientNet::CChatServerEventHandler* lpHandler); template bool EnumChatServerHandler(FnProcess fnProcess) { ChatServerHandlerMap::iterator pos = m_ChatHandlerMap.begin(); ChatServerHandlerMap::iterator end = m_ChatHandlerMap.end(); for (; pos != end; ++pos) { fnProcess(pos->first, pos->second); } return true; } CWnd* GetRegisteredWindow(unsigned int nIDD); bool RegisterWindow(unsigned int nIDD, CWnd* lpWindow); bool RemoveWindow(unsigned int nIDD); void InitServerNameMap(); void InitServerIndexMap(); const char* GetServerName(unsigned int nServerGroup); unsigned int GetServerIndex(CString strServerName); const CString& GetDefaultiniFileName() const { return m_DefaultiniFileName; } void SetAuthorized(bool bIsAuthorized) { m_bIsAuthorized = bIsAuthorized; } bool IsAuthorized() { return m_bIsAuthorized; } void SetLoginedName(const CString& strLoginedName) { m_strLoginedName = strLoginedName; } const CString& GetLoginedName() { return m_strLoginedName; } void ReportResult(const char* szResult); afx_msg void OnAppAbout(); DECLARE_MESSAGE_MAP() private: bool m_bIsAuthorized; typedef std::map ChatServerHandlerMap; typedef std::map ServerNameMap; typedef std::map ServerIndexMap; typedef std::map WindowMap; ClientNet::CClientEventHandlerMgr* m_lpEventHandlerMgr; ClientNet::CManagerServerEventHandler* m_lpManageServerEventHandler; ///< °ü¸® ¼­¹ö ¼¼¼Ç CBufferFactory* m_lpBufferFactory; ///< ¹öÆÛ Factory ChatServerHandlerMap m_ChatHandlerMap; ///< Key : ¼­¹ö ±×·ì À妽º / Value : äÆÃ¼­¹ö ¼¼¼Ç WindowMap m_WindowMap; ServerNameMap m_ServerNameMap; ///< Key : ¼­¹ö ±×·ì À妽º / Value : ¼­¹ö ±×·ì ¸í ServerIndexMap m_ServerIndexMap; ///< Key : ¼­¹ö ±×·ì ¸í / Value : ¼­¹ö ±×·ì À妽º CString m_DefaultiniFileName; CString m_strLoginedName; }; extern CMonitoringToolApp theApp;