diff options
Diffstat (limited to 'macosx/Sparkle.framework/Versions/A/Headers')
16 files changed, 544 insertions, 0 deletions
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h b/macosx/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h new file mode 100644 index 000000000..ee901e685 --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h @@ -0,0 +1,13 @@ +// +// NSApplication+AppCopies.h +// Sparkle +// +// Created by Andy Matuschak on 3/16/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + +@interface NSApplication (SUAppCopies) +- (int)copiesRunning; +@end diff --git a/macosx/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h b/macosx/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h new file mode 100644 index 000000000..c995911ca --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h @@ -0,0 +1,11 @@ +// +// NSFileManager+Authentication.m +// Sparkle +// +// Created by Andy Matuschak on 3/9/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +@interface NSFileManager (SUAuthenticationAdditions) +- (BOOL)movePathWithAuthentication:(NSString *)src toPath:(NSString *)dst; +@end diff --git a/macosx/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h b/macosx/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h new file mode 100644 index 000000000..f0ce7c20c --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h @@ -0,0 +1,15 @@ +// +// NSFileManager+Verification.h +// Sparkle +// +// Created by Andy Matuschak on 3/16/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + +// For the paranoid folks! +@interface NSFileManager (SUVerification) +- (BOOL)validatePath:(NSString *)path withMD5Hash:(NSString *)hash; +- (BOOL)validatePath:(NSString *)path withEncodedDSASignature:(NSString *)encodedSignature; +@end diff --git a/macosx/Sparkle.framework/Versions/A/Headers/NSString+extras.h b/macosx/Sparkle.framework/Versions/A/Headers/NSString+extras.h new file mode 100755 index 000000000..498e4d01c --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/NSString+extras.h @@ -0,0 +1,61 @@ +/* + +BSD License + +Copyright (c) 2002, Brent Simmons +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of ranchero.com or Brent Simmons nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +*/ + + +/* + NSString+extras.h + NetNewsWire + + Created by Brent Simmons on Fri Jun 14 2002. + Copyright (c) 2002 Brent Simmons. All rights reserved. +*/ + + +#import <Foundation/Foundation.h> +#import <CoreFoundation/CoreFoundation.h> + + +@interface NSString (extras) + +- (NSString *)stringWithSubstitute:(NSString *)subs forCharactersFromSet:(NSCharacterSet *)set; + +- (NSString *) trimWhiteSpace; + +- (NSString *) stripHTML; + +- (NSString *) ellipsizeAfterNWords: (int) n; + ++ (BOOL) stringIsEmpty: (NSString *) s; + + +@end diff --git a/macosx/Sparkle.framework/Versions/A/Headers/RSS.h b/macosx/Sparkle.framework/Versions/A/Headers/RSS.h new file mode 100755 index 000000000..82da04a44 --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/RSS.h @@ -0,0 +1,98 @@ +/* + +BSD License + +Copyright (c) 2002, Brent Simmons +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of ranchero.com or Brent Simmons nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +*/ + +/* + RSS.h + A class for reading RSS feeds. + + Created by Brent Simmons on Wed Apr 17 2002. + Copyright (c) 2002 Brent Simmons. All rights reserved. +*/ + + +#import <Cocoa/Cocoa.h> +#import <CoreFoundation/CoreFoundation.h> +#import "NSString+extras.h" + + +@interface RSS : NSObject { + + NSDictionary *headerItems; + NSMutableArray *newsItems; + NSString *version; + + BOOL flRdf; + BOOL normalize; + } + + +/*Public*/ + +- (RSS *) initWithTitle: (NSString *) title andDescription: (NSString *) description; + +- (RSS *) initWithData: (NSData *) rssData normalize: (BOOL) fl; + +- (RSS *) initWithURL: (NSURL *) url normalize: (BOOL) fl; +- (RSS *) initWithURL: (NSURL *) url normalize: (BOOL) fl userAgent:(NSString *)userAgent; + +- (NSDictionary *) headerItems; + +- (NSMutableArray *) newsItems; + +- (NSString *) version; + +// AMM's extensions for Sparkle +- (NSDictionary *)newestItem; + + +/*Private*/ + +- (void) createheaderdictionary: (CFXMLTreeRef) tree; + +- (void) createitemsarray: (CFXMLTreeRef) tree; + +- (void) setversionstring: (CFXMLTreeRef) tree; + +- (void) flattenimagechildren: (CFXMLTreeRef) tree into: (NSMutableDictionary *) dictionary; + +- (void) flattensourceattributes: (CFXMLNodeRef) node into: (NSMutableDictionary *) dictionary; + +- (CFXMLTreeRef) getchanneltree: (CFXMLTreeRef) tree; + +- (CFXMLTreeRef) getnamedtree: (CFXMLTreeRef) currentTree name: (NSString *) name; + +- (void) normalizeRSSItem: (NSMutableDictionary *) rssItem; + +- (NSString *) getelementvalue: (CFXMLTreeRef) tree; + +@end diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUAppcast.h b/macosx/Sparkle.framework/Versions/A/Headers/SUAppcast.h new file mode 100644 index 000000000..209fe2061 --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/SUAppcast.h @@ -0,0 +1,27 @@ +// +// SUAppcast.h +// Sparkle +// +// Created by Andy Matuschak on 3/12/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + +@class RSS, SUAppcastItem; +@interface SUAppcast : NSObject { + NSArray *items; + id delegate; +} + +- (void)fetchAppcastFromURL:(NSURL *)url; +- (void)setDelegate:delegate; + +- (SUAppcastItem *)newestItem; +- (NSArray *)items; + +@end + +@interface NSObject (SUAppcastDelegate) +- appcastDidFinishLoading:(SUAppcast *)appcast; +@end
\ No newline at end of file diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h b/macosx/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h new file mode 100644 index 000000000..c0202e3d9 --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h @@ -0,0 +1,57 @@ +// +// SUAppcastItem.h +// Sparkle +// +// Created by Andy Matuschak on 3/12/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + + +@interface SUAppcastItem : NSObject { + NSString *title; + NSDate *date; + NSString *description; + + NSURL *releaseNotesURL; + + NSString *DSASignature; + NSString *MD5Sum; + + NSURL *fileURL; + NSString *fileVersion; + NSString *versionString; +} + +// Initializes with data from a dictionary provided by the RSS class. +- initWithDictionary:(NSDictionary *)dict; + +- (NSString *)title; +- (void)setTitle:(NSString *)aTitle; + +- (NSDate *)date; +- (void)setDate:(NSDate *)aDate; + +- (NSString *)description; +- (void)setDescription:(NSString *)aDescription; + +- (NSURL *)releaseNotesURL; +- (void)setReleaseNotesURL:(NSURL *)aReleaseNotesURL; + +- (NSString *)DSASignature; +- (void)setDSASignature:(NSString *)aDSASignature; + +- (NSString *)MD5Sum; +- (void)setMD5Sum:(NSString *)aMd5Sum; + +- (NSURL *)fileURL; +- (void)setFileURL:(NSURL *)aFileURL; + +- (NSString *)fileVersion; +- (void)setFileVersion:(NSString *)aFileVersion; + +- (NSString *)versionString; +- (void)setVersionString:(NSString *)versionString; + +@end diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h b/macosx/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h new file mode 100644 index 000000000..fc0ac9fd0 --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h @@ -0,0 +1,21 @@ +// +// SUAutomaticUpdateAlert.h +// Sparkle +// +// Created by Andy Matuschak on 3/18/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + +@class SUAppcastItem; +@interface SUAutomaticUpdateAlert : NSWindowController { + SUAppcastItem *updateItem; +} + +- initWithAppcastItem:(SUAppcastItem *)item; + +- (IBAction)relaunchNow:sender; +- (IBAction)relaunchLater:sender; + +@end diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUConstants.h b/macosx/Sparkle.framework/Versions/A/Headers/SUConstants.h new file mode 100644 index 000000000..bfbe625bb --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/SUConstants.h @@ -0,0 +1,20 @@ +// +// SUConstants.h +// Sparkle +// +// Created by Andy Matuschak on 3/16/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +extern NSString *SUUpdaterWillRestartNotification; + +extern NSString *SUCheckAtStartupKey; +extern NSString *SUFeedURLKey; +extern NSString *SUShowReleaseNotesKey; +extern NSString *SUSkippedVersionKey; +extern NSString *SUScheduledCheckIntervalKey; +extern NSString *SULastCheckTimeKey; +extern NSString *SUExpectsDSASignatureKey; +extern NSString *SUPublicDSAKeyKey; +extern NSString *SUAutomaticallyUpdateKey; +extern NSString *SUAllowsAutomaticUpdatesKey;
\ No newline at end of file diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h b/macosx/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h new file mode 100644 index 000000000..e83d15206 --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h @@ -0,0 +1,26 @@ +// +// SUStatusChecker.h +// Sparkle +// +// Created by Evan Schoenberg on 7/6/06. +// + +#import <Cocoa/Cocoa.h> +#import <Sparkle/SUUpdater.h> + +@class SUStatusChecker; + +@protocol SUStatusCheckerDelegate <NSObject> +//versionString will be nil and isNewVersion will be NO if version checking fails. +- (void)statusChecker:(SUStatusChecker *)statusChecker foundVersion:(NSString *)versionString isNewVersion:(BOOL)isNewVersion; +@end + +@interface SUStatusChecker : SUUpdater { + id<SUStatusCheckerDelegate> scDelegate; +} + +// Create a status checker which will notifiy delegate once the appcast version is determined. +// Notification occurs via the method defined in the SUStatusCheckerDelegate informal protocol. ++ (SUStatusChecker *)statusCheckerForDelegate:(id<SUStatusCheckerDelegate>)delegate; + +@end diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUStatusController.h b/macosx/Sparkle.framework/Versions/A/Headers/SUStatusController.h new file mode 100644 index 000000000..19a3f89ec --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/SUStatusController.h @@ -0,0 +1,33 @@ +// +// SUStatusController.h +// Sparkle +// +// Created by Andy Matuschak on 3/14/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + + +@interface SUStatusController : NSWindowController { + double progressValue, maxProgressValue; + NSString *title, *statusText, *buttonTitle; + IBOutlet NSButton *actionButton; +} + +// Pass 0 for the max progress value to get an indeterminate progress bar. +// Pass nil for the status text to not show it. +- (void)beginActionWithTitle:(NSString *)title maxProgressValue:(double)maxProgressValue statusText:(NSString *)statusText; + +// If isDefault is YES, the button's key equivalent will be \r. +- (void)setButtonTitle:(NSString *)buttonTitle target:target action:(SEL)action isDefault:(BOOL)isDefault; +- (void)setButtonEnabled:(BOOL)enabled; + +- (double)progressValue; +- (void)setProgressValue:(double)value; +- (double)maxProgressValue; +- (void)setMaxProgressValue:(double)value; + +- (void)setStatusText:(NSString *)statusText; + +@end diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h b/macosx/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h new file mode 100644 index 000000000..da111c158 --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h @@ -0,0 +1,25 @@ +// +// SUUnarchiver.h +// Sparkle +// +// Created by Andy Matuschak on 3/16/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + + +@interface SUUnarchiver : NSObject { + id delegate; +} + +- (void)unarchivePath:(NSString *)path; +- (void)setDelegate:delegate; + +@end + +@interface NSObject (SUUnarchiverDelegate) +- (void)unarchiver:(SUUnarchiver *)unarchiver extractedLength:(long)length; +- (void)unarchiverDidFinish:(SUUnarchiver *)unarchiver; +- (void)unarchiverDidFail:(SUUnarchiver *)unarchiver; +@end
\ No newline at end of file diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h b/macosx/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h new file mode 100644 index 000000000..69c281749 --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h @@ -0,0 +1,40 @@ +// +// SUUpdateAlert.h +// Sparkle +// +// Created by Andy Matuschak on 3/12/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + +typedef enum +{ + SUInstallUpdateChoice, + SURemindMeLaterChoice, + SUSkipThisVersionChoice +} SUUpdateAlertChoice; + +@class WebView, SUAppcastItem; +@interface SUUpdateAlert : NSWindowController { + SUAppcastItem *updateItem; + id delegate; + + IBOutlet WebView *releaseNotesView; + IBOutlet NSTextField *description; + NSProgressIndicator *releaseNotesSpinner; + BOOL webViewFinishedLoading; +} + +- initWithAppcastItem:(SUAppcastItem *)item; +- (void)setDelegate:delegate; + +- (IBAction)installUpdate:sender; +- (IBAction)skipThisVersion:sender; +- (IBAction)remindMeLater:sender; + +@end + +@interface NSObject (SUUpdateAlertDelegate) +- (void)updateAlert:(SUUpdateAlert *)updateAlert finishedWithChoice:(SUUpdateAlertChoice)updateChoice; +@end diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUUpdater.h b/macosx/Sparkle.framework/Versions/A/Headers/SUUpdater.h new file mode 100644 index 000000000..5f82914bc --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/SUUpdater.h @@ -0,0 +1,55 @@ +// +// SUUpdater.h +// Sparkle +// +// Created by Andy Matuschak on 1/4/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + +// Before you use Sparkle in your app, you must set SUFeedURL in Info.plist to the +// address of the appcast on your webserver. If you don't already have an +// appcast, please see the Sparkle documentation to learn about how to set one up. + +// .zip, .dmg, .tar, .tbz, .tgz archives are supported at this time. + +// By default, Sparkle offers to show the user the release notes of the build they'll be +// getting, which it assumes are in the description (or body) field of the relevant RSS item. +// Set SUShowReleaseNotes to <false/> in Info.plist to hide the button. + +@class SUAppcastItem, SUUpdateAlert, SUStatusController; +@interface SUUpdater : NSObject { + SUAppcastItem *updateItem; + + SUStatusController *statusController; + SUUpdateAlert *updateAlert; + + NSURLDownload *downloader; + NSString *downloadPath; + + NSTimer *checkTimer; + NSTimeInterval checkInterval; + + BOOL verbose; + BOOL updateInProgress; +} + +// 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:sender; + +// This method is similar to the above, but it's intended for updates initiated by +// the computer instead of by the user. It does not alert the user when he is up to date, +// and it remains silent about network errors in fetching the feed. This is what you +// want to call to update programmatically; only use checkForUpdates: with buttons and menu items. +- (void)checkForUpdatesInBackground; + +// This method allows you to schedule a check to run every time interval. You can +// pass 0 to this method to cancel a previously scheduled timer. You probably don't want +// to call this directly: if you set a SUScheduledCheckInterval key in Info.plist or +// the user defaults, Sparkle will set this up for you automatically on startup. You might +// just want to call this every time the user changes the setting in the preferences. +- (void)scheduleCheckWithInterval:(NSTimeInterval)interval; + +@end
\ No newline at end of file diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUUtilities.h b/macosx/Sparkle.framework/Versions/A/Headers/SUUtilities.h new file mode 100644 index 000000000..5af355083 --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/SUUtilities.h @@ -0,0 +1,20 @@ +// +// SUUtilities.h +// Sparkle +// +// Created by Andy Matuschak on 3/12/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + +id SUInfoValueForKey(NSString *key); +NSString *SUHostAppName(); +NSString *SUHostAppDisplayName(); +NSString *SUHostAppVersion(); +NSString *SUHostAppVersionString(); + +NSComparisonResult SUStandardVersionComparison(NSString * versionA, NSString * versionB); + +// If running make localizable-strings for genstrings, ignore the error on this line. +NSString *SULocalizedString(NSString *key, NSString *comment); diff --git a/macosx/Sparkle.framework/Versions/A/Headers/Sparkle.h b/macosx/Sparkle.framework/Versions/A/Headers/Sparkle.h new file mode 100644 index 000000000..13e9b2156 --- /dev/null +++ b/macosx/Sparkle.framework/Versions/A/Headers/Sparkle.h @@ -0,0 +1,22 @@ +// +// Sparkle.h +// Sparkle +// +// Created by Andy Matuschak on 3/16/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import "SUUpdater.h" +#import "SUUtilities.h" +#import "SUConstants.h" +#import "SUAppcast.h" +#import "SUAppcastItem.h" +#import "SUUpdateAlert.h" +#import "SUAutomaticUpdateAlert.h" +#import "SUStatusController.h" +#import "SUUnarchiver.h" +#import "SUStatusChecker.h" + +#import "NSApplication+AppCopies.h" +#import "NSFileManager+Authentication.h" +#import "NSFileManager+Verification.h"
\ No newline at end of file |