Subversion Repositories SmartDukaan

Rev

Rev 12691 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12691 Rev 12696
Line 349... Line 349...
349
    Parameters:
349
    Parameters:
350
     - userSmsList
350
     - userSmsList
351
    """
351
    """
352
    pass
352
    pass
353
 
353
 
-
 
354
  def authoriseDealer(self, dealer):
-
 
355
    """
-
 
356
    Parameters:
-
 
357
     - dealer
-
 
358
    """
-
 
359
    pass
-
 
360
 
354
 
361
 
355
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
362
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
356
  def __init__(self, iprot, oprot=None):
363
  def __init__(self, iprot, oprot=None):
357
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
364
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
358
 
365
 
Line 1717... Line 1724...
1717
    self._iprot.readMessageEnd()
1724
    self._iprot.readMessageEnd()
1718
    if result.success is not None:
1725
    if result.success is not None:
1719
      return result.success
1726
      return result.success
1720
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markMessagesAsRetry failed: unknown result");
1727
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markMessagesAsRetry failed: unknown result");
1721
 
1728
 
-
 
1729
  def authoriseDealer(self, dealer):
-
 
1730
    """
-
 
1731
    Parameters:
-
 
1732
     - dealer
-
 
1733
    """
-
 
1734
    self.send_authoriseDealer(dealer)
-
 
1735
    return self.recv_authoriseDealer()
-
 
1736
 
-
 
1737
  def send_authoriseDealer(self, dealer):
-
 
1738
    self._oprot.writeMessageBegin('authoriseDealer', TMessageType.CALL, self._seqid)
-
 
1739
    args = authoriseDealer_args()
-
 
1740
    args.dealer = dealer
-
 
1741
    args.write(self._oprot)
-
 
1742
    self._oprot.writeMessageEnd()
-
 
1743
    self._oprot.trans.flush()
-
 
1744
 
-
 
1745
  def recv_authoriseDealer(self, ):
-
 
1746
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1747
    if mtype == TMessageType.EXCEPTION:
-
 
1748
      x = TApplicationException()
-
 
1749
      x.read(self._iprot)
-
 
1750
      self._iprot.readMessageEnd()
-
 
1751
      raise x
-
 
1752
    result = authoriseDealer_result()
-
 
1753
    result.read(self._iprot)
-
 
1754
    self._iprot.readMessageEnd()
-
 
1755
    if result.success is not None:
-
 
1756
      return result.success
-
 
1757
    raise TApplicationException(TApplicationException.MISSING_RESULT, "authoriseDealer failed: unknown result");
-
 
1758
 
1722
 
1759
 
1723
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1760
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1724
  def __init__(self, handler):
1761
  def __init__(self, handler):
1725
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1762
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1726
    self._processMap["saveUserEmailForSending"] = Processor.process_saveUserEmailForSending
1763
    self._processMap["saveUserEmailForSending"] = Processor.process_saveUserEmailForSending
Line 1763... Line 1800...
1763
    self._processMap["listSmsToGetDeliveryInfo"] = Processor.process_listSmsToGetDeliveryInfo
1800
    self._processMap["listSmsToGetDeliveryInfo"] = Processor.process_listSmsToGetDeliveryInfo
1764
    self._processMap["markMessagesAsSentToOperator"] = Processor.process_markMessagesAsSentToOperator
1801
    self._processMap["markMessagesAsSentToOperator"] = Processor.process_markMessagesAsSentToOperator
1765
    self._processMap["markMessagesAsSubmittedToSmsc"] = Processor.process_markMessagesAsSubmittedToSmsc
1802
    self._processMap["markMessagesAsSubmittedToSmsc"] = Processor.process_markMessagesAsSubmittedToSmsc
1766
    self._processMap["markMessagesAsSent"] = Processor.process_markMessagesAsSent
1803
    self._processMap["markMessagesAsSent"] = Processor.process_markMessagesAsSent
1767
    self._processMap["markMessagesAsRetry"] = Processor.process_markMessagesAsRetry
1804
    self._processMap["markMessagesAsRetry"] = Processor.process_markMessagesAsRetry
-
 
1805
    self._processMap["authoriseDealer"] = Processor.process_authoriseDealer
1768
 
1806
 
1769
  def process(self, iprot, oprot):
1807
  def process(self, iprot, oprot):
1770
    (name, type, seqid) = iprot.readMessageBegin()
1808
    (name, type, seqid) = iprot.readMessageBegin()
1771
    if name not in self._processMap:
1809
    if name not in self._processMap:
1772
      iprot.skip(TType.STRUCT)
1810
      iprot.skip(TType.STRUCT)
Line 2328... Line 2366...
2328
    oprot.writeMessageBegin("markMessagesAsRetry", TMessageType.REPLY, seqid)
2366
    oprot.writeMessageBegin("markMessagesAsRetry", TMessageType.REPLY, seqid)
2329
    result.write(oprot)
2367
    result.write(oprot)
2330
    oprot.writeMessageEnd()
2368
    oprot.writeMessageEnd()
2331
    oprot.trans.flush()
2369
    oprot.trans.flush()
2332
 
2370
 
-
 
2371
  def process_authoriseDealer(self, seqid, iprot, oprot):
-
 
2372
    args = authoriseDealer_args()
-
 
2373
    args.read(iprot)
-
 
2374
    iprot.readMessageEnd()
-
 
2375
    result = authoriseDealer_result()
-
 
2376
    result.success = self._handler.authoriseDealer(args.dealer)
-
 
2377
    oprot.writeMessageBegin("authoriseDealer", TMessageType.REPLY, seqid)
-
 
2378
    result.write(oprot)
-
 
