Subversion Repositories SmartDukaan

Rev

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

Rev 765 Rev 1395
Line 20... Line 20...
20
    """
20
    """
21
    For closing the open session in sqlalchemy
21
    For closing the open session in sqlalchemy
22
    """
22
    """
23
    pass
23
    pass
24
 
24
 
-
 
25
  def saveUserEmailForSending(self, emailTo, emailFrom, subject, body, source, emailType):
-
 
26
    """
-
 
27
    Parameters:
-
 
28
     - emailTo
-
 
29
     - emailFrom
-
 
30
     - subject
-
 
31
     - body
-
 
32
     - source
-
 
33
     - emailType
-
 
34
    """
-
 
35
    pass
-
 
36
 
25
  def sendMail(self, mail):
37
  def sendMail(self, mail):
26
    """
38
    """
27
    Parameters:
39
    Parameters:
28
     - mail
40
     - mail
29
    """
41
    """
Line 146... Line 158...
146
    result = closeSession_result()
158
    result = closeSession_result()
147
    result.read(self._iprot)
159
    result.read(self._iprot)
148
    self._iprot.readMessageEnd()
160
    self._iprot.readMessageEnd()
149
    return
161
    return
150
 
162
 
-
 
163
  def saveUserEmailForSending(self, emailTo, emailFrom, subject, body, source, emailType):
-
 
164
    """
-
 
165
    Parameters:
-
 
166
     - emailTo
-
 
167
     - emailFrom
-
 
168
     - subject
-
 
169
     - body
-
 
170
     - source
-
 
171
     - emailType
-
 
172
    """
-
 
173
    self.send_saveUserEmailForSending(emailTo, emailFrom, subject, body, source, emailType)
-
 
174
    self.recv_saveUserEmailForSending()
-
 
175
 
-
 
176
  def send_saveUserEmailForSending(self, emailTo, emailFrom, subject, body, source, emailType):
-
 
177
    self._oprot.writeMessageBegin('saveUserEmailForSending', TMessageType.CALL, self._seqid)
-
 
178
    args = saveUserEmailForSending_args()
-
 
179
    args.emailTo = emailTo
-
 
180
    args.emailFrom = emailFrom
-
 
181
    args.subject = subject
-
 
182
    args.body = body
-
 
183
    args.source = source
-
 
184
    args.emailType = emailType
-
 
185
    args.write(self._oprot)
-
 
186
    self._oprot.writeMessageEnd()
-
 
187
    self._oprot.trans.flush()
-
 
188
 
-
 
189
  def recv_saveUserEmailForSending(self, ):
-
 
190
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
191
    if mtype == TMessageType.EXCEPTION:
-
 
192
      x = TApplicationException()
-
 
193
      x.read(self._iprot)
-
 
194
      self._iprot.readMessageEnd()
-
 
195
      raise x
-
 
196
    result = saveUserEmailForSending_result()
-
 
197
    result.read(self._iprot)
-
 
198
    self._iprot.readMessageEnd()
-
 
199
    if result.se != None:
-
 
200
      raise result.se
-
 
201
    return
-
 
202
 
151
  def sendMail(self, mail):
203
  def sendMail(self, mail):
152
    """
204
    """
153
    Parameters:
205
    Parameters:
154
     - mail
206
     - mail
155
    """
207
    """
Line 519... Line 571...
519
class Processor(Iface, TProcessor):
571
class Processor(Iface, TProcessor):
520
  def __init__(self, handler):
572
  def __init__(self, handler):
521
    self._handler = handler
573
    self._handler = handler
522
    self._processMap = {}
574
    self._processMap = {}
523
    self._processMap["closeSession"] = Processor.process_closeSession
575
    self._processMap["closeSession"] = Processor.process_closeSession
-
 
576
    self._processMap["saveUserEmailForSending"] = Processor.process_saveUserEmailForSending
524
    self._processMap["sendMail"] = Processor.process_sendMail
577
    self._processMap["sendMail"] = Processor.process_sendMail
525
    self._processMap["sendText"] = Processor.process_sendText
578
    self._processMap["sendText"] = Processor.process_sendText
526
    self._processMap["addMessage"] = Processor.process_addMessage
579
    self._processMap["addMessage"] = Processor.process_addMessage
527
    self._processMap["updateMessage"] = Processor.process_updateMessage
580
    self._processMap["updateMessage"] = Processor.process_updateMessage
528
    self._processMap["getMessage"] = Processor.process_getMessage
581
    self._processMap["getMessage"] = Processor.process_getMessage
Line 557... Line 610...
557
    oprot.writeMessageBegin("closeSession", TMessageType.REPLY, seqid)
