mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
49 lines
1.7 KiB
Objective-C
49 lines
1.7 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)prepareCheckForUpdatesWithCompletion:(SPUUpdateDriverCompletion)completionBlock;
|
|
|
|
- (void)preflightForUpdatePermissionPreventingInstallerInteraction:(BOOL)preventsInstallerInteraction reply:(void (^)(NSError * _Nullable))reply;
|
|
|
|
- (void)checkForUpdatesAtAppcastURL:(NSURL *)appcastURL withUserAgent:(NSString *)userAgent httpHeaders:(NSDictionary * _Nullable)httpHeaders inBackground:(BOOL)background;
|
|
|
|
- (void)resumeInstallingUpdateWithCompletion:(SPUUpdateDriverCompletion)completionBlock;
|
|
|
|
- (void)resumeUpdate:(id<SPUResumableUpdate>)resumableUpdate completion:(SPUUpdateDriverCompletion)completionBlock;
|
|
|
|
- (void)abortUpdateWithError:(nullable NSError *)error;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|