ZeroTierOne/ext/mac-ui-macgap1-wrapper/MacGap/Classes/Commands/UserDefaults.h

44 lines
1.0 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// UserDefaults.h
// MacGap
//
// Created by Jeff Hanbury on 16/04/2014.
// Copyright (c) 2014 Twitter. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "WindowController.h"
@interface UserDefaults : NSObject
@property (nonatomic, retain) WebView *webView;
- (id) initWithWebView:(WebView *)view;
- (NSString*) getMyDefaults;
- (NSDictionary*) myDefaultsDictionary;
- (void) removeObjectForKey:(NSString*)key;
- (NSArray*) getUserDefaultsKeys;
- (NSString*) addPrefix:(NSString*)key;
- (void) setString:(NSString*)key withValue:(NSString*)value;
- (NSString*) getString:(NSString*)key;
- (void) setInteger:(NSString*)key withValue:(NSString*)value;
- (NSNumber*) getInteger:(NSString*)key;
- (void) setBool:(NSString*)key withValue:(NSString*)value;
- (NSNumber*) getBool:(NSString*)key;
- (void) setFloat:(NSString*)key withValue:(NSString*)value;
- (NSNumber*) getFloat:(NSString*)key;
// Could also be implemented:
// setObject:forKey:
// setDouble:forKey:
// setURL:forKey:
@end