Beispiel #1
0
 def process_getPlaceSearchInfo(self, seqid, iprot, oprot):
     args = getPlaceSearchInfo_args()
     args.read(iprot)
     iprot.readMessageEnd()
     result = getPlaceSearchInfo_result()
     try:
         result.success = self._handler.getPlaceSearchInfo(
             args.provider, args.keyword, args.clientLocale, args.latitude,
             args.longitude, args.radius)
         msg_type = TMessageType.REPLY
     except TTransport.TTransportException:
         raise
     except TalkException as e:
         msg_type = TMessageType.REPLY
         result.e = e
     except TApplicationException as ex:
         logging.exception('TApplication exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = ex
     except Exception:
         logging.exception('Unexpected exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = TApplicationException(
             TApplicationException.INTERNAL_ERROR, 'Internal error')
     oprot.writeMessageBegin("getPlaceSearchInfo", msg_type, seqid)
     result.write(oprot)
     oprot.writeMessageEnd()
     oprot.trans.flush()
Beispiel #2
0
 def process_lookupNearby(self, seqid, iprot, oprot):
     args = lookupNearby_args()
     args.read(iprot)
     iprot.readMessageEnd()
     result = lookupNearby_result()
     try:
         result.success = self._handler.lookupNearby(
             args.location, args.category, args.query, args.countryAreaCode)
         msg_type = TMessageType.REPLY
     except TTransport.TTransportException:
         raise
     except TalkException as e:
         msg_type = TMessageType.REPLY
         result.e = e
     except TApplicationException as ex:
         logging.exception('TApplication exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = ex
     except Exception:
         logging.exception('Unexpected exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = TApplicationException(
             TApplicationException.INTERNAL_ERROR, 'Internal error')
     oprot.writeMessageBegin("lookupNearby", msg_type, seqid)
     result.write(oprot)
     oprot.writeMessageEnd()
     oprot.trans.flush()
 def process_queryBeaconActions(self, seqid, iprot, oprot):
     args = queryBeaconActions_args()
     args.read(iprot)
     iprot.readMessageEnd()
     result = queryBeaconActions_result()
     try:
         result.success = self._handler.queryBeaconActions(
             args.hwid, args.secureMessage, args.applicationType,
             args.applicationVersion, args.lang)
         msg_type = TMessageType.REPLY
     except TTransport.TTransportException:
         raise
     except TalkException as e:
         msg_type = TMessageType.REPLY
         result.e = e
     except TApplicationException as ex:
         logging.exception('TApplication exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = ex
     except Exception:
         logging.exception('Unexpected exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = TApplicationException(
             TApplicationException.INTERNAL_ERROR, 'Internal error')
     oprot.writeMessageBegin("queryBeaconActions", msg_type, seqid)
     result.write(oprot)
     oprot.writeMessageEnd()
     oprot.trans.flush()
 def process_notify(self, seqid, iprot, oprot):
     args = notify_args()
     args.read(iprot)
     iprot.readMessageEnd()
     result = notify_result()
     try:
         self._handler.notify(args.event)
         msg_type = TMessageType.REPLY
     except TTransport.TTransportException:
         raise
     except UniversalNotificationServiceException as e:
         msg_type = TMessageType.REPLY
         result.e = e
     except TApplicationException as ex:
         logging.exception('TApplication exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = ex
     except Exception:
         logging.exception('Unexpected exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = TApplicationException(
             TApplicationException.INTERNAL_ERROR, 'Internal error')
     oprot.writeMessageBegin("notify", msg_type, seqid)
     result.write(oprot)
     oprot.writeMessageEnd()
     oprot.trans.flush()
Beispiel #5
0
 def process_fetchMessageOperations(self, seqid, iprot, oprot):
     args = fetchMessageOperations_args()
     args.read(iprot)
     iprot.readMessageEnd()
     result = fetchMessageOperations_result()
     try:
         result.success = self._handler.fetchMessageOperations(
             args.localRevision, args.lastOpTimestamp, args.count)
         msg_type = TMessageType.REPLY
     except TTransport.TTransportException:
         raise
     except TalkException as e:
         msg_type = TMessageType.REPLY
         result.e = e
     except TApplicationException as ex:
         logging.exception('TApplication exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = ex
     except Exception:
         logging.exception('Unexpected exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = TApplicationException(
             TApplicationException.INTERNAL_ERROR, 'Internal error')
     oprot.writeMessageBegin("fetchMessageOperations", msg_type, seqid)
     result.write(oprot)
     oprot.writeMessageEnd()
     oprot.trans.flush()
Beispiel #6
0
 def process_reserveCoinPurchase(self, seqid, iprot, oprot):
     args = reserveCoinPurchase_args()
     args.read(iprot)
     iprot.readMessageEnd()
     result = reserveCoinPurchase_result()
     try:
         result.success = self._handler.reserveCoinPurchase(args.request)
         msg_type = TMessageType.REPLY
     except TTransport.TTransportException:
         raise
     except TalkException as e:
         msg_type = TMessageType.REPLY
         result.e = e
     except TApplicationException as ex:
         logging.exception('TApplication exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = ex
     except Exception:
         logging.exception('Unexpected exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
     oprot.writeMessageBegin("reserveCoinPurchase", msg_type, seqid)
     result.write(oprot)
     oprot.writeMessageEnd()
     oprot.trans.flush()
 def process_getSnsFriends(self, seqid, iprot, oprot):
     args = getSnsFriends_args()
     args.read(iprot)
     iprot.readMessageEnd()
     result = getSnsFriends_result()
     try:
         result.success = self._handler.getSnsFriends(
             args.snsIdType, args.snsAccessToken, args.startIdx, args.limit)
         msg_type = TMessageType.REPLY
     except TTransport.TTransportException:
         raise
     except TalkException as e:
         msg_type = TMessageType.REPLY
         result.e = e
     except TApplicationException as ex:
         logging.exception('TApplication exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = ex
     except Exception:
         logging.exception('Unexpected exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = TApplicationException(
             TApplicationException.INTERNAL_ERROR, 'Internal error')
     oprot.writeMessageBegin("getSnsFriends", msg_type, seqid)
     result.write(oprot)
     oprot.writeMessageEnd()
     oprot.trans.flush()
Beispiel #8
0
 def process_checkUserAgeWithDocomo(self, seqid, iprot, oprot):
     args = checkUserAgeWithDocomo_args()
     args.read(iprot)
     iprot.readMessageEnd()
     result = checkUserAgeWithDocomo_result()
     try:
         result.success = self._handler.checkUserAgeWithDocomo(
             args.openIdRedirectUrl, args.standardAge, args.verifier)
         msg_type = TMessageType.REPLY
     except TTransport.TTransportException:
         raise
     except TalkException as e:
         msg_type = TMessageType.REPLY
         result.e = e
     except TApplicationException as ex:
         logging.exception('TApplication exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = ex
     except Exception:
         logging.exception('Unexpected exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = TApplicationException(
             TApplicationException.INTERNAL_ERROR, 'Internal error')
     oprot.writeMessageBegin("checkUserAgeWithDocomo", msg_type, seqid)
     result.write(oprot)
     oprot.writeMessageEnd()
     oprot.trans.flush()
 def process_postSnsInvitationMessage(self, seqid, iprot, oprot):
     args = postSnsInvitationMessage_args()
     args.read(iprot)
     iprot.readMessageEnd()
     result = postSnsInvitationMessage_result()
     try:
         self._handler.postSnsInvitationMessage(args.snsIdType,
                                                args.snsAccessToken,
                                                args.toSnsUserId)
         msg_type = TMessageType.REPLY
     except TTransport.TTransportException:
         raise
     except TalkException as e:
         msg_type = TMessageType.REPLY
         result.e = e
     except TApplicationException as ex:
         logging.exception('TApplication exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = ex
     except Exception:
         logging.exception('Unexpected exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = TApplicationException(
             TApplicationException.INTERNAL_ERROR, 'Internal error')
     oprot.writeMessageBegin("postSnsInvitationMessage", msg_type, seqid)
     result.write(oprot)
     oprot.writeMessageEnd()
     oprot.trans.flush()
Beispiel #10
0
 def process_sendChatCheckedByWatermark(self, seqid, iprot, oprot):
     args = sendChatCheckedByWatermark_args()
     args.read(iprot)
     iprot.readMessageEnd()
     result = sendChatCheckedByWatermark_result()
     try:
         self._handler.sendChatCheckedByWatermark(args.seq, args.mid,
                                                  args.watermark,
                                                  args.sessionId)
         msg_type = TMessageType.REPLY
     except TTransport.TTransportException:
         raise
     except TalkException as e:
         msg_type = TMessageType.REPLY
         result.e = e
     except TApplicationException as ex:
         logging.exception('TApplication exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = ex
     except Exception:
         logging.exception('Unexpected exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = TApplicationException(
             TApplicationException.INTERNAL_ERROR, 'Internal error')
     oprot.writeMessageBegin("sendChatCheckedByWatermark", msg_type, seqid)
     result.write(oprot)
     oprot.writeMessageEnd()
     oprot.trans.flush()
 def process_notifyBeaconDetected(self, seqid, iprot, oprot):
     args = notifyBeaconDetected_args()
     args.read(iprot)
     iprot.readMessageEnd()
     result = notifyBeaconDetected_result()
     try:
         self._handler.notifyBeaconDetected(args.hwid, args.secureMessage,
                                            args.notificationType)
         msg_type = TMessageType.REPLY
     except TTransport.TTransportException:
         raise
     except TalkException as e:
         msg_type = TMessageType.REPLY
         result.e = e
     except TApplicationException as ex:
         logging.exception('TApplication exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = ex
     except Exception:
         logging.exception('Unexpected exception in handler')
         msg_type = TMessageType.EXCEPTION
         result = TApplicationException(
             TApplicationException.INTERNAL_ERROR, 'Internal error')
     oprot.writeMessageBegin("notifyBeaconDetected", msg_type, seqid)
     result.write(oprot)
     oprot.writeMessageEnd()
     oprot.trans.flush()
Beispiel #12
0
 def process(self, iprot, oprot):
     (name, type, seqid) = iprot.readMessageBegin()
     if name not in self._processMap:
         iprot.skip(TType.STRUCT)
         iprot.readMessageEnd()
         x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
         oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
         x.write(oprot)
         oprot.writeMessageEnd()
         oprot.trans.flush()
         return
     else:
         self._processMap[name](self, seqid, iprot, oprot)
     return True
 def recv_postSnsInvitationMessage(self):
     iprot = self._iprot
     (fname, mtype, rseqid) = iprot.readMessageBegin()
     if mtype == TMessageType.EXCEPTION:
         x = TApplicationException()
         x.read(iprot)
         iprot.readMessageEnd()
         raise x
     result = postSnsInvitationMessage_result()
     result.read(iprot)
     iprot.readMessageEnd()
     if result.e is not None:
         raise result.e
     return
Beispiel #14
0
 def recv_notifyLeaveGroup(self):
     iprot = self._iprot
     (fname, mtype, rseqid) = iprot.readMessageBegin()
     if mtype == TMessageType.EXCEPTION:
         x = TApplicationException()
         x.read(iprot)
         iprot.readMessageEnd()
         raise x
     result = notifyLeaveGroup_result()
     result.read(iprot)
     iprot.readMessageEnd()
     if result.e is not None:
         raise result.e
     return
Beispiel #15
0
 def recv_sendChatCheckedByWatermark(self):
     iprot = self._iprot
     (fname, mtype, rseqid) = iprot.readMessageBegin()
     if mtype == TMessageType.EXCEPTION:
         x = TApplicationException()
         x.read(iprot)
         iprot.readMessageEnd()
         raise x
     result = sendChatCheckedByWatermark_result()
     result.read(iprot)
     iprot.readMessageEnd()
     if result.e is not None:
         raise result.e
     return
Beispiel #16
0
 def recv_getCoinUseAndRefundHistory(self):
     iprot = self._iprot
     (fname, mtype, rseqid) = iprot.readMessageBegin()
     if mtype == TMessageType.EXCEPTION:
         x = TApplicationException()
         x.read(iprot)
         iprot.readMessageEnd()
         raise x
     result = getCoinUseAndRefundHistory_result()
     result.read(iprot)
     iprot.readMessageEnd()
     if result.success is not None:
         return result.success
     if result.e is not None:
         raise result.e
     raise TApplicationException(TApplicationException.MISSING_RESULT, "getCoinUseAndRefundHistory failed: unknown result")
Beispiel #17
0
 def recv_reserveCoinPurchase(self):
     iprot = self._iprot
     (fname, mtype, rseqid) = iprot.readMessageBegin()
     if mtype == TMessageType.EXCEPTION:
         x = TApplicationException()
         x.read(iprot)
         iprot.readMessageEnd()
         raise x
     result = reserveCoinPurchase_result()
     result.read(iprot)
     iprot.readMessageEnd()
     if result.success is not None:
         return result.success
     if result.e is not None:
         raise result.e
     raise TApplicationException(TApplicationException.MISSING_RESULT, "reserveCoinPurchase failed: unknown result")
Beispiel #18
0
 def recv_retrieveOpenIdAuthUrlWithDocomo(self):
     iprot = self._iprot
     (fname, mtype, rseqid) = iprot.readMessageBegin()
     if mtype == TMessageType.EXCEPTION:
         x = TApplicationException()
         x.read(iprot)
         iprot.readMessageEnd()
         raise x
     result = retrieveOpenIdAuthUrlWithDocomo_result()
     result.read(iprot)
     iprot.readMessageEnd()
     if result.success is not None:
         return result.success
     if result.e is not None:
         raise result.e
     raise TApplicationException(
         TApplicationException.MISSING_RESULT,
         "retrieveOpenIdAuthUrlWithDocomo failed: unknown result")
Beispiel #19
0
 def recv_lookupByPhoneNumber(self):
     iprot = self._iprot
     (fname, mtype, rseqid) = iprot.readMessageBegin()
     if mtype == TMessageType.EXCEPTION:
         x = TApplicationException()
         x.read(iprot)
         iprot.readMessageEnd()
         raise x
     result = lookupByPhoneNumber_result()
     result.read(iprot)
     iprot.readMessageEnd()
     if result.success is not None:
         return result.success
     if result.e is not None:
         raise result.e
     raise TApplicationException(
         TApplicationException.MISSING_RESULT,
         "lookupByPhoneNumber failed: unknown result")
Beispiel #20
0
 def process_loginZ(self, seqid, iprot, oprot):
     args = loginZ_args()
     args.read(iprot)
     iprot.readMessageEnd()
     result = loginZ_result()
     try:
         result.success = self._handler.loginZ(args.req)
         msg_type = TMessageType.REPLY
     except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
         raise
     except TalkException as e:
         msg_type = TMessageType.REPLY
         result.e = e
     except Exception as ex:
         msg_type = TMessageType.EXCEPTION
         logging.exception(ex)
         result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
     oprot.writeMessageBegin("loginZ", msg_type, seqid)
     result.write(oprot)
     oprot.writeMessageEnd()
     oprot.trans.flush()