	public:
		int roleid;
		int posttype;
		unsigned int money;
		unsigned int item_id;
		int item_pos;
		int item_num;
		int price;
		int sellperiod;
		int buyer_roleid;
		unsigned int localsid;
		Octets syncdata;
		enum { PROTOCOL_TYPE = PROTOCOL_WEBTRADEPREPOST };
	public:
		WebTradePrePost() { type = PROTOCOL_WEBTRADEPREPOST; }
		WebTradePrePost(void*) : Protocol(PROTOCOL_WEBTRADEPREPOST) { }
		WebTradePrePost (int l_roleid,int l_posttype = 0,unsigned int l_money = 0,
			unsigned int l_item_id = 0,int l_item_pos = -1,int l_item_num = 0,
			int l_price = 0,int l_sellperiod = 0,int l_buyer_roleid = 0,
			unsigned int l_localsid = 0,const Octets& l_syncdata = Octets())
			 : roleid(l_roleid),posttype(l_posttype),money(l_money)
			,item_id(l_item_id),item_pos(l_item_pos),item_num(l_item_num)
			,price(l_price),sellperiod(l_sellperiod),buyer_roleid(l_buyer_roleid)
			,localsid(l_localsid),syncdata(l_syncdata)
		{
			type = PROTOCOL_WEBTRADEPREPOST;
		}

		WebTradePrePost(const WebTradePrePost &rhs)
			: Protocol(rhs),roleid(rhs.roleid),posttype(rhs.posttype),money(rhs.money)
			,item_id(rhs.item_id),item_pos(rhs.item_pos),item_num(rhs.item_num)
			,price(rhs.price),sellperiod(rhs.sellperiod),buyer_roleid(rhs.buyer_roleid)
			,localsid(rhs.localsid),syncdata(rhs.syncdata) { }

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

		OctetsStream& marshal(OctetsStream & os) const
		{
			os << roleid;
			os << posttype;
			os << money;
			os << item_id;
			os << item_pos;
			os << item_num;
			os << price;
			os << sellperiod;
			os << buyer_roleid;
			os << localsid;
			os << syncdata;
			return os;
		}

		const OctetsStream& unmarshal(const OctetsStream &os)
		{
			os >> roleid;
			os >> posttype;
			os >> money;
			os >> item_id;
			os >> item_pos;
			os >> item_num;
			os >> price;
			os >> sellperiod;
			os >> buyer_roleid;
			os >> localsid;
			os >> syncdata;
			return os;
		}

		int PriorPolicy( ) const { return 1; }

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