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 | //--------------------------------------------------------------------------␊ |
17 | const char * const kKernelFlags = "Kernel Flags";␊ |
18 | ␊ |
19 | //--------------------------------------------------------------------------␊ |
20 | typedef enum GroupAction␊ |
21 | {␊ |
22 | ␉SetDefaultValues,␊ |
23 | ␉RefreshLockStates,␊ |
24 | ␉LoadPreferencesOptions,␊ |
25 | ␉LoadBootConfigOptions,␊ |
26 | ␉AddOptionsDesc,␊ |
27 | ␉SaveBootConfigOptions␊ |
28 | };␊ |
29 | ␊ |
30 | ␊ |
31 | ␊ |
32 | // ENHANCE ME: remove this globals and integrate them in ChameleonPrefPane or at least ␊ |
33 | // add function accessor entry points␊ |
34 | extern PartitionExtractor * partExtractor;␊ |
35 | ␊ |
36 | // Define common expected behavior for all derived controllers␊ |
37 | @interface PreferencesControllerBase : NSObject ␊ |
38 | {␊ |
39 | }␊ |
40 | ␊ |
41 | // Register the Group panel for further automatic iteration matters␊ |
42 | + (void) registerPreferencesGroup:(id) myGroup;␊ |
43 | ␊ |
44 | // Iterate and execute action for each register group␊ |
45 | + (void) doForEachGroup: (GroupAction) action withOption:(id) option;␊ |
46 | ␊ |
47 | // Set refresh state {enabled | disabled} depending on the authorizations state␊ |
48 | + (void) refreshBodLockState: (const BootOptionDesc*) bod;␊ |
49 | + (void) refreshLockState: (id) item;␊ |
50 | ␊ |
51 | // Unitary Method for Load One option of any type␊ |
52 | + (void) loadOptionsFromBootFile;␊ |
53 | ␊ |
54 | // Method for loading all registred options components in the interface␊ |
55 | + (void) loadOptionFromBootFile:(id) optionID;␊ |
56 | ␊ |
57 | // Get the resource in the pref pane, needed because the bundle get resource api wont work␊ |
58 | // as it would return the SystemPreferences application resource␊ |
59 | - (id) getResourcePath: (NSString *) str ofType: (NSString*) sType;␊ |
60 | ␊ |
61 | // Execute a task and wait for the process to terminate␊ |
62 | - (bool) executeTaskAndWaitForTermination: (NSString*)taskPath;␊ |
63 | ␊ |
64 | // Open a file selection modal dialog␊ |
65 | - (NSString*) selectFileWithFileTypes:(NSString*) dir withName: (NSString*) name withTypes:(NSArray*) fileTypes;␊ |
66 | // Open a file selection modal dialog with a plist predefined type␊ |
67 | - (NSString*) selectAnyFile;␊ |
68 | - (NSString*) selectPlistFile:(NSString*)name;␊ |
69 | ␊ |
70 | - (void) loadPreferences;␊ |
71 | - (bool) savePreferences;␊ |
72 | ␊ |
73 | - (bool) handleSender: (id) sender;␊ |
74 | ␊ |
75 | -(NSMutableDictionary*) preferencesFile;␊ |
76 | -(NSMutableDictionary*) preferencesParts;␊ |
77 | ␊ |
78 | -(ChameleonPrefPane*) chameleon;␊ |
79 | ␊ |
80 | @end␊ |
81 | |