AIInfoManager.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. NS_ASSUME_NONNULL_BEGIN
  11. typedef void(^AIActivityComplention)(NSDictionary *info, NSError *error);
  12. @class AIInfo;
  13. @interface AIInfoManager : NSObject
  14. + (AIInfoManager *)defaultManager;
  15. @property (nonatomic, readonly) BOOL aiInfoValid;
  16. @property (nonatomic, strong) AIInfo *aiInfo;
  17. - (void)activateAIWithInfo:(NSDictionary *)info
  18. complention:(AIActivityComplention)complention;
  19. - (void)fetchAIInfoWithComplention:(AIActivityComplention)complention;
  20. - (void)restoreAIWithInfo:(NSDictionary *)info
  21. complention:(AIActivityComplention)complention;
  22. @end
  23. @interface AIInfo : NSObject
  24. - (id)initWithDict:(NSDictionary *)dict;
  25. @property (nonatomic, readonly) NSDictionary *infoDict;
  26. @property (nonatomic, readonly) BOOL validAIFunction;
  27. @property (nonatomic, readonly) NSString *cdKey;
  28. @property (nonatomic, readonly) int totalToken;
  29. @property (nonatomic, readonly) int usedTimes;
  30. @property (nonatomic, readonly) NSDate *startDate;
  31. @property (nonatomic, readonly) NSDate *endDate;
  32. @property (nonatomic, readonly) int remainingDays;
  33. @end
  34. NS_ASSUME_NONNULL_END