...
 
Commits (3)
Binary files a/OSX/English.lproj/InfoPlist.strings and /dev/null differ
This diff is collapsed.
This diff is collapsed.
/* xscreensaver, Copyright (c) 2006-2013 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation. No representations are made about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* This is a subclass of NSSlider that is flipped horizontally:
* the high value is on the left and the low value is on the right.
*/
#ifdef USE_IPHONE
# import <UIKit/UIKit.h>
# define NSSlider UISlider
# define NSRect CGRect
# define minValue minimumValue
# define maxValue maximumValue
#else
# import <Cocoa/Cocoa.h>
#endif
@interface InvertedSlider : NSSlider
{
BOOL inverted;
BOOL integers;
}
- (id) initWithFrame:(NSRect)r inverted:(BOOL)_inv integers:(BOOL)_int;
# ifdef USE_IPHONE
- (double) transformedValue;
- (void) setTransformedValue:(double)v;
# endif
@end
/* xscreensaver, Copyright (c) 2006-2015 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation. No representations are made about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* This is a subclass of NSSlider that is flipped horizontally:
* the high value is on the left and the low value is on the right.
*/
#import "InvertedSlider.h"
@implementation InvertedSlider
- (id) initWithFrame:(NSRect)r
{
self = [super initWithFrame:r];
if (! self) return 0;
inverted = YES;
integers = NO;
return self;
}
- (id) initWithFrame:(NSRect)r inverted:(BOOL)_inv integers:(BOOL)_int
{
self = [self initWithFrame:r];
inverted = _inv;
integers = _int;
return self;
}
-(double) transformValue:(double) value
{
double v2 = (integers
? (int) (value + (value < 0 ? -0.5 : 0.5))
: value);
double low = [self minValue];
double high = [self maxValue];
double range = high - low;
double off = v2 - low;
if (inverted)
v2 = low + (range - off);
// NSLog (@" ... %.1f -> %.1f [%.1f - %.1f]", value, v2, low, high);
return v2;
}
#ifndef USE_IPHONE
/* On MacOS, we have to transform the value on every entry and exit point
to this class. So, we implement doubleValue and setDoubleValue to
transform the value; and we then have to re-implement every getter and
setter in terms of those. There's no way to simply change how the
slider is displayed without mucking with the value inside of it.
*/
-(double) doubleValue
{
return [self transformValue:[super doubleValue]];
}
-(void) setDoubleValue:(double)v
{
return [super setDoubleValue:[self transformValue:v]];
}
-(float)floatValue { return (float) [self doubleValue]; }
-(int)intValue { return (int) [self doubleValue]; }
-(NSInteger)integerValue { return (NSInteger) [self doubleValue]; }
-(id)objectValue { return [NSNumber numberWithDouble:[self doubleValue]]; }
-(NSString *)stringValue
{
if (integers)
return [NSString stringWithFormat:@"%d", [self intValue]];
else
return [NSString stringWithFormat:@"%f", [self doubleValue]];
}
- (NSAttributedString *)attributedStringValue;
{
return [[[NSAttributedString alloc] initWithString:[self stringValue]]
autorelease];
}
-(void)setFloatValue:(float)v { [self setDoubleValue: (double) v]; }
-(void)setIntValue: (int)v { [self setDoubleValue: (double) v]; }
-(void)setIntegerValue:(NSInteger)v { [self setDoubleValue: (double) v]; }
-(void)setStringValue:(NSString *)v { [self setDoubleValue: [v doubleValue]]; }
-(void)takeIntValueFrom:(id)f { [self setIntValue: [f intValue]]; }
-(void)takeFloatValueFrom:(id)f { [self setFloatValue: [f floatValue]]; }
-(void)takeDoubleValueFrom:(id)f { [self setDoubleValue: [f doubleValue]]; }
-(void)takeStringValueFrom:(id)f { [self setStringValue: [f stringValue]]; }
-(void)takeObjectValueFrom:(id)f { [self setObjectValue: [f objectValue]]; }
-(void)takeIntegerValueFrom:(id)f { [self setIntegerValue:[f integerValue]];}
-(void) setAttributedStringValue:(NSAttributedString *)v {
[self setStringValue:[v string]];
}
-(void) setObjectValue:(id <NSCopying>)v
{
NSAssert2((v == nil) ||
[(NSObject *) v respondsToSelector:@selector(doubleValue)],
@"argument %@ to %s does not respond to doubleValue",
v, __PRETTY_FUNCTION__);
[self setDoubleValue:[((NSNumber *) v) doubleValue]];
}
#else // USE_IPHONE
/* On iOS, we have control over how the value is displayed, but there's no
way to transform the value on input and output: if we wrap 'value' and
'setValue' analagously to what we do on MacOS, things fail in weird
ways. Presumably some parts of the system are accessing the value
instance variable directly instead of going through the methods.
So the only way around this is to enforce that all of our calls into
this object use a new API: 'transformedValue' and 'setTransformedValue'.
The code in XScreenSaverConfigSheet uses that instead.
*/
- (CGRect)thumbRectForBounds:(CGRect)bounds
trackRect:(CGRect)rect
value:(float)value
{
CGRect thumb = [super thumbRectForBounds: bounds
trackRect: rect
value: [self transformValue:value]];
if (inverted)
thumb.origin.x = rect.size.width - thumb.origin.x - thumb.size.width;
return thumb;
}
-(double) transformedValue
{
return [self transformValue: [self value]];
}
-(void) setTransformedValue:(double)v
{
[self setValue: [self transformValue: v]];
}
#endif // USE_IPHONE
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="404" y="445"/>
</view>
</objects>
</document>
This diff is collapsed.
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "iSaverRunner29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "iSaverRunner58.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "iSaverRunner87.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "iSaverRunner80.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "iSaverRunner120.png",
"scale" : "3x"
},
{
"size" : "57x57",
"idiom" : "iphone",
"filename" : "iSaverRunner57.png",
"scale" : "1x"
},
{
"size" : "57x57",
"idiom" : "iphone",
"filename" : "iSaverRunner114.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "iSaverRunner120.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "iSaverRunner180.png",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "iSaverRunner29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "iSaverRunner58.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "iSaverRunner40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "iSaverRunner80.png",
"scale" : "2x"
},
{
"size" : "50x50",
"idiom" : "ipad",
"filename" : "iSaverRunner50.png",
"scale" : "1x"
},
{
"size" : "50x50",
"idiom" : "ipad",
"filename" : "iSaverRunner100.png",
"scale" : "2x"
},
{
"size" : "72x72",
"idiom" : "ipad",
"filename" : "iSaverRunner72.png",
"scale" : "1x"
},
{
"size" : "72x72",
"idiom" : "ipad",
"filename" : "iSaverRunner144.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "iSaverRunner76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "iSaverRunner152.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "iSaverRunner167.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "iSaverRunner1024.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "736h",
"filename" : "1242x2208.png",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "667h",
"filename" : "750x1334.png",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "640x960.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "retina4",
"filename" : "640x1136.png",
"minimum-system-version" : "7.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "640x1136.png",
"extent" : "full-screen",
"subtype" : "retina4",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
/* xscreensaver, Copyright (c) 2006-2013 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation. No representations are made about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*/
/* This implements the substrate of the xscreensaver preferences code:
It does this by writing defaults to, and reading values from, the
NSUserDefaultsController (and ScreenSaverDefaults/NSUserDefaults)
and thereby reading the preferences that may have been edited by
the UI (XScreenSaverConfigSheet).
*/
#ifdef USE_IPHONE
# import <Foundation/Foundation.h>
# import <UIKit/UIKit.h>
# define NSUserDefaultsController NSUserDefaults
#else
# import <Cocoa/Cocoa.h>
#endif
#import "jwxyz.h"
@interface PrefsReader : NSObject
{
NSString *saver_name;
NSUserDefaults *userDefaults; // this is actually a 'ScreenSaverDefaults'
NSUserDefaultsController *userDefaultsController;
NSUserDefaults *globalDefaults; // for prefs shared by all xscreensavers.
NSUserDefaultsController *globalDefaultsController;
NSDictionary *defaultOptions; // Hardcoded defaults before any changes.
}
- (id) initWithName: (NSString *) name
xrmKeys: (const XrmOptionDescRec *) opts
defaults: (const char * const *) defs;
- (NSUserDefaultsController *) userDefaultsController;
- (NSUserDefaultsController *) globalDefaultsController;
- (NSDictionary *) defaultOptions;
- (char *) getStringResource: (const char *) name;
- (double) getFloatResource: (const char *) name;
- (int) getIntegerResource: (const char *) name;
- (BOOL) getBooleanResource: (const char *) name;
@end
This diff is collapsed.
This directory contains the MacOS-specific code for building a Cocoa
version of xscreensaver without using X11.
To build it, just type "make", or use the included XCode project. The
executables will show up in the "build/Release/" and/or "build/Debug/"
directories.
If you build using anything later than Xcode 5.0.2, the resultant savers
will require MacOS 10.7 or later. To support 10.4 through 10.6, you must
use Xcode 5.0.2 or earlier.
This is how you add a new screen saver to the Xcode project. It's a
ridiculously long list of steps!
1: Duplicate a target (Dangerball for GL, or Attraction for X11).
2: Rename it, and drag it to the right spot in the list.
3: Delete the dangerball.c and dangerball.xml files from Build Phases.
4: Delete the "DangerBall copy-Info.plist" file that got created.
5: Delete the "DangerBall copy-Info.plist" from the Build Settings too.
6: Manage Schemes, rename "DangerBall Copy".
7: Move to the right place in the list.
8. Scheme / Profile / Info: Executable: SaverTester.app.
Scheme / Run / Info: Executable: SaverTester.app.
9: Scheme / Run / Arguments: set SELECTED_SAVER environment variable.
10: File / Add Files / the new .c and .xml.
11: Re-order them in the file list. This will bring up an Options dialog.
Add To Targets: the new target, and "XScreenSaver-iOS".
12: The files might not have moved. This means Xcode is gonna crash soon.
It will repair itself after.
13: In target "All Savers (OpenGL)" add the new target as Build Phases /
Target Dependency.
14: In target "XScreenSaver-iOS", reorder new files in Build Phases /
"Copy" and "Compile", since they showed up in a random place.
15: In target "XScreenSaver-iOS", add "-DUSE_GL" to the new file's options.
16: Put a 200x150 screen shot in ~/www/xscreensaver/screenshots/
17: ln -s ../../src/xscreensaver/OSX/build/Debug/NEW.saver \
~/Library/Screen\ Savers/
18: git add xscreensaver.xcodeproj/xcuserdata/*/xcschemes/*.xcscheme
19: Don't forget to create a man page from the XML with xml2man.pl,
and update Makefile.in.
20: Make a video: -record-animation 3600 -geom 1920x1080+128+64
./upload-video.pl NAME
/* xscreensaver, Copyright (c) 2012-2014 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation. No representations are made about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* This implements the top-level screen-saver selection list in the iOS app.
*/
#ifdef USE_IPHONE
#import <UIKit/UIKit.h>
@interface SaverListController : UITableViewController <UISearchBarDelegate> {
int active_section_count;
NSMutableArray *list_by_letter[26]; // 27 to get "#" after "Z".
NSMutableArray *letter_sections;
NSMutableArray *section_titles;
NSArray *names;
NSDictionary *descriptions;
int tap_count;
NSTimer *tap_timer;
NSIndexPath *last_tap;
}
- (id)initWithNames:(NSArray *)names descriptions:(NSDictionary *)descs;
- (void) scrollTo:(NSString *)name;
@end
#endif // USE_IPHONE
This diff is collapsed.
/* xscreensaver, Copyright (c) 2006-2016 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation. No representations are made about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*/
#ifdef USE_IPHONE
# import <Foundation/Foundation.h>
# import <UIKit/UIKit.h>
# import <OpenGLES/EAGL.h>
# import <OpenGLES/ES1/gl.h>
# import <OpenGLES/ES1/glext.h>
# import <QuartzCore/QuartzCore.h>
# define NSView UIView
# define NSRect CGRect
# define NSSize CGSize
# define NSColor UIColor
# define NSImage UIImage
# define NSEvent UIEvent
# define NSWindow UIWindow
# define NSButton UIButton
# define NSApplication UIApplication
# define NSScreen UIScreen
#else
# import <Cocoa/Cocoa.h>
# import <ScreenSaver/ScreenSaver.h>
#endif
#import "XScreenSaverView.h"
#ifdef USE_IPHONE
@class SaverRunner;
@interface SaverViewController : UIViewController
{
SaverRunner *_parent;
NSString *_saverName;
XScreenSaverView *_saverView;
/* When a the SaverViewController is presented, iOS automatically changes
the status bar orientation. (And, by extension, the notification center
orientation.) But there's no willPresentAsModal: event for a
UIViewController so that it knows when this is going to happen, and the
other event handlers occur after the status bar is changed. So save the
orientation just before the view controller is modal-presented, and
restore the proper status bar orientation just before the saverView is
created so it can pick it up in didRotate:. */
// UIInterfaceOrientation _storedOrientation;
BOOL _showAboutBox;
UIView *aboutBox;
NSTimer *splashTimer;
}
@property(nonatomic, retain) NSString *saverName;
@end
#endif
@interface SaverRunner : NSObject
# ifdef USE_IPHONE
<XScreenSaverViewDelegate>
# else
<NSWindowDelegate>
# endif
{
NSString *saverName; // the one currently loaded
NSArray *saverNames; // Names of available savers
NSString *saverDir; // Where we find saver bundles
# ifndef USE_IPHONE
NSBundle *saverBundle;
NSArray *windows;
IBOutlet NSMenu *menubar;
NSTimer *anim_timer;
# else // USE_IPHONE
UINavigationController *rotating_nav; // Hierarchy 1 (UI)
IBOutlet UIWindow *window;
IBOutlet UIView *view;
SaverViewController *nonrotating_controller; // Hierarchy 2 (savers)
UIImage *saved_screenshot;
# endif // USE_IPHONE
}
- (XScreenSaverView *) newSaverView: (NSString *) module
withSize: (NSSize) size;
- (void) loadSaver: (NSString *)name;
- (void) selectedSaverDidChange:(NSDictionary *)change;
#ifndef USE_IPHONE
- (void) openPreferences: (id)sender;
#else // USE_IPHONE
- (UIImage *) screenshot;
- (NSString *) makeDesc:(NSString *)saver
yearOnly:(BOOL) yearp;
#endif // USE_IPHONE
@end
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>5.42</string>
<key>CFBundleIconFile</key>
<string>SaverRunner</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>5.42</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>5.42</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>5.42</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
<string>5.42</string>
<key>NSMainNibFile</key>
<string>SaverRunner</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
Versions/Current/Headers
\ No newline at end of file
Versions/Current/Modules
\ No newline at end of file
Versions/Current/PrivateHeaders
\ No newline at end of file
Versions/Current/Resources
\ No newline at end of file
Versions/Current/Sparkle
\ No newline at end of file
//
// SPUDownloadData.h
// Sparkle
//
// Created by Mayur Pawashe on 8/10/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SUExport.h"
NS_ASSUME_NONNULL_BEGIN
/*!
* A class for containing downloaded data along with some information about it.
*/
SU_EXPORT @interface SPUDownloadData : NSObject <NSSecureCoding>
- (instancetype)initWithData:(NSData *)data textEncodingName:(NSString * _Nullable)textEncodingName MIMEType:(NSString * _Nullable)MIMEType;
/*!
* The raw data that was downloaded.
*/
@property (nonatomic, readonly) NSData *data;
/*!
* The IANA charset encoding name if available. Eg: "utf-8"
*/
@property (nonatomic, readonly, nullable, copy) NSString *textEncodingName;
/*!
* The MIME type if available. Eg: "text/plain"
*/
@property (nonatomic, readonly, nullable, copy) NSString *MIMEType;
@end
NS_ASSUME_NONNULL_END
//
// SPUDownloader.h
// Downloader
//
// Created by Mayur Pawashe on 4/1/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SPUDownloaderProtocol.h"
@protocol SPUDownloaderDelegate;
// This object implements the protocol which we have defined. It provides the actual behavior for the service. It is 'exported' by the service to make it available to the process hosting the service over an NSXPCConnection.
@interface SPUDownloader : NSObject <SPUDownloaderProtocol>
// Due to XPC remote object reasons, this delegate is strongly referenced
// Invoke cleanup when done with this instance
- (instancetype)initWithDelegate:(id <SPUDownloaderDelegate>)delegate;
@end
//
// SPUDownloaderDelegate.h
// Sparkle
//
// Created by Mayur Pawashe on 4/1/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
NS_ASSUME_NONNULL_BEGIN
@class SPUDownloadData;
@protocol SPUDownloaderDelegate <NSObject>
// This is only invoked for persistent downloads
- (void)downloaderDidSetDestinationName:(NSString *)destinationName temporaryDirectory:(NSString *)temporaryDirectory;
// Under rare cases, this may be called more than once, in which case the current progress should be reset back to 0
// This is only invoked for persistent downloads
- (void)downloaderDidReceiveExpectedContentLength:(int64_t)expectedContentLength;
// This is only invoked for persistent downloads
- (void)downloaderDidReceiveDataOfLength:(uint64_t)length;
// downloadData is nil if this is a persisent download, otherwise it's non-nil if it's a temporary download
- (void)downloaderDidFinishWithTemporaryDownloadData:(SPUDownloadData * _Nullable)downloadData;
- (void)downloaderDidFailWithError:(NSError *)error;
@end
NS_ASSUME_NONNULL_END
//
// SPUDownloaderDeprecated.h
// Sparkle
//
// Created by Deadpikle on 12/20/17.
// Copyright © 2017 Sparkle Project. All rights reserved.
//
#import "SPUDownloader.h"
@interface SPUDownloaderDeprecated : SPUDownloader <SPUDownloaderProtocol>
@end
//
// SPUDownloaderProtocol.h
// PersistentDownloader
//
// Created by Mayur Pawashe on 4/1/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
NS_ASSUME_NONNULL_BEGIN
@class SPUURLRequest;
// The protocol that this service will vend as its API. This header file will also need to be visible to the process hosting the service.
@protocol SPUDownloaderProtocol
- (void)startPersistentDownloadWithRequest:(SPUURLRequest *)request bundleIdentifier:(NSString *)bundleIdentifier desiredFilename:(NSString *)desiredFilename;
- (void)startTemporaryDownloadWithRequest:(SPUURLRequest *)request;
- (void)downloadDidFinish;
- (void)cleanup;
- (void)cancel;
@end
NS_ASSUME_NONNULL_END
//
// SPUDownloaderSession.h
// Sparkle
//
// Created by Deadpikle on 12/20/17.
// Copyright © 2017 Sparkle Project. All rights reserved.
//
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SPUDownloader.h"
#import "SPUDownloaderProtocol.h"
NS_CLASS_AVAILABLE(NSURLSESSION_AVAILABLE, 7_0)
@interface SPUDownloaderSession : SPUDownloader <SPUDownloaderProtocol>
@end
//
// SPUURLRequest.h
// Sparkle
//
// Created by Mayur Pawashe on 5/19/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
NS_ASSUME_NONNULL_BEGIN
// A class that wraps NSURLRequest and implements NSSecureCoding
// This class exists because NSURLRequest did not support NSSecureCoding in macOS 10.8
// I have not verified if NSURLRequest in 10.9 implements NSSecureCoding or not
@interface SPUURLRequest : NSObject <NSSecureCoding>
// Creates a new URL request
// Only these properties are currently tracked:
// * URL
// * Cache policy
// * Timeout interval
// * HTTP header fields
// * networkServiceType
+ (instancetype)URLRequestWithRequest:(NSURLRequest *)request;
@property (nonatomic, readonly) NSURLRequest *request;
@end
NS_ASSUME_NONNULL_END
//
// SUAppcast.h
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUAPPCAST_H
#define SUAPPCAST_H
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SUExport.h"
NS_ASSUME_NONNULL_BEGIN
@class SUAppcastItem;
SU_EXPORT @interface SUAppcast : NSObject
@property (copy, nullable) NSString *userAgentString;
@property (copy, nullable) NSDictionary<NSString *, NSString *> *httpHeaders;
- (void)fetchAppcastFromURL:(NSURL *)url inBackground:(BOOL)bg completionBlock:(void (^)(NSError *_Nullable))err;
- (SUAppcast *)copyWithoutDeltaUpdates;
@property (readonly, copy, nullable) NSArray *items;
@end
NS_ASSUME_NONNULL_END
#endif
//
// SUAppcastItem.h
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUAPPCASTITEM_H
#define SUAPPCASTITEM_H
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SUExport.h"
@class SUSignatures;
SU_EXPORT @interface SUAppcastItem : NSObject