Subversion Repositories SmartDukaan

Rev

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

Rev 122 Rev 130
Line 184... Line 184...
184
     - socialService
184
     - socialService
185
     - handle
185
     - handle
186
    """
186
    """
187
    pass
187
    pass
188
 
188
 
-
 
189
  def sendNewPasswordById(self, userid):
-
 
190
    """
-
 
191
    Parameters:
-
 
192
     - userid
-
 
193
    """
-
 
194
    pass
-
 
195
 
-
 
196
  def sendNewPasswordByHandle(self, emailOrHandle, isEmail):
-
 
197
    """
-
 
198
    Parameters:
-
 
199
     - emailOrHandle
-
 
200
     - isEmail
-
 
201
    """
-
 
202
    pass
-
 
203
 
189
 
204
 
190
class Client(Iface):
205
class Client(Iface):
191
  """
206
  """
192
  service
207
  service
193
  """
208
  """
Line 907... Line 922...
907
      return result.success
922
      return result.success
908
    if result.ucx != None:
923
    if result.ucx != None:
909
      raise result.ucx
924
      raise result.ucx
910
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addSocialhandle failed: unknown result");
925
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addSocialhandle failed: unknown result");
911
 
926
 
-
 
927
  def sendNewPasswordById(self, userid):
-
 
928
    """
-
 
929
    Parameters:
-
 
930
     - userid
-
 
931
    """
-
 
932
    self.send_sendNewPasswordById(userid)
-
 
933
    return self.recv_sendNewPasswordById()
-
 
934
 
-
 
935
  def send_sendNewPasswordById(self, userid):
-
 
936
    self._oprot.writeMessageBegin('sendNewPasswordById', TMessageType.CALL, self._seqid)
-
 
937
    args = sendNewPasswordById_args()
-
 
938
    args.userid = userid
-
 
939
    args.write(self._oprot)
-
 
940
    self._oprot.writeMessageEnd()
-
 
941
    self._oprot.trans.flush()
-
 
942
 
-
 
943
  def recv_sendNewPasswordById(self, ):
-
 
944
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
945
    if mtype == TMessageType.EXCEPTION:
-
 
946
      x = TApplicationException()
-
 
947
      x.read(self._iprot)
-
 
948
      self._iprot.readMessageEnd()
-
 
949
      raise x
-
 
950
    result = sendNewPasswordById_result()
-
 
951
    result.read(self._iprot)
-
 
952
    self._iprot.readMessageEnd()
-
 
953
    if result.success != None:
-
 
954
      return result.success
-
 
955
    if result.ucx != None:
-
 
956
      raise result.ucx
-
 
957
    raise TApplicationException(TApplicationException.MISSING_RESULT, "sendNewPasswordById failed: unknown result");
-
 
958
 
-
 
959
  def sendNewPasswordByHandle(self, emailOrHandle, isEmail):
-
 
960
    """
-
 
961
    Parameters:
-
 
962
     - emailOrHandle
-
 
963
     - isEmail
-
 
964
    """
-
 
965
    self.send_sendNewPasswordByHandle(emailOrHandle, isEmail)
-
 
966
    return self.recv_sendNewPasswordByHandle()
-
 
967
 
-
 
968
  def send_sendNewPasswordByHandle(self, emailOrHandle, isEmail):
-
 
969
    self._oprot.writeMessageBegin('sendNewPasswordByHandle', TMessageType.CALL, self._seqid)
-
 
970
    args = sendNewPasswordByHandle_args()
-
 
971
    args.emailOrHandle = emailOrHandle
-
 
972
    args.isEmail = isEmail
-
 
973
    args.write(self._oprot)
-
 
974
    self._oprot.writeMessageEnd()
-
 
975
    self._oprot.trans.flush()
-
 
976
 
-
 
977
  def recv_sendNewPasswordByHandle(self, ):
-
 
978
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
979
    if mtype == TMessageType.EXCEPTION:
-
 
980
      x = TApplicationException()
-
 
981
      x.read(self._iprot)
-
 
