Skip to content
This repository
tag: 2.3.0
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 76 lines (63 sloc) 1.596 kb
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
Something went wrong with that request. Please try again.