2 // SUBasicUpdateDriver.h
5 // Created by Andy Matuschak on 4/23/08.
6 // Copyright 2008 Andy Matuschak. All rights reserved.
9 #ifndef SUBASICUPDATEDRIVER_H
10 #define SUBASICUPDATEDRIVER_H
12 #import <Cocoa/Cocoa.h>
13 #import "SUUpdateDriver.h"
15 @
class SUAppcastItem
, SUUnarchiver
, SUAppcast
, SUUnarchiver
;
16 @interface SUBasicUpdateDriver
: SUUpdateDriver
{
18 SUAppcastItem
*updateItem
;
20 NSURLDownload
*download
;
21 NSString
*downloadPath
;
23 NSString
*relaunchPath
;
26 - (void)checkForUpdatesAtURL
:(NSURL
*)appcastURL hostBundle
:(NSBundle
*)hb
;
28 - (void)appcastDidFinishLoading
:(SUAppcast
*)ac
;
29 - (void)appcast
:(SUAppcast
*)ac failedToLoadWithError
:(NSError
*)error
;
31 - (BOOL
)isItemNewer
:(SUAppcastItem
*)ui
;
32 - (BOOL
)hostSupportsItem
:(SUAppcastItem
*)ui
;
33 - (BOOL
)itemContainsSkippedVersion
:(SUAppcastItem
*)ui
;
34 - (BOOL
)itemContainsValidUpdate
:(SUAppcastItem
*)ui
;
35 - (void)didFindValidUpdate
;
36 - (void)didNotFindUpdate
;
38 - (void)downloadUpdate
;
39 - (void)download
:(NSURLDownload
*)d decideDestinationWithSuggestedFilename
:(NSString
*)name
;
40 - (void)downloadDidFinish
:(NSURLDownload
*)d
;
41 - (void)download
:(NSURLDownload
*)download didFailWithError
:(NSError
*)error
;
43 - (void)extractUpdate
;
44 - (void)unarchiverDidFinish
:(SUUnarchiver
*)ua
;
45 - (void)unarchiverDidFail
:(SUUnarchiver
*)ua
;
47 - (void)installUpdate
;
48 - (void)installerFinishedForHostBundle
:(NSBundle
*)hb
;
49 - (void)installerForHostBundle
:(NSBundle
*)hb failedWithError
:(NSError
*)error
;
51 - (void)relaunchHostApp
;
55 - (void)abortUpdateWithError
:(NSError
*)error
;