Subversion Repositories SmartDukaan

Rev

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

Rev 4806 Rev 4996
Line 234... Line 234...
234
    pass
234
    pass
235
 
235
 
236
  def getQuickLinks(self, ):
236
  def getQuickLinks(self, ):
237
    pass
237
    pass
238
 
238
 
-
 
239
  def updateQuickLink(self, id, url, text):
-
 
240
    """
-
 
241
    Parameters:
-
 
242
     - id
-
 
243
     - url
-
 
244
     - text
-
 
245
    """
-
 
246
    pass
-
 
247
 
239
 
248
 
240
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
249
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
241
  def __init__(self, iprot, oprot=None):
250
  def __init__(self, iprot, oprot=None):
242
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
251
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
243
 
252
 
Line 1098... Line 1107...
1098
      return result.success
1107
      return result.success
1099
    if result.hse is not None:
1108
    if result.hse is not None:
1100
      raise result.hse
1109
      raise result.hse
1101
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getQuickLinks failed: unknown result");
1110
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getQuickLinks failed: unknown result");
1102
 
1111
 
-
 
1112
  def updateQuickLink(self, id, url, text):
-
 
1113
    """
-
 
1114
    Parameters:
-
 
1115
     - id
-
 
1116
     - url
-
 
1117
     - text
-
 
1118
    """
-
 
1119
    self.send_updateQuickLink(id, url, text)
-
 
1120
    self.recv_updateQuickLink()
-
 
1121
 
-
 
1122
  def send_updateQuickLink(self, id, url, text):
-
 
1123
    self._oprot.writeMessageBegin('updateQuickLink', TMessageType.CALL, self._seqid)
-
 
1124
    args = updateQuickLink_args()
-
 
1125
    args.id = id
-
 
1126
    args.url = url
-
 
1127
    args.text = text
-
 
1128
    args.write(self._oprot)
-
 
1129
    self._oprot.writeMessageEnd()
-
 
1130
    self._oprot.trans.flush()
-
 
1131
 
-
 
1132
  def recv_updateQuickLink(self, ):
-
 
1133
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1134
    if mtype == TMessageType.EXCEPTION:
-
 
1135
      x = TApplicationException()
-
 
1136
      x.read(self._iprot)
-
 
1137
      self._iprot.readMessageEnd()
-
 
1138
      raise x
-
 
1139
    result = updateQuickLink_result()
-
 
1140
    result.read(self._iprot)
-
 
1141
    self._iprot.readMessageEnd()
-
 
1142
    if result.hse is not None:
-
 
1143
      raise result.hse
-
 
1144
    return
-
 
1145
 
1103
 
1146
 
1104
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1147
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1105
  def __init__(self, handler):
1148
  def __init__(self, handler):
1106
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1149
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1107
    self._processMap["saveUserEmailForSending"] = Processor.process_saveUserEmailForSending
1150
    self._processMap["saveUserEmailForSending"] = Processor.process_saveUserEmailForSending
Line 1128... Line 1171...
1128
    self._processMap["updatePasswordForAgent"] = Processor.process_updatePasswordForAgent
1171
    self._processMap["updatePasswordForAgent"] = Processor.process_updatePasswordForAgent
1129
    self._processMap["getRoleNamesForAgent"] = Processor.process_getRoleNamesForAgent
1172
    self._processMap["getRoleNamesForAgent"] = Processor.process_getRoleNamesForAgent
1130
    self._processMap["getPermissionsForRoleName"] = Processor.process_getPermissionsForRoleName
1173
    self._processMap["getPermissionsForRoleName"] = Processor.process_getPermissionsForRoleName
1131
    self._processMap["saveQuickLink"] = Processor.process_saveQuickLink
1174
    self._processMap["saveQuickLink"] = Processor.process_saveQuickLink
1132
    self._processMap["getQuickLinks"] = Processor.process_getQuickLinks
1175
    self._processMap["getQuickLinks"] = Processor.process_getQuickLinks
-
 
1176
    self._processMap["updateQuickLink"] = Processor.process_updateQuickLink
1133
 
1177
 
1134
  def process(self, iprot, oprot):
1178
  def process(self, iprot, oprot):
