AlexaClientSDK
1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <SpeakerManagerConfigHelper.h>
Public Member Functions | |
SpeakerManagerConfigHelper (const std::shared_ptr< SpeakerManagerStorageInterface > &storage) | |
void | loadState (SpeakerManagerStorageState &state) |
bool | saveState (const SpeakerManagerStorageState &state) |
int | getMinUnmuteVolume () const |
bool | getRestoreMuteState () const |
Helper class to manage configuration operations for SpeakerManager CA.
This class implements all configuration operations and merges logic of accessing different configuration sources. SpeakerManager get configuration values from three sources: hardcoded values, platform configuration, and persistent storage.
SpeakerManagerConfigHelper::SpeakerManagerConfigHelper | ( | const std::shared_ptr< SpeakerManagerStorageInterface > & | storage | ) |
Creates object.
[in] | storage | Storage interface. |
int SpeakerManagerConfigHelper::getMinUnmuteVolume | ( | ) | const |
Loads minimum unmute volume level from platform configuration. The method tries to load the unmute value from platform configuration files, and if it fails, it returns a hardcoded value.
bool SpeakerManagerConfigHelper::getRestoreMuteState | ( | ) | const |
Loads mute state handling from configuration. By default the speaker manager sets the mute status to the value prior to reboot, but this behaviour can be overridden by configuration.
void SpeakerManagerConfigHelper::loadState | ( | SpeakerManagerStorageState & | state | ) |
Load configuration.
This method always succeeds (assuming state is not nullptr), as it first tries to load configuration from config storage, then from platform configuration files, and falls back to hardcoded values.
[out] | state | Pointer to configuration container to fill with config values. |
bool SpeakerManagerConfigHelper::saveState | ( | const SpeakerManagerStorageState & | state | ) |
Saves configuration to to config storage.
[in] | state | Configuration data to persist. |
AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0