vfs: check userland buffers before reading them.
[haiku.git] / src / apps / debugger / settings / DebuggerSettingsManager.h
blobae6bde40369aa599152bb7cf10832ac2f68da2d8
1 /*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Copyright 2016, Rene Gollent, rene@gollent.com.
4 * Distributed under the terms of the MIT License.
5 */
6 #ifndef DEBUGGER_SETTINGS_MANAGER_H
7 #define DEBUGGER_SETTINGS_MANAGER_H
9 #include "SettingsManager.h"
11 #include <Locker.h>
12 #include <Path.h>
14 #include <ObjectList.h>
17 class TeamUiSettingsFactory;
20 class DebuggerSettingsManager : public SettingsManager {
21 public:
22 DebuggerSettingsManager();
23 ~DebuggerSettingsManager();
25 status_t Init(TeamUiSettingsFactory* factory);
27 virtual status_t LoadTeamSettings(const char* teamName,
28 TeamSettings& settings);
29 virtual status_t SaveTeamSettings(const TeamSettings& settings);
31 private:
32 typedef BObjectList<TeamSettings> TeamSettingsList;
34 private:
35 void _Unset();
37 status_t _LoadSettings();
38 status_t _SaveSettings();
40 int32 _TeamSettingsIndex(const char* teamName) const;
42 private:
43 BLocker fLock;
44 BPath fSettingsPath;
45 TeamSettingsList fRecentTeamSettings; // oldest is first
46 TeamUiSettingsFactory* fUiSettingsFactory;
50 #endif // DEBUGGER_SETTINGS_MANAGER_H