982
      self._iprot.readMessageEnd()
-
 
983
      raise x
-
 
984
    result = sendNewPasswordByHandle_result()
-
 
985
    result.read(self._iprot)
-
 
986
    self._iprot.readMessageEnd()
-
 
987
    if result.success != None:
-
 
988
      return result.success
-
 
989
    if result.ucx != None:
-
 
990
      raise result.ucx
-
 
991
    raise TApplicationException(TApplicationException.MISSING_RESULT, "sendNewPasswordByHandle failed: unknown result");
-
 
992
 
912
 
993
 
913
class Processor(Iface, TProcessor):
994
class Processor(Iface, TProcessor):
914
  def __init__(self, handler):
995
  def __init__(self, handler):
915
    self._handler = handler
996
    self._handler = handler
916
    self._processMap = {}
997
    self._processMap = {}
Line 933... Line 1014...
933
    self._processMap["sendEmailVerification"] = Processor.process_sendEmailVerification
1014
    self._processMap["sendEmailVerification"] = Processor.process_sendEmailVerification
934
    self._processMap["sendSMSVerification"] = Processor.process_sendSMSVerification
1015
    self._processMap["sendSMSVerification"] = Processor.process_sendSMSVerification
935
    self._processMap["confirmEmailVerification"] = Processor.process_confirmEmailVerification
1016
    self._processMap["confirmEmailVerification"] = Processor.process_confirmEmailVerification
936
    self._processMap["confirmSMSVerification"] = Processor.process_confirmSMSVerification
1017
    self._processMap["confirmSMSVerification"] = Processor.process_confirmSMSVerification
937
    self._processMap["addSocialhandle"] = Processor.process_addSocialhandle
1018
    self._processMap["addSocialhandle"] = Processor.process_addSocialhandle
-
 
1019
    self._processMap["sendNewPasswordById"] = Processor.process_sendNewPasswordById
-
 
1020
    self._processMap["sendNewPasswordByHandle"] = Processor.process_sendNewPasswordByHandle
938
 
1021
 
939
  def process(self, iprot, oprot):
1022
  def process(self, iprot, oprot):
940
    (name, type, seqid) = iprot.readMessageBegin()
1023
    (name, type, seqid) = iprot.readMessageBegin()
941
    if name not in self._processMap:
1024
    if name not in self._processMap:
942
      iprot.skip(TType.STRUCT)
1025
      iprot.skip(TType.STRUCT)
Line 1243... Line 1326...
1243
    oprot.writeMessageBegin("addSocialhandle", TMessageType.REPLY, seqid)
1326
    oprot.writeMessageBegin("addSocialhandle", TMessageType.REPLY, seqid)
1244
    result.write(oprot)
1327
    result.write(oprot)
1245
    oprot.writeMessageEnd()
1328
    oprot.writeMessageEnd()
1246
    oprot.trans.flush()
1329
    oprot.trans.flush()
1247
 
1330
 
-
 
1331
  def process_sendNewPasswordById(self, seqid, iprot, oprot):
-
 
1332
    args = sendNewPasswordById_args()
-
 
1333
    args.read(iprot)
-
 
1334
    iprot.readMessageEnd()
-
 
1335
    result = sendNewPasswordById_result()
-
 
1336
    try:
-
 
1337
      result.success = self._handler.sendNewPasswordById(args.userid)
-
 
1338
    except UserContextException, ucx:
-
 
1339
      result.ucx = ucx
-
 
1340
    oprot.writeMessageBegin("sendNewPasswordById", TMessageType.REPLY, seqid)
-
 
1341
    result.write(oprot)
-
 
1342
    oprot.writeMessageEnd()
-
 
1343
    oprot.trans.flush()
-
 
1344
 
-
 
1345
  def process_sendNewPasswordByHandle(self, seqid, iprot, oprot):
-
 
1346
    args = sendNewPasswordByHandle_args()
-
 
1347
    args.read(iprot)
-
 
1348
    iprot.readMessageEnd()
-
 
1349
    result = sendNewPasswordByHandle_result()
-
 
