123456789101112131415161718192021222324252627282930313233343536 |
- //
- // KMResourceDownload.h
- // PDF Master DMG
- //
- // Created by wanjun on 2023/8/1.
- //
- #import <Foundation/Foundation.h>
- NS_ASSUME_NONNULL_BEGIN
- typedef NS_ENUM(NSUInteger, KMResourceDownloadState) {
- KMResourceDownloadStateNone,
- KMResourceDownloadStateSuccess,
- KMResourceDownloadStateUnzipFailed,
- KMResourceDownloadStateMoveFailed
- };
- typedef void(^KMResourceDownloadResult)(BOOL isSuccessful, KMResourceDownloadState state);
- typedef void(^KMResourceDownloadProgress)(double progress);
- @interface KMResourceDownload : NSObject
- + (KMResourceDownload *)manager;
- @property(nonatomic, copy) KMResourceDownloadResult downloadResultBlock;
- @property(nonatomic, copy) KMResourceDownloadProgress progressBlock;
- - (void)downloadFrameworkProgress:(KMResourceDownloadProgress)currentProgress result:(KMResourceDownloadResult)result;
- - (BOOL)documentAIBundleIsExist;
- - (void)cancelDownload;
- @end
- NS_ASSUME_NONNULL_END
|