diff options
author | Damiano Galassi <[email protected]> | 2015-10-13 10:22:02 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2015-10-13 10:22:02 +0200 |
commit | 14839ed2b8a7e4615b2c30fe8a46bb63819d0b40 (patch) | |
tree | f8684e1d7eb41fa1df0c420da50cd4f53f692e64 /macosx/HBPreset.h | |
parent | b8bcf81a60e505135cab3f6deeb090989012ba5e (diff) |
MacGui: remove some HBPreset -> NSDictionary conversions and add a mutable version of HBPreset.
Diffstat (limited to 'macosx/HBPreset.h')
-rw-r--r-- | macosx/HBPreset.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/macosx/HBPreset.h b/macosx/HBPreset.h index bf5b51e8b..32f20c177 100644 --- a/macosx/HBPreset.h +++ b/macosx/HBPreset.h @@ -19,7 +19,7 @@ typedef NS_ENUM(NSUInteger, HBPresetFormat) { * * An instance of HBPreset can be an actual preset or a folder. */ -@interface HBPreset : HBTreeNode <NSCopying> +@interface HBPreset : HBTreeNode <NSCopying, NSMutableCopying> - (instancetype)initWithFolderName:(NSString *)title builtIn:(BOOL)builtIn; @@ -50,11 +50,6 @@ typedef NS_ENUM(NSUInteger, HBPresetFormat) { - (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)atomically format:(HBPresetFormat)format removeRoot:(BOOL)removeRoot; /** - * Removes unknown keys and normalizes values. - */ -- (void)cleanUp; - -/** * The name of the preset. */ @property (nonatomic, copy) NSString *name; @@ -75,14 +70,14 @@ typedef NS_ENUM(NSUInteger, HBPresetFormat) { @property (nonatomic) BOOL isDefault; /** - * The actual content of the preset. - */ -@property (nonatomic, strong, nullable) NSDictionary *content; - -/** - * A dictionary representation of the preset. + * Returns the value associated with a given key. + * + * @param key The key for which to return the corresponding value. + * + * @return The value associated with key, or nil if no value is associated with key */ -@property (readonly, copy) NSDictionary *dictionary; +- (nullable id)objectForKey:(NSString *)key; +- (nullable id)objectForKeyedSubscript:(NSString *)key; @end |