#ifndef _PLAYER_H_INCLUDE_
#define _PLAYER_H_INCLUDE_

#include <string>

#include "ccommon.h"

/**
 * ״̬
 */
enum PlayerState
{
	PLAYERSTATE_NORAML = 0,             // ״̬
	PLAYERSTATE_READY,                  // ׼״̬
	PLAYERSTATE_GAMING,                 // Ϸ״̬
	PLAYERSTATE_LOSTLINE,               // ״̬
	PLAYERSTATE_QUEUE                   // Ŷ״̬
};

/**
 * 
 */
enum PlayerType
{
	PLAYERTYPE_NORMAL = 0,              // ͨû
	PLAYERTYPE_ROBOT                    // û
};

/**
 * 豸
 */
enum PlayerDeviceType
{
	PLAYERDEVICETYPE_PC = 0,            // PCû
	PLAYERDEVICETYPE_ANDROID,           // ׿û
	PLAYERDEVICETYPE_IOS,               // iosû
	PLAYERDEVICETYPE_FLASH,             // flashû
	PLAYERDEVICETYPE_NULL
};

class Player
{
public:
	/// ID
	virtual void SetID(int id) = 0;
	/// õID
	virtual int GetID(void) = 0;
	/// ID
	virtual void SetConnectID(uint32 id) = 0;
	/// õID
	virtual uint32 GetConnectID(void) = 0;
	/// ڵķID
	virtual void SetRoomId(int id) = 0;
	/// õڵķID
	virtual int GetRoomId(void) = 0;
	/// 
	virtual void SetType(PlayerType type) = 0;
	/// õ
	virtual PlayerType GetType(void) = 0;
	/// 豸
	virtual void SetDeviceType(PlayerDeviceType type) = 0;
	/// õ豸
	virtual PlayerDeviceType GetDeviceType(void) = 0;
	/// ڷе
	virtual void SetChairIndex(int index) = 0;
	/// õڷе
	virtual int GetChairIndex(void) = 0;
	/// 
	virtual void SetName(std::string name) = 0;
	/// õ
	virtual std::string GetName(void) = 0;
	/// õ״̬
	virtual PlayerState GetState(void) = 0;
	/// ״̬
	virtual void SetState(PlayerState state) = 0;
	/// ǷԹ
	virtual void SetLookOn(bool isLook) = 0;
	/// õǷԹ
	virtual bool IsLookOn(void) = 0;

	/// ҽǮ
	virtual void SetMoney(int64 money) = 0;
	/// õҽ
	virtual int64 GetMoney(void) = 0;
	/// нǮ
	virtual void SetBankMoney(int64 money) = 0;
	/// õн
	virtual int64 GetBankMoney(void) = 0;
	/// ˰
	virtual void SetRevenue(int64 revenue) = 0;
	/// õ˰
	virtual int64 GetRevenue(void) = 0;
	/// Ӯֵ
	virtual void SetTotalResult(int64 result) = 0;
	/// õӮֵ
	virtual int64 GetTotalResult(void) = 0;
	/// ҵȼ
	virtual void SetLevel(int level) = 0;
	/// õҵȼ
	virtual int GetLevel(void) = 0;
	/// Ҿֵ
	virtual void SetExperience(unsigned int exp) = 0;
	/// õҾֵ
	virtual unsigned int GetExperience(void) = 0;
	/// ܾ
	virtual void SetTotalBureau(int bureau) = 0;
	/// õܾ
	virtual int GetTotalBureau(void) = 0;
	/// Ӯ
	virtual void SetSuccessBureau(int bureau) = 0;
	/// õӮ
	virtual int GetSuccessBureau(void) = 0;
	/// 
	virtual void SetFailBureau(int bureau) = 0;
	/// õ
	virtual int GetFailBureau(void) = 0;
	/// ܴ
	virtual void SetRunawayBureau(int bureau) = 0;
	/// õܴ
	virtual int GetRunawayBureau(void) = 0;
	/// ʤ
	virtual void SetSuccessRate(float rate) = 0;
	/// õʤ
	virtual float GetSuccessRate(void) = 0;
	/// 
	virtual void SetRunawayrate(float rate) = 0;
	/// õ
	virtual float GetRunawayrate(void) = 0;
	/// Ա
	virtual void SetSex(int psex) = 0;
	/// õԱ
	virtual int GetSex(void) = 0;
	/// ʵ
	virtual void SetRealName(std::string rn) = 0;
	/// õʵ
	virtual std::string GetRealName(void) = 0;
	/// ϵͳ
	virtual void SetSysType(int type) = 0;
	/// õϵͳ
	virtual int GetSysType(void) = 0;
	/// IPַ
	virtual void SetLoginIP(uint32 ip) = 0;
	/// õIPַ
	virtual uint32 GetLoginIP(void) = 0;

	/// ҵǰϷID
	virtual void setCurGameID(uint32 gameid) = 0;
	/// õҵǰϷID
	virtual uint32 getCurGameID(void) = 0;
	/// ҵǰID
	virtual void setCurTableIndex(int32 tableindex) = 0;
	/// õҵǰID
	virtual int32 getCurTableIndex(void) = 0;
	/// õҵǰID
	virtual void setCurChairIndex(int32 chairindex) = 0;
	/// õҵǰID
	virtual int32 getCurChairIndex(void) = 0;
	/// ҵǰڷID
	virtual void setCurServerId(uint32 serverid) = 0;
	/// õҵǰڷID
	virtual uint32 getCurServerId(void) = 0;
	/// ҵǰǷϷ
	virtual void setCurGamingState(bool state) = 0;
	/// õҵǰǷϷ
	virtual bool getCurGamingState(void) = 0;
	/// ǷԳ齱
	virtual void setIsChouJiang(bool iscj) = 0;
	/// õǷԳ齱
	virtual bool IsChouJiang(void) = 0;

	/// ʼһʱ
	virtual bool StartTimer(int timerId,int space) = 0;
	/// رһʱ
	virtual void StopTimer(int id) = 0;
	/// رеĶʱ
	virtual void StopAllTimer(void) = 0;

	/// Ϸ(˺ֻڻʹãûʹʹ÷Ϣͺ)
	virtual void SendGameMsg(Json::Value &msg) = 0;
	/// ׼Ϣ
	virtual void SendReadyMsg(void) = 0;

	/// Ƿڱ
	virtual bool IsMatching(void) = 0;
	/// Ƿ
	virtual void SetMatching(bool im) = 0;
	/// Ƿ
	virtual bool IsMatchSignUp(void) = 0;
	/// Ƿ
	virtual void SetMatchSignUp(bool ms) = 0;
	/// 
	virtual void SetMatchCount(int count) = 0;
	/// õ
	virtual int GetMatchCount(void) = 0;
	/// ܾ
	virtual void SetTotalMatchCount(int count) = 0;
	/// õܾ
	virtual int GetTotalMatchCount(void) = 0;
	/// 
	virtual void SetMatchResult(int64 result) = 0;
	/// õ
	virtual int64 GetMatchResult(void) = 0;
	/// ȡָұ
	virtual void GetPlayerRanking(void) = 0;
	/// ñ
	virtual void SetMatchRoomIndex(int index) = 0;
	/// õ
	virtual int GetMatchRoomIndex(void) = 0;
	/// Ƿе
	virtual bool IsMatchingLostLine(void) = 0;
	/// Ƿе
	virtual void SetMatchingLostLine(bool mlo) = 0;
};

#endif
