#ifndef _GAME_FRAME_MANAGER_H_INCLUDE_
#define _GAME_FRAME_MANAGER_H_INCLUDE_

#include "../include/molnet/Network.h"
#include "../include/Common/defines.h"
#include <string.h>

#include <jsoncpp/json/json.h>

using namespace network;

class GameFrameManager : public Singleton<GameFrameManager>
{
public:
	/// 캯
	GameFrameManager();
	/// 
	~GameFrameManager();

	/// ڴյϢ
	void OnProcessNetMes(uint32 connId,CMolMessageIn *mes);

	/// ڴϢ
	void OnProcessConnectedNetMes(uint32 connId);

	/// ڴڶϿϢ
	void OnProcessDisconnectNetMes(uint32 connId);

private:
	/// û¼ϵͳϢ
	void OnProcessUserLoginMes(uint32 connId,Json::Value &mes);
	/// ûϢϢ
	void OnProcessUserInfoUpdateMes(uint32 connId,Json::Value &mes);
	/// ûעϢ
	void OnProcessUserRegisterMes(uint32 connId,Json::Value &mes);
	/// õǰ߷б
	void OnProcessUserGetOnlineRoomMes(uint32 connId);
	/// ǮϢ
	void OnProcessUserBankMes(uint32 connId,Json::Value &mes);
	/// õҵĽ
	bool GetUserMoney(uint32 UserId,int64 *money,int64 *bankmoney);
	/// õеϷϢ
	void OnProcessGetGamesMes(uint32 connId,Json::Value &mes);

private:
    std::map<uint32,uint32>  m_onlineuserlist;
};

#define ServerGameFrameManager GameFrameManager::getSingleton()

extern int m_accountserverid;

#endif
