Subversion Repositories SmartDukaan

Rev

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

Rev 3206 Rev 3376
Line 3... Line 3...
3
#
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
5
#
6
 
6
 
7
from thrift.Thrift import *
7
from thrift.Thrift import *
-
 
8
import shop2020.thriftpy.generic.GenericService
8
from ttypes import *
9
from ttypes import *
9
from thrift.Thrift import TProcessor
10
from thrift.Thrift import TProcessor
10
from thrift.transport import TTransport
11
from thrift.transport import TTransport
11
from thrift.protocol import TBinaryProtocol
12
from thrift.protocol import TBinaryProtocol
12
try:
13
try:
13
  from thrift.protocol import fastbinary
14
  from thrift.protocol import fastbinary
14
except:
15
except:
15
  fastbinary = None
16
  fastbinary = None
16
 
17
 
17
 
18
 
18
class Iface:
-
 
19
  def closeSession(self, ):
-
 
20
    """
-
 
21
    For closing the open session in sqlalchemy
19
class Iface(shop2020.thriftpy.generic.GenericService.Iface):
22
    """
-
 
23
    pass
-
 
24
 
-
 
25
  def saveUserEmailForSending(self, emailTo, emailFrom, subject, body, source, emailType):
20
  def saveUserEmailForSending(self, emailTo, emailFrom, subject, body, source, emailType):
26
    """
21
    """
27
    Save email details, to be sent later; Also returns its identifier.
22
    Save email details, to be sent later; Also returns its identifier.
28
    
23
    
29
    Parameters:
24
    Parameters:
Line 186... Line 181...
186
     - role
181
     - role
187
    """
182
    """
188
    pass
183
    pass
189
 
184
 
190
 
185
 
191
class Client(Iface):
186
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
192
  def __init__(self, iprot, oprot=None):
187
  def __init__(self, iprot, oprot=None):
193
    self._iprot = self._oprot = iprot
-
 
194
    if oprot != None:
-
 
195
      self._oprot = oprot
-
 
196
    self._seqid = 0
-
 
197
 
-
 
198
  def closeSession(self, ):
-
 
199
    """
-
 
200
    For closing the open session in sqlalchemy
-
 
201
    """
-
 
202
    self.send_closeSession()
-
 
203
    self.recv_closeSession()
-
 
204
 
-
 
205
  def send_closeSession(self, ):
-
 
206
    self._oprot.writeMessageBegin('closeSession', TMessageType.CALL, self._seqid)
188
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
207
    args = closeSession_args()
-
 
208
    args.write(self._oprot)
-
 
209
    self._oprot.writeMessageEnd()
-
 
210
    self._oprot.trans.flush()
-
 
211
 
-
 
212
  def recv_closeSession(self, ):
-
 
213
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
214
    if mtype == TMessageType.EXCEPTION:
-
 
215
      x = TApplicationException()
-
 
216
      x.read(self._iprot)
-
 
217
      self._iprot.readMessageEnd()
-
 
218
      raise x
-
 
219
    result = closeSession_result()
-
 
220
    result.read(self._iprot)
-
 
221
    self._iprot.readMessageEnd()
-
 
222
    return
-
 
223
 
189
 
224
  def saveUserEmailForSending(self, emailTo, emailFrom, subject, body, source, emailType):
190
  def saveUserEmailForSending(self, emailTo, emailFrom, subject, body, source, emailType):
225
    """
191
    """
226
    Save email details, to be sent later; Also returns its identifier.
192
    Save email details, to be sent later; Also returns its identifier.
227
    
193
    
Line 839... Line 805...
839
    if result.hse != None:
805
    if result.hse != None:
840
      raise result.hse
806
      raise result.hse
841
    raise TApplicationException(TApplicationException.MISSING_RESULT, "authenticateCatalogUser failed: unknown result");
807
    raise TApplicationException(TApplicationException.MISSING_RESULT, "authenticateCatalogUser failed: unknown result");
842
 
808
 
843
 
809
 
844
class Processor(Iface, TProcessor):
810
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
845
  def __init__(self, handler):
811
  def __init__(self, handler):
846
    self._handler = handler
-
 
847
    self._processMap = {}
-
 
848
    self._processMap["closeSession"] = Processor.process_closeSession
812
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
849
    self._processMap["saveUserEmailForSending"] = Processor.process_saveUserEmailForSending
813
    self._processMap["saveUserEmailForSending"] = Processor.process_saveUserEmailForSending
850
    self._processMap["getEmailsToBeSent"] = Processor.process_getEmailsToBeSent
814
    self._processMap["getEmailsToBeSent"] = Processor.process_getEmailsToBeSent
851
    self._processMap["markEmailAsSent"] = Processor.process_markEmailAsSent
815
    self._processMap["markEmailAsSent"] = Processor.process_markEmailAsSent
