Python thrift.Thrift.TMessageType.REPLY Examples

The following are 30 code examples of thrift.Thrift.TMessageType.REPLY(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module thrift.Thrift.TMessageType , or try the search function .
Example #1
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_isGroupMember(self, seqid, iprot, oprot):
    args = isGroupMember_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = isGroupMember_result()
    try:
      result.success = self._handler.isGroupMember(args.groupId)
      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("isGroupMember", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #2
Source File: ChannelService.py    From simpleSB with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def process_reserveCoinUse(self, seqid, iprot, oprot):
        args = reserveCoinUse_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = reserveCoinUse_result()
        try:
            result.success = self._handler.reserveCoinUse(args.request, args.locale)
            msg_type = TMessageType.REPLY
        except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
        except ChannelException 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("reserveCoinUse", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush() 
Example #3
Source File: ChannelService.py    From simpleSB with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def process_getChannels(self, seqid, iprot, oprot):
        args = getChannels_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getChannels_result()
        try:
            result.success = self._handler.getChannels(args.lastSynced, args.locale)
            msg_type = TMessageType.REPLY
        except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
        except ChannelException 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("getChannels", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush() 
Example #4
Source File: ChannelService.py    From simpleSB with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def process_syncChannelData(self, seqid, iprot, oprot):
        args = syncChannelData_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = syncChannelData_result()
        try:
            result.success = self._handler.syncChannelData(args.lastSynced, args.locale)
            msg_type = TMessageType.REPLY
        except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
        except ChannelException 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("syncChannelData", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush() 
Example #5
Source File: CallService.py    From simpleSB with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def process_acquireCallRoute(self, seqid, iprot, oprot):
        args = acquireCallRoute_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = acquireCallRoute_result()
        try:
            result.success = self._handler.acquireCallRoute(args.to)
            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("acquireCallRoute", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush() 
Example #6
Source File: ChannelService.py    From simpleSB with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def process_revokeChannel(self, seqid, iprot, oprot):
        args = revokeChannel_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = revokeChannel_result()
        try:
            self._handler.revokeChannel(args.channelId)
            msg_type = TMessageType.REPLY
        except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
        except ChannelException 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("revokeChannel", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush() 
Example #7
Source File: ChannelService.py    From simpleSB with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def process_issueRequestToken(self, seqid, iprot, oprot):
        args = issueRequestToken_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = issueRequestToken_result()
        try:
            result.success = self._handler.issueRequestToken(args.channelId, args.otpId)
            msg_type = TMessageType.REPLY
        except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
        except ChannelException 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("issueRequestToken", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush() 
Example #8
Source File: ChannelService.py    From simpleSB with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def process_getNotificationBadgeCount(self, seqid, iprot, oprot):
        args = getNotificationBadgeCount_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getNotificationBadgeCount_result()
        try:
            result.success = self._handler.getNotificationBadgeCount(args.localRev)
            msg_type = TMessageType.REPLY
        except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
        except ChannelException 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("getNotificationBadgeCount", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush() 
Example #9
Source File: ChannelService.py    From simpleSB with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def process_getFriendChannelMatrices(self, seqid, iprot, oprot):
        args = getFriendChannelMatrices_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getFriendChannelMatrices_result()
        try:
            result.success = self._handler.getFriendChannelMatrices(args.channelIds)
            msg_type = TMessageType.REPLY
        except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
        except ChannelException 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("getFriendChannelMatrices", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush() 
Example #10
Source File: ChannelService.py    From simpleSB with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def process_getDomains(self, seqid, iprot, oprot):
        args = getDomains_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getDomains_result()
        try:
            result.success = self._handler.getDomains(args.lastSynced)
            msg_type = TMessageType.REPLY
        except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
        except ChannelException 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("getDomains", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush() 
Example #11
Source File: ChannelService.py    From simpleSB with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def process_issueRequestTokenWithAuthScheme(self, seqid, iprot, oprot):
        args = issueRequestTokenWithAuthScheme_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = issueRequestTokenWithAuthScheme_result()
        try:
            result.success = self._handler.issueRequestTokenWithAuthScheme(args.channelId, args.otpId, args.authScheme, args.returnUrl)
            msg_type = TMessageType.REPLY
        except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
            raise
        except ChannelException 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("issueRequestTokenWithAuthScheme", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush() 
Example #12
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_sendMessageForChannel(self, seqid, iprot, oprot):
    args = sendMessageForChannel_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = sendMessageForChannel_result()
    try:
      result.success = self._handler.sendMessageForChannel(args.message)
      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("sendMessageForChannel", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #13
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_removeNotificationStatus(self, seqid, iprot, oprot):
    args = removeNotificationStatus_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = removeNotificationStatus_result()
    try:
      self._handler.removeNotificationStatus(args.notificationStatus)
      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("removeNotificationStatus", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #14
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_registerChannelCP(self, seqid, iprot, oprot):
    args = registerChannelCP_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = registerChannelCP_result()
    try:
      result.success = self._handler.registerChannelCP(args.cpId, args.registerPassword)
      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("registerChannelCP", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #15
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_isInContact(self, seqid, iprot, oprot):
    args = isInContact_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = isInContact_result()
    try:
      result.success = self._handler.isInContact(args.mid)
      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("isInContact", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #16
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_updateProfileAttributeForChannel(self, seqid, iprot, oprot):
    args = updateProfileAttributeForChannel_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = updateProfileAttributeForChannel_result()
    try:
      self._handler.updateProfileAttributeForChannel(args.profileAttribute, args.value)
      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("updateProfileAttributeForChannel", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()


# HELPER FUNCTIONS AND STRUCTURES 
Example #17
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_getUserLanguage(self, seqid, iprot, oprot):
    args = getUserLanguage_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getUserLanguage_result()
    try:
      result.success = self._handler.getUserLanguage()
      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("getUserLanguage", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #18
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_getUserIdentities(self, seqid, iprot, oprot):
    args = getUserIdentities_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getUserIdentities_result()
    try:
      result.success = self._handler.getUserIdentities()
      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("getUserIdentities", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #19
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_getUserCreateTime(self, seqid, iprot, oprot):
    args = getUserCreateTime_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getUserCreateTime_result()
    try:
      result.success = self._handler.getUserCreateTime()
      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("getUserCreateTime", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #20
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_getUserCountryForBilling(self, seqid, iprot, oprot):
    args = getUserCountryForBilling_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getUserCountryForBilling_result()
    try:
      result.success = self._handler.getUserCountryForBilling(args.country, args.remoteIp)
      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("getUserCountryForBilling", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #21
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_getSimpleChannelContacts(self, seqid, iprot, oprot):
    args = getSimpleChannelContacts_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getSimpleChannelContacts_result()
    try:
      result.success = self._handler.getSimpleChannelContacts(args.ids)
      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("getSimpleChannelContacts", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #22
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_getPrimaryClientForChannel(self, seqid, iprot, oprot):
    args = getPrimaryClientForChannel_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getPrimaryClientForChannel_result()
    try:
      result.success = self._handler.getPrimaryClientForChannel()
      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("getPrimaryClientForChannel", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #23
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_getMid(self, seqid, iprot, oprot):
    args = getMid_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getMid_result()
    try:
      result.success = self._handler.getMid()
      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("getMid", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #24
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_getMetaProfile(self, seqid, iprot, oprot):
    args = getMetaProfile_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getMetaProfile_result()
    try:
      result.success = self._handler.getMetaProfile()
      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("getMetaProfile", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #25
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_getJoinedGroupIdsForChannel(self, seqid, iprot, oprot):
    args = getJoinedGroupIdsForChannel_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getJoinedGroupIdsForChannel_result()
    try:
      result.success = self._handler.getJoinedGroupIdsForChannel()
      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("getJoinedGroupIdsForChannel", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #26
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_getIdentityCredential(self, seqid, iprot, oprot):
    args = getIdentityCredential_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getIdentityCredential_result()
    try:
      result.success = self._handler.getIdentityCredential()
      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("getIdentityCredential", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #27
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_getGroupMemberMids(self, seqid, iprot, oprot):
    args = getGroupMemberMids_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getGroupMemberMids_result()
    try:
      result.success = self._handler.getGroupMemberMids(args.groupId)
      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("getGroupMemberMids", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #28
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_getFriendMids(self, seqid, iprot, oprot):
    args = getFriendMids_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getFriendMids_result()
    try:
      result.success = self._handler.getFriendMids()
      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("getFriendMids", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #29
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_getFavoriteMidsForChannel(self, seqid, iprot, oprot):
    args = getFavoriteMidsForChannel_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getFavoriteMidsForChannel_result()
    try:
      result.success = self._handler.getFavoriteMidsForChannel()
      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("getFavoriteMidsForChannel", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush() 
Example #30
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
def process_getDisplayName(self, seqid, iprot, oprot):
    args = getDisplayName_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getDisplayName_result()
    try:
      result.success = self._handler.getDisplayName(args.mid)
      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("getDisplayName", msg_type, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()