//
//  OSSManager.h
//  AliyunOSSSDK-iOS-Example
//
//  Created by huaixu on 2018/10/23.
//  Copyright © 2018 aliyun. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AliyunOSSiOS/AliyunOSSiOS.h>

NS_ASSUME_NONNULL_BEGIN


@protocol OSSManagerDelegate <NSObject>
@optional
- (void)stateChange:(NSDictionary *_Nullable)changeMsg;
@end


@interface OSSManager : NSObject
@property (nonatomic,weak) id <OSSManagerDelegate> delegate;
@property (nonatomic, strong) OSSClient *defaultClient;

@property (nonatomic, strong) OSSClient *imageClient;
@property (nonatomic, strong) NSDictionary *OSSInfo;
@property (nonatomic,strong) NSMutableArray * _Nullable uploadTanck;

@property (nonatomic) NSInteger initIme;

+ (instancetype)sharedManager;

//普通上传
- (void)asyncPutFile:(NSString *)objectKey localFilePath:(NSString *)filePath thrid:(NSString *)strtime;

//断点续传
- (void)asyncResumableUploadFile:(NSString *)objectKey localFilePath:(NSString *)filePath thrid:(NSString *)strtime;




-(void)addUploadTanckobj:(OSSTask *)task thrid:(NSString *)thrid;



-(BOOL)isuploadTanck:(NSString *)thrid;

-(void)removeUploadTanckobj:(NSString *)thrid;

-(void)stopUploadTanck:(NSString *)thrid;

- (NSString *)fullUploadURLByAppendPath:(NSString *)path;
- (void)applicationWillTerminate;
- (NSString *)fileMessageKeyWith:(NSString *)strtime;
@end

NS_ASSUME_NONNULL_END
