#pragma once

#include <vector>
#include <string>
#include "NetCli_Mail.h"

using namespace std;

struct NetInboxInfo
{
	string			sender;
	string			subject;
	string			content;
	int				DBID;	
	int				money;
	int				CODAmount;
	int				leftTime;
	bool			isSystem;
	bool			wasRead;
	bool			wasReturned;
	bool			canReply;
	ItemFieldStruct	itemData;
};

class NetCli_MailChild : public NetCli_Mail
{
public:
	static bool _Init();
	static bool _Release();

public:
	static	void				ClearInboxList		();
	static	int					GetInboxNumItems	()						{ return m_indoxNumItems; }
	static	int					GetInboxMaxNumItems	()						{ return m_inboxMaxNumItems; }
	static	NetInboxInfo*		GetInboxInfo		(int index);
	static	bool				InboxItemCanDelete	(int index);
	static	void				ReadInboxItem		(int index);
	static	void				DeleteInboxItem		(int index);
	static	void				ReturnInboxItem		(int index);
	static	void				TakeInboxItem		(int index);

	virtual void RL_SendMailResult	( SendMailResultEnum Result );
	virtual void RL_GetItemResult	( int MailDBID , bool Result );
	virtual void RD_MailListResult	( int MailDBID , int Index , MailBaseInfoStruct&  MailBaseInfo , char* Content );
	virtual void RD_MailListCountResult	( int MaxCount , int Count );
//	virtual void RD_ReadMailResult	( int MailDBID , MailBaseInfoStruct&  MailBaseInfo , char* Content , bool Result  );	

	static	vector<NetInboxInfo>	m_inbox;
	static	int						m_indoxNumItems;
	static	int						m_inboxMaxNumItems;
};

