Files
Sparkle/Sparkle/SUCoreBasedUpdateDriver.h
T
Zorg cd108ef47c Allow automatically downloading updates, but alerting the user immediately
Following cases where after an update has been automatically downloaded, Sparkle may alert the user right away:
1) Critical updates
2) Insufficient write access to install without being root
3) Package type installations

In addition to alerting the user right away, if they dismiss the update, the schedule timer will be on regular intervals. We also no longer need to care about writability in the updater, only just in the installer.
2016-04-10 02:32:54 -04:00

67 lines
2.0 KiB
Objective-C

//
// SUCoreBasedUpdateDriver.h
// Sparkle
//
// Created by Mayur Pawashe on 3/18/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "SUStatusCompletionResults.h"
#import "SUUpdateDriver.h"
NS_ASSUME_NONNULL_BEGIN
@class SUHost, SUAppcastItem;
@protocol SUUpdaterDelegate;
@protocol SUCoreBasedUpdateDriverDelegate <NSObject>
- (void)basicDriverDidFindUpdateWithAppcastItem:(SUAppcastItem *)updateItem;
- (void)installerDidFinishPreparationAndCanInstallSilently:(BOOL)canInstallSilently;
- (void)coreDriverIsRequestingAbortUpdateWithError:(nullable NSError *)error;
- (void)basicDriverIsRequestingAbortUpdateWithError:(nullable NSError *)error;
- (BOOL)basicDriverShouldSignalShowingUpdateImmediately;
@optional
- (void)basicDriverDidFinishLoadingAppcast;
- (void)downloadDriverWillBeginDownload;
- (void)downloadDriverDidReceiveResponse:(NSURLResponse *)response;
- (void)downloadDriverDidReceiveDataOfLength:(NSUInteger)length;
- (void)coreDriverDidFinishDownloadingUpdate;
- (void)installerDidStartInstalling;
- (void)installerDidExtractUpdateWithProgress:(double)progress;
- (void)coreDriverIsRequestingAppTermination;
@end
@interface SUCoreBasedUpdateDriver : NSObject
- (instancetype)initWithHost:(SUHost *)host sparkleBundle:(NSBundle *)sparkleBundle updater:(id)updater updaterDelegate:(nullable id <SUUpdaterDelegate>)updaterDelegate delegate:(id<SUCoreBasedUpdateDriverDelegate>)delegate;
- (void)checkForUpdatesAtAppcastURL:(NSURL *)appcastURL withUserAgent:(NSString *)userAgent httpHeaders:(NSDictionary *)httpHeaders includesSkippedUpdates:(BOOL)includesSkippedUpdates completion:(SUUpdateDriverCompletion)completionBlock;
- (void)resumeUpdateWithCompletion:(SUUpdateDriverCompletion)completionBlock;
- (void)downloadUpdateFromAppcastItem:(SUAppcastItem *)updateItem;
- (void)finishInstallationWithResponse:(SUInstallUpdateStatus)installUpdateStatus;
- (void)abortUpdateWithError:(nullable NSError *)error;
@end
NS_ASSUME_NONNULL_END