Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
112 lines
3.6 KiB
C++
112 lines
3.6 KiB
C++
// 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 <map>
|
|
#include <string>
|
|
|
|
/** \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<class FnProcess>
|
|
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<unsigned int, ClientNet::CChatServerEventHandler*> ChatServerHandlerMap;
|
|
typedef std::map<unsigned int, std::string> ServerNameMap;
|
|
typedef std::map<CString, unsigned int> ServerIndexMap;
|
|
typedef std::map<unsigned long, CWnd*> 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; |