// // AIInfoManager.h // PDF Reader Pro Edition // // Created by Niehaoyu on 2024/1/24. // #import #import "VerificationManager.h" #define kDeviceAIStatusChangeNotification @"kDeviceAIStatusChangeNotification" #define kAIIconShowStateChangeNotification @"kAIIconShowStateChangeNotification" #define kAIIconShowIdentifyKey @"kAIIconShowIdentifyKey" NS_ASSUME_NONNULL_BEGIN typedef void(^AIActivityComplention)(NSDictionary *info, NSError *error); @class AIInfo; @interface AIInfoManager : NSObject + (AIInfoManager *)defaultManager; @property (nonatomic, assign) BOOL showAIIcon; @property (nonatomic, readonly) BOOL aiInfoValid; @property (nonatomic, strong) AIInfo *aiInfo; - (void)activateAIWithInfo:(NSDictionary *)info complention:(AIActivityComplention)complention; - (void)fetchAIInfoWithComplention:(AIActivityComplention)complention; - (void)restoreAIWithInfo:(NSDictionary *)info complention:(AIActivityComplention)complention; @end @interface AIInfo : NSObject - (id)initWithDict:(NSDictionary *)dict; @property (nonatomic, readonly) NSDictionary *infoDict; @property (nonatomic, readonly) BOOL validAIFunction; @property (nonatomic, readonly) NSString *cdKey; @property (nonatomic, readonly) int totalToken; @property (nonatomic, readonly) int usedTimes; @property (nonatomic, readonly) NSDate *startDate; @property (nonatomic, readonly) NSDate *endDate; @property (nonatomic, readonly) int remainingDays; @property (nonatomic, readonly) int pre_creditToken; @end #if DEBUG @interface AIInfoManager (KMTest) @end #endif NS_ASSUME_NONNULL_END