洛阳学员端
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.

63 lines
3.0 KiB

9 months ago
  1. //
  2. // APBResponse.h
  3. // BioAuthEngine
  4. //
  5. // Created by yukun.tyk on 11/9/15.
  6. // Copyright © 2015 DTF. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. /**
  10. */
  11. typedef enum {
  12. APB_RESULT_SUCCESS = 500, //操作成功(不弹框)
  13. APB_RESULT_SUCCESS_VALIDATE_UPLOAD = 501, //操作成功(不弹框),合并上传
  14. APB_RESULT_CAMERA_PERMISSION_DENIED = 100, //无摄像头权限(弹框)
  15. APB_RESULT_CAMERA_DEVICE_UNSUPPORTED = 101, //摄像头不支持(弹框)
  16. APB_RESULT_CAMERA_CPU_UNSUPPORTED = 102, //CPU不支持(弹框)
  17. APB_RESULT_DEVICE_UNSUPPORTED = 103, //设备不支持(弹框)
  18. APB_RESULT_UNDEFINED_ERROR = 104, //其他异常(不弹框)
  19. APB_RESULT_CAMERA_INIT_FAILED = 200, //摄像头初始化失败(不弹框)
  20. APB_RESULT_INVALID_ARGUMENT = 201, //无效的业务参数(不弹框)
  21. APB_RESULT_INTERRUPT = 202, //操作中断(弹框)
  22. APB_RESULT_TIMEOUT = 203, //操作超时(弹框)
  23. APB_RESULT_RESOURCE_ABSENCE = 204, //缺少资源文件(不弹框)
  24. APB_RESULT_SYSTEM_EXCEPT = 205, //系统异常(不弹框)
  25. APB_RESULT_ENGINE_EXCEPT = 206, //框架内部错误(不弹框)
  26. APB_RESULT_NETWORK_TIMEOUT = 207, //网络超时(弹框)
  27. APB_RESULT_SERVER_FAIL = 208, //服务端错误(弹框)
  28. APB_RESULT_RETRY_LIMIT = 209, //重试次数达到上限(弹框)
  29. APB_RESULT_AUTH_REJECT = 210, //用户拒绝人脸授权(弹框)
  30. APB_RESULT_NETWORK_FAIL = 211, //网络出错
  31. APB_RESULT_USE_PASSWORD = 300, //用户选择账密登录(弹框)
  32. APB_RESULT_OTHER_VERIFICATION = 303, //其他核身方式
  33. APB_RESULT_LOCALVERIFY_FAIL = 304, //本地比对失败
  34. }APBResultType;
  35. @interface APBResponse : NSObject
  36. @property(nonatomic, assign)APBResultType resultType; //结果码
  37. @property(nonatomic, copy)NSString *failReason; //失败原因
  38. @property(nonatomic, copy)NSString *token; //bis token
  39. @property(nonatomic, strong)NSMutableDictionary *successResult; //成功结果
  40. @property (nonatomic,copy) NSString* retCodeSub ;
  41. @property (nonatomic,copy) NSString* retMessageSub ;
  42. - (instancetype)initWithResultType:(APBResultType)type
  43. failReason:(NSString *)reason
  44. token:(NSString *)token
  45. retCodeSub:(NSString *)retCodeSub
  46. retMessageSub:(NSString *)retMessageSub
  47. successResult:(NSMutableDictionary *)result;
  48. - (instancetype)initWithResultType:(APBResultType)type
  49. failReason:(NSString *)reason
  50. token:(NSString *)token
  51. successResult:(NSMutableDictionary *)result;
  52. @end