-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathtetherKitAppDelegate.h
162 lines (149 loc) · 4.97 KB
/
tetherKitAppDelegate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
//
// tetherKitAppDelegate.h
// Seas0nPass
//
// Created by Kevin Bradley on 12/27/10.
// Copyright 2011 Fire Core, LLC. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "ripURL.h"
#import "FWBundle.h"
#import <Carbon/Carbon.h>
#import "SPButton.h"
#import "SPMenuItem.h"
#import "nitoUtility.h"
#import "TSSWorker.h"
#import "IPSWRestore.h"
#import "IPSW.h"
#import "libusbkit.h"
enum {
kSPATVRestoreImage,
kSPATVTetheredImage,
kSPATVTetheredRemoteImage,
kSPSuccessImage,
kSPIPSWImage,
kSPATVUntetheredImage,
};
enum {
kSPStandardMode,
kSPCydiaSigningMode,
kSPStitchSigningMode,
};
@interface tetherKitAppDelegate : NSObject <ripURLDelegate> {
NSWindow *window;
IBOutlet NSProgressIndicator *downloadBar;
IBOutlet NSTextField *downloadProgressField;
IBOutlet NSTextField *instructionField;
IBOutlet NSImageView *instructionImage;
IBOutlet NSButton *buttonOne;
IBOutlet NSButton *cancelButton;
IBOutlet SPButton *bootButton;
IBOutlet NSWindow *otherWindow;
NSMutableArray *downloadFiles;
int downloadIndex;
BOOL processing;
BOOL enableScripting;
IBOutlet NSView *firstView;
IBOutlet NSView *secondView;
ripURL *downloadFile;
BOOL poisoning;
FWBundle *currentBundle;
IBOutlet NSArrayController *bundleController;
IBOutlet NSTextField *commandTextField;
IBOutlet NSTextField *countdownField;
int counter;
IBOutlet NSTextField *tetherLabel;
NSString *theEcid;
NSString *deviceClass;
int runMode;
int _restoreMode;
int _downloadRetries;
TSSDeviceID currentDevice;
BOOL itunesFullScreen;
BOOL itunesShowingSideBar;
BOOL restoreStatus;
IPSWRestore *restoreInstance;
UKDevice *Device;
NSString *currentIPSWPath;
}
@property (nonatomic, retain) NSString *theEcid;
@property (nonatomic, retain) NSString *deviceClass;
@property (assign) IBOutlet NSTextField *commandTextField;
@property (assign) IBOutlet NSTextField *countdownField;
@property (assign) IBOutlet NSTextField *tetherLabel;
@property (assign) IBOutlet NSArrayController *bundleController;
@property (assign) FWBundle *currentBundle;
@property (assign) IBOutlet NSWindow *window;
@property (assign) IBOutlet NSWindow *otherWindow;
@property (assign) IBOutlet NSView *firstView;
@property (assign) IBOutlet NSView *secondView;
@property (readwrite, assign) int runMode;
@property (readwrite, assign) BOOL processing;
@property (readwrite, assign) BOOL poisoning;
@property (readwrite, assign) BOOL enableScripting;
@property (readwrite, assign) int downloadIndex;
@property (readwrite, assign) int counter;
@property (readwrite, assign) BOOL restoreStatus;
@property (nonatomic, strong) NSString *currentIPSWPath;
- (IBAction)exitRecoveryMode:(id)sender;
- (void)shatterFinished:(int)mode;
- (void)updateStatus:(int)status;
- (void)dataReadyFormat:(NSFileHandle *)theFile;
- (void)customFW:(NSDictionary *)theDict; //called inside process one
- (void)_fetchDeviceInfo;
- (IBAction)ifaithPayloadDump:(id)sender;
- (void)failedWithReason:(NSString *)theReason;
- (void)showIncompatDeviceAlert;
- (BOOL)isAppleTV3;
- (void)showInitialView;
- (void)showProgressViewWithText:(NSString *)theString;
+ (NSArray *)filteredBundleNames;
- (void)downloadBundle:(NSString *)theFile;
- (BOOL)isFullScreen:(NSSize)theSize;
//- (void)updateManifestFile:(NSString *)manifest;
+ (NSString *)bundleNameFromLabel:(NSString *)theBundle;
+ (NSString *)formattedStringFromBundle:(NSString *)theBundle;
- (NSData *)hexFileSize:(NSString *)inputFile;
//- (BOOL)signFile:(NSString *)inputFile withBlob:(NSData *)blobData;
- (void)fetchBlobs:(NSString *)myEcid;
- (int)showDeviceAlert;
- (int)showDeviceFailedAlert;
- (void)showDeviceIneligibleAlert;
- (void)downloadTheFiles;
- (int)performFirmwarePatches:(FWBundle *)theBundle withUtility:(nitoUtility *)nitoUtil;
- (NSString *)buildVersion;
- (IBAction)showHelpLog:(id)sender;
- (IBAction)versionChanged:(id)sender;
- (IBAction)poison:(id)sender;
//- (IBAction)startCountdown:(id)sender;
//- (void)firstTimer:(NSTimer *)timer;
- (BOOL) optionKeyIsDown;
+ (NSString *)applicationSupportFolder;
+ (NSString *)wifiFile;
- (IBAction)fixScript:(id)sender;
- (void)killiTunes;
- (void)checkScripting;
- (BOOL)scriptingEnabled;
- (BOOL)loadItunesWithIPSW:(NSString *)ipsw;
- (BOOL)pwnHelperCheckOwner;
- (void)setDownloadProgress:(double)theProgress;
- (void)setDownloadText:(NSString *)downloadString;
- (IBAction)processOne:(id)sender;
- (IBAction)cancel:(id)sender;
- (IBAction)userGuides:(id)sender;
+ (NSString *)downloadLocation;
- (int)tetheredBoot;
- (IBAction)bootTethered:(id)sender;
- (IBAction)dfuMode:(id)sender;
- (BOOL)loadItunesWithIPSW:(NSString *)ipswString;
- (BOOL)loadiTunes11WithIPSW:(NSString *)ipsw;
- (BOOL)iTunesIsElevenPlus;
- (IBAction)itunesRestore:(id)sender;
- (void)setInstructionText:(NSString *)instructions;
- (NSImage *)imageForMode:(int)inputMode;
- (NSString *)ipswOutputPath;
- (void)createSupportBundleWithCache:(NSString *)theCache iBSS:(NSString *)iBSS iBEC:(NSString *)iBEC;
- (int)performSupportBundlePatches:(FWBundle *)theBundle;
- (BOOL)homeWritable;
+ (NSArray *)appSupportBundles;
@end