|
|
1.1 root 1: /*
2: Copyright (c) 2008 TrueCrypt Foundation. All rights reserved.
3:
4: Governed by the TrueCrypt License 2.4 the full text of which is contained
5: in the file License.txt included in TrueCrypt binary and source code
6: distribution packages.
7: */
8:
9: #ifndef TC_HEADER_Main_UserPreferences
10: #define TC_HEADER_Main_UserPreferences
11:
12: #include "System.h"
13: #include "Main.h"
14: #include "Hotkey.h"
15:
16: namespace TrueCrypt
17: {
18: struct UserPreferences
19: {
20: UserPreferences ()
21: :
22: BackgroundTaskEnabled (true),
23: BackgroundTaskMenuDismountItemsEnabled (true),
24: BackgroundTaskMenuMountItemsEnabled (true),
25: BackgroundTaskMenuOpenItemsEnabled (true),
26: BeepAfterHotkeyMountDismount (false),
27: CloseBackgroundTaskOnNoVolumes (false),
28: CloseExplorerWindowsOnDismount (true),
29: DismountOnInactivity (false),
30: DismountOnLogOff (true),
31: DismountOnPowerSaving (true),
32: DismountOnScreenSaver (false),
33: DisplayMessageAfterHotkeyDismount (false),
34: ForceAutoDismount (true),
35: LastSelectedSlotNumber (0),
36: MaxVolumeIdleTime (60),
37: MountDevicesOnLogon (false),
38: MountFavoritesOnLogon (false),
39: NonInteractive (false),
40: OpenExplorerWindowAfterMount (false),
41: SaveHistory (false),
42: StartOnLogon (false),
43: UseKeyfiles (false),
44: Verbose (false),
45: WipeCacheOnAutoDismount (true),
46: WipeCacheOnClose (false)
47: {
48: }
49:
50: virtual ~UserPreferences ()
51: {
52: }
53: void Load();
54: void Save() const;
55:
56: HotkeyList Hotkeys;
57: KeyfileList DefaultKeyfiles;
58: MountOptions DefaultMountOptions;
59:
60: bool BackgroundTaskEnabled;
61: bool BackgroundTaskMenuDismountItemsEnabled;
62: bool BackgroundTaskMenuMountItemsEnabled;
63: bool BackgroundTaskMenuOpenItemsEnabled;
64: bool BeepAfterHotkeyMountDismount;
65: bool CloseBackgroundTaskOnNoVolumes;
66: bool CloseExplorerWindowsOnDismount;
67: bool DismountOnInactivity;
68: bool DismountOnLogOff;
69: bool DismountOnPowerSaving;
70: bool DismountOnScreenSaver;
71: bool DisplayMessageAfterHotkeyDismount;
72: bool ForceAutoDismount;
73: uint64 LastSelectedSlotNumber;
74: int32 MaxVolumeIdleTime;
75: bool MountDevicesOnLogon;
76: bool MountFavoritesOnLogon;
77: bool NonInteractive;
78: bool OpenExplorerWindowAfterMount;
79: bool SaveHistory;
80: bool StartOnLogon;
81: bool UseKeyfiles;
82: bool Verbose;
83: bool WipeCacheOnAutoDismount;
84: bool WipeCacheOnClose;
85:
86: protected:
87: wxString GetDefaultKeyfilesFileName () const { return L"Default Keyfiles.xml"; }
88: wxString GetPreferencesFileName () const { return L"Configuration.xml"; }
89: void SetValue (const wxString &cfgText, bool &cfgVar);
90: void SetValue (const wxString &cfgText, int &cfgVar);
91: void SetValue (const wxString &cfgText, uint64 &cfgVar);
92: void SetValue (const wxString &cfgText, wstring &cfgVar);
93: void SetValue (const wxString &cfgText, wxString &cfgVar);
94: };
95: }
96:
97: #endif // TC_HEADER_Main_UserPreferences
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.