![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <DeviceSettingStorageInterface.h>
Public Types | |
using | SettingStatusAndValue = std::pair< SettingStatus, std::string > |
Public Member Functions | |
virtual | ~DeviceSettingStorageInterface ()=default |
virtual bool | open ()=0 |
virtual void | close ()=0 |
virtual bool | storeSetting (const std::string &key, const std::string &value, SettingStatus status)=0 |
virtual bool | storeSettings (const std::vector< std::tuple< std::string, std::string, SettingStatus >> &data)=0 |
virtual SettingStatusAndValue | loadSetting (const std::string &key)=0 |
virtual bool | deleteSetting (const std::string &key)=0 |
virtual bool | updateSettingStatus (const std::string &key, SettingStatus status)=0 |
An Interface class which defines APIs for interacting with a database used for storing, loading, and modifying settings.
SettingStatus
transitions are managed by the caller. This class simply manages the persistence of settings data and status. using alexaClientSDK::settings::storage::DeviceSettingStorageInterface::SettingStatusAndValue = std::pair<SettingStatus, std::string> |
The type holding the status and string value of a setting. If the status is NOT_AVAILABLE
the value will contain the reason or error message why the setting value can not be retrieved.
|
virtualdefault |
Destructor.
|
pure virtual |
Close the currently open database, if one is open.
Implemented in alexaClientSDK::settings::storage::SQLiteDeviceSettingStorage.
|
pure virtual |
Removes the entry for a particular setting in the database.
key | The string identifier for the setting. |
Implemented in alexaClientSDK::settings::storage::SQLiteDeviceSettingStorage.
|
pure virtual |
Retrieves the setting status and value from the database.
key | The string identifier for the setting. |
NOT_AVAILABLE
. Implemented in alexaClientSDK::settings::storage::SQLiteDeviceSettingStorage.
|
pure virtual |
Open an existing database.
true
If the database is opened ok or is already open false
if this object is already managing an open database, or if there is another internal reason the database could not be opened. Implemented in alexaClientSDK::settings::storage::SQLiteDeviceSettingStorage.
|
pure virtual |
Stores a single setting in the database.
key | The string identifier for the setting. |
value | The string value of the setting. |
status | The status of the setting. |
Implemented in alexaClientSDK::settings::storage::SQLiteDeviceSettingStorage.
|
pure virtual |
Stores multiple setting in the database.
data | A collection of key-value-status entries to store. |
Implemented in alexaClientSDK::settings::storage::SQLiteDeviceSettingStorage.
|
pure virtual |
Update the status of a setting in the database. The update will fail if the setting does not exist.
key | The string identifier for the setting. |
status | The status of the setting. |
Implemented in alexaClientSDK::settings::storage::SQLiteDeviceSettingStorage.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0