	public:
		int gmroleid;
		int localsid;
		int kickroleid;
		int forbid_time;
		Octets reason;
		enum { PROTOCOL_TYPE = PROTOCOL_GMKICKOUTROLE };
	public:
		GMKickoutRole() { type = PROTOCOL_GMKICKOUTROLE; }
		GMKickoutRole(void*) : Protocol(PROTOCOL_GMKICKOUTROLE) { }
		GMKickoutRole (int l_gmroleid,int l_localsid,int l_kickroleid,
			int l_forbid_time = 600,const Octets& l_reason = Octets())
			 : gmroleid(l_gmroleid),localsid(l_localsid),kickroleid(l_kickroleid)
			,forbid_time(l_forbid_time),reason(l_reason)
		{
			type = PROTOCOL_GMKICKOUTROLE;
		}

		GMKickoutRole(const GMKickoutRole &rhs)
			: Protocol(rhs),gmroleid(rhs.gmroleid),localsid(rhs.localsid),kickroleid(rhs.kickroleid)
			,forbid_time(rhs.forbid_time),reason(rhs.reason) { }

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

		OctetsStream& marshal(OctetsStream & os) const
		{
			os << gmroleid;
			os << localsid;
			os << kickroleid;
			os << forbid_time;
			os << reason;
			return os;
		}

		const OctetsStream& unmarshal(const OctetsStream &os)
		{
			os >> gmroleid;
			os >> localsid;
			os >> kickroleid;
			os >> forbid_time;
			os >> reason;
			return os;
		}

		int PriorPolicy( ) const { return 1; }

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