	public:
		int roleid;
		unsigned int localsid;
		int remain_time;
		unsigned char present_type;
		enum { PROTOCOL_TYPE = PROTOCOL_ANNOUNCENEWMAIL };
	public:
		AnnounceNewMail() { type = PROTOCOL_ANNOUNCENEWMAIL; }
		AnnounceNewMail(void*) : Protocol(PROTOCOL_ANNOUNCENEWMAIL) { }
		AnnounceNewMail (int l_roleid,unsigned int l_localsid,int l_remain_time,
			unsigned char l_present_type = 0)
			 : roleid(l_roleid),localsid(l_localsid),remain_time(l_remain_time)
			,present_type(l_present_type)
		{
			type = PROTOCOL_ANNOUNCENEWMAIL;
		}

		AnnounceNewMail(const AnnounceNewMail &rhs)
			: Protocol(rhs),roleid(rhs.roleid),localsid(rhs.localsid),remain_time(rhs.remain_time)
			,present_type(rhs.present_type) { }

		GNET::Protocol *Clone() const { return new AnnounceNewMail(*this); }

		OctetsStream& marshal(OctetsStream & os) const
		{
			os << roleid;
			os << localsid;
			os << remain_time;
			os << present_type;
			return os;
		}

		const OctetsStream& unmarshal(const OctetsStream &os)
		{
			os >> roleid;
			os >> localsid;
			os >> remain_time;
			os >> present_type;
			return os;
		}

		int PriorPolicy( ) const { return 1; }

		bool SizePolicy(size_t size) const { return size <= 32; }
