APBToygerDataCenter.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. //
  2. // APFDataCenter.h
  3. // APFaceDetectBiz
  4. //
  5. // Created by yukun.tyk on 9/8/16.
  6. // Copyright © 2016 DTF. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <BioAuthEngine/BioAuthEngine.h>
  10. @class BisBehavTask;
  11. @protocol APBToygerDataCenterDelegate <NSObject>
  12. /**
  13. * 收到response的回调
  14. * @param success rpc是否成功
  15. * @param retCode 结果码
  16. * @param msg 结果信息
  17. * @param ext 扩展信息
  18. */
  19. - (void)didFinishUploadWithSuccess:(BOOL)success
  20. retCode:(NSString *)retCode
  21. retMessage:(NSString *)msg
  22. extInfo:(NSString *)ext;
  23. @end
  24. @interface APBToygerDataCenter : NSObject
  25. @property (nonatomic, copy) NSString *pubkey;
  26. /**
  27. * 初始化
  28. *
  29. * @param config 配置参数
  30. */
  31. - (instancetype)initWithConfig:(NSDictionary *)config;
  32. #ifdef SUPPORT_PB
  33. /**
  34. * 添加采集数据
  35. *
  36. * @param monitorImage 监控照片
  37. * @param panoImage 全景图,若该参数指定,将替换之前的全景图
  38. */
  39. - (void)addMonitorImage:(UIImage *)monitorImage
  40. replacePanoImage:(NSData *)panoImage
  41. andCypherKeyData:(NSData *)cypherKey;
  42. #else
  43. /**
  44. * 添加采集数据
  45. *
  46. * @param monitorImage 监控照片
  47. * @param panoImage 全景图,若该参数指定,将替换之前的全景图
  48. */
  49. - (void)addMonitorImage:(UIImage *)monitorImage
  50. replacePanoImage:(NSString *)panoImage
  51. andCypherKeyData:(NSString *)cypherKey;
  52. #endif
  53. /**
  54. * 清除采集数据
  55. *
  56. * @param monitorImage 监控照片
  57. * @param panoImage 全景图,
  58. */
  59. - (void)clearMonitorImage:(BOOL)monitor
  60. panoImage:(BOOL)pano;
  61. /**
  62. * 添加行为日志
  63. *
  64. * @param task 任务
  65. */
  66. - (void)addBehavTask:(BisBehavTask *)task;
  67. /**
  68. * clearTask
  69. *
  70. *
  71. */
  72. - (void)clearTask;
  73. /**
  74. * clear
  75. *
  76. *
  77. */
  78. - (void)clear;
  79. - (BOOL)hasFaceData;
  80. /**
  81. * 建立上传数据request
  82. *
  83. * @param monitor 是否上传监控照片
  84. * @param behav 是否上传行为日志
  85. * @param pano 是否上传全景图
  86. * @param type 触发类型
  87. * @param retry 重试次数
  88. */
  89. - (APBBisUploadGwRequest *)buildUploadRequestWithMonitorImage:(BOOL)monitor
  90. behavLog:(BOOL)behav
  91. panoImage:(BOOL)pano
  92. invokeType:(NSString *)type
  93. retryCnt:(NSInteger)retry;
  94. - (APBBisUploadGwRequest *)buildUploadRequestWithContent:(NSData *)data
  95. cypherKey:(NSData *)cypherKeyData
  96. invokeType:(NSString *)type
  97. retryCnt:(NSInteger)retry;
  98. /**
  99. * 设置delegate
  100. */
  101. - (void)setDelegate:(id<APBToygerDataCenterDelegate>)delegate;
  102. @end