Subversion Repositories SmartDukaan

Rev

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

Rev 4691 Rev 4806
Line 223... Line 223...
223
    Parameters:
223
    Parameters:
224
     - roleName
224
     - roleName
225
    """
225
    """
226
    pass
226
    pass
227
 
227
 
-
 
228
  def saveQuickLink(self, url, text):
-
 
229
    """
-
 
230
    Parameters:
-
 
231
     - url
-
 
232
     - text
-
 
233
    """
-
 
234
    pass
-
 
235
 
-
 
236
  def getQuickLinks(self, ):
-
 
237
    pass
-
 
238
 
228
 
239
 
229
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
240
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
230
  def __init__(self, iprot, oprot=None):
241
  def __init__(self, iprot, oprot=None):
231
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
242
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
232
 
243
 
Line 1028... Line 1039...
1028
    self._iprot.readMessageEnd()
1039
    self._iprot.readMessageEnd()
1029
    if result.success is not None:
1040
    if result.success is not None:
1030
      return result.success
1041
      return result.success
1031
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPermissionsForRoleName failed: unknown result");
1042
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPermissionsForRoleName failed: unknown result");
1032
 
1043
 
-
 
1044
  def saveQuickLink(self, url, text):
-
 
1045
    """
-
 
1046
    Parameters:
-
 
1047
     - url
-
 
1048
     - text
-
 
1049
    """
-
 
1050
    self.send_saveQuickLink(url, text)
-
 
1051
    self.recv_saveQuickLink()
-
 
1052
 
-
 
1053
  def send_saveQuickLink(self, url, text):
-
 
1054
    self._oprot.writeMessageBegin('saveQuickLink', TMessageType.CALL, self._seqid)
-
 
1055
    args = saveQuickLink_args()
-
 
1056
    args.url = url
-
 
1057
    args.text = text
-
 
1058
    args.write(self._oprot)
-
 
1059
    self._oprot.writeMessageEnd()
-
 
1060
    self._oprot.trans.flush()
-
 
1061
 
-
 
1062
  def recv_saveQuickLink(self, ):
-
 
1063
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1064
    if mtype == TMessageType.EXCEPTION:
-
 
1065
      x = TApplicationException()
-
 
1066
      x.read(self._iprot)
-
 
1067
      self._iprot.readMessageEnd()
-
 
1068
      raise x
-
 
1069
    result = saveQuickLink_result()
-
 
1070
    result.read(self._iprot)
-
 
1071
    self._iprot.readMessageEnd()
-
 
1072
    if result.hse is not None:
-
 
1073
      raise result.hse
-
 
1074
    return
-
 
1075
 
-
 
1076
  def getQuickLinks(self, ):
-
 
1077
    self.send_getQuickLinks()
-
 
1078
    return self.recv_getQuickLinks()
-
 
1079
 
-
 
1080
  def send_getQuickLinks(self, ):
-
 
1081
    self._oprot.writeMessageBegin('getQuickLinks', TMessageType.CALL, self._seqid)
-
 
1082
    args = getQuickLinks_args()
-
 
1083
    args.write(self._oprot)
-
 
1084
    self._oprot.writeMessageEnd()
-
 
1085
    self._oprot.trans.flush()
-
 
1086
 
-
 
1087
  def recv_getQuickLinks(self, ):
-
 
1088
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1089
    if mtype == TMessageType.EXCEPTION:
-
 
1090
      x = TApplicationException()
-
 
1091
      x.read(self._iprot)
-
 
1092
      self._iprot.readMessageEnd()
-
 
1093
      raise x
-
 
1094
    result = getQuickLinks_result()
-
 
1095
    result.read(self._iprot)
-
 
1096
    self._iprot.readMessageEnd()
-
 
1097
    if result.success is not None:
-
 
1098
      return result.success
-
 
1099
    if result.hse is not None:
-
 
1100
      raise result.hse
-
 
1101
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getQuickLinks failed: unknown result");
-
 
1102
 
1033
 
1103
 
1034
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1104
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1035
  def __init__(self, handler):
1105
  def __init__(self, handler):
1036
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1106
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1037
    self._processMap["saveUserEmailForSending"] = Processor.process_saveUserEmailForSending
1107
    self._processMap["saveUserEmailForSending"] = Processor.process_saveUserEmailForSending
Line 1056... Line 1126...
1056
    self._processMap["getAgents"] = Processor.process_getAgents
1126
    self._processMap["getAgents"] = Processor.process_getAgents
1057
    self._processMap["validateLogIn"] = Processor.process_validateLogIn
1127
    self._processMap["validateLogIn"] = Processor.process_validateLogIn