2379
    oprot.writeMessageEnd()
-
 
2380
    oprot.trans.flush()
-
 
2381
 
2333
 
2382
 
2334
# HELPER FUNCTIONS AND STRUCTURES
2383
# HELPER FUNCTIONS AND STRUCTURES
2335
 
2384
 
2336
class saveUserEmailForSending_args:
2385
class saveUserEmailForSending_args:
2337
  """
2386
  """
Line 8016... Line 8065...
8016
      oprot.writeFieldEnd()
8065
      oprot.writeFieldEnd()
8017
    oprot.writeFieldStop()
8066
    oprot.writeFieldStop()
8018
    oprot.writeStructEnd()
8067
    oprot.writeStructEnd()
8019
 
8068
 
8020
  def validate(self):
8069
  def validate(self):
-
 
8070
    return
-
 
8071
 
-
 
8072
 
-
 
8073
  def __repr__(self):
-
 
8074
    L = ['%s=%r' % (key, value)
-
 
8075
      for key, value in self.__dict__.iteritems()]
-
 
8076
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
8077
 
-
 
8078
  def __eq__(self, other):
-
 
8079
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
8080
 
-
 
8081
  def __ne__(self, other):
-
 
8082
    return not (self == other)
-
 
8083
 
-
 
8084
class authoriseDealer_args:
-
 
8085
  """
-
 
8086
  Attributes:
-
 
8087
   - dealer
-
 
8088
  """
-
 
8089
 
-
 
8090
  thrift_spec = (
-
 
8091
    None, # 0
-
 
8092
    (1, TType.STRUCT, 'dealer', (DealerAuth, DealerAuth.thrift_spec), None, ), # 1
-
 
8093
  )
-
 
8094
 
-
 
8095
  def __init__(self, dealer=None,):
-
 
8096
    self.dealer = dealer
-
 
8097
 
-
 
8098
  def read(self, iprot):
-
 
8099
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
8100
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
8101
      return
-
 
8102
    iprot.readStructBegin()
-
 
8103
    while True:
-
 
8104
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
8105
      if ftype == TType.STOP:
-
 
8106
        break
-
 
8107
      if fid == 1:
-
 
8108
        if ftype == TType.STRUCT:
-
 
8109
          self.dealer = DealerAuth()
-
 
8110
          self.dealer.read(iprot)
-
 
8111
        else:
-
 
8112
          iprot.skip(ftype)
-
 
8113
      else:
-
 
8114
        iprot.skip(ftype)
-
 
8115
      iprot.readFieldEnd()
-
 
8116
    iprot.readStructEnd()
-
 
8117
 
-
 
8118
  def write(self, oprot):
-
 
8119
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
8120
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
8121
      return
-
 
8122
    oprot.writeStructBegin('authoriseDealer_args')
-
 
8123
    if self.dealer is not None:
-
 
8124
      oprot.writeFieldBegin('dealer', TType.STRUCT, 1)
-
 
8125
      self.dealer.write(oprot)
-
 
8126
      oprot.writeFieldEnd()
-
 
8127
    oprot.writeFieldStop()
-
 
8128
    oprot.writeStructEnd()
-
 
8129
 
-
 
8130
  def validate(self):
-
 
8131
    return
-
 
8132
 
-
 
8133
 
-
 
8134
  def __repr__(self):
-
 
8135
    L = ['%s=%r' % (key, value)
-
 
8136
      for key, value in self.__dict__.iteritems()]
-
 
8137
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
8138
 
-
 
8139
  def __eq__(self, other):
-
 
8140
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
8141
 
-
 
8142
  def __ne__(self, other):
-
 
8143
    return not (self == other)
-
 
8144
 
-
 
8145
class authoriseDealer_result:
-
 
8146
  """
-
 
8147
  Attributes:
-
 
8148
   - success
-
 
8149
  """
-
 
8150
 
-
 
8151
  thrift_spec = (
-
 
8152
    (0, TType.STRUCT, 'success', (DealerAuth, DealerAuth.thrift_spec), None, ), # 0
-
 
8153
  )
-
 
8154
 
-
 
8155
  def __init__(self, success=None,):
-
 
8156
    self.success = success
-
 
8157
 
-
 
8158
  def read(self, iprot):
-
 
8159
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
8160
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
8161
      return
-
 
8162
    iprot.readStructBegin()
-
 
8163
    while True:
-
 
8164
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
8165
      if ftype == TType.STOP:
-
 
8166
        break
-
 
8167
      if fid == 0:
-
 
8168
        if ftype == TType.STRUCT:
-
 
8169
          self.success = DealerAuth()
-
 
8170
          self.success.read(iprot)
-
 
8171
        else:
-
 
8172
          iprot.skip(ftype)
-
 
8173
      else:
-
 
8174
        iprot.skip(ftype)
-
 
8175
      iprot.readFieldEnd()
-
 
8176
    iprot.readStructEnd()
-
 
8177
 
-
 
8178
  def write(self, oprot):
-
 
8179
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
8180
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
8181
      return
-
 
8182
    oprot.writeStructBegin('authoriseDealer_result')
-
 
8183
    if self.success is not None:
-
 
8184
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
8185
      self.success.write(oprot)
-
 
8186
      oprot.writeFieldEnd()
-
 
8187
    oprot.writeFieldStop()
-
 
8188
    oprot.writeStructEnd()
-
 
8189
 
-
 
8190
  def validate(self):
8021
    return
8191
    return
8022
 
8192
 
8023
 
8193
 
8024
  def __repr__(self):
8194
  def __repr__(self):
8025
    L = ['%s=%r' % (key, value)
8195
    L = ['%s=%r' % (key, value)