-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathEController.h
76 lines (65 loc) · 2.87 KB
/
EController.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
// EController.h
// GUI Tar Version 1.2.4
//
// Created by admin on 17 June 2003.
// Copyright (c) 2003 - 2011 Edenwaith. All rights reserved.
//
// Copyright 2003-2011 Chad Armstrong <support@edenwaith.com>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library. If not, see <http://www.gnu.org/licenses/>.
#import <Cocoa/Cocoa.h>
#import "WinController.h"
@interface EController : NSObject
{
IBOutlet NSTextField *fileField; // text field containing compressed file name
IBOutlet NSTextField *dirField; // text field containing directory name
IBOutlet NSButton *UTButton; // Extract button
IBOutlet NSProgressIndicator *extractionIndicator;
IBOutlet id extractionSheet;
IBOutlet NSButton *eCancelButton;
IBOutlet id e_window;
IBOutlet NSTextField *progress_msg; // Message displaying current file extracted
NSTask *untar; // new task to run tar
NSFileManager *fm;
NSMutableArray *file_list;
NSMutableDictionary *dict;
NSMutableString *directory;
NSPipe *ePipe;
NSFileHandle *eHandle;
int os_version; // Operating System version (i.e. 1000 = 10.0.0)
BOOL quitWhenFinished; // boolean value to indicate to close program when done
BOOL beepWhenFinished; // value to determine whether or not to beep when task is finished
BOOL tempSuspendQuit;
BOOL pauseTaskRelease;
BOOL wasCanceled;
}
// happy, fun filled prototypes -----------------------------------------------------------
// drag, drop, & launch functions
//- (void) applicationDidFinishLaunching:(NSNotification *)aNotification;
//- (BOOL) application:(NSApplication *)theApplication openFile:(NSString *)filename;
// other wonderful functions which uncompress and get files
- (NSString *) fileNameString: (NSString *) filename;
- (IBAction)getFile: (id)sender;
- (IBAction)getDir: (id)sender;
- (IBAction)extract: (id)sender;
- (IBAction) cancelExtraction: (id)sender;
- (void) unTarIt;
- (void) outputExtractorData: (NSFileHandle *) handle;
- (NSString *) fileNameWithoutExtension: (NSString *) filename;
- (void) setWorkingDirectory: (BOOL) isArchive;
- (BOOL) isArchive: (NSString *) filename;
- (void) startExtractor: (NSNotification *)aNotification;
- (void)doneTarring: (NSNotification *)aNotification;
- (void) checkOSVersion;
@end