![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <MessageStorageInterface.h>
Classes | |
struct | StoredMessage |
Public Member Functions | |
virtual | ~MessageStorageInterface ()=default |
virtual bool | createDatabase ()=0 |
virtual bool | open ()=0 |
virtual void | close ()=0 |
virtual bool | store (const std::string &message, int *id)=0 |
virtual bool | store (const std::string &message, const std::string &uriPathExtension, int *id)=0 |
virtual bool | load (std::queue< StoredMessage > *messageContainer)=0 |
virtual bool | erase (int messageId)=0 |
virtual bool | clearDatabase ()=0 |
An Interface class which defines APIs for interacting with a database for storing text-based messages.
An implementation of this interface must enforce ordering of the messages, so that the ordering of items returned in the load() operation are the same as the ordering of store() calls.
This interface does not provide any thread-safety guarantees.
|
virtualdefault |
Destructor.
|
pure virtual |
A utility function to clear the database of all records. Note that the database will still exist, as will the tables. Only the rows will be erased.
Implemented in alexaClientSDK::acsdkAlerts::test::StubMessageStorage, and alexaClientSDK::certifiedSender::SQLiteMessageStorage.
|
pure virtual |
Close the currently open database, if one is open.
Implemented in alexaClientSDK::acsdkAlerts::test::StubMessageStorage, and alexaClientSDK::certifiedSender::SQLiteMessageStorage.
|
pure virtual |
Creates a new database with the given filePath. If a database is already being handled by this object, or there is are other errors creating the database, 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 an internal error creating the database. Implemented in alexaClientSDK::acsdkAlerts::test::StubMessageStorage, and alexaClientSDK::certifiedSender::SQLiteMessageStorage.
|
pure virtual |
Erases a single message from the database.
messageId | The id of the message to be erased. |
Implemented in alexaClientSDK::acsdkAlerts::test::StubMessageStorage, and alexaClientSDK::certifiedSender::SQLiteMessageStorage.
|
pure virtual |
Loads all messages in the database.
[out] | messageContainer | The container where messages should be stored. |
StoredMessages
were successfully loaded. Implemented in alexaClientSDK::acsdkAlerts::test::StubMessageStorage, and alexaClientSDK::certifiedSender::SQLiteMessageStorage.
|
pure virtual |
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. Implemented in alexaClientSDK::acsdkAlerts::test::StubMessageStorage, and alexaClientSDK::certifiedSender::SQLiteMessageStorage.
|
pure virtual |
Stores a single message in the database.
The | message to store. | |
[out] | id | The id associated with the stored messsage, if successfully stored. |
Implemented in alexaClientSDK::acsdkAlerts::test::StubMessageStorage, and alexaClientSDK::certifiedSender::SQLiteMessageStorage.
|
pure virtual |
Stores a single message and its uri in the database.
The | message to store. | |
uriPathExtension | path extension which will be appended to the base url of the AVS when sending the event. | |
[out] | id | The id associated with the stored messsage, if successfully stored. |
Implemented in alexaClientSDK::acsdkAlerts::test::StubMessageStorage, and alexaClientSDK::certifiedSender::SQLiteMessageStorage.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0