1350
    try:
-
 
1351
      result.success = self._handler.sendNewPasswordByHandle(args.emailOrHandle, args.isEmail)
-
 
1352
    except UserContextException, ucx:
-
 
1353
      result.ucx = ucx
-
 
1354
    oprot.writeMessageBegin("sendNewPasswordByHandle", TMessageType.REPLY, seqid)
-
 
1355
    result.write(oprot)
-
 
1356
    oprot.writeMessageEnd()
-
 
1357
    oprot.trans.flush()
-
 
1358
 
1248
 
1359
 
1249
# HELPER FUNCTIONS AND STRUCTURES
1360
# HELPER FUNCTIONS AND STRUCTURES
1250
 
1361
 
1251
class createContext_args:
1362
class createContext_args:
1252
  """
1363
  """
Line 4082... Line 4193...
4082
    if self.success != None:
4193
    if self.success != None:
4083
      oprot.writeFieldBegin('success', TType.BOOL, 0)
4194
      oprot.writeFieldBegin('success', TType.BOOL, 0)
4084
      oprot.writeBool(self.success)
4195
      oprot.writeBool(self.success)
4085
      oprot.writeFieldEnd()
4196
      oprot.writeFieldEnd()
4086
    if self.ucx != None:
4197
    if self.ucx != None:
-
 
4198
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
-
 
4199
      self.ucx.write(oprot)
-
 
4200
      oprot.writeFieldEnd()
-
 
4201
    oprot.writeFieldStop()
-
 
4202
    oprot.writeStructEnd()
-
 
4203
 
-
 
4204
  def __repr__(self):
-
 
4205
    L = ['%s=%r' % (key, value)
-
 
4206
      for key, value in self.__dict__.iteritems()]
-
 
4207
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4208
 
-
 
4209
  def __eq__(self, other):
-
 
4210
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4211
 
-
 
4212
  def __ne__(self, other):
-
 
4213
    return not (self == other)
-
 
4214
 
-
 
4215
class sendNewPasswordById_args:
-
 
4216
  """
-
 
4217
  Attributes:
-
 
4218
   - userid
-
 
4219
  """
-
 
4220
 
-
 
4221
  thrift_spec = (
-
 
4222
    None, # 0
-
 
4223
    (1, TType.I64, 'userid', None, None, ), # 1
-
 
4224
  )
-
 
4225
 
-
 
4226
  def __init__(self, userid=None,):
-
 
4227
    self.userid = userid
-
 
4228
 
-
 
4229
  def read(self, iprot):
-
 
4230
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4231
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4232
      return
-
 
4233
    iprot.readStructBegin()
-
 
4234
    while True:
-
 
4235
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4236
      if ftype == TType.STOP:
-
 
4237
        break
-
 
4238
      if fid == 1:
-
 
4239
        if ftype == TType.I64:
-
 
4240
          self.userid = iprot.readI64();
-
 
4241
        else:
-
 
4242
          iprot.skip(ftype)
-
 
4243
      else:
-
 
4244
        iprot.skip(ftype)
-
 
4245
      iprot.readFieldEnd()
-
 
4246
    iprot.readStructEnd()
-
 
4247
 
-
 
4248
  def write(self, oprot):
-
 
4249
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4250
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4251
      return
-
 
4252
    oprot.writeStructBegin('sendNewPasswordById_args')
-
 
4253
    if self.userid != None:
-
 
4254
      oprot.writeFieldBegin('userid', TType.I64, 1)
-
 
4255
      oprot.writeI64(self.userid)
-
 
4256
      oprot.writeFieldEnd()
-
 
4257
    oprot.writeFieldStop()
-
 
4258
    oprot.writeStructEnd()
-
 
4259
 
-
 
4260
  def __repr__(self):
-
 
4261
    L = ['%s=%r' % (key, value)
-
 
4262
      for key, value in self.__dict__.iteritems()]
-
 
4263
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4264
 
-
 
4265
  def __eq__(self, other):
-
 
4266
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4267
 
-
 
4268
  def __ne__(self, other):
