#pragma once

#include "PG_Guild.h"
#include "../../MainProc/NetGlobal.h"

class NetCli_Guild : public CNetGlobal
{
protected:
    //-------------------------------------------------------------------
    static	NetCli_Guild* This;
    static	bool _Init();
    static	bool _Release();	

	
	static void _PG_Guild_LtoC_CreateGuildResult	( int Sockid , int Size , void* Data );
	static void _PG_Guild_LtoC_NewGuildInvite		( int Sockid , int Size , void* Data );
	static void _PG_Guild_LtoC_NewGuildInviteResult	( int Sockid , int Size , void* Data );
	static void _PG_Guild_LtoC_JoindNewGuild		( int Sockid , int Size , void* Data );
													
	static void _PG_Guild_LtoC_LeaveNewGuildResult	( int Sockid , int Size , void* Data );
	static void _PG_Guild_LtoC_DelNewGuildResult	( int Sockid , int Size , void* Data );

	static void _PG_Guild_LtoC_GuildInvite			( int Sockid , int Size , void* Data );
	static void _PG_Guild_LtoC_GuildInviteResult	( int Sockid , int Size , void* Data );
	static void _PG_Guild_LtoC_JoindGuild			( int Sockid , int Size , void* Data );
	static void _PG_Guild_LtoC_LeaveGuildResult		( int Sockid , int Size , void* Data );
	static void _PG_Guild_LtoC_DelGuildResult		( int Sockid , int Size , void* Data );

	static void _PG_Guild_LtoC_GuildInfo			( int Sockid , int Size , void* Data );
	static void _PG_Guild_LtoC_GuildMemberListCount	( int Sockid , int Size , void* Data );
	static void _PG_Guild_LtoC_GuildMemberBaseInfo	( int Sockid , int Size , void* Data );
	static void _PG_Guild_LtoC_GuildMemberInfo		( int Sockid , int Size , void* Data );
	static void _PG_Guild_DtoC_GuildCreate			( int Sockid , int Size , void* Data );

	static void _PG_Guild_DtoC_BoardPostResult			( int Sockid , int Size , void* Data );	
	static void _PG_Guild_DtoC_BoardListCount			( int Sockid , int Size , void* Data );	
	static void _PG_Guild_DtoC_BoardListData			( int Sockid , int Size , void* Data );	
	static void _PG_Guild_DtoC_BoardMessageResult		( int Sockid , int Size , void* Data );	
	static void _PG_Guild_DtoC_BoardModifyMessageResult	( int Sockid , int Size , void* Data );	
	static void _PG_Guild_DtoC_BoardModifyModeResult	( int Sockid , int Size , void* Data );	

protected:
	static int	_MemberCount;
	static vector< GuildMemberBaseInfoStruct > _MemberList;
public:    
    NetCli_Guild() { This = this; }

	static	NetCli_Guild*	GetThis()		{ return This; }
	//////////////////////////////////////////////////////////////////////////
	// 連署
	//////////////////////////////////////////////////////////////////////////
	static void SL_CreateGuild				( char* GuildName );
	static void SL_NewGuildInvite			( char* PlayerName );
	static void SL_NewGuildInviteResult		( int GuildID , int LeaderDBID , bool Result );
	static void SL_LeaveNewGuild			( char* KickPlayerName );
	static void SL_DelNewGuild				( );

	//////////////////////////////////////////////////////////////////////////
	// 正式公會
	//////////////////////////////////////////////////////////////////////////
	static void SL_GuildInvite				( char* PlayerName );
	static void SL_GuildInviteResult		( int GuildID , int LeaderDBID , bool Result );
	static void SL_LeaveGuild				( char* KickPlayerName );
	static void SL_DelGuild					( );

	static void SL_ModifyGuildInfoRequest		( GuildBaseStruct& Guild );
	static void SL_ModifyGuildMemberInfoRequest	( GuildMemberStruct& Member );
	static void SL_GuildInfoRequet				( int GuildID );
	static void SL_GuildMemberListRequet		( int GuildID );
	static void SL_GuildMemberInfoRequet		( int MemberDBID );

	//////////////////////////////////////////////////////////////////////////
	// 留言板 
	//////////////////////////////////////////////////////////////////////////
	static void SL_BoardPostRequest				( char* Title , char* Message );
	static void SL_BoardListRequest				( int PageID );
	static void SL_BoardMessageRequest			( int MessageGUID );
	static void SL_BoardModifyMessageRequest	( int MessageGUID , char* Message );
	static void SL_BoardModifyModeRequest		( int MessageGUID  , GuildBoardModeStruct	Mode );	

	//////////////////////////////////////////////////////////////////////////
	virtual void RL_CreateGuildResult		( char* GuildName , CreateGuildResultENUM Result ) = 0;
	virtual void RL_NewGuildInvite			( int GuildID , char* LeaderName , int LeaderDBID ) = 0;
	virtual void RL_NewGuildInviteResult	( char* PlayerName , NewGuildInviteResultENUM	Result ) = 0;
	virtual void RL_JoindNewGuild			( int GuildID , char* LeaderName ) = 0;
	virtual void RL_LeaveNewGuildResult		( char* KickPlayerName , bool Result ) = 0;
	virtual void RL_DelNewGuildResult		( bool Result ) = 0;

	virtual void RL_GuildInvite				( int GuildID , char* LeaderName , int LeaderDBID ) = 0;
	virtual void RL_GuildInviteResult		( char* PlayerName , GuildInviteResultENUM	Result ) = 0;
	virtual void RL_JoindGuild				( int GuildID , char* LeaderName ) = 0;
	virtual void RL_LeaveGuildResult		( char* KickPlayerName , bool Result ) = 0;
	virtual void RL_DelGuildResult			( bool Result ) = 0;


	virtual void RL_GuildInfo			( GuildBaseStruct& Guild ) = 0;
	virtual void RL_GuildMemberBaseInfo	( vector< GuildMemberBaseInfoStruct >& MemberList ) = 0;
	virtual void RL_GuildMemberInfo		( GuildMemberStruct& Member ) = 0;
	virtual void RD_GuildCreate			( ) = 0;
	//////////////////////////////////////////////////////////////////////////
	// 留言板 
	//////////////////////////////////////////////////////////////////////////
	virtual void RD_BoardPostResult			( bool Result ) =0;
	virtual void RD_BoardListCount			( int MaxCount , int Count , int PageID ) =0;
	virtual void RD_BoardListData			( int MessageGUID , int Index , char* PlayerName , int Time , char* Title , GuildBoardModeStruct Type ) =0;
	virtual void RD_BoardMessageResult		( GuildBoardStruct&	Message ) =0;
	virtual void RD_BoardModifyMessageResult( bool Result ) =0;
	virtual void RD_BoardModifyModeResult	( bool Result ) =0;

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

