Chameleon Applications

Chameleon Applications Svn Source Tree

Root/trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.h

1//
2// PreferencesControllerBase.h
3// ChameleonPrefPane
4//
5// Created by Rekursor on 1/22/10.
6//
7
8#import <Cocoa/Cocoa.h>
9#import "ChameleonPrefPane.h"
10#import "ChameleonPropertyList.h"
11#import "ShellProcess.h"
12#import "string_util.h"
13#import "GroupControllerProtocol.h"
14
15
16//--------------------------------------------------------------------------
17const char * const kKernelFlags = "Kernel Flags";
18
19//--------------------------------------------------------------------------
20typedef enum GroupAction
21{
22SetDefaultValues,
23RefreshLockStates,
24LoadPreferencesOptions,
25LoadBootConfigOptions,
26AddOptionsDesc,
27SaveBootConfigOptions
28};
29
30
31
32// ENHANCE ME: remove this globals and integrate them in ChameleonPrefPane or at least
33// add function accessor entry points
34extern PartitionExtractor * partExtractor;
35
36// Define common expected behavior for all derived controllers
37@interface PreferencesControllerBase : NSObject
38{
39}
40
41// from the id to desc map in BootProp::instance(), load all default values for dict
42+ (void) loadAllValues: (NSMutableDictionary*) dict;
43
44// Register the Group panel for further automatic iteration matters
45+ (void) registerPreferencesGroup:(id) myGroup;
46
47// Iterate and execute action for each register group
48+ (void) doForEachGroup: (GroupAction) action withOption:(id) option;
49
50// Set refresh state {enabled | disabled} depending on the authorizations state
51+ (void) refreshLockState: (id) item;
52
53// Unitary Method for Load One option of any type
54+ (void) loadOptionsFromBootFile;
55
56// Method for loading all registred options components in the interface
57+ (void) loadOptionFromBootFile:(id) optionID;
58
59- (void) loadPreferences;
60- (bool) savePreferences;
61
62- (bool) handleSender: (id) sender;
63
64-(NSMutableDictionary*) preferencesFile;
65-(NSMutableDictionary*) preferencesParts;
66
67-(ChameleonPrefPane*) chameleon;
68
69@end
70

Archive Download this file

Revision: 51