852
    self._processMap["sendMail"] = Processor.process_sendMail
816
    self._processMap["sendMail"] = Processor.process_sendMail
853
    self._processMap["sendText"] = Processor.process_sendText
817
    self._processMap["sendText"] = Processor.process_sendText
Line 878... Line 842...
878
      return
842
      return
879
    else:
843
    else:
880
      self._processMap[name](self, seqid, iprot, oprot)
844
      self._processMap[name](self, seqid, iprot, oprot)
881
    return True
845
    return True
882
 
846
 
883
  def process_closeSession(self, seqid, iprot, oprot):
-
 
884
    args = closeSession_args()
-
 
885
    args.read(iprot)
-
 
886
    iprot.readMessageEnd()
-
 
887
    result = closeSession_result()
-
 
888
    self._handler.closeSession()
-
 
889
    oprot.writeMessageBegin("closeSession", TMessageType.REPLY, seqid)
-
 
890
    result.write(oprot)
-
 
891
    oprot.writeMessageEnd()
-
 
892
    oprot.trans.flush()
-
 
893
 
-
 
894
  def process_saveUserEmailForSending(self, seqid, iprot, oprot):
847
  def process_saveUserEmailForSending(self, seqid, iprot, oprot):
895
    args = saveUserEmailForSending_args()
848
    args = saveUserEmailForSending_args()
896
    args.read(iprot)
849
    args.read(iprot)
897
    iprot.readMessageEnd()
850
    iprot.readMessageEnd()
898
    result = saveUserEmailForSending_result()
851
    result = saveUserEmailForSending_result()
Line 1141... Line 1094...
1141
    oprot.trans.flush()
1094
    oprot.trans.flush()
1142
 
1095
 
1143
 
1096
 
1144
# HELPER FUNCTIONS AND STRUCTURES
1097
# HELPER FUNCTIONS AND STRUCTURES
1145
 
1098
 
1146
class closeSession_args:
-
 
1147
 
-
 
1148
  thrift_spec = (
-
 
1149
  )
-
 
1150
 
-
 
1151
  def read(self, iprot):
-
 
1152
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1153
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1154
      return
-
 
1155
    iprot.readStructBegin()
-
 
1156
    while True:
-
 
1157
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1158
      if ftype == TType.STOP:
-
 
1159
        break
-
 
1160
      else:
-
 
1161
        iprot.skip(ftype)
-
 
1162
      iprot.readFieldEnd()
-
 
1163
    iprot.readStructEnd()
-
 
1164
 
-
 
1165
  def write(self, oprot):
-
 
1166
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1167
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1168
      return
-
 
1169
    oprot.writeStructBegin('closeSession_args')
-
 
1170
    oprot.writeFieldStop()
-
 
1171
    oprot.writeStructEnd()
-
 
1172
 
-
 
1173
  def __repr__(self):
-
 
1174
    L = ['%s=%r' % (key, value)
-
 
1175
      for key, value in self.__dict__.iteritems()]
-
 
1176
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1177
 
-
 
1178
  def __eq__(self, other):
-
 
1179
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1180
 
-
 
1181
  def __ne__(self, other):
-
 
1182
    return not (self == other)
-
 
1183
 
-
 
1184
class closeSession_result:
-
 
1185
 
-
 
1186
  thrift_spec = (
-
 
1187
  )
-
 
1188
 
-
 
1189
  def read(self, iprot):
-
 
1190
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1191
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1192
      return
-
 
1193
    iprot.readStructBegin()
-
 
1194
    while True:
-
 
1195
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1196
      if ftype == TType.STOP:
-
 
1197
        break
-
 
1198
      else:
-
 
1199
        iprot.skip(ftype)
-
 
1200
      iprot.readFieldEnd()
-
 
1201
    iprot.readStructEnd()
-
 
1202
 
-
 
1203
  def write(self, oprot):
-
 
1204
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1205
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1206
      return
-
 
1207
    oprot.writeStructBegin('closeSession_result')
-
 
1208
    oprot.writeFieldStop()
-
 
1209
    oprot.writeStructEnd()
-
 
1210
 
-
 
1211
  def __repr__(self):
-
 
1212
    L = ['%s=%r' % (key, value)
-
 
1213
      for key, value in self.__dict__.iteritems()]
-
 
1214
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1215
 
-
 
1216
  def __eq__(self, other):
-
 
1217
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1218
 
-
 
1219
  def __ne__(self, other):
-
 
1220
    return not (self == other)
-
 
1221
 
-
 
1222
class saveUserEmailForSending_args:
1099
class saveUserEmailForSending_args:
1223
  """
1100
  """
1224
  Attributes:
1101
  Attributes:
1225
   - emailTo
1102
   - emailTo
1226
   - emailFrom
1103
   - emailFrom