123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- //
- // customUploadOperation.h
- // Private-X
- //
- // Created by xd h on 2024/8/27.
- //
- #import <Foundation/Foundation.h>
- #import "uploadFileDataModel.h"
- /**
- * 检测文件是否存在拿到结果 -1 失败 0 是正常(文件不存在 或者存在了 但是未上传完成) 1 文件已经存在并且上传完成了
- */
- typedef void (^uploadStateFileExistRet) (NSInteger state);
- NS_ASSUME_NONNULL_BEGIN
- @interface customUploadOperation : NSObject
- @property(nonatomic,strong) uploadFileDataModel *fileModel;
- @property(nonatomic,copy) NSString *filePath;
- @property(nonatomic,strong)NSFileHandle *fileHandle;
- /** 上传任务 */
- @property (nonatomic,strong,nullable)NSURLSession *session;
- /** 上传任务 */
- @property (nonatomic,strong,nullable)NSURLSessionDataTask *dataTask;
- @property(nonatomic,assign) long onceDataLengt;//当前的片的长度
- @property(nonatomic,assign) NSInteger i;//从来控制速度刷新的
- @property(nonatomic,assign) BOOL isCancelType;//是都被点击暂停或者删除了(考虑dataTask取消的情况)
- /** 下载中上次通知的时间 用来控制通知时间的频率 目前定位一秒 */
- @property (nonatomic, assign) NSTimeInterval preNotTimeInterval;
- -(NSData*)cutVideoFileFunAtIndex:(NSUInteger)dataIndex withMaxLenght:(NSInteger)maxLengt;
- - (void)closeFileHandleFun;
- @end
- NS_ASSUME_NONNULL_END
|