#include <StubMiscStorage.h>
|
|
bool | createDatabase () override |
|
bool | open () override |
|
bool | isOpened () override |
|
void | close () override |
|
bool | createTable (const std::string &componentName, const std::string &tableName, KeyType keyType, ValueType valueType) override |
|
bool | clearTable (const std::string &componentName, const std::string &tableName) override |
|
bool | deleteTable (const std::string &componentName, const std::string &tableName) override |
|
bool | get (const std::string &componentName, const std::string &tableName, const std::string &key, std::string *value) override |
|
bool | add (const std::string &componentName, const std::string &tableName, const std::string &key, const std::string &value) override |
|
bool | update (const std::string &componentName, const std::string &tableName, const std::string &key, const std::string &value) override |
|
bool | put (const std::string &componentName, const std::string &tableName, const std::string &key, const std::string &value) override |
|
bool | remove (const std::string &componentName, const std::string &tableName, const std::string &key) override |
|
bool | tableEntryExists (const std::string &componentName, const std::string &tableName, const std::string &key, bool *tableEntryExistsValue) override |
|
bool | tableExists (const std::string &componentName, const std::string &tableName, bool *tableExistsValue) override |
|
bool | load (const std::string &componentName, const std::string &tableName, std::unordered_map< std::string, std::string > *valueContainer) override |
|
virtual | ~MiscStorageInterface ()=default |
|
In memory implementation for MiscStorageInterface
. This class is not thread safe.
◆ add()
bool alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::add |
( |
const std::string & |
componentName, |
|
|
const std::string & |
tableName, |
|
|
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
|
overridevirtual |
◆ clearTable()
bool alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::clearTable |
( |
const std::string & |
componentName, |
|
|
const std::string & |
tableName |
|
) |
| |
|
overridevirtual |
◆ close()
void alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::close |
( |
| ) |
|
|
overridevirtual |
◆ create()
static std::shared_ptr<StubMiscStorage> alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::create |
( |
| ) |
|
|
static |
◆ createDatabase()
bool alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::createDatabase |
( |
| ) |
|
|
overridevirtual |
Creates a new database. If a database is already being handled by this object or there is another internal error, then this function returns false.
- Returns
true
If the database is created ok, or false
if a database is already being handled by this object or there is a problem creating the database.
Implements alexaClientSDK::avsCommon::sdkInterfaces::storage::MiscStorageInterface.
◆ createTable()
bool alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::createTable |
( |
const std::string & |
componentName, |
|
|
const std::string & |
tableName, |
|
|
KeyType |
keyType, |
|
|
ValueType |
valueType |
|
) |
| |
|
overridevirtual |
Create a simple key/value pair table. If there is a problem creating the table, this function returns false.
- Parameters
-
componentName | The component name. |
tableName | The table name. |
keyType | The key type. |
valueType | The value type. |
- Returns
true
If the table is created ok, false
if the table couldn't be created.
Implements alexaClientSDK::avsCommon::sdkInterfaces::storage::MiscStorageInterface.
◆ deleteTable()
bool alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::deleteTable |
( |
const std::string & |
componentName, |
|
|
const std::string & |
tableName |
|
) |
| |
|
overridevirtual |
◆ get()
bool alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::get |
( |
const std::string & |
componentName, |
|
|
const std::string & |
tableName, |
|
|
const std::string & |
key, |
|
|
std::string * |
value |
|
) |
| |
|
overridevirtual |
◆ isOpened()
bool alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::isOpened |
( |
| ) |
|
|
overridevirtual |
◆ load()
bool alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::load |
( |
const std::string & |
componentName, |
|
|
const std::string & |
tableName, |
|
|
std::unordered_map< std::string, std::string > * |
valueContainer |
|
) |
| |
|
overridevirtual |
◆ open()
bool alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::open |
( |
| ) |
|
|
overridevirtual |
Open an existing database. If this object is already managing an open database, or there is a problem opening the database, this function returns false.
- Returns
true
If the database is opened ok, false
if this object is already managing an open database, or if there is another internal reason the database could not be opened.
Implements alexaClientSDK::avsCommon::sdkInterfaces::storage::MiscStorageInterface.
◆ put()
bool alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::put |
( |
const std::string & |
componentName, |
|
|
const std::string & |
tableName, |
|
|
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
|
overridevirtual |
Puts a value in the table. Basically, this will add the entry for the key if it doesn't already exist, or it will update the entry for the key if it already exists.
- Parameters
-
componentName | The component name. |
tableName | The table name. |
key | The key for the table entry. |
value | The value of the table entry. |
- Note
value
should be a literal string.
- Returns
true
If the value was put ok, false
if not.
Implements alexaClientSDK::avsCommon::sdkInterfaces::storage::MiscStorageInterface.
◆ remove()
bool alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::remove |
( |
const std::string & |
componentName, |
|
|
const std::string & |
tableName, |
|
|
const std::string & |
key |
|
) |
| |
|
overridevirtual |
◆ tableEntryExists()
bool alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::tableEntryExists |
( |
const std::string & |
componentName, |
|
|
const std::string & |
tableName, |
|
|
const std::string & |
key, |
|
|
bool * |
tableEntryExistsValue |
|
) |
| |
|
overridevirtual |
Checks if a key exists in the table.
- Parameters
-
| componentName | The component name. |
| tableName | The table name. |
| key | The key for the table entry. |
[out] | tableEntryExistsValue | True if the key exists, false if not. |
- Returns
true
if the table entry's existence was found out ok, else false..
Implements alexaClientSDK::avsCommon::sdkInterfaces::storage::MiscStorageInterface.
◆ tableExists()
bool alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::tableExists |
( |
const std::string & |
componentName, |
|
|
const std::string & |
tableName, |
|
|
bool * |
tableExistsValue |
|
) |
| |
|
overridevirtual |
◆ update()
bool alexaClientSDK::avsCommon::sdkInterfaces::storage::test::StubMiscStorage::update |
( |
const std::string & |
componentName, |
|
|
const std::string & |
tableName, |
|
|
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
|
overridevirtual |
The documentation for this class was generated from the following file:
- /workplace/avs-device-sdk/AVSCommon/SDKInterfaces/test/AVSCommon/SDKInterfaces/Storage/StubMiscStorage.h
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0