JubeatPlus 3.9.11
Loading...
Searching...
No Matches
MarkerDownloadManager.h
Go to the documentation of this file.
1
9
10#import <Foundation/Foundation.h>
11
12#import "Downloader.h"
13
14NS_ASSUME_NONNULL_BEGIN
15
17
21@protocol MarkerDownloadManagerDelegate <NSObject>
22@optional
27- (void)downloadManagerStartTask:(nonnull MarkerDownloadManager *)manager;
32- (void)downloadManagerProceed:(nonnull MarkerDownloadManager *)manager;
37- (void)downloadManagerCompleted:(nonnull MarkerDownloadManager *)manager;
43- (void)downloadManagerFailed:(nullable MarkerDownloadManager *)manager;
44@end
45
50
52@property(nonatomic) unsigned int currentIndex;
54@property(nonatomic, readonly) unsigned int numTasks;
56@property(nonatomic, readonly) float currentProgress;
58@property(nonatomic, readonly) float overallProgress;
59
67- (instancetype)initWithTasks:(nullable NSArray *)tasks
68 delegate:(nullable id<MarkerDownloadManagerDelegate>)delegate;
69
74- (void)start;
75
80- (void)cancel;
81
82@end
83
84NS_ASSUME_NONNULL_END
85
86// code: language=Objective-C
87// kate: hl Objective-C;
88// vim: set ft=objc :
The HTTP client.
Runs a list of marker download tasks one after another.
Definition MarkerDownloadManager.h:49
float currentProgress
The current task's download progress, 0…1.
Definition MarkerDownloadManager.m:99
unsigned int numTasks
The number of tasks.
Definition MarkerDownloadManager.m:94
void cancel()
Cancels the in-flight download.
Definition MarkerDownloadManager.m:127
unsigned int currentIndex
The index of the task currently downloading.
Definition MarkerDownloadManager.h:52
float overallProgress
The progress across all tasks, 0…1.
Definition MarkerDownloadManager.m:104
void start()
Starts downloading the first task.
Definition MarkerDownloadManager.m:111
Performs a single HTTP request.
Definition Downloader.h:30