示例#1
0
	def marshall(self):
		d =''
		d += tce.serial_int(self.act_type,d)
		d = tce.serial_string(self.url,d)
		d += tce.serial_int(self.conform_on_url,d)
		d = tce.serial_string(self.activity,d)
		d = tce.serial_string(self.intent,d)
		d += tce.serial_int(self.intent_flag,d)
		d += tce.serial_int(self.pending_flag,d)
		d = tce.serial_string(self.package_name,d)
		d = tce.serial_string(self.package_download_url,d)
		d += tce.serial_int(self.confirm_on_package,d)
		return d
示例#2
0
	def onUserOffline_oneway(self,user_id,gws_id,device,extra={}):
		# function index: idx_4
		
		try:
			m_1 = tce.RpcMessageCall(self)
			m_1.ifidx = 1
			m_1.opidx = 1
			m_1.calltype |= tce.RpcMessage.ONEWAY
			m_1.prx = self
			m_1.conn = m_1.prx.conn
			m_1.call_id = tce.RpcCommunicator.instance().currentServer().getId()
			m_1.extra.setStrDict(extra)
			d_2 = '' 
			d_2 = tce.serial_string(user_id,d_2)
			m_1.paramstream += d_2
			d_2 = '' 
			d_2 = tce.serial_string(gws_id,d_2)
			m_1.paramstream += d_2
			d_2 = '' 
			d_2 += tce.serial_int(device,d_2)
			m_1.paramstream += d_2
			r_4 = self.conn.sendMessage(m_1)
			if not r_4:
				raise tce.RpcException(tce.RpcConsts.RPCERROR_SENDFAILED)
		except:
			traceback.print_exc()
			raise tce.RpcException(tce.RpcConsts.RPCERROR_SENDFAILED)
示例#3
0
	def onUserOffline(self,user_id,gws_id,device,timeout=None,extra={}):
		# function index: idx_4
		
		m_1 = tce.RpcMessageCall(self)
		m_1.ifidx = 1
		m_1.opidx = 1
		m_1.extra.setStrDict(extra)
		d_2 = '' 
		d_2 = tce.serial_string(user_id,d_2)
		m_1.paramstream += d_2
		d_2 = '' 
		d_2 = tce.serial_string(gws_id,d_2)
		m_1.paramstream += d_2
		d_2 = '' 
		d_2 += tce.serial_int(device,d_2)
		m_1.paramstream += d_2
		m_1.prx = self
		m_1.conn = m_1.prx.conn
		m_1.call_id = tce.RpcCommunicator.instance().currentServer().getId()
		r_4 = self.conn.sendMessage(m_1)
		if not r_4:
			raise tce.RpcException(tce.RpcConsts.RPCERROR_SENDFAILED)
		if not timeout: timeout = tce.RpcCommunicator.instance().getRpcCallTimeout()
		m_5 = None
		try:
			m_5 = m_1.mtx.get(timeout=timeout)
		except:
			raise tce.RpcException(tce.RpcConsts.RPCERROR_TIMEOUT)
		if m_5.errcode != tce.RpcConsts.RPCERROR_SUCC:
			raise tce.RpcException(m_5.errcode)
		m_1 = m_5
示例#4
0
	def onUserOffline_oneway(self,userid,gws_id,device,extra={}):
		# function index: idx_4
		
		try:
			m_1 = tce.RpcMessageCall(self)
			m_1.ifidx = 1
			m_1.opidx = 1
			m_1.calltype |= tce.RpcMessage.ONEWAY
			m_1.prx = self
			m_1.conn = m_1.prx.conn
			m_1.call_id = tce.RpcCommunicator.instance().currentServer().getId()
			m_1.extra.setStrDict(extra)
			d_2 = '' 
			d_2 = tce.serial_string(userid,d_2)
			m_1.paramstream += d_2
			d_2 = '' 
			d_2 = tce.serial_string(gws_id,d_2)
			m_1.paramstream += d_2
			d_2 = '' 
			d_2 += tce.serial_int(device,d_2)
			m_1.paramstream += d_2
			r_4 = self.conn.sendMessage(m_1)
			if not r_4:
				raise tce.RpcException(tce.RpcConsts.RPCERROR_SENDFAILED)
		except:
			traceback.print_exc()
			raise tce.RpcException(tce.RpcConsts.RPCERROR_SENDFAILED)
