forked from textmate/dialog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCLIProxy.h
54 lines (41 loc) · 1.18 KB
/
CLIProxy.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
//
// CLIProxy.h
// Dialog2
//
// Created by Ciaran Walsh on 16/02/2008.
//
#import <Cocoa/Cocoa.h>
#import "OptionParser.h"
@interface CLIProxy : NSObject
{
NSDictionary* environment;
NSString* workingDirectory;
NSFileHandle* inputHandle;
NSFileHandle* outputHandle;
NSFileHandle* errorHandle;
option_t const* optionTemplate;
size_t optionCount;
NSArray* arguments;
NSDictionary* parsedOptions;
NSDictionary* parameters;
}
+ (id)proxyWithOptions:(NSDictionary*)options;
- (id)initWithOptions:(NSDictionary*)options;
- (void)writeStringToOutput:(NSString*)text;
- (void)writeStringToError:(NSString*)text;
- (id)readPropertyListFromInput;
- (NSDictionary*)parameters;
- (NSFileHandle*)inputHandle;
- (NSFileHandle*)outputHandle;
- (NSFileHandle*)errorHandle;
- (NSDictionary*)environment;
- (NSString*)workingDirectory;
- (NSString*)argumentAtIndex:(int)index;
- (int)numberOfArguments;
- (id)valueForOption:(NSString*)option;
- (void)setOptionTemplate:(option_t const*)options count:(size_t)count;
@end
template <size_t optionCount> void SetOptionTemplate(CLIProxy* proxy, option_t const (&options)[optionCount])
{
[proxy setOptionTemplate:options count:optionCount];
}