// // WXYZ_BBBBBBBManager.h // WXReader // // Created by Andrew on 2020/7/10. // Copyright © 2020 Andrew. All rights reserved. // #import #import "WXYZ_DownloadHelper.h" #import "TFNovelDownloadTaskListModel.h" NS_ASSUME_NONNULL_BEGIN @interface WXYZ_BookDownloadManager : NSObject @property (nonatomic, copy) void (^downloadDeleteFinishBlock)(NSArray *success_chapter_ids, NSArray *fail_chapter); // 总体任务下载回调 @property (nonatomic, copy) void (^downloadMissionStateChangeBlock)(WXYZ_DownloadMissionState state, NSInteger production_id, TFDownloadTaskModel *downloadTaskModel, NSArray * _Nullable chapterIDArray); interface_singleton /* 增 **/ // 下载章节(不支持自动订阅 && 支持多章下载) - (void)downloadChaptersWithProductionModel:(TFProductionModel *)productionModel downloadTaskModel:(TFDownloadTaskModel *)downloadTaskModel production_id:(NSInteger)production_id start_chapter_id:(NSInteger)start_chapter_id downloadNum:(NSInteger)downloadNum; /* 删 **/ // 删除本地已下载作品 - (BOOL)removeDownloadProductionWithProduction_id:(NSInteger)production_id; /* 查 **/ // 获取已下载文件路径 - (NSString *)getChapterFilePathWithChapterModel:(TFProductionChapterModel *)chapterModel; // 获取章节内容 - (NSString *)getFileContentsWithChapterModel:(TFProductionChapterModel * __nullable)chapterModel; // 存储章节内容 - (void)storingFilesWithChapterModel:(TFProductionChapterModel * __nullable)chapterModel storingCompletionHandler:(void (^)(BOOL finishStoring))completionHandler; // 获取下载状态 - (WXYZ_ProductionDownloadState)getDownloadMissionStateWithProduction_id:(NSInteger)production_id downloadTaskModel:(TFDownloadTaskModel *)downloadTaskModel; // 获取某一已下载作品model - (TFNovelDownloadTaskListModel *)getDownloadProductionModelWithProduction_id:(NSInteger)production_id; @end NS_ASSUME_NONNULL_END