JubeatPlus 3.9.11
Loading...
Searching...
No Matches
StoreDownloadManager.h
Go to the documentation of this file.
1
9
10#import <Foundation/Foundation.h>
11
12@class KUnzip;
14
15NS_ASSUME_NONNULL_BEGIN
16
20@protocol StoreDownloadManagerDelegate <NSObject>
21@optional
26- (void)downloadManagerStartTask:(nonnull StoreDownloadManager *)manager;
31- (void)downloadManagerProceed:(nonnull StoreDownloadManager *)manager;
36- (void)downloadManagerCompleted:(nonnull StoreDownloadManager *)manager;
41- (void)downloadManagerFailed:(nonnull StoreDownloadManager *)manager;
42@end
43
48@interface StoreDownloadManager : NSObject
49
51@property(nonatomic) unsigned int currentIndex;
53@property(nonatomic, readonly) unsigned int numTasks;
55@property(nonatomic, readonly) float currentProgress;
57@property(nonatomic, readonly) float overallProgress;
58
70- (nullable NSDictionary *)getTuneInfoFromUnzip:(nullable KUnzip *)unzip;
71
79- (instancetype)initWithTasks:(nullable NSArray *)tasks
80 delegate:(nullable id<StoreDownloadManagerDelegate>)delegate;
81
86- (void)start;
87
92- (void)cancel;
93
94@end
95
96NS_ASSUME_NONNULL_END
97
98// code: language=Objective-C
99// kate: hl Objective-C;
100// vim: set ft=objc :
Reads named entries out of one packed archive.
Definition KUnzip.h:22
Runs a list of store download tasks one after another, verifying each pack's trailing MD5 digest,...
Definition StoreDownloadManager.h:49
unsigned int numTasks
The number of tasks.
Definition StoreDownloadManager.m:125
void start()
Starts downloading the first task.
Definition StoreDownloadManager.m:142
void cancel()
Cancels the in-flight download.
Definition StoreDownloadManager.m:152
float overallProgress
The progress across all tasks, 0…1.
Definition StoreDownloadManager.m:135
float currentProgress
The current task's download progress, 0…1.
Definition StoreDownloadManager.m:130
unsigned int currentIndex
The index of the task currently downloading.
Definition StoreDownloadManager.h:51