-
Notifications
You must be signed in to change notification settings - Fork 41
/
MyAppController.h
110 lines (94 loc) · 3.61 KB
/
MyAppController.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
//Copyright (C) 2008 Antoine Mercadal
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either version 2
//of the License, or (at your option) any later version.
//
//This program 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 General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program; if not, write to the Free Software
//Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#import <Cocoa/Cocoa.h>
#import <Security/Security.h>
#import <Foundation/Foundation.h>
#import <QuartzCore/QuartzCore.h>
#import <QuartzCore/CAAnimation.h>
#import <QuartzCore/CoreImage.h>
#import "messages.h"
#import "AMSession.h"
#import "AMServer.h"
#import "AMAccountViewController.h"
#import "AMServerViewController.h"
#import "AMSessionViewController.h"
#import "AMBaseViewController.h"
#import "AMServiceViewController.h"
@interface MyAppController : AMBaseViewController {
IBOutlet NSTextField *errorMessage;
IBOutlet NSView *errorPanel;
IBOutlet NSView *serverView;
IBOutlet NSView *sessionView;
IBOutlet NSView *aboutView;
IBOutlet NSView *registerView;
IBOutlet NSView *serviceView;
IBOutlet NSMenu *taskBarMenu;
IBOutlet NSView *preferencesView;
IBOutlet AMSessionViewController *sessionController;
IBOutlet AMServerViewController *serverController;
IBOutlet AMServiceViewController *serviceController;
IBOutlet NSUserDefaultsController *preferencesController;
NSTimer *timer;
NSView *backViewReminder;
NSString *__strong hostName;
CATransition *transition;
NSDictionary *currentAnimation;
NSStatusItem *statusBarItem;
NSRect oldWindowFrame;
NSInteger preferencesViewHeight;
}
@property(readwrite, strong) NSString *hostName;
#pragma mark -
#pragma mark Interface Actions
- (IBAction) openSessionInSafari:(id)sender;
- (IBAction) toggleTunnel:(id)sender;
- (IBAction) openSession:(id)sender;
- (IBAction) closeSession:(id)sender;
- (IBAction) openAllSession:(id)sender;
- (IBAction) closeAllSession:(id)sender;
- (IBAction) killAllSSH:(id)sender;
- (IBAction) checkForNewVersion:(id)sender;
- (IBAction) resetApplicationSupportFolder:(id)sender;
- (IBAction) openMainWindow:(id)sender;
- (IBAction) closeMainWindow:(id)sender;
- (IBAction) applyCurrentServerToAllSessions:(id)sender;
#pragma mark -
#pragma mark View management
- (IBAction) displayServerView:(id)sender;
- (IBAction) displayAboutView:(id)sender;
- (IBAction) displayRegisterView:(id)sender;
- (IBAction) displaySessionView:(id)sender;
- (IBAction) displayServiceView:(id)sender;
- (IBAction) displayPreferenceView:(id)sender;
#pragma mark -
#pragma mark Helper methods
- (void) prepareApplicationSupports: (NSFileManager *) fileManager;
- (void) resetAndRestart;
- (void) executeKillAllSSH:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo;
- (void) setAnimationsTypes;
- (void) checkNewVersionOnServerFromUser:(BOOL)userRequest;
- (BOOL) stopAllOtherRunningGlobalProxy;
- (void) performAutostart;
- (void) prepareStatusBarMenu;
#pragma mark -
#pragma mark Observer and Delegates
- (void) createObservers;
#pragma mark -
#pragma mark Messaging methods
- (void) performInfoMessage:(NSNotification*)notif;
- (void) errorPanelDisplaywithMessage:(NSString *)message;
- (void) errorPanelClose:(NSTimer *)theTimer;
@end