洛阳学员端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
2.5 KiB

9 months ago
  1. //
  2. // ZIMResponse.h
  3. // DTFIdentityManager
  4. //
  5. // Created by yukun.tyk on 28/06/2017.
  6. // Copyright © 2017 DTF. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. typedef NS_ENUM(NSUInteger, ZIMResponseCode) {
  10. ZIMResponseSuccess = 1000, //采集成功并且服务端成功(人脸比对成功,或者证件宝服务端OCR/质量检测成功)[zim不会弹框处理]
  11. ZIMInternalError = 1001, //用户被动退出(极简核身没有取到协议、toyger启动失败、协议解析失败)[zim不会弹框处理]
  12. ZIMInterrupt = 1003, //用户主动退出(无相机权限、超时、用户取消)[zim会弹框处理]
  13. ZIMNetworkfail = 2002, //网络失败(标准zim流程,请求协议错误,oss上传失败)[zim不会弹框处理]
  14. ZIMTIMEError = 2003, //设备时间设置不对
  15. ZIMResponseFail = 2006 //服务端validate失败(人脸比对失败或者证件宝OCR/质量检测失败)[zim不会弹框处理]
  16. };
  17. @interface ZIMResponse : NSObject
  18. @property(nonatomic, assign, readonly)ZIMResponseCode code;
  19. @property(nonatomic, assign, readonly)ZIMResponseCode retCode;
  20. @property(nonatomic, copy, readonly)NSString * _Nullable reason;
  21. @property(nonatomic, copy, readonly)NSString * _Nullable retCodeSub;
  22. @property(nonatomic, copy, readonly)NSString * _Nullable retMessageSub;
  23. @property(nonatomic, strong, readonly)NSDictionary * _Nullable extInfo;
  24. @property(nonatomic, strong, readonly)NSString * _Nullable bizData;
  25. @property(nonatomic, strong) NSString* _Nullable deviceToken; //设备token
  26. @property(nonatomic, strong, nullable) NSString *videoFilePath; //如果采用视频返照,这个字段返回视频的路径
  27. @property(nonatomic, strong ,nullable) NSData *imageContent; //这个字段返回采集照片
  28. @property(nonatomic , strong ,nullable)NSData *faceData; //OCR身份证人像面照片 ,只有在OCR模式下,才有值
  29. @property(nonatomic , strong ,nullable)NSData *countryData; //OCR身份证国徽面照片,只有在OCR模式下,才有值
  30. -(instancetype _Nullable )initWithResponseCode:(ZIMResponseCode) code
  31. retCode:(ZIMResponseCode) retCode
  32. retCodeSub:(NSString *_Nullable) retCodeSub
  33. retMessageSub:(NSString *_Nullable) retMessageSub
  34. reason:(NSString *_Nullable) reason
  35. extParam:(NSDictionary *_Nullable) extInfo
  36. bizData:(NSString *_Nullable) bizData;
  37. @end