Files
Sparkle/Sparkle/SPUInstallerDriver.h
T
Zorg 9ba73525b0 Update last update check time when choosing to install update (#2136)
In the UI driver, this is when the user chooses to Install & Relaunch.

In the automatic download based driver, this is when Sparkle hands off responsibility to its delegate to install the update and they trigger the callback to relaunch the app.
2022-06-04 18:43:59 -07:00

49 lines
1.7 KiB
Objective-C

//
// SPUInstallerDriver.h
// Sparkle
//
// Created by Mayur Pawashe on 3/17/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol SPUUpdaterDelegate;
@class SUHost, SUAppcastItem, SPUDownloadedUpdate;
@protocol SPUInstallerDriverDelegate <NSObject>
- (void)installerDidStartInstallingWithApplicationTerminated:(BOOL)applicationTerminated;
- (void)installerDidStartExtracting;
- (void)installerDidExtractUpdateWithProgress:(double)progress;
- (void)installerDidFinishPreparationAndWillInstallImmediately:(BOOL)willInstallImmediately silently:(BOOL)willInstallSilently;
- (void)installerWillFinishInstallationAndRelaunch:(BOOL)relaunch;
- (void)installerDidFinishInstallationAndRelaunched:(BOOL)relaunch acknowledgement:(void(^)(void))acknowledgement;
- (void)installerIsRequestingAbortInstallWithError:(nullable NSError *)error;
- (void)installerDidFailToApplyDeltaUpdate;
@end
@interface SPUInstallerDriver : NSObject
- (instancetype)initWithHost:(SUHost *)host applicationBundle:(NSBundle *)applicationBundle updater:(id)updater updaterDelegate:(nullable id<SPUUpdaterDelegate>)updaterDelegate delegate:(nullable id<SPUInstallerDriverDelegate>)delegate;
- (void)resumeInstallingUpdateWithUpdateItem:(SUAppcastItem *)updateItem systemDomain:(BOOL)systemDomain;
- (void)setUpdateWillInstallHandler:(void (^)(void))updateWillInstallHandler;
- (void)extractDownloadedUpdate:(SPUDownloadedUpdate *)downloadedUpdate silently:(BOOL)silently completion:(void (^)(NSError * _Nullable))completionHandler;
- (void)installWithToolAndRelaunch:(BOOL)relaunch displayingUserInterface:(BOOL)showUI;
- (void)cancelUpdate;
- (void)abortInstall;
@end
NS_ASSUME_NONNULL_END