-
 
4269
    return not (self == other)
-
 
4270
 
-
 
4271
class sendNewPasswordById_result:
-
 
4272
  """
-
 
4273
  Attributes:
-
 
4274
   - success
-
 
4275
   - ucx
-
 
4276
  """
-
 
4277
 
-
 
4278
  thrift_spec = (
-
 
4279
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
4280
    (1, TType.STRUCT, 'ucx', (UserContextException, UserContextException.thrift_spec), None, ), # 1
-
 
4281
  )
-
 
4282
 
-
 
4283
  def __init__(self, success=None, ucx=None,):
-
 
4284
    self.success = success
-
 
4285
    self.ucx = ucx
-
 
4286
 
-
 
4287
  def read(self, iprot):
-
 
4288
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4289
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4290
      return
-
 
4291
    iprot.readStructBegin()
-
 
4292
    while True:
-
 
4293
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4294
      if ftype == TType.STOP:
-
 
4295
        break
-
 
4296
      if fid == 0:
-
 
4297
        if ftype == TType.BOOL:
-
 
4298
          self.success = iprot.readBool();
-
 
4299
        else:
-
 
4300
          iprot.skip(ftype)
-
 
4301
      elif fid == 1:
-
 
4302
        if ftype == TType.STRUCT:
-
 
4303
          self.ucx = UserContextException()
-
 
4304
          self.ucx.read(iprot)
-
 
4305
        else:
-
 
4306
          iprot.skip(ftype)
-
 
4307
      else:
-
 
4308
        iprot.skip(ftype)
-
 
4309
      iprot.readFieldEnd()
-
 
4310
    iprot.readStructEnd()
-
 
4311
 
-
 
4312
  def write(self, oprot):
-
 
4313
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4314
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4315
      return
-
 
4316
    oprot.writeStructBegin('sendNewPasswordById_result')
-
 
4317
    if self.success != None:
-
 
4318
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
4319
      oprot.writeBool(self.success)
-
 
4320
      oprot.writeFieldEnd()
-
 
4321
    if self.ucx != None:
-
 
4322
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
-
 
4323
      self.ucx.write(oprot)
-
 
4324
      oprot.writeFieldEnd()
-
 
4325
    oprot.writeFieldStop()
-
 
4326
    oprot.writeStructEnd()
-
 
4327
 
-
 
4328
  def __repr__(self):
-
 
4329
    L = ['%s=%r' % (key, value)
-
 
4330
      for key, value in self.__dict__.iteritems()]
-
 
4331
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4332
 
-
 
4333
  def __eq__(self, other):
-
 
4334
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4335
 
-
 
4336
  def __ne__(self, other):
-
 
4337
    return not (self == other)
-
 
4338
 
-
 
4339
class sendNewPasswordByHandle_args:
-
 
4340
  """
-
 
4341
  Attributes:
-
 
4342
   - emailOrHandle
-
 
4343
   - isEmail
-
 
4344
  """
-
 
4345
 
-
 
4346
  thrift_spec = (
-
 
4347
    None, # 0
-
 
4348
    (1, TType.STRING, 'emailOrHandle', None, None, ), # 1
-
 
4349
    (2, TType.BOOL, 'isEmail', None, None, ), # 2
-
 
4350
  )
-
 
4351
 
-
 
4352
  def __init__(self, emailOrHandle=None, isEmail=None,):
-
 
4353
    self.emailOrHandle = emailOrHandle
-
 
4354
    self.isEmail = isEmail
-
 
4355
 
-
 
4356
  def read(self, iprot):
-
 
4357
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4358
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4359
      return
-
 
4360
    iprot.readStructBegin()
-
 
4361
    while True:
-
 
4362
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4363
      if ftype == TType.STOP:
-
 
4364
        break
-
 
4365
      if fid == 1:
-
 
4366
        if ftype == TType.STRING:
-
 
4367
          self.emailOrHandle = iprot.readString();
-
 
4368
        else:
-
 
4369
          iprot.skip(ftype)
-
 
4370
      elif fid == 2:
