Subversion Repositories SmartDukaan

Rev

Rev 2926 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2926 Rev 3431
Line 1... Line 1...
1
#
1
#
2
# Autogenerated by Thrift
2
# Autogenerated by Thrift Compiler (0.7.0)
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
from ttypes import *
8
from ttypes import *
9
from thrift.Thrift import TProcessor
9
from thrift.Thrift import TProcessor
10
from thrift.transport import TTransport
10
from thrift.transport import TTransport
11
from thrift.protocol import TBinaryProtocol
11
from thrift.protocol import TBinaryProtocol, TProtocol
12
try:
12
try:
13
  from thrift.protocol import fastbinary
13
  from thrift.protocol import fastbinary
14
except:
14
except:
15
  fastbinary = None
15
  fastbinary = None
16
 
16
 
Line 36... Line 36...
36
 
36
 
37
 
37
 
38
class Client(Iface):
38
class Client(Iface):
39
  def __init__(self, iprot, oprot=None):
39
  def __init__(self, iprot, oprot=None):
40
    self._iprot = self._oprot = iprot
40
    self._iprot = self._oprot = iprot
41
    if oprot != None:
41
    if oprot is not None:
42
      self._oprot = oprot
42
      self._oprot = oprot
43
    self._seqid = 0
43
    self._seqid = 0
44
 
44
 
45
  def getPropetry(self, propertyName):
45
  def getPropetry(self, propertyName):
46
    """
46
    """
Line 66... Line 66...
66
      self._iprot.readMessageEnd()
66
      self._iprot.readMessageEnd()
67
      raise x
67
      raise x
68
    result = getPropetry_result()
68
    result = getPropetry_result()
69
    result.read(self._iprot)
69
    result.read(self._iprot)
70
    self._iprot.readMessageEnd()
70
    self._iprot.readMessageEnd()
71
    if result.success != None:
71
    if result.success is not None:
72
      return result.success
72
      return result.success
73
    if result.e != None:
73
    if result.e is not None:
74
      raise result.e
74
      raise result.e
75
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPropetry failed: unknown result");
75
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPropetry failed: unknown result");
76
 
76
 
77
  def loadProperty(self, propertyName, propertyValue):
77
  def loadProperty(self, propertyName, propertyValue):
78
    """
78
    """
Line 226... Line 226...
226
  def write(self, oprot):
226
  def write(self, oprot):
227
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
227
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
228
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
228
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
229
      return
229
      return
230
    oprot.writeStructBegin('getPropetry_args')
230
    oprot.writeStructBegin('getPropetry_args')
231
    if self.propertyName != None:
231
    if self.propertyName is not None:
232
      oprot.writeFieldBegin('propertyName', TType.STRING, 1)
232
      oprot.writeFieldBegin('propertyName', TType.STRING, 1)
233
      oprot.writeString(self.propertyName)
233
      oprot.writeString(self.propertyName)
234
      oprot.writeFieldEnd()
234
      oprot.writeFieldEnd()
235
    oprot.writeFieldStop()
235
    oprot.writeFieldStop()
236
    oprot.writeStructEnd()
236
    oprot.writeStructEnd()
237
 
237
 
-
 
238
  def validate(self):
-
 
239
    return
-
 
240
 
-
 
241
 
238
  def __repr__(self):
242
  def __repr__(self):
239
    L = ['%s=%r' % (key, value)
243
    L = ['%s=%r' % (key, value)
240
      for key, value in self.__dict__.iteritems()]
244
      for key, value in self.__dict__.iteritems()]
241
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
245
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
242
 
246
 
Line 290... Line 294...
290
  def write(self, oprot):
294
  def write(self, oprot):
291
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
295
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
292
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
296
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
293
      return
297
      return
294
    oprot.writeStructBegin('getPropetry_result')
298
    oprot.writeStructBegin('getPropetry_result')
295
    if self.success != None:
299
    if self.success is not None:
296
      oprot.writeFieldBegin('success', TType.STRING, 0)
300
      oprot.writeFieldBegin('success', TType.STRING, 0)
297
      oprot.writeString(self.success)
301
      oprot.writeString(self.success)
298
      oprot.writeFieldEnd()
302
      oprot.writeFieldEnd()
299
    if self.e != None:
303
    if self.e is not None:
300
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
304
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
301
      self.e.write(oprot)
305
      self.e.write(oprot)
302
      oprot.writeFieldEnd()
306
      oprot.writeFieldEnd()
303
    oprot.writeFieldStop()
307
    oprot.writeFieldStop()
304
    oprot.writeStructEnd()
308
    oprot.writeStructEnd()
305
 
309
 
-
 
310
  def validate(self):
