mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 05:13:58 -07:00
Pass authtoken in from user, and add a wrapper for web UI on Mac.
This commit is contained in:
parent
e58047eaa0
commit
5b54612d91
68 changed files with 7537 additions and 1 deletions
53
ext/mac-ui-macgap1-wrapper/MacGap/Classes/Commands/Path.m
Normal file
53
ext/mac-ui-macgap1-wrapper/MacGap/Classes/Commands/Path.m
Normal file
|
@ -0,0 +1,53 @@
|
|||
#import "Path.h"
|
||||
|
||||
@implementation Path
|
||||
|
||||
@synthesize application;
|
||||
@synthesize resource;
|
||||
@synthesize documents;
|
||||
@synthesize library;
|
||||
@synthesize home;
|
||||
@synthesize temp;
|
||||
|
||||
- (NSString *)application {
|
||||
return [[NSBundle mainBundle] bundlePath];
|
||||
}
|
||||
|
||||
- (NSString *)resource {
|
||||
return [[NSBundle mainBundle] resourcePath];
|
||||
}
|
||||
|
||||
- (NSString *)documents {
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||
return [paths objectAtIndex:0];
|
||||
}
|
||||
|
||||
- (NSString *)library {
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
|
||||
NSLog( @"%@", paths );
|
||||
return [paths objectAtIndex:0];
|
||||
}
|
||||
|
||||
- (NSString *)home {
|
||||
return NSHomeDirectory();
|
||||
}
|
||||
|
||||
- (NSString *)temp {
|
||||
return NSTemporaryDirectory();
|
||||
}
|
||||
|
||||
#pragma mark WebScripting Protocol
|
||||
|
||||
/* checks whether a selector is acceptable to be called from JavaScript */
|
||||
+ (BOOL) isSelectorExcludedFromWebScript:(SEL)selector
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
// right now exclude all properties (eg keys)
|
||||
+ (BOOL) isKeyExcludedFromWebScript:(const char*)name
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
Loading…
Add table
Add a link
Reference in a new issue