Upgrade to Sparkle 1.21.3.
[macgdbp.git] / Sparkle.framework / Versions / A / Headers / SPUDownloaderDelegate.h
1 //
2 // SPUDownloaderDelegate.h
3 // Sparkle
4 //
5 // Created by Mayur Pawashe on 4/1/16.
6 // Copyright © 2016 Sparkle Project. All rights reserved.
7 //
8
9 #if __has_feature(modules)
10 @import Foundation;
11 #else
12 #import <Foundation/Foundation.h>
13 #endif
14
15 NS_ASSUME_NONNULL_BEGIN
16
17 @class SPUDownloadData;
18
19 @protocol SPUDownloaderDelegate <NSObject>
20
21 // This is only invoked for persistent downloads
22 - (void)downloaderDidSetDestinationName:(NSString *)destinationName temporaryDirectory:(NSString *)temporaryDirectory;
23
24 // Under rare cases, this may be called more than once, in which case the current progress should be reset back to 0
25 // This is only invoked for persistent downloads
26 - (void)downloaderDidReceiveExpectedContentLength:(int64_t)expectedContentLength;
27
28 // This is only invoked for persistent downloads
29 - (void)downloaderDidReceiveDataOfLength:(uint64_t)length;
30
31 // downloadData is nil if this is a persisent download, otherwise it's non-nil if it's a temporary download
32 - (void)downloaderDidFinishWithTemporaryDownloadData:(SPUDownloadData * _Nullable)downloadData;
33
34 - (void)downloaderDidFailWithError:(NSError *)error;
35
36 @end
37
38 NS_ASSUME_NONNULL_END