610
    oprot.writeMessageBegin("closeSession", TMessageType.REPLY, seqid)
558
    result.write(oprot)
611
    result.write(oprot)
559
    oprot.writeMessageEnd()
612
    oprot.writeMessageEnd()
560
    oprot.trans.flush()
613
    oprot.trans.flush()
561
 
614
 
-
 
615
  def process_saveUserEmailForSending(self, seqid, iprot, oprot):
-
 
616
    args = saveUserEmailForSending_args()
-
 
617
    args.read(iprot)
-
 
618
    iprot.readMessageEnd()
-
 
619
    result = saveUserEmailForSending_result()
-
 
620
    try:
-
 
621
      self._handler.saveUserEmailForSending(args.emailTo, args.emailFrom, args.subject, args.body, args.source, args.emailType)
-
 
622
    except HelperServiceException, se:
-
 
623
      result.se = se
-
 
624
    oprot.writeMessageBegin("saveUserEmailForSending", TMessageType.REPLY, seqid)
-
 
625
    result.write(oprot)
-
 
626
    oprot.writeMessageEnd()
-
 
627
    oprot.trans.flush()
-
 
628
 
562
  def process_sendMail(self, seqid, iprot, oprot):
629
  def process_sendMail(self, seqid, iprot, oprot):
563
    args = sendMail_args()
630
    args = sendMail_args()
564
    args.read(iprot)
631
    args.read(iprot)
565
    iprot.readMessageEnd()
632
    iprot.readMessageEnd()
566
    result = sendMail_result()
633
    result = sendMail_result()
Line 781... Line 848...
781
    oprot.writeFieldStop()
848
    oprot.writeFieldStop()
782
    oprot.writeStructEnd()
849
    oprot.writeStructEnd()
783
 
850
 
784
  def __repr__(self):
851
  def __repr__(self):
