Ersa Wearable Platform
Embedded smartwatch firmware and application framework
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ersa::services::MemorySettingsService Class Reference
Inheritance diagram for ersa::services::MemorySettingsService:
Inheritance graph
[legend]
Collaboration diagram for ersa::services::MemorySettingsService:
Collaboration graph
[legend]

Public Member Functions

Result< void > init () override
 
std::string getWifiSsid () const override
 Return the configured Wi-Fi network name.
 
void setWifiSsid (const std::string &ssid) override
 
std::string getWifiPass () const override
 Return the configured Wi-Fi password.
 
void setWifiPass (const std::string &pass) override
 
int16_t getTimezoneOffsetMin () const override
 Return the timezone offset in minutes from UTC.
 
void setTimezoneOffsetMin (int16_t offset) override
 
bool isMilitaryTime () const override
 Return whether the user selected 24-hour time display.
 
void setMilitaryTime (bool military) override
 
void save () override
 
- Public Member Functions inherited from ersa::services::SettingsService
virtual ~SettingsService ()=default
 

Private Attributes

std::string ssid_ {"TestSSID"}
 
std::string pass_ {"secret"}
 
int16_t tzOffset_ {330}
 
bool military_ {false}
 

Additional Inherited Members

- Static Public Member Functions inherited from ersa::services::SettingsService
static SettingsService & instance ()
 Return the installed process-wide settings service.
 
static void setInstance (SettingsService *instance)
 Install the process-wide settings service.
 

Member Function Documentation

◆ getTimezoneOffsetMin()

int16_t ersa::services::MemorySettingsService::getTimezoneOffsetMin ( ) const
inlineoverridevirtual

Return the timezone offset in minutes from UTC.

Implements ersa::services::SettingsService.

◆ getWifiPass()

std::string ersa::services::MemorySettingsService::getWifiPass ( ) const
inlineoverridevirtual

Return the configured Wi-Fi password.

Implements ersa::services::SettingsService.

◆ getWifiSsid()

std::string ersa::services::MemorySettingsService::getWifiSsid ( ) const
inlineoverridevirtual

Return the configured Wi-Fi network name.

Implements ersa::services::SettingsService.

◆ init()

Result< void > ersa::services::MemorySettingsService::init ( )
inlineoverridevirtual

Load persisted values, validate ranges, and fill absent keys with defaults.

Implements ersa::services::SettingsService.

◆ isMilitaryTime()

bool ersa::services::MemorySettingsService::isMilitaryTime ( ) const
inlineoverridevirtual

Return whether the user selected 24-hour time display.

Implements ersa::services::SettingsService.

◆ save()

void ersa::services::MemorySettingsService::save ( )
inlineoverridevirtual

Commit pending setting changes to durable storage.

Implements ersa::services::SettingsService.

◆ setMilitaryTime()

void ersa::services::MemorySettingsService::setMilitaryTime ( bool  military)
inlineoverridevirtual

Update the display preference; formatting remains the view's responsibility.

Implements ersa::services::SettingsService.

◆ setTimezoneOffsetMin()

void ersa::services::MemorySettingsService::setTimezoneOffsetMin ( int16_t  offset)
inlineoverridevirtual

Update offset minutes (east positive); persist with save().

Implements ersa::services::SettingsService.

◆ setWifiPass()

void ersa::services::MemorySettingsService::setWifiPass ( const std::string &  pass)
inlineoverridevirtual

Update the pending passphrase; implementations must not log its value.

Implements ersa::services::SettingsService.

◆ setWifiSsid()

void ersa::services::MemorySettingsService::setWifiSsid ( const std::string &  ssid)
inlineoverridevirtual

Update the pending SSID; call save() to persist it.

Implements ersa::services::SettingsService.

Member Data Documentation

◆ military_

bool ersa::services::MemorySettingsService::military_ {false}
private

◆ pass_

std::string ersa::services::MemorySettingsService::pass_ {"secret"}
private

◆ ssid_

std::string ersa::services::MemorySettingsService::ssid_ {"TestSSID"}
private

◆ tzOffset_

int16_t ersa::services::MemorySettingsService::tzOffset_ {330}
private

The documentation for this class was generated from the following file: