2014-07-10 16:11:09 +02:00
|
|
|
/*
|
|
|
|
* This is the source code of Telegram for iOS v. 1.1
|
|
|
|
* It is licensed under GNU GPL v. 2 or later.
|
|
|
|
* You should have received a copy of the license in this archive (see LICENSE).
|
|
|
|
*
|
|
|
|
* Copyright Peter Iakovlev, 2013.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
|
|
|
@class TGWorkerTask;
|
|
|
|
@class TGWorkerPool;
|
|
|
|
|
2015-10-01 18:19:52 +02:00
|
|
|
@class TGMapSnapshotOptions;
|
|
|
|
@class TGDocumentMediaAttachment;
|
|
|
|
|
|
|
|
@class SThreadPool;
|
|
|
|
|
2014-07-10 16:11:09 +02:00
|
|
|
@interface TGMediaPreviewTask : NSObject
|
|
|
|
|
|
|
|
- (void)executeWithWorkerTask:(TGWorkerTask *)workerTask workerPool:(TGWorkerPool *)workerPool;
|
2015-10-01 18:19:52 +02:00
|
|
|
- (void)executeWithWorkerTask:(TGWorkerTask *)workerTask threadPool:(SThreadPool *)workerPool;
|
|
|
|
|
2014-07-10 16:11:09 +02:00
|
|
|
- (void)executeWithTargetFilePath:(NSString *)targetFilePath uri:(NSString *)uri completion:(void (^)(bool))completion workerTask:(TGWorkerTask *)workerTask;
|
2015-10-01 18:19:52 +02:00
|
|
|
- (void)executeTempDownloadWithTargetFilePath:(NSString *)targetFilePath uri:(NSString *)uri progress:(void (^)(float))progress completionWithData:(void (^)(NSData *))completionWithData workerTask:(TGWorkerTask *)workerTask;
|
|
|
|
- (void)executeWithTargetFilePath:(NSString *)targetFilePath uri:(NSString *)uri progress:(void (^)(float))progress completion:(void (^)(bool))completion workerTask:(TGWorkerTask *)workerTask;
|
|
|
|
- (void)executeWithTargetFilePath:(NSString *)targetFilePath document:(TGDocumentMediaAttachment *)document progress:(void (^)(float))progress completion:(void (^)(bool))completion workerTask:(TGWorkerTask *)workerTask;
|
|
|
|
- (void)executeMultipartWithImageUri:(NSString *)imageUri targetFilePath:(NSString *)targetFilePath progress:(void (^)(float))progress completion:(void (^)(bool))completion;
|
|
|
|
- (void)executeWithMapSnapshotOptions:(TGMapSnapshotOptions *)snapshotOptions completionWithImage:(void (^)(UIImage *image))completionWithImage workerTask:(TGWorkerTask *)workerTask;
|
2014-07-10 16:11:09 +02:00
|
|
|
|
|
|
|
- (void)cancel;
|
|
|
|
|
|
|
|
@end
|