785
    L = ['%s=%r' % (key, value)
852
    L = ['%s=%r' % (key, value)
-
 
853
      for key, value in self.__dict__.iteritems()]
-
 
854
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
855
 
-
 
856
  def __eq__(self, other):
-
 
857
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
858
 
-
 
859
  def __ne__(self, other):
-
 
860
    return not (self == other)
-
 
861
 
-
 
862
class saveUserEmailForSending_args:
-
 
863
  """
-
 
864
  Attributes:
-
 
865
   - emailTo
-
 
866
   - emailFrom
-
 
867
   - subject
-
 
868
   - body
-
 
869
   - source
-
 
870
   - emailType
-
 
871
  """
-
 
872
 
-
 
873
  thrift_spec = (
-
 
874
    None, # 0
-
 
875
    (1, TType.STRING, 'emailTo', None, None, ), # 1
-
 
876
    (2, TType.STRING, 'emailFrom', None, None, ), # 2
-
 
877
    (3, TType.STRING, 'subject', None, None, ), # 3
-
 
878
    (4, TType.STRING, 'body', None, None, ), # 4
-
 
879
    (5, TType.STRING, 'source', None, None, ), # 5
-
 
880
    (6, TType.STRING, 'emailType', None, None, ), # 6
-
 
881
  )
-
 
882
 
-
 
883
  def __init__(self, emailTo=None, emailFrom=None, subject=None, body=None, source=None, emailType=None,):
-
 
884
    self.emailTo = emailTo
-
 
885
    self.emailFrom = emailFrom
-
 
886
    self.subject = subject
-
 
887
    self.body = body
-
 
888
    self.source = source
-
 
889
    self.emailType = emailType
-
 
890
 
-
 
891
  def read(self, iprot):
-
 
892
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
893
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
894
      return
-
 
895
    iprot.readStructBegin()
-
 
896
    while True:
-
 
897
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
898
      if ftype == TType.STOP:
-
 
899
        break
-
 
900
      if fid == 1:
-
 
901
        if ftype == TType.STRING:
-
 
902
          self.emailTo = iprot.readString();
-
 
903
        else:
-
 
904
          iprot.skip(ftype)
-
 
905
      elif fid == 2:
-
 
906
        if ftype == TType.STRING:
-
 
907
          self.emailFrom = iprot.readString();
-
 
908
        else:
-
 
909
          iprot.skip(ftype)
-
 
910
      elif fid == 3:
-
 
911
        if ftype == TType.STRING:
-
 
912
          self.subject = iprot.readString();
-
 
913
        else:
-
 
914
          iprot.skip(ftype)
-
 
915
      elif fid == 4:
-
 
916
        if ftype == TType.STRING:
-
 
917
          self.body = iprot.readString();
-
 
918
        else:
-
 
919
          iprot.skip(ftype)
-
 
920
      elif fid == 5:
-
 
921
        if ftype == TType.STRING:
-
 
922
          self.source = iprot.readString();
-
 
923
        else:
-
 
924
          iprot.skip(ftype)
-
 
925
      elif fid == 6:
-
 
926
        if ftype == TType.STRING:
-
 
927
          self.emailType = iprot.readString();
-
 
928
        else:
-
 
929
          iprot.skip(ftype)
-
 
930
      else:
-
 
931
        iprot.skip(ftype)
-
 
932
      iprot.readFieldEnd()
-
 
933
    iprot.readStructEnd()
-
 
934
 
-
 
935
  def write(self, oprot):
-
 
936
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
937
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
938
      return
-
 
939
    oprot.writeStructBegin('saveUserEmailForSending_args')
-
 
940
    if self.emailTo != None:
-
 
941
      oprot.writeFieldBegin('emailTo', TType.STRING, 1)
-
 
942
      oprot.writeString(self.emailTo)
-
 
943
      oprot.writeFieldEnd()
-
 
944
    if self.emailFrom != None:
-
 
945
      oprot.writeFieldBegin('emailFrom', TType.STRING, 2)
-
 
946
      oprot.writeString(self.emailFrom)
-
 
947
      oprot.writeFieldEnd()
-
 
948
    if self.subject != None:
-
 
949
      oprot.writeFieldBegin('subject', TType.STRING, 3)
-
 
950
      oprot.writeString(self.subject)
-
 
951
      oprot.writeFieldEnd()
-
 
952
    if self.body != None:
-
 
953
      oprot.writeFieldBegin('body', TType.STRING, 4)
-
 
954
      oprot.writeString(self.body)
-
 
955
      oprot.writeFieldEnd()
-
 
956
    if self.source != None:
-
 
957
      oprot.writeFieldBegin('source', TType.STRING, 5)
-
 
958
      oprot.writeString(self.source)
-
 
959
      oprot.writeFieldEnd()
-
 
960
    if self.emailType != None:
-
 
961
      oprot.writeFieldBegin('emailType', TType.STRING, 6)
-
 
962
      oprot.writeString(self.emailType)
-
 
963
      oprot.writeFieldEnd()
-
 
964
    oprot.writeFieldStop()
-
 
965
    oprot.writeStructEnd()
-
 
966
 
-
 
967
  def __repr__(self):
-
 
968
    L = ['%s=%r' % (key, value)
-
 
969
      for key, value in self.__dict__.iteritems()]
-
 
970
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
971
 
-
 
972
  def __eq__(self, other):
-
 
973
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
974
 
-
 
975
  def __ne__(self, other):
-
 
976
    return not (self == other)
-
 
977
 
-
 
978
class saveUserEmailForSending_result:
-
 
979
  """
-
 
980
  Attributes:
-
 
981
   - se
-
 
982
  """
-
 
983
 
-
 
984
  thrift_spec = (
-
 
985
    None, # 0
-
 
986
    (1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
-
 
987
  )
-
 
988
 
-
 
989
  def __init__(self, se=None,):
-
 
990
    self.se = se
-
 
991
 
-
 
992
  def read(self, iprot):
-
 
993
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
994
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
995
      return
-
 
996
    iprot.readStructBegin()
-
 
997
    while True:
-
 
998
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
999
      if ftype == TType.STOP:
-
 
1000
        break
-
 
1001
      if fid == 1:
-
 
1002
        if ftype == TType.STRUCT:
-
 
1003
          self.se = HelperServiceException()
-
 
1004
          self.se.read(iprot)
-
 
1005
        else:
-
 
1006
          iprot.skip(ftype)
-
 
1007
      else:
-
 
1008
        iprot.skip(ftype)
-
 
1009
      iprot.readFieldEnd()
-
 
1010
    iprot.readStructEnd()
-
 
1011
 
-
 
1012
  def write(self, oprot):
-
 
1013
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1014
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1015
      return
-
 
1016
    oprot.writeStructBegin('saveUserEmailForSending_result')
-
 
1017
    if self.se != None:
-
 
1018
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
-
 
1019
      self.se.write(oprot)
-
 
1020
      oprot.writeFieldEnd()
-
 
1021
    oprot.writeFieldStop()
-
 
1022
    oprot.writeStructEnd()
-
 
1023
 
-
 
1024
  def __repr__(self):
-
 
1025
    L = ['%s=%r' % (key, value)
786
      for key, value in self.__dict__.iteritems()]
1026
      for key, value in self.__dict__.iteritems()]
787
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1027
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
788
 
1028
 
789
  def __eq__(self, other):
1029
  def __eq__(self, other):
790
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1030
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__