transmission/macosx/BlocklistDownloader.h

35 lines
895 B
C
Raw Normal View History

// This file Copyright © 2008-2022 Transmission authors and contributors.
// 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
#import <Cocoa/Cocoa.h>
@class BlocklistDownloaderViewController;
2008-03-29 23:38:38 +00:00
typedef NS_ENUM(unsigned int, blocklistDownloadState) { //
BLOCKLIST_DL_START,
BLOCKLIST_DL_DOWNLOADING,
BLOCKLIST_DL_PROCESSING
};
@interface BlocklistDownloader : NSObject<NSURLSessionDownloadDelegate>
{
NSURLSession* fSession;
BlocklistDownloaderViewController* fViewController;
2008-03-29 23:38:38 +00:00
NSUInteger fCurrentSize;
long long fExpectedSize;
blocklistDownloadState fState;
2008-03-29 23:38:38 +00:00
}
+ (BlocklistDownloader*)downloader; //starts download if not already occuring
@property(nonatomic, class, readonly) BOOL isRunning;
- (void)setViewController:(BlocklistDownloaderViewController*)viewController;
2008-03-29 23:38:38 +00:00
- (void)cancelDownload;
2008-03-29 23:38:38 +00:00
@end