downloadManager.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // downloadManager.h
  3. // 隐私保护
  4. //
  5. // Created by xd h on 2024/1/9.
  6. //
  7. #import <Foundation/Foundation.h>
  8. //#import "couldPhoneFileModel.h"
  9. #import "couldPhoneFileListModel.h"
  10. #import "uploadFileManager.h"
  11. #define download_tableName [[NSString alloc] initWithFormat:@"download_tableName_%@",ksharedAppDelegate.DeviceThirdIdMod.data.sn]
  12. NS_ASSUME_NONNULL_BEGIN
  13. @interface downloadManager : NSObject
  14. //数据库数据
  15. @property (nonatomic, strong) NSMutableArray * _Nullable databaseArr;
  16. @property (nonatomic, strong) NSMutableArray * _Nullable downLoadFileModelDataArr;
  17. @property (nonatomic, strong) couldPhoneFileModel * curDownloadFileModel;
  18. @property (nonatomic, assign) BOOL isSuspendType;
  19. @property (nonatomic, assign) BOOL isDownloadIngType;
  20. @property (nonatomic, assign) NSInteger reDownloadIngSelectIndex;
  21. @property (nonatomic, assign) BOOL isNewAddTaskType;
  22. @property (nonatomic, strong) NSMutableDictionary * _Nullable downloadDoneList;
  23. +(downloadManager *)shareInstance;
  24. #pragma mark 读取数据库数据
  25. - (void)getDataInDatabaseFun:(BOOL)isReGet complete:(custom_complete_Arr)complete;
  26. -(void)handleCouldPhoneFileModelToDownloadFileDataFunBy:(NSMutableArray*)indexPathsForSelectedItems complete:(custom_complete_Arr)complete;
  27. - (void)DownloadFileDoneOneFileFun;
  28. - (void)DownloadFileFailOneFileFun;
  29. - (void)DownloadFileChangeingOneFileFun;
  30. - (void)suspendDownloadFileFun:(BOOL)isSuspendAll withModel:(couldPhoneFileModel*)model;
  31. - (void)reDownloadFileFunBy:(NSMutableArray*)arr withAll:(BOOL)isAllType;
  32. //删除本地数据库记录
  33. - (void)deleteDownloadFileRecordBy:(NSMutableArray *)delArr withDelCache:(BOOL)isDelCache;
  34. - (void)checkReDownloadFileFun;
  35. //检测是否未下载中
  36. - (BOOL)checkDownloadingFun;
  37. - (void)checkHadDownloadTaskWithComplete:(custom_complete_B)complete;
  38. #pragma mark-保存完成后 删除此次信息 download done plist
  39. - (void)deleteDownloadDonePlistInfoBy:(NSString*)fullPath;
  40. #pragma mark-查询还有没有没处理的任务
  41. - (void)checkDownloadDonePlistInfoFun;
  42. @end
  43. NS_ASSUME_NONNULL_END