Subversion Repositories SmartDukaan

Rev

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

Rev 759 Rev 765
Line 14... Line 14...
14
except:
14
except:
15
  fastbinary = None
15
  fastbinary = None
16
 
16
 
17
 
17
 
18
class Iface:
18
class Iface:
-
 
19
  def closeSession(self, ):
-
 
20
    """
-
 
21
    For closing the open session in sqlalchemy
-
 
22
    """
-
 
23
    pass
-
 
24
 
19
  def sendMail(self, mail):
25
  def sendMail(self, mail):
20
    """
26
    """
21
    Parameters:
27
    Parameters:
22
     - mail
28
     - mail
23
    """
29
    """
Line 114... Line 120...
114
    self._iprot = self._oprot = iprot
120
    self._iprot = self._oprot = iprot
115
    if oprot != None:
121
    if oprot != None:
116
      self._oprot = oprot
122
      self._oprot = oprot
117
    self._seqid = 0
123
    self._seqid = 0
118
 
124
 
-
 
125
  def closeSession(self, ):
-
 
126
    """
-
 
127
    For closing the open session in sqlalchemy
-
 
128
    """
-
 
129
    self.send_closeSession()
-
 
130
    self.recv_closeSession()
-
 
131
 
-
 
132
  def send_closeSession(self, ):
-
 
133
    self._oprot.writeMessageBegin('closeSession', TMessageType.CALL, self._seqid)
-
 
134
    args = closeSession_args()
-
 
135
    args.write(self._oprot)
-
 
136
    self._oprot.writeMessageEnd()
-
 
137
    self._oprot.trans.flush()
-
 
138
 
-
 
139
  def recv_closeSession(self, ):
-
 
140
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
141
    if mtype == TMessageType.EXCEPTION:
-
 
142
      x = TApplicationException()
-
 
143
      x.read(self._iprot)
-
 
144
      self._iprot.readMessageEnd()
-
 
145
      raise x
-
 
146
    result = closeSession_result()
-
 
147
    result.read(self._iprot)
-
 
148
    self._iprot.readMessageEnd()
-
 
149
    return
-
 
150
 
119
  def sendMail(self, mail):
151
  def sendMail(self, mail):
120
    """
152
    """
121
    Parameters:
153
    Parameters:
122
     - mail
154
     - mail
123
    """
155
    """
Line 486... Line 518...
486
 
518
 
487
class Processor(Iface, TProcessor):
519
class Processor(Iface, TProcessor):
488
  def __init__(self, handler):
520
  def __init__(self, handler):
489
    self._handler = handler
521
    self._handler = handler
490
    self._processMap = {}
522
    self._processMap = {}
-
 
523
    self._processMap["closeSession"] = Processor.process_closeSession
491
    self._processMap["sendMail"] = Processor.process_sendMail
524
    self._processMap["sendMail"] = Processor.process_sendMail
492
    self._processMap["sendText"] = Processor.process_sendText
525
    self._processMap["sendText"] = Processor.process_sendText
493
    self._processMap["addMessage"] = Processor.process_addMessage
526
    self._processMap["addMessage"] = Processor.process_addMessage
494
    self._processMap["updateMessage"] = Processor.process_updateMessage
527
    self._processMap["updateMessage"] = Processor.process_updateMessage
495
    self._processMap["getMessage"] = Processor.process_getMessage
528
    self._processMap["getMessage"] = Processor.process_getMessage
Line 513... Line 546...
513
      return
546
      return
514
    else:
547
    else:
515
      self._processMap[name](self, seqid, iprot, oprot)
548
      self._processMap[name](self, seqid, iprot, oprot)
516
    return True
549
    return True
517
 
550
 
-
 
551
  def process_closeSession(self, seqid, iprot, oprot):
-
 
552
    args = closeSession_args()
-
 
553
    args.read(iprot)
-
 
554
    iprot.readMessageEnd()
-
 
555
    result = closeSession_result()
-
 
556
    self._handler.closeSession()
-
 
557
    oprot.writeMessageBegin("closeSession", TMessageType.REPLY, seqid)
-
 
558
    result.write(oprot)
-
 
559
    oprot.writeMessageEnd()
-
 
560
    oprot.trans.flush()
-
 
561
 
518
  def process_sendMail(self, seqid, iprot, oprot):
562
  def process_sendMail(self, seqid, iprot, oprot):
519
    args = sendMail_args()
563
    args = sendMail_args()
520
    args.read(iprot)
564
    args.read(iprot)
521
    iprot.readMessageEnd()
565
    iprot.readMessageEnd()
522
    result = sendMail_result()
566
    result = sendMail_result()
Line 670... Line 714...
670
    oprot.trans.flush()
714
    oprot.trans.flush()
671
 
715
 
672
 
716
 
673
# HELPER FUNCTIONS AND STRUCTURES
717
# HELPER FUNCTIONS AND STRUCTURES
674
 
718
 
-
 
719
class closeSession_args:
-
 
720
 
-
 
721
  thrift_spec = (
-
 
722
  )
-
 
723
 
-
 
724
  def read(self, iprot):
-
 
725
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
726
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
727
      return
-
 
728
    iprot.readStructBegin()
-
 
729
    while True:
-
 
730
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
731
      if ftype == TType.STOP:
-
 
732
        break
-
 
733
      else:
-
 
734
        iprot.skip(ftype)
-
 
735
      iprot.readFieldEnd()
-
 
736
    iprot.readStructEnd()
-
 
737
 
-
 
738
  def write(self, oprot):
-
 
739
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
740
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
741
      return
-
 
742
    oprot.writeStructBegin('closeSession_args')
-
 
743
    oprot.writeFieldStop()
-
 
744
    oprot.writeStructEnd()
-
 
745
 
-
 
746
  def __repr__(self):
-
 
747
    L = ['%s=%r' % (key, value)
-
 
748
      for key, value in self.__dict__.iteritems()]
-
 
749
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
750
 
-
 
751
  def __eq__(self, other):
-
 
752
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
753
 
-
 
754
  def __ne__(self, other):
-
 
755
    return not (self == other)
-
 
756
 
-
 
757
class closeSession_result:
-
 
758
 
-
 
759
  thrift_spec = (
-
 
760
  )
-
 
761
 
-
 
762
  def read(self, iprot):
-
 
763
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
764
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
765
      return
-
 
766
    iprot.readStructBegin()
-
 
767
    while True:
-
 
768
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
769
      if ftype == TType.STOP:
-
 
770
        break
-
 
771
      else:
-
 
772
        iprot.skip(ftype)
-
 
773
      iprot.readFieldEnd()
-
 
774
    iprot.readStructEnd()
-
 
775
 
-
 
776
  def write(self, oprot):
-
 
777
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
778
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
779
      return
-
 
780
    oprot.writeStructBegin('closeSession_result')
-
 
781
    oprot.writeFieldStop()
-
 
782
    oprot.writeStructEnd()
-
 
783
 
-
 
784
  def __repr__(self):
-
 
785
    L = ['%s=%r' % (key, value)
-
 
786
      for key, value in self.__dict__.iteritems()]
-
 
787
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
788
 
-
 
789
  def __eq__(self, other):
-
 
790
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
791
 
-
 
792
  def __ne__(self, other):
-
 
793
    return not (self == other)
-
 
794
 
675
class sendMail_args:
795
class sendMail_args:
676
  """
796
  """
677
  Attributes:
797
  Attributes:
678
   - mail
798
   - mail
679
  """
799
  """