示例#5
0
	def onUserOffline(self,userid,gws_id,device,timeout=None,extra={}):
		# function index: idx_4
		
		m_1 = tce.RpcMessageCall(self)
		m_1.ifidx = 1
		m_1.opidx = 1
		m_1.extra.setStrDict(extra)
		d_2 = '' 
		d_2 = tce.serial_string(userid,d_2)
		m_1.paramstream += d_2
		d_2 = '' 
		d_2 = tce.serial_string(gws_id,d_2)
		m_1.paramstream += d_2
		d_2 = '' 
		d_2 += tce.serial_int(device,d_2)
		m_1.paramstream += d_2
		m_1.prx = self
		m_1.conn = m_1.prx.conn
		m_1.call_id = tce.RpcCommunicator.instance().currentServer().getId()
		r_4 = self.conn.sendMessage(m_1)
		if not r_4:
			raise tce.RpcException(tce.RpcConsts.RPCERROR_SENDFAILED)
		if not timeout: timeout = tce.RpcCommunicator.instance().getRpcCallTimeout()
		m_5 = None
		try:
			m_5 = m_1.mtx.get(timeout=timeout)
		except:
			raise tce.RpcException(tce.RpcConsts.RPCERROR_TIMEOUT)
		if m_5.errcode != tce.RpcConsts.RPCERROR_SUCC:
			raise tce.RpcException(m_5.errcode)
		m_1 = m_5
示例#6
0
	def marshall(self):
		d =''
		d = tce.serial_string(self.user_id,d)
		d = tce.serial_string(self.user_name,d)
		d = tce.serial_long(self.login_time,d)
		d = tce.serial_long(self.expire_time,d)
		d += tce.serial_int(self.platform_type,d)
		d = tce.serial_string(self.device_id,d)
		return d
示例#7
0
	def marshall(self):
		d =''
		d = tce.serial_string(self.user_id,d)
		d = tce.serial_string(self.user_name,d)
		d = tce.serial_long(self.login_time,d)
		d = tce.serial_long(self.expire_time,d)
		d += tce.serial_int(self.platform_type,d)
		d = tce.serial_string(self.device_id,d)
		return d
示例#8
0
	def marshall(self):
		d =''
		d = tce.serial_string(self.seq,d)
		d = tce.serial_string(self.sender_id,d)
		d = tce.serial_string(self.sent_time,d)
		d = tce.serial_string(self.title,d)
		d = tce.serial_string(self.content,d)
		d = tce.serial_string(self.expire_time,d)
		d = tce.serial_string(self.send_time,d)
		d = tce.serial_string(self.accept_time,d)
		d += tce.serial_int(self.type_,d)
		d += self.style.marshall()
		d += self.action.marshall()
		d = tce.serial_string(self.custom,d)
		d += tce.serial_int(self.loop_times,d)
		d += tce.serial_int(self.loop_inerval,d)
		d = tce.serial_string(self.alert,d)
		d += tce.serial_int(self.badge,d)
		d = tce.serial_string(self.sound,d)
		d = tce.serial_string(self.category,d)
		d = tce.serial_string(self.raw,d)
		return d
示例#9
0
	def marshall(self):
		d =''
		d = tce.serial_bool(self.succ,d)
		d += tce.serial_int(self.code,d)
		d = tce.serial_string(self.msg,d)
		return d
示例#10
0
		# function index: 8
		
		ecode_2 = tce.RpcConsts.RPCERROR_SUCC
		m_1 = tce.RpcMessageCall(self)
		m_1.cookie = cookie
		m_1.ifidx = 1
		m_1.opidx = 0
		m_1.extra.setStrDict(extra)
		d_3 = '' 
		d_3 = tce.serial_string(user_id,d_3)
		m_1.paramstream += d_3
		d_3 = '' 
		d_3 = tce.serial_string(gws_id,d_3)
		m_1.paramstream += d_3
		d_3 = '' 
		d_3 += tce.serial_int(device,d_3)
		m_1.paramstream += d_3
		m_1.prx = self
		m_1.conn = m_1.prx.conn
		m_1.call_id = tce.RpcCommunicator.instance().currentServer().getId()
		m_1.async = async
		m_1.asyncparser = IUserEventListenerPrx.onUserOnline_asyncparser
		r_5 = self.conn.sendMessage(m_1)
		if not r_5:
			raise tce.RpcException(tce.RpcConsts.RPCERROR_SENDFAILED)
	
	@staticmethod
	def onUserOnline_asyncparser(m,m2):
		# function index: 8 , m2 - callreturn msg.
		
		stream_1 = m2.paramstream