-
 
311
    return
-
 
312
 
-
 
313
 
306
  def __repr__(self):
314
  def __repr__(self):
307
    L = ['%s=%r' % (key, value)
315
    L = ['%s=%r' % (key, value)
308
      for key, value in self.__dict__.iteritems()]
316
      for key, value in self.__dict__.iteritems()]
309
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
317
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
310
 
318
 
Line 358... Line 366...
358
  def write(self, oprot):
366
  def write(self, oprot):
359
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
367
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
360
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
368
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
361
      return
369
      return
362
    oprot.writeStructBegin('loadProperty_args')
370
    oprot.writeStructBegin('loadProperty_args')
363
    if self.propertyName != None:
371
    if self.propertyName is not None:
364
      oprot.writeFieldBegin('propertyName', TType.STRING, 1)
372
      oprot.writeFieldBegin('propertyName', TType.STRING, 1)
365
      oprot.writeString(self.propertyName)
373
      oprot.writeString(self.propertyName)
366
      oprot.writeFieldEnd()
374
      oprot.writeFieldEnd()
367
    if self.propertyValue != None:
375
    if self.propertyValue is not None:
368
      oprot.writeFieldBegin('propertyValue', TType.STRING, 2)
376
      oprot.writeFieldBegin('propertyValue', TType.STRING, 2)
369
      oprot.writeString(self.propertyValue)
377
      oprot.writeString(self.propertyValue)
370
      oprot.writeFieldEnd()
378
      oprot.writeFieldEnd()
371
    oprot.writeFieldStop()
379
    oprot.writeFieldStop()
372
    oprot.writeStructEnd()
380
    oprot.writeStructEnd()
373
 
381
 
-
 
382
  def validate(self):
-
 
383
    return
-
 
384
 
-
 
385
 
374
  def __repr__(self):
386
  def __repr__(self):
375
    L = ['%s=%r' % (key, value)
387
    L = ['%s=%r' % (key, value)
376
      for key, value in self.__dict__.iteritems()]
388
      for key, value in self.__dict__.iteritems()]
377
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
389
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
378
 
390
 
Line 407... Line 419...
407
      return
419
      return
408
    oprot.writeStructBegin('loadProperty_result')
420
    oprot.writeStructBegin('loadProperty_result')
409
    oprot.writeFieldStop()
421
    oprot.writeFieldStop()
410
    oprot.writeStructEnd()
422
    oprot.writeStructEnd()
411
 
423
 
-
 
424
  def validate(self):
-
 
425
    return
-
 
426
 
-
 
427
 
412
  def __repr__(self):
428
  def __repr__(self):
413
    L = ['%s=%r' % (key, value)
429
    L = ['%s=%r' % (key, value)
414
      for key, value in self.__dict__.iteritems()]
430
      for key, value in self.__dict__.iteritems()]
415
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
431
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
416
 
432
 
Line 445... Line 461...
445
      return
461
      return
446
    oprot.writeStructBegin('reloadProperties_args')
462
    oprot.writeStructBegin('reloadProperties_args')
447
    oprot.writeFieldStop()
463
    oprot.writeFieldStop()
448
    oprot.writeStructEnd()
464
    oprot.writeStructEnd()
449
 
465
 
-
 
466
  def validate(self):
-
 
467
    return
-
 
468
 
-
 
469
 
450
  def __repr__(self):
470
  def __repr__(self):
451
    L = ['%s=%r' % (key, value)
471
    L = ['%s=%r' % (key, value)
452
      for key, value in self.__dict__.iteritems()]
472
      for key, value in self.__dict__.iteritems()]
453
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
473
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
454
 
474
 
Line 483... Line 503...
483
      return
503
      return
484
    oprot.writeStructBegin('reloadProperties_result')
504
    oprot.writeStructBegin('reloadProperties_result')
485
    oprot.writeFieldStop()
505
    oprot.writeFieldStop()
486
    oprot.writeStructEnd()
506
    oprot.writeStructEnd()
487
 
507
 
-
 
508
  def validate(self):
-
 
509
    return
-
 
510
 
-
 
511
 
488
  def __repr__(self):
512
  def __repr__(self):
489
    L = ['%s=%r' % (key, value)
513
    L = ['%s=%r' % (key, value)
490
      for key, value in self.__dict__.iteritems()]
514
      for key, value in self.__dict__.iteritems()]
491
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
515
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
492
 
516
 
493
  def __eq__(self, other):
517
  def __eq__(self, other):
494
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
518
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
495
 
519
 
496
  def __ne__(self, other):
520
  def __ne__(self, other):
497
    return not (self == other)
521
    return not (self == other)
498
 
-
 
499
 
-