1058
    self._processMap["updatePasswordForAgent"] = Processor.process_updatePasswordForAgent
1128
    self._processMap["updatePasswordForAgent"] = Processor.process_updatePasswordForAgent
1059
    self._processMap["getRoleNamesForAgent"] = Processor.process_getRoleNamesForAgent
1129
    self._processMap["getRoleNamesForAgent"] = Processor.process_getRoleNamesForAgent
1060
    self._processMap["getPermissionsForRoleName"] = Processor.process_getPermissionsForRoleName
1130
    self._processMap["getPermissionsForRoleName"] = Processor.process_getPermissionsForRoleName
-
 
1131
    self._processMap["saveQuickLink"] = Processor.process_saveQuickLink
-
 
1132
    self._processMap["getQuickLinks"] = Processor.process_getQuickLinks
1061
 
1133
 
1062
  def process(self, iprot, oprot):
1134
  def process(self, iprot, oprot):
1063
    (name, type, seqid) = iprot.readMessageBegin()
1135
    (name, type, seqid) = iprot.readMessageBegin()
1064
    if name not in self._processMap:
1136
    if name not in self._processMap:
1065
      iprot.skip(TType.STRUCT)
1137
      iprot.skip(TType.STRUCT)
Line 1390... Line 1462...
1390
    oprot.writeMessageBegin("getPermissionsForRoleName", TMessageType.REPLY, seqid)
1462
    oprot.writeMessageBegin("getPermissionsForRoleName", TMessageType.REPLY, seqid)
1391
    result.write(oprot)
1463
    result.write(oprot)
1392
    oprot.writeMessageEnd()
1464
    oprot.writeMessageEnd()
1393
    oprot.trans.flush()
1465
    oprot.trans.flush()
1394
 
1466
 
-
 
1467
  def process_saveQuickLink(self, seqid, iprot, oprot):
-
 
1468
    args = saveQuickLink_args()
-
 
1469
    args.read(iprot)
-
 
1470
    iprot.readMessageEnd()
-
 
1471
    result = saveQuickLink_result()
-
 
1472
    try:
-
 
1473
      self._handler.saveQuickLink(args.url, args.text)
-
 
1474
    except HelperServiceException, hse:
-
 
1475
      result.hse = hse
-
 
1476
    oprot.writeMessageBegin("saveQuickLink", TMessageType.REPLY, seqid)
-
 
1477
    result.write(oprot)
-
 
1478
    oprot.writeMessageEnd()
-
 
1479
    oprot.trans.flush()
-
 
1480
 
-
 
1481
  def process_getQuickLinks(self, seqid, iprot, oprot):
-
 
1482
    args = getQuickLinks_args()
-
 
1483
    args.read(iprot)
-
 
1484
    iprot.readMessageEnd()
-
 
1485
    result = getQuickLinks_result()
-
 
1486
    try:
-
 
1487
      result.success = self._handler.getQuickLinks()
-
 
1488
    except HelperServiceException, hse:
-
 
1489
      result.hse = hse
-
 
1490
    oprot.writeMessageBegin("getQuickLinks", TMessageType.REPLY, seqid)
-
 
1491
    result.write(oprot)
-
 
1492
    oprot.writeMessageEnd()
-
 
1493
    oprot.trans.flush()
-
 
1494
 
1395
 
1495
 
1396
# HELPER FUNCTIONS AND STRUCTURES
1496
# HELPER FUNCTIONS AND STRUCTURES
1397
 
1497
 
1398
class saveUserEmailForSending_args:
1498
class saveUserEmailForSending_args:
1399
  """
1499
  """
Line 4661... Line 4761...
4661
      oprot.writeFieldEnd()
4761
      oprot.writeFieldEnd()
4662
    oprot.writeFieldStop()
4762
    oprot.writeFieldStop()
4663
    oprot.writeStructEnd()
4763
    oprot.writeStructEnd()
4664
 
4764
 
4665
  def validate(self):
4765
  def validate(self):
-
 
4766
    return
-
 
4767
 
-
 
4768
 
-
 
4769
  def __repr__(self):
-
 
4770
    L = ['%s=%r' % (key, value)
-
 
4771
      for key, value in self.__dict__.iteritems()]
-
 
4772
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4773
 
-
 
4774
  def __eq__(self, other):
-
 
4775
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4776
 
-
 
4777
  def __ne__(self, other):
-
 
4778
    return not (self == other)
-
 
4779
 
-
 
4780
class saveQuickLink_args:
-
 
4781
  """
-
 
4782
  Attributes:
-
 
4783
   - url
-
 
4784
   - text
-
 
4785
  """
-
 
4786
 
-
 
