AIInfoManager.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. //
  2. // AIInfoManager.h
  3. // PDF Reader Pro Edition
  4. //
  5. // Created by Niehaoyu on 2024/1/24.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import "VerificationManager.h"
  9. #define kDeviceAIStatusChangeNotification @"kDeviceAIStatusChangeNotification"
  10. #define kAIIconShowStateChangeNotification @"kAIIconShowStateChangeNotification"
  11. #define kAIIconShowIdentifyKey @"kAIIconShowIdentifyKey"
  12. NS_ASSUME_NONNULL_BEGIN
  13. typedef void(^AIActivityComplention)(NSDictionary *info, NSError *error);
  14. @class AIInfo;
  15. @interface AIInfoManager : NSObject
  16. + (AIInfoManager *)defaultManager;
  17. @property (nonatomic, assign) BOOL showAIIcon;
  18. @property (nonatomic, readonly) BOOL aiInfoValid;
  19. @property (nonatomic, strong) AIInfo *aiInfo;
  20. - (void)activateAIWithInfo:(NSDictionary *)info
  21. complention:(AIActivityComplention)complention;
  22. - (void)fetchAIInfoWithComplention:(AIActivityComplention)complention;
  23. - (void)restoreAIWithInfo:(NSDictionary *)info
  24. complention:(AIActivityComplention)complention;
  25. @end
  26. @interface AIInfo : NSObject
  27. - (id)initWithDict:(NSDictionary *)dict;
  28. @property (nonatomic, readonly) NSDictionary *infoDict;
  29. @property (nonatomic, readonly) BOOL validAIFunction;
  30. @property (nonatomic, readonly) NSString *cdKey;
  31. @property (nonatomic, readonly) int totalToken;
  32. @property (nonatomic, readonly) int usedTimes;
  33. @property (nonatomic, readonly) NSDate *startDate;
  34. @property (nonatomic, readonly) NSDate *endDate;
  35. @property (nonatomic, readonly) int remainingDays;
  36. @property (nonatomic, readonly) int pre_creditToken;
  37. @end
  38. NS_ASSUME_NONNULL_END