Swiftgram/submodules/LegacyComponents/LegacyComponents/CBGenericDownloadOperation.h
Peter d153fe0f21 Add 'submodules/LegacyComponents/' from commit 'd5594346161c1b7f203d1e87068bbe77bcaac019'
git-subtree-dir: submodules/LegacyComponents
git-subtree-mainline: 608630530451e02e5aec48389d144dbf7a3625b9
git-subtree-split: d5594346161c1b7f203d1e87068bbe77bcaac019
2019-06-11 18:51:15 +01:00

29 lines
1.1 KiB
Objective-C
Executable File

#import <Foundation/Foundation.h>
#import "CBDownloadOperation.h"
#import "CBCoubAsset.h"
#import "CBDownloadOperationDelegate.h"
#import "LegacyHTTPRequestOperation.h"
@interface CBGenericDownloadOperation : NSObject <CBDownloadOperation>
@property (nonatomic, strong) NSOperation<LegacyHTTPRequestOperation> *downloadOperation;
@property (nonatomic, readwrite) NSOperationQueuePriority queuePriority;
@property (nonatomic, assign) NSInteger tag;
@property (nonatomic, assign) BOOL starting;
@property (nonatomic, assign) BOOL comleted;
@property (nonatomic, assign) BOOL chunkDownloadingNeeded;
@property (nonatomic, weak) id<CBCoubAsset> coub;
@property (nonatomic, weak) id<CBDownloadOperationDelegate> operationViewDelegate;
@property(nonatomic, copy) void (^clientSuccess)(id<CBCoubAsset>, NSInteger tag);
@property(nonatomic, copy) void (^clientFailure)(id<CBCoubAsset>, NSInteger tag, NSError *error);
@property (nonatomic, copy) void (^completionBlock)(id<CBDownloadOperation> process, NSError *error);
//protected
- (void)successDownload;
- (void)failureDownloadWithError:(NSError *)error;
@end