Finish moving all informal protocols to formal protocols.

Fix improperly-named protocols.
This commit is contained in:
C.W. Betts committed 2014-06-28 13:19:27 -06:00
1 parent 133a701d24
commit bb990ad172
12 files changed
+27 -22

No files matched your search

+3 -3
View File
@@ -11,7 +11,7 @@
#import "SUWindowController.h"
@protocol SUAutomaticUpdateAlertDelegateProtocol;
@protocol SUAutomaticUpdateAlertDelegate;
typedef enum
{
@@ -23,14 +23,14 @@ typedef enum
@class SUAppcastItem, SUHost;
@interface SUAutomaticUpdateAlert : SUWindowController
- (instancetype)initWithAppcastItem:(SUAppcastItem *)item host:(SUHost *)hostBundle delegate:(id<SUAutomaticUpdateAlertDelegateProtocol>)delegate;
- (instancetype)initWithAppcastItem:(SUAppcastItem *)item host:(SUHost *)hostBundle delegate:(id<SUAutomaticUpdateAlertDelegate>)delegate;
- (IBAction)installNow:sender;
- (IBAction)installLater:sender;
- (IBAction)doNotInstall:sender;
@end
@protocol SUAutomaticUpdateAlertDelegateProtocol <NSObject>
@protocol SUAutomaticUpdateAlertDelegate <NSObject>
- (void)automaticUpdateAlert:(SUAutomaticUpdateAlert *)aua finishedWithChoice:(SUAutomaticInstallationChoice)choice;
@end
+2 -2
View File
@@ -12,7 +12,7 @@
@interface SUAutomaticUpdateAlert ()
@property (retain) SUAppcastItem *updateItem;
@property (assign) id<SUAutomaticUpdateAlertDelegateProtocol> delegate;
@property (assign) id<SUAutomaticUpdateAlertDelegate> delegate;
@property (retain) SUHost *host;
@end
@@ -21,7 +21,7 @@
@synthesize host;
@synthesize updateItem;
- (instancetype)initWithAppcastItem:(SUAppcastItem *)item host:(SUHost *)aHost delegate:(id<SUAutomaticUpdateAlertDelegateProtocol>)del
- (instancetype)initWithAppcastItem:(SUAppcastItem *)item host:(SUHost *)aHost delegate:(id<SUAutomaticUpdateAlertDelegate>)del
{
self = [super initWithHost:aHost windowNibName:@"SUAutomaticUpdateAlert"];
if (self)
+1 -1
View File
@@ -13,7 +13,7 @@
#import "SUBasicUpdateDriver.h"
#import "SUAutomaticUpdateAlert.h"
@interface SUAutomaticUpdateDriver : SUBasicUpdateDriver <SUUnarchiverDelegate, SUAutomaticUpdateAlertDelegateProtocol>
@interface SUAutomaticUpdateDriver : SUBasicUpdateDriver <SUUnarchiverDelegate, SUAutomaticUpdateAlertDelegate>
{
@private
BOOL postponingInstallation, showErrors;
+5 -3
View File
@@ -12,15 +12,17 @@
#import <Cocoa/Cocoa.h>
#import "SUVersionComparisonProtocol.h"
@protocol SUInstallerDelegate;
@class SUHost;
@interface SUInstaller : NSObject
+ (NSString *) appPathInUpdateFolder:(NSString *)updateFolder forHost:(SUHost *)host;
+ (void) installFromUpdateFolder:(NSString *)updateFolder overHost:(SUHost *)host installationPath:(NSString *)installationPath delegate:delegate synchronously:(BOOL)synchronously versionComparator:(id <SUVersionComparison>)comparator;
+ (void) finishInstallationToPath:(NSString *)installationPath withResult:(BOOL)result host:(SUHost *)host error:(NSError *)error delegate:delegate;
+ (void) installFromUpdateFolder:(NSString *)updateFolder overHost:(SUHost *)host installationPath:(NSString *)installationPath delegate:(id<SUInstallerDelegate>)delegate synchronously:(BOOL)synchronously versionComparator:(id <SUVersionComparison>)comparator;
+ (void) finishInstallationToPath:(NSString *)installationPath withResult:(BOOL)result host:(SUHost *)host error:(NSError *)error delegate:(id<SUInstallerDelegate>)delegate;
+ (NSString*) updateFolder;
@end
@interface NSObject (SUInstallerDelegateInformalProtocol)
@protocol SUInstallerDelegate <NSObject>
- (void)installerFinishedForHost:(SUHost *)host;
- (void)installerForHost:(SUHost *)host failedWithError:(NSError *)error;
@end
+2 -2
View File
@@ -117,7 +117,7 @@ static NSString* sUpdateFolder = nil;
return isPackage ? nil : path;
}
+ (void)installFromUpdateFolder:(NSString *)inUpdateFolder overHost:(SUHost *)host installationPath:(NSString *)installationPath delegate:delegate synchronously:(BOOL)synchronously versionComparator:(id <SUVersionComparison>)comparator
+ (void)installFromUpdateFolder:(NSString *)inUpdateFolder overHost:(SUHost *)host installationPath:(NSString *)installationPath delegate:(id<SUInstallerDelegate>)delegate synchronously:(BOOL)synchronously versionComparator:(id <SUVersionComparison>)comparator
{
BOOL isPackage = NO;
NSString *newAppDownloadPath = [self installSourcePathInUpdateFolder:inUpdateFolder forHost:host isPackage:&isPackage];
@@ -158,7 +158,7 @@ static NSString* sUpdateFolder = nil;
#define SUNotifyDictErrorKey @"SUNotifyDictError"
#define SUNotifyDictDelegateKey @"SUNotifyDictDelegate"
+ (void)finishInstallationToPath:(NSString *)installationPath withResult:(BOOL)result host:(SUHost *)host error:(NSError *)error delegate:delegate
+ (void)finishInstallationToPath:(NSString *)installationPath withResult:(BOOL)result host:(SUHost *)host error:(NSError *)error delegate:(id<SUInstallerDelegate>)delegate
{
if (result)
{
+1 -1
View File
@@ -20,7 +20,7 @@
@class SUHost;
@interface SUPlainInstaller : SUInstaller
+ (void)performInstallationToPath:(NSString *)installationPath fromPath:(NSString *)path host:(SUHost *)host delegate:delegate synchronously:(BOOL)synchronously versionComparator:(id <SUVersionComparison>)comparator;
+ (void)performInstallationToPath:(NSString *)installationPath fromPath:(NSString *)path host:(SUHost *)host delegate:(id<SUInstallerDelegate>)delegate synchronously:(BOOL)synchronously versionComparator:(id <SUVersionComparison>)comparator;
@end
#endif
+1 -1
View File
@@ -58,7 +58,7 @@ static NSString * const SUInstallerInstallationPathKey = @"SUInstallerInstallati
}
}
+ (void)performInstallationToPath:(NSString *)installationPath fromPath:(NSString *)path host:(SUHost *)host delegate:delegate synchronously:(BOOL)synchronously versionComparator:(id <SUVersionComparison>)comparator
+ (void)performInstallationToPath:(NSString *)installationPath fromPath:(NSString *)path host:(SUHost *)host delegate:(id<SUInstallerDelegate>)delegate synchronously:(BOOL)synchronously versionComparator:(id <SUVersionComparison>)comparator
{
// Prevent malicious downgrades:
#if !PERMIT_AUTOMATED_DOWNGRADES
+4 -4
View File
@@ -16,24 +16,24 @@ typedef enum {
SUDoNotAutomaticallyCheck
} SUPermissionPromptResult;
@protocol SUUpdatePermissionPromptDelegateProtocol;
@protocol SUUpdatePermissionPromptDelegate;
@class SUHost;
@interface SUUpdatePermissionPrompt : SUWindowController {
SUHost *host;
NSArray *systemProfileInformationArray;
id<SUUpdatePermissionPromptDelegateProtocol> delegate;
id<SUUpdatePermissionPromptDelegate> delegate;
IBOutlet NSTextField *descriptionTextField;
IBOutlet NSView *moreInfoView;
IBOutlet NSButton *moreInfoButton;
IBOutlet NSTableView *profileTableView;
}
+ (void)promptWithHost:(SUHost *)aHost systemProfile:(NSArray *)profile delegate:(id<SUUpdatePermissionPromptDelegateProtocol>)d;
+ (void)promptWithHost:(SUHost *)aHost systemProfile:(NSArray *)profile delegate:(id<SUUpdatePermissionPromptDelegate>)d;
- (IBAction)toggleMoreInfo:(id)sender;
- (IBAction)finishPrompt:(id)sender;
@end
@protocol SUUpdatePermissionPromptDelegateProtocol <NSObject>
@protocol SUUpdatePermissionPromptDelegate <NSObject>
- (void)updatePermissionPromptFinishedWithResult:(SUPermissionPromptResult)result;
@end
+1 -1
View File
@@ -22,7 +22,7 @@
return [[host objectForInfoDictionaryKey:SUEnableSystemProfilingKey] boolValue];
}
- (instancetype)initWithHost:(SUHost *)aHost systemProfile:(NSArray *)profile delegate:(id<SUUpdatePermissionPromptDelegateProtocol>)d
- (instancetype)initWithHost:(SUHost *)aHost systemProfile:(NSArray *)profile delegate:(id<SUUpdatePermissionPromptDelegate>)d
{
self = [super initWithHost:aHost windowNibName:@"SUUpdatePermissionPrompt"];
if (self)
+5 -2
View File
@@ -14,6 +14,8 @@
@class SUUpdateDriver, SUAppcastItem, SUHost, SUAppcast;
@protocol SUUpdaterDelegate;
@interface SUUpdater : NSObject
{
@private
@@ -21,7 +23,7 @@
SUHost *host;
}
@property (assign) IBOutlet id delegate;
@property (assign) IBOutlet id<SUUpdaterDelegate> delegate;
+ (SUUpdater *)sharedUpdater;
+ (SUUpdater *)updaterForBundle:(NSBundle *)bundle;
@@ -84,7 +86,8 @@ extern NSString *const SUUpdaterAppcastNotificationKey;
// SUUpdater Delegate:
// -----------------------------------------------------------------------------
@interface NSObject (SUUpdaterDelegateInformalProtocol)
@protocol SUUpdaterDelegate <NSObject>
@optional
// Use this to keep Sparkle from popping up e.g. while your setup assistant is showing:
- (BOOL)updaterMayCheckForUpdates:(SUUpdater *)bundle;
+1 -1
View File
@@ -27,7 +27,7 @@ NSString *const SUUpdaterWillRestartNotification = @"SUUpdaterWillRestartNotific
NSString *const SUUpdaterAppcastItemNotificationKey = @"SUUpdaterAppcastItemNotificationKey";
NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotificationKey";
@interface SUUpdater () <SUUpdatePermissionPromptDelegateProtocol>
@interface SUUpdater () <SUUpdatePermissionPromptDelegate>
@property (retain) NSTimer *checkTimer;
- (instancetype)initForBundle:(NSBundle *)bundle;
- (void)startUpdateCycle;
+1 -1
View File
@@ -12,7 +12,7 @@
#define LONG_INSTALLATION_TIME 5 // If the Installation takes longer than this time the Application Icon is shown in the Dock so that the user has some feedback.
#define CHECK_FOR_PARENT_TO_QUIT_TIME .5 // Time this app uses to recheck if the parent has already died.
@interface TerminationListener : NSObject
@interface TerminationListener : NSObject <SUInstallerDelegate>
{
const char *hostpath;
const char *executablepath;