-
 
4371
        if ftype == TType.BOOL:
-
 
4372
          self.isEmail = iprot.readBool();
-
 
4373
        else:
-
 
4374
          iprot.skip(ftype)
-
 
4375
      else:
-
 
4376
        iprot.skip(ftype)
-
 
4377
      iprot.readFieldEnd()
-
 
4378
    iprot.readStructEnd()
-
 
4379
 
-
 
4380
  def write(self, oprot):
-
 
4381
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4382
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4383
      return
-
 
4384
    oprot.writeStructBegin('sendNewPasswordByHandle_args')
-
 
4385
    if self.emailOrHandle != None:
-
 
4386
      oprot.writeFieldBegin('emailOrHandle', TType.STRING, 1)
-
 
4387
      oprot.writeString(self.emailOrHandle)
-
 
4388
      oprot.writeFieldEnd()
-
 
4389
    if self.isEmail != None:
-
 
4390
      oprot.writeFieldBegin('isEmail', TType.BOOL, 2)
-
 
4391
      oprot.writeBool(self.isEmail)
-
 
4392
      oprot.writeFieldEnd()
-
 
4393
    oprot.writeFieldStop()
-
 
4394
    oprot.writeStructEnd()
-
 
4395
 
-
 
4396
  def __repr__(self):
-
 
4397
    L = ['%s=%r' % (key, value)
-
 
4398
      for key, value in self.__dict__.iteritems()]
-
 
4399
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4400
 
-
 
4401
  def __eq__(self, other):
-
 
4402
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4403
 
-
 
4404
  def __ne__(self, other):
-
 
4405
    return not (self == other)
-
 
4406
 
-
 
4407
class sendNewPasswordByHandle_result:
-
 
4408
  """
-
 
4409
  Attributes:
-
 
4410
   - success
-
 
4411
   - ucx
-
 
4412
  """
-
 
4413
 
-
 
4414
  thrift_spec = (
-
 
4415
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
4416
    (1, TType.STRUCT, 'ucx', (UserContextException, UserContextException.thrift_spec), None, ), # 1
-
 
4417
  )
-
 
4418
 
-
 
4419
  def __init__(self, success=None, ucx=None,):
-
 
4420
    self.success = success
-
 
4421
    self.ucx = ucx
-
 
4422
 
-
 
4423
  def read(self, iprot):
-
 
4424
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4425
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4426
      return
-
 
4427
    iprot.readStructBegin()
-
 
4428
    while True:
-
 
4429
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4430
      if ftype == TType.STOP:
-
 
4431
        break
-
 
4432
      if fid == 0:
-
 
4433
        if ftype == TType.BOOL:
-
 
4434
          self.success = iprot.readBool();
-
 
4435
        else:
-
 
4436
          iprot.skip(ftype)
-
 
4437
      elif fid == 1:
-
 
4438
        if ftype == TType.STRUCT:
-
 
4439
          self.ucx = UserContextException()
-
 
4440
          self.ucx.read(iprot)
-
 
4441
        else:
-
 
4442
          iprot.skip(ftype)
-
 
4443
      else:
-
 
4444
        iprot.skip(ftype)
-
 
4445
      iprot.readFieldEnd()
-
 
4446
    iprot.readStructEnd()
-
 
4447
 
-
 
4448
  def write(self, oprot):
-
 
4449
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4450
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4451
      return
-
 
4452
    oprot.writeStructBegin('sendNewPasswordByHandle_result')
-
 
4453
    if self.success != None:
-
 
4454
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
4455
      oprot.writeBool(self.success)
-
 
4456
      oprot.writeFieldEnd()
-
 
4457
    if self.ucx != None:
4087
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
4458
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
4088
      self.ucx.write(oprot)
4459
      self.ucx.write(oprot)
4089
      oprot.writeFieldEnd()
4460
      oprot.writeFieldEnd()
4090
    oprot.writeFieldStop()
4461
    oprot.writeFieldStop()
4091
    oprot.writeStructEnd()
4462
    oprot.writeStructEnd()