12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- //
- // uploadFileManager.h
- // 隐私保护
- //
- // Created by xd h on 2023/11/15.
- //
- #import <Foundation/Foundation.h>
- #import "uploadFileDataModel.h"
- #import "TZImageManager.h"
- #import "TZAssetModel+imageData.h"
- #import "cachesFileManager.h"
- #import "connectDeviceManager.h"
- //#define upLoadFile_image_tableName @"upLoadFile_image_tableName"
- #define upLoadFile_image_tableName [[NSString alloc] initWithFormat:@"upLoadFile_tableName_%@",ksharedAppDelegate.DeviceThirdIdMod.data.sn]
- NS_ASSUME_NONNULL_BEGIN
- #define custom_complete_B void(^_Nullable)(BOOL isSuccess)
- #define custom_complete_Arr void(^_Nullable)(NSMutableArray * Arr)
- @interface uploadFileManager : NSObject
- +(uploadFileManager *)shareInstance;
- //数据库数据
- @property (nonatomic, strong) NSMutableArray * _Nullable databaseArr;
- //排队等待上传的文件列表
- @property (nonatomic, strong) NSMutableArray * _Nullable fileModelDataArr;
- @property (nonatomic, strong) uploadFileDataModel *curUploadFileDataModel;//当前上传的文件
- @property (nonatomic, assign) BOOL isSuspendType;
- @property (nonatomic, assign) BOOL isUploadIngType;
- @property (nonatomic, assign) NSInteger curUploadModelNumbers;
- @property (nonatomic, assign) NSInteger reUploadIngSelectIndex;
- @property (nonatomic, assign) BOOL isNewAddTaskType;
- #pragma mark 读取数据库数据
- - (void)getDataInDatabaseFun:(BOOL)isReGet complete:(custom_complete_Arr)complete;
- //把TZAssetModel 转成 我们需要上传的model
- - (void)handlTZAssetModelToUploadFileDataFunBy:(NSMutableArray*)indexPathsForSelectedItems complete:(custom_complete_Arr)complete;
- //暂停上传 当 isSuspendAll为NO时候 传指定暂停哪一个
- - (void)suspendUploadFileFun:(BOOL)isSuspendAll withModel:(uploadFileDataModel*)model;
- //文件重新上传
- - (void)reUploadFileFunBy:(NSMutableArray*)Arr withAll:(BOOL)isAllType;
- //文件上传完成
- - (void)uploadFileDoneFun;
- //文件上传失败
- - (void)uploadFileFailFun;
- //修改文件上传的状态
- - (void)changeUploadFileState:(uploadStateType)curUploadStateType withDidUploadBytes:(long)didUpLoadBytes withModel:(uploadFileDataModel*)model complete:(custom_complete_B)complete;
- //删除本地数据库记录
- - (void)deleteUploadFileRecordBy:(NSMutableArray *)delArr withDelCache:(BOOL)isDelCache complete:(custom_complete_B)complete;
- - (void)checkReUploadFileFun;
- //检测是否在上传中
- - (BOOL)checkUploadingFun;
- - (void)checkHadUploadTaskWithComplete:(custom_complete_B)complete;
- @end
- NS_ASSUME_NONNULL_END
|