// // downloadManager.h // 隐私保护 // // Created by xd h on 2024/1/9. // #import //#import "couldPhoneFileModel.h" #import "couldPhoneFileListModel.h" #import "uploadFileManager.h" #define download_tableName [[NSString alloc] initWithFormat:@"download_tableName_%@",ksharedAppDelegate.DeviceThirdIdMod.data.sn] NS_ASSUME_NONNULL_BEGIN @interface downloadManager : NSObject //数据库数据 @property (nonatomic, strong) NSMutableArray * _Nullable databaseArr; @property (nonatomic, strong) NSMutableArray * _Nullable downLoadFileModelDataArr; @property (nonatomic, strong) couldPhoneFileModel * curDownloadFileModel; @property (nonatomic, assign) BOOL isSuspendType; @property (nonatomic, assign) BOOL isDownloadIngType; @property (nonatomic, assign) NSInteger reDownloadIngSelectIndex; @property (nonatomic, assign) BOOL isNewAddTaskType; @property (nonatomic, strong) NSMutableDictionary * _Nullable downloadDoneList; +(downloadManager *)shareInstance; #pragma mark 读取数据库数据 - (void)getDataInDatabaseFun:(BOOL)isReGet complete:(custom_complete_Arr)complete; -(void)handleCouldPhoneFileModelToDownloadFileDataFunBy:(NSMutableArray*)indexPathsForSelectedItems complete:(custom_complete_Arr)complete; - (void)DownloadFileDoneOneFileFun; - (void)DownloadFileFailOneFileFun; - (void)DownloadFileChangeingOneFileFun; - (void)suspendDownloadFileFun:(BOOL)isSuspendAll withModel:(couldPhoneFileModel*)model; - (void)reDownloadFileFunBy:(NSMutableArray*)arr withAll:(BOOL)isAllType; //删除本地数据库记录 - (void)deleteDownloadFileRecordBy:(NSMutableArray *)delArr withDelCache:(BOOL)isDelCache; - (void)checkReDownloadFileFun; //检测是否未下载中 - (BOOL)checkDownloadingFun; - (void)checkHadDownloadTaskWithComplete:(custom_complete_B)complete; #pragma mark-保存完成后 删除此次信息 download done plist - (void)deleteDownloadDonePlistInfoBy:(NSString*)fullPath; #pragma mark-查询还有没有没处理的任务 - (void)checkDownloadDonePlistInfoFun; @end NS_ASSUME_NONNULL_END