1135
    (name, type, seqid) = iprot.readMessageBegin()
1179
    (name, type, seqid) = iprot.readMessageBegin()
1136
    if name not in self._processMap:
1180
    if name not in self._processMap:
1137
      iprot.skip(TType.STRUCT)
1181
      iprot.skip(TType.STRUCT)
Line 1490... Line 1534...
1490
    oprot.writeMessageBegin("getQuickLinks", TMessageType.REPLY, seqid)
1534
    oprot.writeMessageBegin("getQuickLinks", TMessageType.REPLY, seqid)
1491
    result.write(oprot)
1535
    result.write(oprot)
1492
    oprot.writeMessageEnd()
1536
    oprot.writeMessageEnd()
1493
    oprot.trans.flush()
1537
    oprot.trans.flush()
1494
 
1538
 
-
 
1539
  def process_updateQuickLink(self, seqid, iprot, oprot):
-
 
1540
    args = updateQuickLink_args()
-
 
1541
    args.read(iprot)
-
 
1542
    iprot.readMessageEnd()
-
 
1543
    result = updateQuickLink_result()
-
 
1544
    try:
-
 
1545
      self._handler.updateQuickLink(args.id, args.url, args.text)
-
 
1546
    except HelperServiceException, hse:
-
 
1547
      result.hse = hse
-
 
1548
    oprot.writeMessageBegin("updateQuickLink", TMessageType.REPLY, seqid)
-
 
1549
    result.write(oprot)
-
 
1550
    oprot.writeMessageEnd()
-
 
1551
    oprot.trans.flush()
-
 
1552
 
1495
 
1553
 
1496
# HELPER FUNCTIONS AND STRUCTURES
1554
# HELPER FUNCTIONS AND STRUCTURES
1497
 
1555
 
1498
class saveUserEmailForSending_args:
1556
class saveUserEmailForSending_args:
1499
  """
1557
  """
Line 5014... Line 5072...
5014
    if self.hse is not None:
5072
    if self.hse is not None:
5015
      oprot.writeFieldBegin('hse', TType.STRUCT, 1)
5073
      oprot.writeFieldBegin('hse', TType.STRUCT, 1)
5016
      self.hse.write(oprot)
5074
      self.hse.write(oprot)
5017
      oprot.writeFieldEnd()
5075
      oprot.writeFieldEnd()
5018
    oprot.writeFieldStop()
5076
    oprot.writeFieldStop()
-
 
5077
    oprot.writeStructEnd()
-
 
5078
 
-
 
5079
  def validate(self):
-
 
5080
    return
-
 
5081
 
-
 
5082
 
-
 
5083
  def __repr__(self):
-
 
5084
    L = ['%s=%r' % (key, value)
-
 
5085
      for key, value in self.__dict__.iteritems()]
-
 
5086
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
5087
 
-
 
5088
  def __eq__(self, other):
-
 
5089
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
5090
 
-
 
5091
  def __ne__(self, other):
-
 
5092
    return not (self == other)
-
 
5093
 
-
 
5094
class updateQuickLink_args:
-
 
5095
  """
-
 
5096
  Attributes:
-
 
5097
   - id
-
 
5098
   - url
-
 
5099
   - text
-
 
5100
  """
-
 
5101
 
-
 
5102
  thrift_spec = (
-
 
5103
    None, # 0
-
 
5104
    (1, TType.I64, 'id', None, None, ), # 1
-
 
5105
    (2, TType.STRING, 'url', None, None, ), # 2
-
 
5106
    (3, TType.STRING, 'text', None, None, ), # 3
-
 
5107
  )
-
 
5108
 
-
 
5109
  def __init__(self, id=None, url=None, text=None,):
-
 
5110
    self.id = id
-
 
5111
    self.url = url
-
 
5112
    self.text = text
-
 
5113
 
-
 
5114
  def read(self, iprot):
-
 
5115
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
5116
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
5117
      return
-
 
5118
    iprot.readStructBegin()
-
 
5119
    while True:
-
 
5120
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
5121
      if ftype == TType.STOP:
-
 
5122
        break
-
 
5123
      if fid == 1:
-
 
5124
        if ftype == TType.I64:
-
 
5125
          self.id = iprot.readI64();