4787
  thrift_spec = (
-
 
4788
    None, # 0
-
 
4789
    (1, TType.STRING, 'url', None, None, ), # 1
-
 
4790
    (2, TType.STRING, 'text', None, None, ), # 2
-
 
4791
  )
-
 
4792
 
-
 
4793
  def __init__(self, url=None, text=None,):
-
 
4794
    self.url = url
-
 
4795
    self.text = text
-
 
4796
 
-
 
4797
  def read(self, iprot):
-
 
4798
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4799
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4800
      return
-
 
4801
    iprot.readStructBegin()
-
 
4802
    while True:
-
 
4803
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4804
      if ftype == TType.STOP:
-
 
4805
        break
-
 
4806
      if fid == 1:
-
 
4807
        if ftype == TType.STRING:
-
 
4808
          self.url = iprot.readString();
-
 
4809
        else:
-
 
4810
          iprot.skip(ftype)
-
 
4811
      elif fid == 2:
-
 
4812
        if ftype == TType.STRING:
-
 
4813
          self.text = iprot.readString();
-
 
4814
        else:
-
 
4815
          iprot.skip(ftype)
-
 
4816
      else:
-
 
4817
        iprot.skip(ftype)
-
 
4818
      iprot.readFieldEnd()
-
 
4819
    iprot.readStructEnd()
-
 
4820
 
-
 
4821
  def write(self, oprot):
-
 
4822
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4823
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4824
      return
-
 
4825
    oprot.writeStructBegin('saveQuickLink_args')
-
 
4826
    if self.url is not None:
-
 
4827
      oprot.writeFieldBegin('url', TType.STRING, 1)
-
 
4828
      oprot.writeString(self.url)
-
 
4829
      oprot.writeFieldEnd()
-
 
4830
    if self.text is not None:
-
 
4831
      oprot.writeFieldBegin('text', TType.STRING, 2)
-
 
4832
      oprot.writeString(self.text)
-
 
4833
      oprot.writeFieldEnd()
-
 
4834
    oprot.writeFieldStop()
-
 
4835
    oprot.writeStructEnd()
-
 
4836
 
-
 
4837
  def validate(self):
-
 
4838
    return
-
 
4839
 
-
 
4840
 
-
 
4841
  def __repr__(self):
-
 
4842
    L = ['%s=%r' % (key, value)
-
 
4843
      for key, value in self.__dict__.iteritems()]
-
 
4844
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4845
 
-
 
4846
  def __eq__(self, other):
-
 
4847
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4848
 
-
 
4849
  def __ne__(self, other):
-
 
4850
    return not (self == other)
-
 
4851
 
-
 
4852
class saveQuickLink_result:
-
 
4853
  """
-
 
4854
  Attributes:
-
 
4855
   - hse
-
 
4856
  """
-
 
4857
 
-
 
