diff --git a/Sparkle/Autoupdate/Autoupdate.m b/Sparkle/Autoupdate/Autoupdate.m index fb12c9d5..55db2e52 100644 --- a/Sparkle/Autoupdate/Autoupdate.m +++ b/Sparkle/Autoupdate/Autoupdate.m @@ -19,19 +19,6 @@ static const NSTimeInterval SUInstallationTimeLimit = 5; static const NSTimeInterval SUParentQuitCheckInterval = .5; @interface TerminationListener : NSObject -{ - const char *hostpath; - const char *executablepath; - pid_t parentprocessid; - const char *folderpath; - NSString *selfPath; - NSString *installationPath; - NSTimer *watchdogTimer; - NSTimer *longInstallationTimer; - SUHost *host; - BOOL shouldRelaunch; - BOOL shouldShowUI; -} - (void) parentHasQuit; @@ -44,6 +31,19 @@ static const NSTimeInterval SUParentQuitCheckInterval = .5; @end @implementation TerminationListener +{ + const char *hostpath; + const char *executablepath; + pid_t parentprocessid; + const char *folderpath; + NSString *selfPath; + NSString *installationPath; + NSTimer *watchdogTimer; + NSTimer *longInstallationTimer; + SUHost *host; + BOOL shouldRelaunch; + BOOL shouldShowUI; +} - (instancetype) initWithHostPath:(const char *)inhostpath executablePath:(const char *)execpath parentProcessId:(pid_t)ppid folderPath:(const char*)infolderpath shouldRelaunch:(BOOL)relaunch shouldShowUI:(BOOL)showUI selfPath:(NSString*)inSelfPath { diff --git a/Sparkle/SUAppcast.h b/Sparkle/SUAppcast.h index e4c885a5..9df6b9c4 100644 --- a/Sparkle/SUAppcast.h +++ b/Sparkle/SUAppcast.h @@ -13,11 +13,7 @@ @class SUAppcastItem; @interface SUAppcast : NSObject -{ -@private - NSString *downloadFilename; - NSURLDownload *download; -} + @property (weak) id delegate; @property (copy) NSString *userAgentString; diff --git a/Sparkle/SUAppcast.m b/Sparkle/SUAppcast.m index 0ff296e5..65b6a843 100644 --- a/Sparkle/SUAppcast.m +++ b/Sparkle/SUAppcast.m @@ -41,6 +41,11 @@ @end @implementation SUAppcast +{ + NSString *downloadFilename; + NSURLDownload *download; +} + @synthesize downloadFilename; @synthesize delegate; @synthesize userAgentString; diff --git a/Sparkle/SUAutomaticUpdateDriver.h b/Sparkle/SUAutomaticUpdateDriver.h index 390be48d..9935936e 100644 --- a/Sparkle/SUAutomaticUpdateDriver.h +++ b/Sparkle/SUAutomaticUpdateDriver.h @@ -14,13 +14,6 @@ #import "SUAutomaticUpdateAlert.h" @interface SUAutomaticUpdateDriver : SUBasicUpdateDriver -{ -@private - BOOL postponingInstallation, showErrors; - BOOL willUpdateOnTermination; - SUAutomaticUpdateAlert *alert; - NSTimer *showUpdateAlertTimer; -} @end diff --git a/Sparkle/SUAutomaticUpdateDriver.m b/Sparkle/SUAutomaticUpdateDriver.m index 74e55ef9..26151277 100644 --- a/Sparkle/SUAutomaticUpdateDriver.m +++ b/Sparkle/SUAutomaticUpdateDriver.m @@ -16,6 +16,12 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 24 * 7; @implementation SUAutomaticUpdateDriver +{ + BOOL postponingInstallation, showErrors; + BOOL willUpdateOnTermination; + SUAutomaticUpdateAlert *alert; + NSTimer *showUpdateAlertTimer; +} - (void)showUpdateAlert { diff --git a/Sparkle/SUBasicUpdateDriver.h b/Sparkle/SUBasicUpdateDriver.h index 3eae0c3d..f0826b04 100644 --- a/Sparkle/SUBasicUpdateDriver.h +++ b/Sparkle/SUBasicUpdateDriver.h @@ -16,14 +16,9 @@ @class SUAppcastItem, SUHost; @interface SUBasicUpdateDriver : SUUpdateDriver { - SUAppcastItem *updateItem; - SUAppcastItem *nonDeltaUpdateItem; - - NSURLDownload *download; - NSString *downloadPath; - NSString *tempDir; - - NSString *relaunchPath; + SUAppcastItem *updateItem; + NSURLDownload *download; + NSString *downloadPath; } - (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)host; diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index ca83b9ed..28268101 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -31,6 +31,11 @@ #endif @implementation SUBasicUpdateDriver +{ + SUAppcastItem *nonDeltaUpdateItem; + NSString *tempDir; + NSString *relaunchPath; +} - (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)aHost { diff --git a/Sparkle/SUHost.h b/Sparkle/SUHost.h index 3d0d5683..6e4e49f9 100644 --- a/Sparkle/SUHost.h +++ b/Sparkle/SUHost.h @@ -11,11 +11,7 @@ #import "SUVersionComparisonProtocol.h" @interface SUHost : NSObject -{ -@private - NSString *defaultsDomain; - BOOL usesStandardUserDefaults; -} + @property (strong, readonly) NSBundle *bundle; + (NSString *)systemVersionString; diff --git a/Sparkle/SUHost.m b/Sparkle/SUHost.m index 8bb80bf6..ab8e788d 100644 --- a/Sparkle/SUHost.m +++ b/Sparkle/SUHost.m @@ -28,6 +28,11 @@ typedef struct { @end @implementation SUHost +{ + NSString *defaultsDomain; + BOOL usesStandardUserDefaults; +} + @synthesize bundle; - (instancetype)initWithBundle:(NSBundle *)aBundle diff --git a/Sparkle/SUScheduledUpdateDriver.h b/Sparkle/SUScheduledUpdateDriver.h index 64b8022d..dfdde51f 100644 --- a/Sparkle/SUScheduledUpdateDriver.h +++ b/Sparkle/SUScheduledUpdateDriver.h @@ -13,10 +13,6 @@ #import "SUUIBasedUpdateDriver.h" @interface SUScheduledUpdateDriver : SUUIBasedUpdateDriver -{ -@private - BOOL showErrors; -} @end diff --git a/Sparkle/SUScheduledUpdateDriver.m b/Sparkle/SUScheduledUpdateDriver.m index 7a7b486d..34bf51d8 100644 --- a/Sparkle/SUScheduledUpdateDriver.m +++ b/Sparkle/SUScheduledUpdateDriver.m @@ -14,6 +14,9 @@ #import "SUVersionComparisonProtocol.h" @implementation SUScheduledUpdateDriver +{ + BOOL showErrors; +} - (void)didFindValidUpdate { diff --git a/Sparkle/SUUIBasedUpdateDriver.h b/Sparkle/SUUIBasedUpdateDriver.h index 5c5be17e..5fb8885f 100644 --- a/Sparkle/SUUIBasedUpdateDriver.h +++ b/Sparkle/SUUIBasedUpdateDriver.h @@ -16,10 +16,6 @@ @class SUStatusController; @interface SUUIBasedUpdateDriver : SUBasicUpdateDriver -{ - SUStatusController *statusController; - SUUpdateAlert *updateAlert; -} - (void)showModalAlert:(NSAlert *)alert; - (IBAction)cancelDownload: (id)sender; diff --git a/Sparkle/SUUIBasedUpdateDriver.m b/Sparkle/SUUIBasedUpdateDriver.m index 99fea65e..d19daded 100644 --- a/Sparkle/SUUIBasedUpdateDriver.m +++ b/Sparkle/SUUIBasedUpdateDriver.m @@ -15,6 +15,10 @@ #import "SUConstants.h" @implementation SUUIBasedUpdateDriver +{ + SUStatusController *statusController; + SUUpdateAlert *updateAlert; +} - (void)didFindValidUpdate { diff --git a/Sparkle/SUUpdateAlert.h b/Sparkle/SUUpdateAlert.h index 984c1b2d..55a36d04 100644 --- a/Sparkle/SUUpdateAlert.h +++ b/Sparkle/SUUpdateAlert.h @@ -23,18 +23,8 @@ typedef enum } SUUpdateAlertChoice; @class WebView, SUAppcastItem, SUHost; -@interface SUUpdateAlert : SUWindowController { - SUAppcastItem *updateItem; - SUHost *host; +@interface SUUpdateAlert : SUWindowController - IBOutlet WebView *releaseNotesView; - IBOutlet NSTextField *description; - IBOutlet NSButton *installButton; // UK 2007-08-31. - IBOutlet NSButton *skipButton; - IBOutlet NSButton *laterButton; - NSProgressIndicator *releaseNotesSpinner; - BOOL webViewFinishedLoading; -} @property (weak) id delegate; @property (weak) id versionDisplayer; diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index c981920b..10b374a9 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -26,6 +26,19 @@ @implementation SUUpdateAlert +{ + SUAppcastItem *updateItem; + SUHost *host; + + IBOutlet WebView *releaseNotesView; + IBOutlet NSTextField *description; + IBOutlet NSButton *installButton; // UK 2007-08-31. + IBOutlet NSButton *skipButton; + IBOutlet NSButton *laterButton; + NSProgressIndicator *releaseNotesSpinner; + BOOL webViewFinishedLoading; +} + @synthesize delegate; @synthesize versionDisplayer; diff --git a/Sparkle/SUUpdateDriver.h b/Sparkle/SUUpdateDriver.h index 33dbc6b4..7058f7b2 100644 --- a/Sparkle/SUUpdateDriver.h +++ b/Sparkle/SUUpdateDriver.h @@ -17,7 +17,6 @@ extern NSString * const SUUpdateDriverFinishedNotification; @interface SUUpdateDriver : NSObject { SUUpdater *updater; //assigned - NSURL *appcastURL; BOOL isInterruptible; } @property (strong) SUHost *host; diff --git a/Sparkle/SUUpdateDriver.m b/Sparkle/SUUpdateDriver.m index d9aacd03..44d4c9e6 100644 --- a/Sparkle/SUUpdateDriver.m +++ b/Sparkle/SUUpdateDriver.m @@ -12,6 +12,10 @@ NSString * const SUUpdateDriverFinishedNotification = @"SUUpdateDriverFinished"; @implementation SUUpdateDriver +{ + NSURL *appcastURL; +} + @synthesize host; @synthesize interruptible = isInterruptible; @synthesize finished; diff --git a/Sparkle/SUUpdatePermissionPrompt.h b/Sparkle/SUUpdatePermissionPrompt.h index d29f8876..450594d7 100644 --- a/Sparkle/SUUpdatePermissionPrompt.h +++ b/Sparkle/SUUpdatePermissionPrompt.h @@ -19,15 +19,8 @@ typedef enum { @protocol SUUpdatePermissionPromptDelegate; @class SUHost; -@interface SUUpdatePermissionPrompt : SUWindowController { - SUHost *host; - NSArray *systemProfileInformationArray; - id delegate; - IBOutlet NSTextField *descriptionTextField; - IBOutlet NSView *moreInfoView; - IBOutlet NSButton *moreInfoButton; - IBOutlet NSTableView *profileTableView; -} +@interface SUUpdatePermissionPrompt : SUWindowController + + (void)promptWithHost:(SUHost *)aHost systemProfile:(NSArray *)profile delegate:(id)d; - (IBAction)toggleMoreInfo:(id)sender; - (IBAction)finishPrompt:(id)sender; diff --git a/Sparkle/SUUpdatePermissionPrompt.m b/Sparkle/SUUpdatePermissionPrompt.m index 93d9e462..c61d6c14 100644 --- a/Sparkle/SUUpdatePermissionPrompt.m +++ b/Sparkle/SUUpdatePermissionPrompt.m @@ -16,6 +16,15 @@ @end @implementation SUUpdatePermissionPrompt +{ + SUHost *host; + NSArray *systemProfileInformationArray; + id delegate; + IBOutlet NSTextField *descriptionTextField; + IBOutlet NSView *moreInfoView; + IBOutlet NSButton *moreInfoButton; + IBOutlet NSTableView *profileTableView; +} @synthesize isShowingMoreInfo = _isShowingMoreInfo, shouldSendProfile = _shouldSendProfile; diff --git a/Sparkle/SUUpdater.h b/Sparkle/SUUpdater.h index 4d62d603..2a1108f4 100644 --- a/Sparkle/SUUpdater.h +++ b/Sparkle/SUUpdater.h @@ -23,12 +23,7 @@ and automatically schedule and control checks for updates. */ @interface SUUpdater : NSObject -{ -@private - SUUpdateDriver *driver; - SUHost *host; -} @property (weak) IBOutlet id delegate; + (SUUpdater *)sharedUpdater; diff --git a/Sparkle/SUUpdater.m b/Sparkle/SUUpdater.m index f321bd12..fc9f84e0 100644 --- a/Sparkle/SUUpdater.m +++ b/Sparkle/SUUpdater.m @@ -44,6 +44,11 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification @end @implementation SUUpdater +{ + SUUpdateDriver *driver; + SUHost *host; +} + @synthesize delegate; @synthesize checkTimer; @synthesize userAgentString = customUserAgentString; diff --git a/Sparkle/SUUserInitiatedUpdateDriver.h b/Sparkle/SUUserInitiatedUpdateDriver.h index 8df5f89d..079d2fea 100644 --- a/Sparkle/SUUserInitiatedUpdateDriver.h +++ b/Sparkle/SUUserInitiatedUpdateDriver.h @@ -13,11 +13,6 @@ #import "SUUIBasedUpdateDriver.h" @interface SUUserInitiatedUpdateDriver : SUUIBasedUpdateDriver -{ -@private - SUStatusController *checkingController; - BOOL isCanceled; -} @end diff --git a/Sparkle/SUUserInitiatedUpdateDriver.m b/Sparkle/SUUserInitiatedUpdateDriver.m index 5916d24b..dd5c678a 100644 --- a/Sparkle/SUUserInitiatedUpdateDriver.m +++ b/Sparkle/SUUserInitiatedUpdateDriver.m @@ -12,6 +12,10 @@ #import "SUHost.h" @implementation SUUserInitiatedUpdateDriver +{ + SUStatusController *checkingController; + BOOL isCanceled; +} - (void)closeCheckingWindow {