OperationNodeProtocol.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. //
  2. // OperationNodeProtocol.h
  3. // sampleSDK
  4. //
  5. // Created by 王昭威 on 2023/1/17.
  6. //
  7. #ifndef OperationNodeProtocol_h
  8. #define OperationNodeProtocol_h
  9. #import "LenzSDKConstant.h"
  10. NS_ASSUME_NONNULL_BEGIN
  11. @class UIImage;
  12. @class PCSBaseViewController;
  13. typedef void(^WillQuitCompletionBlockType)();
  14. @protocol OperationNodeLongPressProtocol <NSObject>
  15. - (void)takePhotoButtonTouchDownInside;
  16. - (void)takePhotoButtonTouchUpInside;
  17. @end
  18. @protocol OperationNodeBackgroundProtocol <NSObject>
  19. - (void)willEnterBackground: (NSNotification*)noti;
  20. @end
  21. @protocol OperationNodeProtocol <NSObject>
  22. @property (nonatomic, weak) PCSBaseViewController* controller;
  23. @property (nonatomic, readonly) NSString* modeTitleString;
  24. @property (nonatomic, readonly) NSString* modeItemString;
  25. //@property (nonatomic) BOOL needHiddenDir;
  26. @property (nonatomic, assign, readonly) SDKCaptureModeIndex modeIndex;
  27. - (instancetype)initWithController: (PCSBaseViewController*)controller;
  28. // return NO if shouldnt quit current mode right now.
  29. - (void)willQuitOnCompletion: (WillQuitCompletionBlockType)block;
  30. - (void)save;
  31. // 拍摄按钮被点击时,触发此方法
  32. - (void)takePhotoButtonTouched;
  33. // Camera数据获取数据完成时调用此方法
  34. - (void)triggered;
  35. - (void)clear;
  36. @optional
  37. @property (nonatomic, assign, readonly) BOOL enable;
  38. @property (nonatomic, readonly) NSUInteger numberOfCaches;
  39. @property (nonatomic, readonly) NSString* segueForAlbum;
  40. @property (nonatomic, readonly, nullable) UIImage* firstCoverImage;
  41. - (void)didQuit;
  42. - (void)cleanOnCompleted:(void(^)(void))block;
  43. - (void)updateUI;
  44. - (void)discardPhotoResultButtonTouchUpInside;
  45. - (void)deleteCacheForKey: (NSString*)key completion: (void(^)(BOOL success))comletion;
  46. - (void)deleteCacheForImage: (UIImage*)image completion: (void(^)(BOOL success))comletion;
  47. @end
  48. NS_ASSUME_NONNULL_END
  49. #endif /* OperationNodeProtocol_h */