#ifndef _C_COMMON_RENDER_FRAME_H_INCLUDE_
#define _C_COMMON_RENDER_FRAME_H_INCLUDE_

#include "ccommon.h"

class CCommonRenderDevice;
class CCommonSocket;
class CMolMessageIn;
class Player;
class Room;

/** 
 * ͨûͼܣڸֳĻ
 */
class CCommonRenderFrame
{
public:
	/// 캯
	CCommonRenderFrame(SceneType type=SCENE_TYPE_GAMEROOM) { }
	/// 
	virtual ~CCommonRenderFrame() {}

	/// Ϸ
	virtual void SetSceneType(SceneType type) = 0;
	/// õϷ
	virtual SceneType GetSceneType(void) = 0;
	/// Ⱦ豸
	virtual void SetDevice(CCommonRenderDevice *pDevice) = 0;
	/// 
	virtual void SetGameRoom(Player *pPlayer,Room *pRoom) = 0;
	/// ϷԴ
	virtual bool LoadGameResources(void) = 0;
	/// жϷԴ
	virtual bool ShutdownGameResources(void) = 0;
	/// Ϸ
	virtual void ResetGameScene(void) = 0;
	/// Ϸ
	virtual void DrawGameScene(void) = 0;
	/// Ϸ¼
	virtual bool OnEvent(const SEvent& event) = 0;

	/// ûʱϢ
	virtual void OnProcessTimerMsg(int timerId,int curTimer) = 0;
	/// ϵͳϢ
	virtual void OnProcessSystemMsg(int msgType,CString msg) = 0;
	/// Ϣ
	virtual void OnProcessMatchingMsg(int msgType,CMolMessageIn *mes) = 0;

	///////////////////////////ºϷʹ///////////////////////////////////////

	/// ڴûʼϷʼϢ
	virtual void OnProcessPlayerGameStartMes(void) = 0;
	/// ڴûϷϢ
	virtual void OnProcessPlayerGameOverMes(void) = 0;
	/// ڴûϷϢ
	virtual void OnProcessPlayerRoomMes(CMolMessageIn *mes) = 0;
	/// û뷿Ϣ
	virtual void OnProcessEnterRoomMsg(int pChairId) = 0;
	/// û뿪Ϣ
	virtual void OnProcessLeaveRoomMsg(int pChairId) = 0;
	/// ûϢ
	virtual void OnProcessOfflineRoomMes(int pChairId) = 0;
	/// ûϢ
	virtual void OnProcessReEnterRoomMes(int pChairId,CMolMessageIn *mes) = 0;

	////////////////////////////////////////////////////////////////////////////////////
};

#endif