-
 
5126
        else:
-
 
5127
          iprot.skip(ftype)
-
 
5128
      elif fid == 2:
-
 
5129
        if ftype == TType.STRING:
-
 
5130
          self.url = iprot.readString();
-
 
5131
        else:
-
 
5132
          iprot.skip(ftype)
-
 
5133
      elif fid == 3:
-
 
5134
        if ftype == TType.STRING:
-
 
5135
          self.text = iprot.readString();
-
 
5136
        else:
-
 
5137
          iprot.skip(ftype)
-
 
5138
      else:
-
 
5139
        iprot.skip(ftype)
-
 
5140
      iprot.readFieldEnd()
-
 
5141
    iprot.readStructEnd()
-
 
5142
 
-
 
5143
  def write(self, oprot):
-
 
5144
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
5145
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
5146
      return
-
 
5147
    oprot.writeStructBegin('updateQuickLink_args')
-
 
5148
    if self.id is not None:
-
 
5149
      oprot.writeFieldBegin('id', TType.I64, 1)
-
 
5150
      oprot.writeI64(self.id)
-
 
5151
      oprot.writeFieldEnd()
-
 
5152
    if self.url is not None:
-
 
5153
      oprot.writeFieldBegin('url', TType.STRING, 2)
-
 
5154
      oprot.writeString(self.url)
-
 
5155
      oprot.writeFieldEnd()
-
 
5156
    if self.text is not None:
-
 
5157
      oprot.writeFieldBegin('text', TType.STRING, 3)
-
 
5158
      oprot.writeString(self.text)
-
 
5159
      oprot.writeFieldEnd()
-
 
5160
    oprot.writeFieldStop()
-
 
5161
    oprot.writeStructEnd()
-
 
5162
 
-
 
5163
  def validate(self):
-
 
5164
    return
-
 
5165
 
-
 
5166
 
-
 
5167
  def __repr__(self):
-
 
5168
    L = ['%s=%r' % (key, value)
-
 
5169
      for key, value in self.__dict__.iteritems()]
-
 
5170
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
5171
 
-
 
5172
  def __eq__(self, other):
-
 
5173
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
5174
 
-
 
5175
  def __ne__(self, other):
-
 
5176
    return not (self == other)
-
 
5177
 
-
 
5178
class updateQuickLink_result:
-
 
5179
  """
-
 
5180
  Attributes:
-
 
5181
   - hse
-
 
5182
  """
-
 
5183
 
-
 
5184
  thrift_spec = (
-
 
5185
    None, # 0
-
 
5186
    (1, TType.STRUCT, 'hse', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
-
 
5187
  )
-
 
5188
 
-
 
5189
  def __init__(self, hse=None,):
-
 
5190
    self.hse = hse
-
 
5191
 
-
 
5192
  def read(self, iprot):
-
 
5193
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
5194
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
5195
      return
-
 
5196
    iprot.readStructBegin()
-
 
5197
    while True:
-
 
5198
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
5199
      if ftype == TType.STOP:
-
 
5200
        break
-
 
5201
      if fid == 1:
-
 
5202
        if ftype == TType.STRUCT:
-
 
5203
          self.hse = HelperServiceException()
-
 
5204
          self.hse.read(iprot)
-
 
5205
        else:
-
 
5206
          iprot.skip(ftype)
-
 
5207
      else:
-
 
5208
        iprot.skip(ftype)
-
 
5209
      iprot.readFieldEnd()
-
 
5210
    iprot.readStructEnd()
-
 
5211
 
-
 
5212
  def write(self, oprot):
-
 
5213
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
5214
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
5215
      return
-
 
5216
    oprot.writeStructBegin('updateQuickLink_result')
-
 
5217
    if self.hse is not None:
-
 
5218
      oprot.writeFieldBegin('hse', TType.STRUCT, 1)
-
 
5219
      self.hse.write(oprot)
-
 
5220
      oprot.writeFieldEnd()
-
 
5221
    oprot.writeFieldStop()
5019
    oprot.writeStructEnd()
5222
    oprot.writeStructEnd()
5020
 
5223
 
5021
  def validate(self):
5224
  def validate(self):
5022
    return
5225
    return
5023
 
5226