2023-02-11 20:49:42 +00:00
|
|
|
// This file Copyright © 2008-2023 Transmission authors and contributors.
|
2022-01-20 18:27:56 +00:00
|
|
|
// It may be used under the MIT (SPDX: MIT) license.
|
|
|
|
// License text can be found in the licenses/ folder.
|
2008-03-29 23:38:38 +00:00
|
|
|
|
2022-06-29 00:15:52 +00:00
|
|
|
#import <Foundation/Foundation.h>
|
2008-03-29 23:38:38 +00:00
|
|
|
|
2008-08-31 19:47:11 +00:00
|
|
|
@class BlocklistDownloaderViewController;
|
2008-03-29 23:38:38 +00:00
|
|
|
|
2023-04-15 21:33:43 +00:00
|
|
|
typedef NS_ENUM(NSUInteger, BlocklistDownloadState) { //
|
|
|
|
BlocklistDownloadStateStart,
|
|
|
|
BlocklistDownloadStateDownloading,
|
|
|
|
BlocklistDownloadStateProcessing
|
2021-08-07 07:27:56 +00:00
|
|
|
};
|
2008-08-31 21:10:45 +00:00
|
|
|
|
2021-11-10 18:55:15 +00:00
|
|
|
@interface BlocklistDownloader : NSObject<NSURLSessionDownloadDelegate>
|
2017-01-24 17:53:16 +00:00
|
|
|
|
2022-02-22 16:04:20 +00:00
|
|
|
@property(nonatomic) BlocklistDownloaderViewController* viewController;
|
2021-08-15 09:41:48 +00:00
|
|
|
@property(nonatomic, class, readonly) BOOL isRunning;
|
2008-08-31 20:26:41 +00:00
|
|
|
|
2022-04-21 14:28:38 +00:00
|
|
|
+ (BlocklistDownloader*)downloader; //starts download if not already occurring
|
2008-03-29 23:38:38 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)cancelDownload;
|
2008-03-29 23:38:38 +00:00
|
|
|
|
|
|
|
@end
|