summaryrefslogtreecommitdiffstats
path: root/OSX/Sparkle.framework/Versions/A/Headers
diff options
context:
space:
mode:
Diffstat (limited to 'OSX/Sparkle.framework/Versions/A/Headers')
-rwxr-xr-xOSX/Sparkle.framework/Versions/A/Headers/SUAppcast.h36
-rwxr-xr-xOSX/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h60
-rwxr-xr-xOSX/Sparkle.framework/Versions/A/Headers/SUUpdater.h161
-rwxr-xr-xOSX/Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h29
-rwxr-xr-xOSX/Sparkle.framework/Versions/A/Headers/SUVersionDisplayProtocol.h27
-rwxr-xr-xOSX/Sparkle.framework/Versions/A/Headers/Sparkle.h21
6 files changed, 334 insertions, 0 deletions
diff --git a/OSX/Sparkle.framework/Versions/A/Headers/SUAppcast.h b/OSX/Sparkle.framework/Versions/A/Headers/SUAppcast.h
new file mode 100755
index 0000000..5a60d2f
--- /dev/null
+++ b/OSX/Sparkle.framework/Versions/A/Headers/SUAppcast.h
@@ -0,0 +1,36 @@
+//
+// SUAppcast.h
+// Sparkle
+//
+// Created by Andy Matuschak on 3/12/06.
+// Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#ifndef SUAPPCAST_H
+#define SUAPPCAST_H
+
+@class SUAppcastItem;
+@interface SUAppcast : NSObject
+{
+@private
+ NSArray *items;
+ NSString *userAgentString;
+ id delegate;
+ NSString *downloadFilename;
+ NSURLDownload *download;
+}
+
+- (void)fetchAppcastFromURL:(NSURL *)url;
+- (void)setDelegate:delegate;
+- (void)setUserAgentString:(NSString *)userAgentString;
+
+- (NSArray *)items;
+
+@end
+
+@interface NSObject (SUAppcastDelegate)
+- (void)appcastDidFinishLoading:(SUAppcast *)appcast;
+- (void)appcast:(SUAppcast *)appcast failedToLoadWithError:(NSError *)error;
+@end
+
+#endif
diff --git a/OSX/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h b/OSX/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h
new file mode 100755
index 0000000..d6f9c64
--- /dev/null
+++ b/OSX/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h
@@ -0,0 +1,60 @@
+//
+// SUAppcastItem.h
+// Sparkle
+//
+// Created by Andy Matuschak on 3/12/06.
+// Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#ifndef SUAPPCASTITEM_H
+#define SUAPPCASTITEM_H
+
+@interface SUAppcastItem : NSObject
+{
+@private
+ NSString *title;
+ NSDate *date;
+ NSString *itemDescription;
+
+ NSURL *releaseNotesURL;
+
+ NSString *DSASignature;
+ NSString *minimumSystemVersion;
+ NSString *maximumSystemVersion;
+
+ NSURL *fileURL;
+ NSString *versionString;
+ NSString *displayVersionString;
+
+ NSDictionary *deltaUpdates;
+
+ NSDictionary *propertiesDictionary;
+
+ NSURL *infoURL; // UK 2007-08-31
+}
+
+// Initializes with data from a dictionary provided by the RSS class.
+- initWithDictionary:(NSDictionary *)dict;
+- initWithDictionary:(NSDictionary *)dict failureReason:(NSString**)error;
+
+- (NSString *)title;
+- (NSString *)versionString;
+- (NSString *)displayVersionString;
+- (NSDate *)date;
+- (NSString *)itemDescription;
+- (NSURL *)releaseNotesURL;
+- (NSURL *)fileURL;
+- (NSString *)DSASignature;
+- (NSString *)minimumSystemVersion;
+- (NSString *)maximumSystemVersion;
+- (NSDictionary *)deltaUpdates;
+- (BOOL)isDeltaUpdate;
+
+// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions.
+- (NSDictionary *)propertiesDictionary;
+
+- (NSURL *)infoURL; // UK 2007-08-31
+
+@end
+
+#endif
diff --git a/OSX/Sparkle.framework/Versions/A/Headers/SUUpdater.h b/OSX/Sparkle.framework/Versions/A/Headers/SUUpdater.h
new file mode 100755
index 0000000..cd79566
--- /dev/null
+++ b/OSX/Sparkle.framework/Versions/A/Headers/SUUpdater.h
@@ -0,0 +1,161 @@
+//
+// SUUpdater.h
+// Sparkle
+//
+// Created by Andy Matuschak on 1/4/06.
+// Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#ifndef SUUPDATER_H
+#define SUUPDATER_H
+
+#import "SUVersionComparisonProtocol.h"
+#import "SUVersionDisplayProtocol.h"
+
+@class SUUpdateDriver, SUAppcastItem, SUHost, SUAppcast;
+
+@interface SUUpdater : NSObject
+{
+@private
+ NSTimer *checkTimer;
+ SUUpdateDriver *driver;
+
+ NSString *customUserAgentString;
+ SUHost *host;
+ IBOutlet id delegate;
+}
+
++ (SUUpdater *)sharedUpdater;
++ (SUUpdater *)updaterForBundle:(NSBundle *)bundle;
+- (id)initForBundle:(NSBundle *)bundle;
+
+- (NSBundle *)hostBundle;
+
+- (void)setDelegate:(id)delegate;
+- (id)delegate;
+
+- (void)setAutomaticallyChecksForUpdates:(BOOL)automaticallyChecks;
+- (BOOL)automaticallyChecksForUpdates;
+
+- (void)setUpdateCheckInterval:(NSTimeInterval)interval;
+- (NSTimeInterval)updateCheckInterval;
+
+- (void)setFeedURL:(NSURL *)feedURL;
+- (NSURL *)feedURL; // *** MUST BE CALLED ON MAIN THREAD ***
+
+- (void)setUserAgentString:(NSString *)userAgent;
+- (NSString *)userAgentString;
+
+- (void)setSendsSystemProfile:(BOOL)sendsSystemProfile;
+- (BOOL)sendsSystemProfile;
+
+- (void)setAutomaticallyDownloadsUpdates:(BOOL)automaticallyDownloadsUpdates;
+- (BOOL)automaticallyDownloadsUpdates;
+
+// This IBAction is meant for a main menu item. Hook up any menu item to this action,
+// and Sparkle will check for updates and report back its findings verbosely.
+- (IBAction)checkForUpdates:(id)sender;
+
+// This kicks off an update meant to be programmatically initiated. That is, it will display no UI unless it actually finds an update,
+// in which case it proceeds as usual. If the fully automated updating is turned on, however, this will invoke that behavior, and if an
+// update is found, it will be downloaded and prepped for installation.
+- (void)checkForUpdatesInBackground;
+
+// Date of last update check. Returns nil if no check has been performed.
+- (NSDate*)lastUpdateCheckDate;
+
+// This begins a "probing" check for updates which will not actually offer to update to that version. The delegate methods, though,
+// (up to updater:didFindValidUpdate: and updaterDidNotFindUpdate:), are called, so you can use that information in your UI.
+- (void)checkForUpdateInformation;
+
+// Call this to appropriately schedule or cancel the update checking timer according to the preferences for time interval and automatic checks. This call does not change the date of the next check, but only the internal NSTimer.
+- (void)resetUpdateCycle;
+
+- (BOOL)updateInProgress;
+
+@end
+
+
+// -----------------------------------------------------------------------------
+// SUUpdater Delegate:
+// -----------------------------------------------------------------------------
+
+@interface NSObject (SUUpdaterDelegateInformalProtocol)
+
+// Use this to keep Sparkle from popping up e.g. while your setup assistant is showing:
+- (BOOL)updaterMayCheckForUpdates:(SUUpdater *)bundle;
+
+// This method allows you to add extra parameters to the appcast URL, potentially based on whether or not Sparkle will also be sending along the system profile. This method should return an array of dictionaries with keys: "key", "value", "displayKey", "displayValue", the latter two being specifically for display to the user.
+- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile;
+
+// Override this to dynamically specify the entire URL.
+- (NSString*)feedURLStringForUpdater:(SUUpdater*)updater;
+
+// Use this to override the default behavior for Sparkle prompting the user about automatic update checks.
+- (BOOL)updaterShouldPromptForPermissionToCheckForUpdates:(SUUpdater *)bundle;
+
+// Implement this if you want to do some special handling with the appcast once it finishes loading.
+- (void)updater:(SUUpdater *)updater didFinishLoadingAppcast:(SUAppcast *)appcast;
+
+// If you're using special logic or extensions in your appcast, implement this to use your own logic for finding
+// a valid update, if any, in the given appcast.
+- (SUAppcastItem *)bestValidUpdateInAppcast:(SUAppcast *)appcast forUpdater:(SUUpdater *)bundle;
+
+// Sent when a valid update is found by the update driver.
+- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update;
+
+// Sent when a valid update is not found.
+- (void)updaterDidNotFindUpdate:(SUUpdater *)update;
+
+// Sent immediately before installing the specified update.
+- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update;
+
+// Return YES to delay the relaunch until you do some processing; invoke the given NSInvocation to continue.
+// This is not called if the user didn't relaunch on the previous update, in that case it will immediately
+// restart.
+- (BOOL)updater:(SUUpdater *)updater shouldPostponeRelaunchForUpdate:(SUAppcastItem *)update untilInvoking:(NSInvocation *)invocation;
+
+// Some apps *can not* be relaunched in certain circumstances. They can use this method
+// to prevent a relaunch "hard":
+- (BOOL)updaterShouldRelaunchApplication:(SUUpdater *)updater;
+
+// Called immediately before relaunching.
+- (void)updaterWillRelaunchApplication:(SUUpdater *)updater;
+
+// This method allows you to provide a custom version comparator.
+// If you don't implement this method or return nil, the standard version comparator will be used.
+- (id <SUVersionComparison>)versionComparatorForUpdater:(SUUpdater *)updater;
+
+// This method allows you to provide a custom version comparator.
+// If you don't implement this method or return nil, the standard version displayer will be used.
+- (id <SUVersionDisplay>)versionDisplayerForUpdater:(SUUpdater *)updater;
+
+// Returns the path which is used to relaunch the client after the update is installed. By default, the path of the host bundle.
+- (NSString *)pathToRelaunchForUpdater:(SUUpdater *)updater;
+
+// Called before and after, respectively, an updater shows a modal alert window, to give the host
+// the opportunity to hide attached windows etc. that may get in the way:
+-(void) updaterWillShowModalAlert:(SUUpdater *)updater;
+-(void) updaterDidShowModalAlert:(SUUpdater *)updater;
+
+@end
+
+
+// -----------------------------------------------------------------------------
+// Constants:
+// -----------------------------------------------------------------------------
+
+// Define some minimum intervals to avoid DOS-like checking attacks. These are in seconds.
+#if defined(DEBUG) && DEBUG && 0
+#define SU_MIN_CHECK_INTERVAL 60
+#else
+#define SU_MIN_CHECK_INTERVAL 60*60
+#endif
+
+#if defined(DEBUG) && DEBUG && 0
+#define SU_DEFAULT_CHECK_INTERVAL 60
+#else
+#define SU_DEFAULT_CHECK_INTERVAL 60*60*24
+#endif
+
+#endif
diff --git a/OSX/Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h b/OSX/Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h
new file mode 100755
index 0000000..6c65ea4
--- /dev/null
+++ b/OSX/Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h
@@ -0,0 +1,29 @@
+//
+// SUVersionComparisonProtocol.h
+// Sparkle
+//
+// Created by Andy Matuschak on 12/21/07.
+// Copyright 2007 Andy Matuschak. All rights reserved.
+//
+
+#ifndef SUVERSIONCOMPARISONPROTOCOL_H
+#define SUVERSIONCOMPARISONPROTOCOL_H
+
+#import <Cocoa/Cocoa.h>
+
+/*!
+ @protocol
+ @abstract Implement this protocol to provide version comparison facilities for Sparkle.
+*/
+@protocol SUVersionComparison
+
+/*!
+ @method
+ @abstract An abstract method to compare two version strings.
+ @discussion Should return NSOrderedAscending if b > a, NSOrderedDescending if b < a, and NSOrderedSame if they are equivalent.
+*/
+- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB; // *** MAY BE CALLED ON NON-MAIN THREAD!
+
+@end
+
+#endif
diff --git a/OSX/Sparkle.framework/Versions/A/Headers/SUVersionDisplayProtocol.h b/OSX/Sparkle.framework/Versions/A/Headers/SUVersionDisplayProtocol.h
new file mode 100755
index 0000000..368b9c9
--- /dev/null
+++ b/OSX/Sparkle.framework/Versions/A/Headers/SUVersionDisplayProtocol.h
@@ -0,0 +1,27 @@
+//
+// SUVersionDisplayProtocol.h
+// EyeTV
+//
+// Created by Uli Kusterer on 08.12.09.
+// Copyright 2009 Elgato Systems GmbH. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+
+/*!
+ @protocol
+ @abstract Implement this protocol to apply special formatting to the two
+ version numbers.
+*/
+@protocol SUVersionDisplay
+
+/*!
+ @method
+ @abstract An abstract method to format two version strings.
+ @discussion You get both so you can display important distinguishing
+ information, but leave out unnecessary/confusing parts.
+*/
+-(void) formatVersion: (NSString**)inOutVersionA andVersion: (NSString**)inOutVersionB;
+
+@end
diff --git a/OSX/Sparkle.framework/Versions/A/Headers/Sparkle.h b/OSX/Sparkle.framework/Versions/A/Headers/Sparkle.h
new file mode 100755
index 0000000..08dd577
--- /dev/null
+++ b/OSX/Sparkle.framework/Versions/A/Headers/Sparkle.h
@@ -0,0 +1,21 @@
+//
+// Sparkle.h
+// Sparkle
+//
+// Created by Andy Matuschak on 3/16/06. (Modified by CDHW on 23/12/07)
+// Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#ifndef SPARKLE_H
+#define SPARKLE_H
+
+// This list should include the shared headers. It doesn't matter if some of them aren't shared (unless
+// there are name-space collisions) so we can list all of them to start with:
+
+#import <Sparkle/SUUpdater.h>
+
+#import <Sparkle/SUAppcast.h>
+#import <Sparkle/SUAppcastItem.h>
+#import <Sparkle/SUVersionComparisonProtocol.h>
+
+#endif