// ServiceManagerEx.h : ServiceManagerEx ÀÀ¿ë ÇÁ·Î±×·¥¿¡ ´ëÇÑ ÁÖ Çì´õ ÆÄÀÏ // #pragma once #ifndef __AFXWIN_H__ #error "PCH¿¡ ´ëÇØ ÀÌ ÆÄÀÏÀ» Æ÷ÇÔÇϱâ Àü¿¡ 'stdafx.h'¸¦ Æ÷ÇÔÇÕ´Ï´Ù." #endif #include "resource.h" // ÁÖ ±âÈ£ÀÔ´Ï´Ù. #include "SMConfig.h" #include "GSMServer.h" #include "Scheduler.h" // CServiceManagerExApp: // ÀÌ Å¬·¡½ºÀÇ ±¸Çö¿¡ ´ëÇØ¼­´Â ServiceManagerEx.cppÀ» ÂüÁ¶ÇϽʽÿÀ. // class CLogViewDisplayer; class CServiceManagerExApp : public CWinApp { public: CServiceManagerExApp(); virtual ~CServiceManagerExApp(); // ÀçÁ¤ÀÇÀÔ´Ï´Ù. public: virtual BOOL InitInstance(); virtual int ExitInstance(); // ±¸ÇöÀÔ´Ï´Ù. afx_msg void OnAppAbout(); DECLARE_MESSAGE_MAP() public: virtual BOOL OnIdle(LONG lCount); virtual BOOL PreTranslateMessage(MSG* pMsg); public: bool LoadConfig(); void ReloadConfigEx(); public: void BuildView(); void RefreshView(); void RefreshStateView(); public: const ConfigEx& GetConfigEx() const { return m_ConfigEx; } public: void OnPatchStart(); void OnPatchProgress(int id, const wchar_t* key, unsigned long progress, unsigned long progressMax); void OnPatchEnd(bool succeeded); void OnUnzipProgress(int id, const wchar_t* filename, unsigned long progress, unsigned long progressMax); public: void OnWorldMaxUser(int id, int maxUser); void OnPatchFail(int id, const wchar_t* msg); void OnPatchCompleted(int id); void OnCommandPatch(); private: void LoadConfigEx(); bool CreateDisplayer(); bool InitServiceManager(); public: bool ReportExceptionToClipboard(); bool ReportExceptionToBuffer(size_t days, OUT wstring& buffer); bool ReportExceptionToFile(const wstring& filename); private: bool SaveToClipboard(const wstring& report); private: void BuildSchedule(); void ClearSchedule(); private: CGSMServer m_GSMServer; ConfigEx m_ConfigEx; HANDLE m_hMutex; CLogViewDisplayer* m_pLogDisplayer; SimpleScheduler::CScheduler m_Scheduler; }; extern CServiceManagerExApp theApp;