![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <NotificationsStorageInterface.h>
Public Types | |
using | IndicatorState = avsCommon::avs::IndicatorState |
Some useful shorthand. More... | |
Public Member Functions | |
virtual | ~NotificationsStorageInterface ()=default |
virtual bool | createDatabase ()=0 |
virtual bool | open ()=0 |
virtual void | close ()=0 |
virtual bool | enqueue (const acsdkNotifications::NotificationIndicator ¬ificationIndicator)=0 |
virtual bool | dequeue ()=0 |
virtual bool | peek (acsdkNotifications::NotificationIndicator *notificationIndicator)=0 |
virtual bool | setIndicatorState (IndicatorState state)=0 |
virtual bool | getIndicatorState (IndicatorState *state)=0 |
virtual bool | checkForEmptyQueue (bool *empty)=0 |
virtual bool | clearNotificationIndicators ()=0 |
virtual bool | getQueueSize (int *size)=0 |
This class implements an interface for interacting with a Notifications database.
Users should be notified of their pending notifications in the order that SetIndicator directives are received. NotificationIndicators are therefore stored in a queue and should be persisted across system shutdown.
This storage is also responsible for maintaining IndicatorState as defined in IndicatorState.h.
using alexaClientSDK::acsdkNotificationsInterfaces::NotificationsStorageInterface::IndicatorState = avsCommon::avs::IndicatorState |
Some useful shorthand.
|
virtualdefault |
|
pure virtual |
Checks if there are any NotificationIndicator records in the database.
[out] | empty | Whether there were any records in the database. |
Implemented in alexaClientSDK::acsdkNotifications::test::TestNotificationsStorage, and alexaClientSDK::acsdkNotifications::SQLiteNotificationsStorage.
|
pure virtual |
Clears the database of all NotificationIndicators
.
Implemented in alexaClientSDK::acsdkNotifications::test::TestNotificationsStorage, and alexaClientSDK::acsdkNotifications::SQLiteNotificationsStorage.
|
pure virtual |
Close the currently open database, if one is open.
Implemented in alexaClientSDK::acsdkNotifications::test::TestNotificationsStorage, and alexaClientSDK::acsdkNotifications::SQLiteNotificationsStorage.
|
pure virtual |
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. Implemented in alexaClientSDK::acsdkNotifications::test::TestNotificationsStorage, and alexaClientSDK::acsdkNotifications::SQLiteNotificationsStorage.
|
pure virtual |
Dequeues the next NotificationIndicator
in the database.
Implemented in alexaClientSDK::acsdkNotifications::test::TestNotificationsStorage, and alexaClientSDK::acsdkNotifications::SQLiteNotificationsStorage.
|
pure virtual |
Enqueues a single NotificationIndicator
in the database.
notificationIndicator | The NotificationIndicator to enqueue. |
NotificationIndicator
was successfully enqueued. Implemented in alexaClientSDK::acsdkNotifications::test::TestNotificationsStorage, and alexaClientSDK::acsdkNotifications::SQLiteNotificationsStorage.
|
pure virtual |
Retrieves the currently stored IndicatorState
.
[out] | state | A pointer to receive the currently stored IndicatorState |
Implemented in alexaClientSDK::acsdkNotifications::test::TestNotificationsStorage, and alexaClientSDK::acsdkNotifications::SQLiteNotificationsStorage.
|
pure virtual |
Gets the size of the queue (number of records in the queue table).
[out] | size | A pointer to receive the calculated size. |
Implemented in alexaClientSDK::acsdkNotifications::test::TestNotificationsStorage, and alexaClientSDK::acsdkNotifications::SQLiteNotificationsStorage.
|
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::acsdkNotifications::test::TestNotificationsStorage, and alexaClientSDK::acsdkNotifications::SQLiteNotificationsStorage.
|
pure virtual |
Peeks at the next NotificationIndicator
in the database.
[out] | notificationIndicator | A pointer to receive the peeked NotificationIndicator |
Implemented in alexaClientSDK::acsdkNotifications::test::TestNotificationsStorage, and alexaClientSDK::acsdkNotifications::SQLiteNotificationsStorage.
|
pure virtual |
Stores the current IndicatorState
.
Implemented in alexaClientSDK::acsdkNotifications::test::TestNotificationsStorage, and alexaClientSDK::acsdkNotifications::SQLiteNotificationsStorage.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0