Files
textmate/Frameworks/SoftwareUpdate/src/DownloadWindowController.h
Allan Odgaard 9894969e67 Initial commit
2012-08-09 16:25:56 +02:00

46 lines
1.5 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#import <network/key_chain.h>
struct shared_state_t
{
double progress = 0;
bool stop = false;
};
typedef std::tr1::shared_ptr<shared_state_t> shared_state_ptr;
@interface DownloadWindowController : NSWindowController
{
NSString* activityText;
CGFloat progress;
CGFloat secondsLeft;
NSString* statusText;
BOOL isDownloading;
BOOL canInstall;
BOOL isInstalling;
BOOL showUpdateBadge;
NSTimer* progressTimer;
NSDate* downloadStartDate;
NSString* versionOfDownload;
NSString* url;
key_chain_t keyChain;
NSString* archive;
shared_state_ptr sharedState;
}
@property (nonatomic, retain) NSString* versionOfDownload; // API
@property (nonatomic, readonly) BOOL isVisible; // API
@property (nonatomic, retain) NSString* activityText; // Text binding: “Downlading TextMate_r1589.tbz…”
@property (nonatomic, retain) NSString* statusText; // Text binding: “Less than one minute”
@property (nonatomic, readonly) BOOL isWorking; // Progress bar binding (animate)
@property (nonatomic, assign) CGFloat progress; // Progress bar binding (value)
@property (nonatomic, assign) BOOL canInstall; // Install Button binding
@property (nonatomic, assign) BOOL isInstalling; // Install/Cancel Button bindings + Progress bar (is indeterminate)
- (id)initWithURL:(NSString*)aURL displayString:(NSString*)aDisplayString keyChain:(key_chain_t const&)aKeyChain;
- (IBAction)install:(id)sender;
- (IBAction)cancel:(id)sender;
@end