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

64 lines
1.5 KiB

9 months ago
  1. //
  2. // IBioAuthTask.h
  3. // BioAuthEngine
  4. //
  5. // Created by yukun.tyk on 11/4/15.
  6. // Copyright © 2015 DTF. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <BioAuthEngine/APBBackwardCommand.h>
  10. #import <BioAuthEngine/APBEvent.h>
  11. #import <BioAuthEngine/APBAuthEngine.h>
  12. @class APBTaskContext;
  13. /**
  14. * pipeInfo key
  15. * value为commandBlocktask可以调用并要求框架执行相应APBBackwardCommand命令
  16. */
  17. extern NSString *const kTaskCommandBlockKey;
  18. /**
  19. * taskConfig key
  20. * task超时value为CGFloattask设置了该值task计时器task超时封装成APBEvent发送给当前task
  21. */
  22. extern NSString *const kTaskTimeoutKey;
  23. typedef void (^commandBlock)(APBBackwardCommand *command);
  24. @protocol IBioAuthTask <NSObject>
  25. @property(nonatomic, copy, readonly) NSString *taskName; //任务名称
  26. @property(nonatomic, strong, readonly) APBTaskContext *context; //任务上下文
  27. /**
  28. *
  29. */
  30. - (void)invokeWithPipeInfo:(NSMutableDictionary *)pipeInfo;
  31. /**
  32. *
  33. *
  34. * @param event
  35. * @param callback
  36. */
  37. - (void)processEvent:(APBEvent *)event
  38. withCompletionCallback:(BioAuthExecCallback)callback;
  39. /**
  40. * ()
  41. */
  42. - (NSDictionary *)getConfig;
  43. /**
  44. *
  45. */
  46. - (void)reset;
  47. /**
  48. * task
  49. */
  50. - (NSMutableDictionary *)pipeInfo;
  51. @end