|
Ersa Wearable Platform
Embedded smartwatch firmware and application framework
|
#include <settings_service.h>

Public Member Functions | |
| virtual | ~SettingsService ()=default |
| virtual Result< void > | init ()=0 |
| virtual std::string | getWifiSsid () const =0 |
| Return the configured Wi-Fi network name. | |
| virtual void | setWifiSsid (const std::string &ssid)=0 |
| virtual std::string | getWifiPass () const =0 |
| Return the configured Wi-Fi password. | |
| virtual void | setWifiPass (const std::string &pass)=0 |
| virtual int16_t | getTimezoneOffsetMin () const =0 |
| Return the timezone offset in minutes from UTC. | |
| virtual void | setTimezoneOffsetMin (int16_t offset)=0 |
| virtual bool | isMilitaryTime () const =0 |
| Return whether the user selected 24-hour time display. | |
| virtual void | setMilitaryTime (bool military)=0 |
| virtual void | save ()=0 |
Static Public Member Functions | |
| static SettingsService & | instance () |
| Return the installed process-wide settings service. | |
| static void | setInstance (SettingsService *instance) |
| Install the process-wide settings service. | |
Typed user preferences exposed independently from persistent storage format.
UI and service code use named settings rather than raw keys so defaults, validation, and future migrations remain centralized in the implementation. Setters update the service's in-memory view; save() is the explicit durable commit boundary for backends that buffer writes.
|
virtualdefault |
|
pure virtual |
Return the timezone offset in minutes from UTC.
Implemented in ersa::services::MemorySettingsService.
|
pure virtual |
Return the configured Wi-Fi password.
Implemented in ersa::services::MemorySettingsService.
|
pure virtual |
Return the configured Wi-Fi network name.
Implemented in ersa::services::MemorySettingsService.
|
pure virtual |
Load persisted values, validate ranges, and fill absent keys with defaults.
Implemented in ersa::services::MemorySettingsService.
|
static |
Return the installed process-wide settings service.
|
pure virtual |
Return whether the user selected 24-hour time display.
Implemented in ersa::services::MemorySettingsService.
|
pure virtual |
Commit pending setting changes to durable storage.
Implemented in ersa::services::MemorySettingsService.
|
static |
Install the process-wide settings service.
|
pure virtual |
Update the display preference; formatting remains the view's responsibility.
Implemented in ersa::services::MemorySettingsService.
|
pure virtual |
Update offset minutes (east positive); persist with save().
Implemented in ersa::services::MemorySettingsService.
|
pure virtual |
Update the pending passphrase; implementations must not log its value.
Implemented in ersa::services::MemorySettingsService.
|
pure virtual |
Update the pending SSID; call save() to persist it.
Implemented in ersa::services::MemorySettingsService.