forked from bububa/MongoHub-Mac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tunnel.h
76 lines (63 loc) · 1.56 KB
/
Tunnel.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
//
// Tunnel.h
// MongoHub
//
// Created by Syd on 10-12-15.
// Copyright 2010 ThePeppersStudio.COM. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface Tunnel : NSObject <NSCoding> {
id delegate;
NSLock* lock;
NSTask* task;
NSPipe* pipe;
NSString* pipeData;
NSDate* startDate;
NSString* retStatus;
BOOL isRunning;
NSString* uid;
NSString* name;
NSString* host;
int port;
NSString* user;
NSString* password;
int aliveInterval;
int aliveCountMax;
BOOL tcpKeepAlive;
BOOL compression;
NSString* additionalArgs;
NSMutableArray* portForwardings;
}
@property(retain) NSString* uid;
@property(retain) NSString* name;
@property(retain) NSString* host;
@property(assign) int port;
@property(retain) NSString* user;
@property(retain) NSString* password;
@property(assign) int aliveInterval;
@property(assign) int aliveCountMax;
@property(assign) BOOL tcpKeepAlive;
@property(assign) BOOL compression;
@property(retain) NSString* additionalArgs;
@property(retain) NSMutableArray* portForwardings;
- (void)setDelegate:(id)val;
- (id)delegate;
-(BOOL) running;
-(BOOL) checkProcess;
-(void) start;
-(void) stop;
-(void) readStatus;
-(NSArray*) prepareSSHCommandArgs;
-(void) tunnelLoaded;
-(void) tunnelSaved;
-(void) tunnelRemoved;
-(BOOL) keychainItemExists;
-(BOOL) keychainAddItem;
-(BOOL) keychainModifyItem;
-(BOOL) keychainDeleteItem;
-(NSString*) keychainGetPassword;
-(NSString*) keychainGetPasswordFromItemRef: (SecKeychainItemRef)item;
@end
@interface NSObject (Tunnel)
- (void) tunnelStatusChanged: (Tunnel*) tunnel status: (NSString*) status;
@end