示例#11
0
            raise tce.RpcException(tce.RpcConsts.RPCERROR_TIMEOUT)
        if m_5.errcode != tce.RpcConsts.RPCERROR_SUCC:
            raise tce.RpcException(m_5.errcode)
        m_1 = m_5

    def timeout_async(self, secs, async, cookie=None, extra={}):
        # function index: idx_4

        ecode_2 = tce.RpcConsts.RPCERROR_SUCC
        m_1 = tce.RpcMessageCall(self)
        m_1.cookie = cookie
        m_1.ifidx = 2
        m_1.opidx = 1
        m_1.extra.setStrDict(extra)
        d_3 = ''
        d_3 += tce.serial_int(secs, d_3)
        m_1.paramstream += d_3
        m_1.prx = self
        m_1.conn = m_1.prx.conn
        m_1.call_id = tce.RpcCommunicator.instance().currentServer().getId()
        m_1. async = async
        m_1.asyncparser = ServerPrx.timeout_asyncparser
        r_5 = self.conn.sendMessage(m_1)
        if not r_5:
            raise tce.RpcException(tce.RpcConsts.RPCERROR_SENDFAILED)

    @staticmethod
    def timeout_asyncparser(m, m2):
        # function index: idx_4 , m2 - callreturn msg.

        stream_1 = m2.paramstream
示例#12
0
	def marshall(self):
		d =''
		d = tce.serial_bool(self.succ,d)
		d += tce.serial_int(self.code,d)
		d = tce.serial_string(self.msg,d)
		return d
示例#13
0
	def marshall(self):
		d =''
		d += tce.serial_int(self.builder_id,d)
		d += tce.serial_int(self.ring,d)
		return d
示例#14
0
		# function index: 11
		
		ecode_2 = tce.RpcConsts.RPCERROR_SUCC
		m_1 = tce.RpcMessageCall(self)
		m_1.cookie = cookie
		m_1.ifidx = 1
		m_1.opidx = 0
		m_1.extra.setStrDict(extra)
		d_3 = '' 
		d_3 = tce.serial_string(userid,d_3)
		m_1.paramstream += d_3
		d_3 = '' 
		d_3 = tce.serial_string(gws_id,d_3)
		m_1.paramstream += d_3
		d_3 = '' 
		d_3 += tce.serial_int(device,d_3)
		m_1.paramstream += d_3
		m_1.prx = self
		m_1.conn = m_1.prx.conn
		m_1.call_id = tce.RpcCommunicator.instance().currentServer().getId()
		m_1.async = async
		m_1.asyncparser = IUserEventListenerPrx.onUserOnline_asyncparser
		r_5 = self.conn.sendMessage(m_1)
		if not r_5:
			raise tce.RpcException(tce.RpcConsts.RPCERROR_SENDFAILED)
	
	@staticmethod
	def onUserOnline_asyncparser(m,m2):
		# function index: 11 , m2 - callreturn msg.
		
		stream_1 = m2.paramstream
示例#15
0
文件: test.py 项目: adoggie/TCE
			raise tce.RpcException(tce.RpcConsts.RPCERROR_TIMEOUT)
		if m_5.errcode != tce.RpcConsts.RPCERROR_SUCC:
			raise tce.RpcException(m_5.errcode)
		m_1 = m_5
	
	def timeout_async(self,secs,async,cookie=None,extra={}):
		# function index: idx_4
		
		ecode_2 = tce.RpcConsts.RPCERROR_SUCC
		m_1 = tce.RpcMessageCall(self)
		m_1.cookie = cookie
		m_1.ifidx = 2
		m_1.opidx = 1
		m_1.extra.setStrDict(extra)
		d_3 = '' 
		d_3 += tce.serial_int(secs,d_3)
		m_1.paramstream += d_3
		m_1.prx = self
		m_1.conn = m_1.prx.conn
		m_1.call_id = tce.RpcCommunicator.instance().currentServer().getId()
		m_1.async = async
		m_1.asyncparser = ServerPrx.timeout_asyncparser
		r_5 = self.conn.sendMessage(m_1)
		if not r_5:
			raise tce.RpcException(tce.RpcConsts.RPCERROR_SENDFAILED)
	
	@staticmethod
	def timeout_asyncparser(m,m2):
		# function index: idx_4 , m2 - callreturn msg.
		
		stream_1 = m2.paramstream