![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Public Member Functions | |
MOCK_METHOD0 (createDatabase, bool()) | |
MOCK_METHOD0 (open, bool()) | |
MOCK_METHOD0 (close, void()) | |
MOCK_METHOD1 (store, bool(std::shared_ptr< Alert >)) | |
MOCK_METHOD3 (storeOfflineAlert, bool(const std::string &, const std::string &, const std::string &)) | |
MOCK_METHOD2 (load, bool(std::vector< std::shared_ptr< Alert >> *, std::shared_ptr< settings::DeviceSettingsManager >)) | |
MOCK_METHOD2 (loadOfflineAlerts, bool(rapidjson::Value *, rapidjson::Document::AllocatorType &)) | |
MOCK_METHOD1 (modify, bool(std::shared_ptr< Alert >)) | |
MOCK_METHOD1 (erase, bool(std::shared_ptr< Alert >)) | |
MOCK_METHOD2 (eraseOffline, bool(const std::string &, int)) | |
MOCK_METHOD1 (bulkErase, bool(const std::list< std::shared_ptr< Alert >> &)) | |
MOCK_METHOD0 (clearDatabase, bool()) | |
MockAlertStorage () | |
bool | createDatabase () |
bool | open () |
bool | isOpen () |
void | close () |
bool | alertExists (const std::string &token) |
bool | store (std::shared_ptr< Alert > alert) |
bool | storeOfflineAlert (const std::string &token, const std::string &scheduledTime, const std::string &eventTime) |
bool | load (std::vector< std::shared_ptr< Alert >> *alertContainer, std::shared_ptr< settings::DeviceSettingsManager > settingsManager) |
bool | loadOfflineAlerts (rapidjson::Value *alertContainer, rapidjson::Document::AllocatorType &allocator) |
bool | erase (const std::vector< int > &alertDbIds) |
bool | eraseOffline (const std::string &token, int id) |
void | setCreateDatabaseRetVal (bool retVal) |
void | setOpenRetVal (bool retVal) |
void | setIsOpenRetVal (bool retVal) |
void | setAlertExistsRetVal (bool retVal) |
void | setStoreRetVal (bool retVal) |
void | setLoadRetVal (bool retVal) |
void | setEraseRetVal (bool retVal) |
void | setAlerts (std::vector< std::shared_ptr< TestAlert >> alertsToAdd) |
MOCK_METHOD1 (bulkErase, bool(const std::list< std::shared_ptr< Alert >> &)) | |
MOCK_METHOD1 (erase, bool(std::shared_ptr< Alert >)) | |
MOCK_METHOD1 (modify, bool(std::shared_ptr< Alert >)) | |
MOCK_METHOD0 (clearDatabase, bool()) | |
![]() | |
virtual | ~AlertStorageInterface ()=default |
virtual bool | load (std::vector< std::shared_ptr< Alert >> *alertContainer, std::shared_ptr< settings::DeviceSettingsManager > settingsManager)=0 |
virtual bool | modify (std::shared_ptr< Alert > alert)=0 |
virtual bool | erase (std::shared_ptr< Alert > alert)=0 |
virtual bool | bulkErase (const std::list< std::shared_ptr< Alert >> &alertList)=0 |
virtual bool | clearDatabase ()=0 |
Mock of AlertStorageInterface
.
|
inline |
|
inline |
|
inlinevirtual |
Close the currently open database, if one is open.
Implements alexaClientSDK::acsdkAlerts::storage::AlertStorageInterface.
|
inlinevirtual |
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.
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::acsdkAlerts::storage::AlertStorageInterface.
|
inline |
|
inlinevirtual |
Erases a single alert from the offline database.
token | The alertToken of the alert to be erased. |
id | The id of the alert to be erased |
Implements alexaClientSDK::acsdkAlerts::storage::AlertStorageInterface.
|
inline |
|
inline |
|
inlinevirtual |
Loads all alerts in the offline database.
[out] | alertContainer | The container where alerts should be stored. |
allocator | The rapidjson allocator, required for the results of this function to be mergable with other rapidjson::Value objects. |
Implements alexaClientSDK::acsdkAlerts::storage::AlertStorageInterface.
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD0 | ( | createDatabase | , |
bool() | |||
) |
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD0 | ( | open | , |
bool() | |||
) |
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD0 | ( | close | , |
void() | |||
) |
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD0 | ( | clearDatabase | , |
bool() | |||
) |
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD0 | ( | clearDatabase | , |
bool() | |||
) |
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD1 | ( | store | , |
bool(std::shared_ptr< Alert >) | |||
) |
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD1 | ( | modify | , |
bool(std::shared_ptr< Alert >) | |||
) |
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD1 | ( | erase | , |
bool(std::shared_ptr< Alert >) | |||
) |
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD1 | ( | bulkErase | , |
bool(const std::list< std::shared_ptr< Alert >> &) | |||
) |
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD1 | ( | bulkErase | , |
bool(const std::list< std::shared_ptr< Alert >> &) | |||
) |
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD1 | ( | erase | , |
bool(std::shared_ptr< Alert >) | |||
) |
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD1 | ( | modify | , |
bool(std::shared_ptr< Alert >) | |||
) |
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD2 | ( | load | , |
bool(std::vector< std::shared_ptr< Alert >> *, std::shared_ptr< settings::DeviceSettingsManager >) | |||
) |
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD2 | ( | loadOfflineAlerts | , |
bool(rapidjson::Value *, rapidjson::Document::AllocatorType &) | |||
) |
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD2 | ( | eraseOffline | , |
bool(const std::string &, int) | |||
) |
alexaClientSDK::acsdkAlerts::test::MockAlertStorage::MOCK_METHOD3 | ( | storeOfflineAlert | , |
bool(const std::string &, const std::string &, const std::string &) | |||
) |
|
inlinevirtual |
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.
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::acsdkAlerts::storage::AlertStorageInterface.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Stores a single Alert
in the database.
The | Alert to store. |
Alert
was successfully stored. Implements alexaClientSDK::acsdkAlerts::storage::AlertStorageInterface.
|
inlinevirtual |
Stores a single Alert
in the offline alerts database.
token | The alertToken of the alert to be erased. |
scheduledTime | The scheduled time of the alert |
eventTime | the time the alert stopped |
Alert
was successfully stored. Implements alexaClientSDK::acsdkAlerts::storage::AlertStorageInterface.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0