Spaces:
Running
Running
class SettingsManager { | |
private: | |
SystemSettings settings; | |
static const char* NAMESPACE; | |
static const char* SETTINGS_KEY; | |
uint32_t version; | |
void setDefaults(); | |
bool validateSettings(); | |
public: | |
SettingsManager(); | |
void begin(); | |
bool load(); | |
bool save(); | |
void reset(); | |
SystemSettings& getSettings() { return settings; } | |
void setSettings(const SystemSettings& newSettings); | |
String exportToJson(); | |
bool importFromJson(const String& json); | |
bool saveToSD(const char* filename); | |
bool loadFromSD(const char* filename); | |
uint32_t getVersion() const { return version; } | |
bool isCompatibleVersion(uint32_t version) const; | |
}; | |