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 8 9 #include "SettingsManager.h" 10 11 #include <Locker.h> 12 #include <Path.h> 13 14 #include <ObjectList.h> 15 16 17 class TeamUiSettingsFactory; 18 19 20 class DebuggerSettingsManager : public SettingsManager { 21 public: 22 DebuggerSettingsManager(); 23 ~DebuggerSettingsManager(); 24 25 status_t Init(TeamUiSettingsFactory* factory); 26 27 virtual status_t LoadTeamSettings(const char* teamName, 28 TeamSettings& settings); 29 virtual status_t SaveTeamSettings(const TeamSettings& settings); 30 31 private: 32 typedef BObjectList<TeamSettings> TeamSettingsList; 33 34 private: 35 void _Unset(); 36 37 status_t _LoadSettings(); 38 status_t _SaveSettings(); 39 40 int32 _TeamSettingsIndex(const char* teamName) const; 41 42 private: 43 BLocker fLock; 44 BPath fSettingsPath; 45 TeamSettingsList fRecentTeamSettings; // oldest is first 46 TeamUiSettingsFactory* fUiSettingsFactory; 47 }; 48 49 50 #endif // DEBUGGER_SETTINGS_MANAGER_H 51