mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
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.
49 lines
1.5 KiB
Objective-C
49 lines
1.5 KiB
Objective-C
//
|
|
// SPUUIBasedUpdateDriver.h
|
|
// Sparkle
|
|
//
|
|
// Created by Mayur Pawashe on 3/18/16.
|
|
// Copyright © 2016 Sparkle Project. All rights reserved.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "SPUUpdateDriver.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@protocol SPUUIBasedUpdateDriverDelegate <NSObject>
|
|
|
|
- (void)basicDriverIsRequestingAbortUpdateWithError:(nullable NSError *)error;
|
|
- (void)coreDriverIsRequestingAbortUpdateWithError:(nullable NSError *)error;
|
|
- (void)uiDriverIsRequestingAbortUpdateWithError:(nullable NSError *)error;
|
|
|
|
@optional
|
|
|
|
- (void)uiDriverDidShowUpdate;
|
|
- (void)basicDriverDidFinishLoadingAppcast;
|
|
|
|
@end
|
|
|
|
@class SUHost;
|
|
@protocol SPUUserDriver, SPUUpdaterDelegate;
|
|
|
|
@interface SPUUIBasedUpdateDriver : NSObject
|
|
|
|
- (instancetype)initWithHost:(SUHost *)host applicationBundle:(NSBundle *)applicationBundle updater:(id)updater userDriver:(id <SPUUserDriver>)userDriver userInitiated:(BOOL)userInitiated updaterDelegate:(nullable id <SPUUpdaterDelegate>)updaterDelegate delegate:(id<SPUUIBasedUpdateDriverDelegate>)delegate;
|
|
|
|
- (void)setCompletionHandler:(SPUUpdateDriverCompletion)completionBlock;
|
|
|
|
- (void)setUpdateWillInstallHandler:(void (^)(void))updateWillInstallHandler;
|
|
|
|
- (void)checkForUpdatesAtAppcastURL:(NSURL *)appcastURL withUserAgent:(NSString *)userAgent httpHeaders:(NSDictionary * _Nullable)httpHeaders inBackground:(BOOL)background;
|
|
|
|
- (void)resumeInstallingUpdate;
|
|
|
|
- (void)resumeUpdate:(id<SPUResumableUpdate>)resumableUpdate;
|
|
|
|
- (void)abortUpdateWithError:(nullable NSError *)error showErrorToUser:(BOOL)showedUserProgress;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|