def unmarshall(self,d,idx_=0): idx = idx_ try: self.seq,idx = tce.unserial_string(d,idx) self.sender_id,idx = tce.unserial_string(d,idx) self.sent_time,idx = tce.unserial_string(d,idx) self.title,idx = tce.unserial_string(d,idx) self.content,idx = tce.unserial_string(d,idx) self.expire_time,idx = tce.unserial_string(d,idx) self.send_time,idx = tce.unserial_string(d,idx) self.accept_time,idx = tce.unserial_string(d,idx) self.type_,idx = tce.unserial_int(d,idx) r,idx = self.style.unmarshall(d,idx) if not r: return False,idx r,idx = self.action.unmarshall(d,idx) if not r: return False,idx self.custom,idx = tce.unserial_string(d,idx) self.loop_times,idx = tce.unserial_int(d,idx) self.loop_inerval,idx = tce.unserial_int(d,idx) self.alert,idx = tce.unserial_string(d,idx) self.badge,idx = tce.unserial_int(d,idx) self.sound,idx = tce.unserial_string(d,idx) self.category,idx = tce.unserial_string(d,idx) self.raw,idx = tce.unserial_string(d,idx) except: traceback.print_exc() return False,idx return True,idx
def unmarshall(self,d,idx_=0): idx = idx_ try: self.builder_id,idx = tce.unserial_int(d,idx) self.ring,idx = tce.unserial_int(d,idx) except: traceback.print_exc() return False,idx return True,idx
def unmarshall(self,d,idx_=0): idx = idx_ try: self.act_type,idx = tce.unserial_int(d,idx) self.url,idx = tce.unserial_string(d,idx) self.conform_on_url,idx = tce.unserial_int(d,idx) self.activity,idx = tce.unserial_string(d,idx) self.intent,idx = tce.unserial_string(d,idx) self.intent_flag,idx = tce.unserial_int(d,idx) self.pending_flag,idx = tce.unserial_int(d,idx) self.package_name,idx = tce.unserial_string(d,idx) self.package_download_url,idx = tce.unserial_string(d,idx) self.confirm_on_package,idx = tce.unserial_int(d,idx) except: traceback.print_exc() return False,idx return True,idx
def unmarshall(self,d,idx_=0): idx = idx_ try: self.succ,idx = tce.unserial_bool(d,idx) self.code,idx = tce.unserial_int(d,idx) self.msg,idx = tce.unserial_string(d,idx) except: traceback.print_exc() return False,idx return True,idx
def unmarshall(self,d,idx_=0): idx = idx_ try: self.user_id,idx = tce.unserial_string(d,idx) self.user_name,idx = tce.unserial_string(d,idx) self.login_time,idx = tce.unserial_long(d,idx) self.expire_time,idx = tce.unserial_long(d,idx) self.platform_type,idx = tce.unserial_int(d,idx) self.device_id,idx = tce.unserial_string(d,idx) except: traceback.print_exc() return False,idx return True,idx
def timeout(self, ctx): tce.log_debug("callin (timeout)") d = ctx.msg.paramstream idx = 0 _p_secs, idx = tce.unserial_int(d, idx) cr = None self.inst.timeout(_p_secs, ctx) if ctx.msg.calltype & tce.RpcMessage.ONEWAY: return True d = '' m = tce.RpcMessageReturn(self.inst) m.sequence = ctx.msg.sequence m.callmsg = ctx.msg m.ifidx = ctx.msg.ifidx m.call_id = ctx.msg.call_id m.conn = ctx.msg.conn m.extra = ctx.msg.extra if d: m.paramstream += d ctx.conn.sendMessage(m) return True
def timeout(self,ctx): tce.log_debug("callin (timeout)") d = ctx.msg.paramstream idx = 0 _p_secs,idx = tce.unserial_int(d,idx) cr = None self.inst.timeout(_p_secs,ctx) if ctx.msg.calltype & tce.RpcMessage.ONEWAY: return True d = '' m = tce.RpcMessageReturn(self.inst) m.sequence = ctx.msg.sequence m.callmsg = ctx.msg m.ifidx = ctx.msg.ifidx m.call_id = ctx.msg.call_id m.conn = ctx.msg.conn m.extra = ctx.msg.extra if d: m.paramstream += d ctx.conn.sendMessage(m) return True
def onUserOffline(self,ctx): tce.log_debug("callin (onUserOffline)") d = ctx.msg.paramstream idx = 0 _p_user_id,idx = tce.unserial_string(d,idx) _p_gws_id,idx = tce.unserial_string(d,idx) _p_device,idx = tce.unserial_int(d,idx) cr = None self.inst.onUserOffline(_p_user_id,_p_gws_id,_p_device,ctx) if ctx.msg.calltype & tce.RpcMessage.ONEWAY: return True d = '' m = tce.RpcMessageReturn(self.inst) m.sequence = ctx.msg.sequence m.callmsg = ctx.msg m.ifidx = ctx.msg.ifidx m.call_id = ctx.msg.call_id m.conn = ctx.msg.conn m.extra = ctx.msg.extra if d: m.paramstream += d ctx.conn.sendMessage(m) return True
def onUserOffline(self,ctx): tce.log_debug("callin (onUserOffline)") d = ctx.msg.paramstream idx = 0 _p_userid,idx = tce.unserial_string(d,idx) _p_gws_id,idx = tce.unserial_string(d,idx) _p_device,idx = tce.unserial_int(d,idx) cr = None self.inst.onUserOffline(_p_userid,_p_gws_id,_p_device,ctx) if ctx.msg.calltype & tce.RpcMessage.ONEWAY: return True d = '' m = tce.RpcMessageReturn(self.inst) m.sequence = ctx.msg.sequence m.callmsg = ctx.msg m.ifidx = ctx.msg.ifidx m.call_id = ctx.msg.call_id m.conn = ctx.msg.conn m.extra = ctx.msg.extra if d: m.paramstream += d ctx.conn.sendMessage(m) return True