//
//  CloudUploadSession.h
//  zhuxun
//
//  Created by winsoft on 17/6/27.
//
//

#import <Foundation/Foundation.h>
#import "WSUploadSession.h"
#import "CSFileDownUpModel.h"

typedef void (^CSUploadProgressBlock)(double progress,NSInteger sendedSize, CSFileDownUpModel *fileDownUpModel);
typedef void (^CSUploadSuccessBlock)(NSString* url,long long fileSize,CSFileDownUpModel *fileDownUpModel);
typedef void (^CSUploadFailedBlock)(NSString* errMessage,CSFileDownUpModel *fileDownUpModel);

@interface CloudUploadSession : NSObject

/**
 *  for - 队列center
 */
@property (nonatomic, strong)CSUploadSuccessBlock uploadSuccessDBBlock; //参数改为fileDownUpModel
@property (nonatomic, strong)CSUploadFailedBlock uploadFailedDBBlock;
@property (nonatomic, strong)CSUploadProgressBlock uploadProgressDBBlock;

@property (nonatomic , strong, readonly) CSFileDownUpModel *fileDownUpModel;

+ (CloudUploadSession *)startUploadFileWithFileDownUpModel:(CSFileDownUpModel *)fileDownUpModel operationQueue:(NSOperationQueue *)operationQueue;

//外层UI注册回调
- (void)addBlockToUIWithUUID:(NSString *)uuid withProcessBlock:(CSUploadProgressUIBlock)processBlock successBlock:(CSUploadSuccessUIBlock)successBlock failBlock:(CSUploadFailedUIBlock)failBlock;

- (void)cancerUpload;
@end
