ZimRpcManager.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. //
  2. // ZIMRpcManager.h
  3. // ZolozIdentityManager
  4. //
  5. // Created by richard on 26/02/2018.
  6. // Copyright © 2018 com.alipay.iphoneclient.zoloz. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <AliyunIdentityManager/ZimInitRequest.h>
  10. #import <AliyunIdentityManager/ZimValidateRequest.h>
  11. #import <BioAuthEngine/APBGatewayFacade.h>
  12. /**
  13. * rpc结果回调
  14. *
  15. * @param success 网络交互是否成功(不代表服务端返回的结果)
  16. * @param result 服务端返回的结果
  17. */
  18. typedef void (^rpcCompletionBlock)(BOOL success, NSObject *result);
  19. @interface ZimRpcManager : NSObject
  20. @property(nonatomic, strong) APBGatewayFacade * gatewayFacade;
  21. /**
  22. /为了兼容旧版本,这是过度时期的产物,后面会删除该函数
  23. */
  24. - (void)doInitRequest:(ZimInitRequest * )request withcompletionBlock:(rpcCompletionBlock)blk;
  25. /**
  26. /为了兼容旧版本,这是过度时期的产物,后面会删除该函数
  27. */
  28. - (void)doValidateRequest:(ZimValidateRequest *)request withcompletionBlock:(rpcCompletionBlock)blk;
  29. //代理模式
  30. - (void)doValidateRequetViaDelegate:(ZimValidateRequest * )request withcompletionBlock:(rpcCompletionBlock)blk;
  31. /**
  32. * zim init request
  33. *
  34. * @param request 初始化请求
  35. * @param blk 网络请求结果回调处理,result为ZimInitResponse
  36. */
  37. - (void)doFastUploadInitRequest:(ZimInitRequest * )request withcompletionBlock:(rpcCompletionBlock)blk;
  38. /**
  39. * zim validate request
  40. *
  41. * @param request validate请求
  42. * @param blk 网络请求结果回调处理,result为ZimValidateResponse
  43. */
  44. - (void)doFastUploadValidateRequest:(ZimValidateRequest * )request withcompletionBlock:(rpcCompletionBlock)blk;
  45. //OCR接口
  46. - (void) doSendOCRContent:(NSString*)certifyId idSide:(NSString*)side withImage:(NSData*)imageData withcompletionBlock:(rpcCompletionBlock)blk;
  47. // SMS 请求接口
  48. - (void)getSMSCode:(NSDictionary*)serviceParameters completionBlock:(rpcCompletionBlock)blk;
  49. // SMS 验证接口
  50. - (void)verifySMSCode:(NSDictionary*)serviceParameters completionBlock:(rpcCompletionBlock)blk;
  51. @end