4858
  thrift_spec = (
-
 
4859
    None, # 0
-
 
4860
    (1, TType.STRUCT, 'hse', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
-
 
4861
  )
-
 
4862
 
-
 
4863
  def __init__(self, hse=None,):
-
 
4864
    self.hse = hse
-
 
4865
 
-
 
4866
  def read(self, iprot):
-
 
4867
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4868
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4869
      return
-
 
4870
    iprot.readStructBegin()
-
 
4871
    while True:
-
 
4872
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4873
      if ftype == TType.STOP:
-
 
4874
        break
-
 
4875
      if fid == 1:
-
 
4876
        if ftype == TType.STRUCT:
-
 
4877
          self.hse = HelperServiceException()
-
 
4878
          self.hse.read(iprot)
-
 
4879
        else:
-
 
4880
          iprot.skip(ftype)
-
 
4881
      else:
-
 
4882
        iprot.skip(ftype)
-
 
4883
      iprot.readFieldEnd()
-
 
4884
    iprot.readStructEnd()
-
 
4885
 
-
 
4886
  def write(self, oprot):
-
 
4887
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4888
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4889
      return
-
 
4890
    oprot.writeStructBegin('saveQuickLink_result')
-
 
4891
    if self.hse is not None:
-
 
4892
      oprot.writeFieldBegin('hse', TType.STRUCT, 1)
-
 
4893
      self.hse.write(oprot)
-
 
4894
      oprot.writeFieldEnd()
-
 
4895
    oprot.writeFieldStop()
-
 
4896
    oprot.writeStructEnd()
-
 
4897
 
-
 
4898
  def validate(self):
-
 
4899
    return
-
 
4900
 
-
 
4901
 
-
 
4902
  def __repr__(self):
-
 
4903
    L = ['%s=%r' % (key, value)
-
 
4904
      for key, value in self.__dict__.iteritems()]
-
 
4905
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4906
 
-
 
4907
  def __eq__(self, other):
-
 
4908
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4909
 
-
 
4910
  def __ne__(self, other):
-
 
4911
    return not (self == other)
-
 
4912
 
-
 
4913
class getQuickLinks_args:
-
 
4914
 
-
 
4915
  thrift_spec = (
-
 
4916
  )
-
 
4917
 
-
 
4918
  def read(self, iprot):
-
 
4919
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4920
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4921
      return
-
 
4922
    iprot.readStructBegin()
-
 
4923
    while True:
-
 
4924
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4925
      if ftype == TType.STOP:
-
 
4926
        break
-
 
4927
      else:
-
 
4928
        iprot.skip(ftype)
-
 
4929
      iprot.readFieldEnd()
-
 
4930
    iprot.readStructEnd()
-
 
4931
 
-
 
4932
  def write(self, oprot):
-
 
4933
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4934
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4935
      return
-
 
4936
    oprot.writeStructBegin('getQuickLinks_args')
-
 
4937
    oprot.writeFieldStop()
-
 
4938
    oprot.writeStructEnd()
-
 
4939
 
-
 
4940
  def validate(self):
-
 
4941
    return
-
 
4942
 
-
 
4943
 
-
 
4944
  def __repr__(self):
-
 
4945
    L = ['%s=%r' % (key, value)
-
 
4946
      for key, value in self.__dict__.iteritems()]
-
 
4947
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4948
 
-
 
4949
  def __eq__(self, other):
-
 
4950
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4951
 
-
 
4952
  def __ne__(self, other):
-
 
4953
    return not (self == other)
-
 
4954
 
-
 
4955
class getQuickLinks_result:
-
 
4956
  """
-
 
4957
  Attributes:
-
 
4958
   - success
-
 
4959
   - hse
-
 
4960
  """
-
 
4961
 
-
 
4962
  thrift_spec = (
-
 
4963
    (0, TType.LIST, 'success', (TType.STRUCT,(QuickLink, QuickLink.thrift_spec)), None, ), # 0
-
 
4964
    (1, TType.STRUCT, 'hse', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
-
 
4965
  )
-
 
4966
 
-
 
4967
  def __init__(self, success=None, hse=None,):
-
 
4968
    self.success = success
-
 
4969
    self.hse = hse
-
 
4970
 
-
 
4971
  def read(self, iprot):
-
 
4972
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4973
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4974
      return
-
 
4975
    iprot.readStructBegin()
-
 
4976
    while True:
-
 
4977
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4978
      if ftype == TType.STOP:
-
 
4979
        break
-
 
4980
      if fid == 0:
-
 
4981
        if ftype == TType.LIST:
-
 
4982
          self.success = []
-
 
4983
          (_etype68, _size65) = iprot.readListBegin()
-
 
4984
          for _i69 in xrange(_size65):
-
 
4985
            _elem70 = QuickLink()
-
 
4986
            _elem70.read(iprot)
-
 
4987
            self.success.append(_elem70)
-
 
4988
          iprot.readListEnd()
-
 
4989
        else:
-
 
4990
          iprot.skip(ftype)
-
 
4991
      elif fid == 1:
-
 
4992
        if ftype == TType.STRUCT:
-
 
4993
          self.hse = HelperServiceException()
-
 
4994
          self.hse.read(iprot)
-
 
4995
        else:
-
 
4996
          iprot.skip(ftype)
-
 
4997
      else:
-
 
4998
        iprot.skip(ftype)
-
 
4999
      iprot.readFieldEnd()
-
 
5000
    iprot.readStructEnd()
-
 
5001
 
-
 
5002
  def write(self, oprot):
-
 
5003
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
5004
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
5005
      return
-
 
5006
    oprot.writeStructBegin('getQuickLinks_result')
-
 
5007
    if self.success is not None:
-
 
5008
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
5009
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
5010
      for iter71 in self.success:
-
 
5011
        iter71.write(oprot)
-
 
5012
      oprot.writeListEnd()
-
 
5013
      oprot.writeFieldEnd()
-
 
5014
    if self.hse is not None:
-
 
5015
      oprot.writeFieldBegin('hse', TType.STRUCT, 1)
-
 
5016
      self.hse.write(oprot)
-
 
5017
      oprot.writeFieldEnd()
-
 
5018
    oprot.writeFieldStop()
-
 
5019
    oprot.writeStructEnd()
-
 
5020
 
-
 
5021
  def validate(self):
4666
    return
5022
    return
4667
 
5023
 
4668
 
5024
 
4669
  def __repr__(self):
5025
  def __repr__(self):
4670
    L = ['%s=%r' % (key, value)
5026
    L = ['%s=%r' % (key, value)