AlexaClientSDK
1.19.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Classes | |
class | AlertStorageInterface |
struct | AssetOrderItem |
struct | AssetOrderItemCompare |
class | SQLiteAlertStorage |
Functions | |
static const std::string | TAG ("SQLiteAlertStorage") |
String to identify log entries originating from this file. More... | |
static bool | alertTypeToDbField (const std::string &alertType, int *dbType) |
static bool | alertStateToDbField (Alert::State state, int *dbState) |
static bool | dbFieldToAlertState (int dbState, Alert::State *state) |
static bool | createAlertsTable (SQLiteDatabase *db) |
static bool | createAlertAssetsTable (SQLiteDatabase *db) |
static bool | createAlertAssetPlayOrderItemsTable (SQLiteDatabase *db) |
static bool | storeAlertAssets (SQLiteDatabase *db, int alertId, const std::unordered_map< std::string, Alert::Asset > &assets) |
static bool | storeAlertAssetPlayOrderItems (SQLiteDatabase *db, int alertId, const std::vector< std::string > &assetPlayOrderItems) |
static bool | loadAlertAssets (SQLiteDatabase *db, std::map< int, std::vector< Alert::Asset >> *alertAssetsMap) |
static bool | loadAlertAssetPlayOrderItems (SQLiteDatabase *db, std::map< int, std::set< AssetOrderItem, AssetOrderItemCompare >> *alertAssetOrderItemsMap) |
static bool | eraseAlert (SQLiteDatabase *db, int alertId) |
static bool | eraseAlertAssets (SQLiteDatabase *db, int alertId) |
static bool | eraseAlertAssetPlayOrderItems (SQLiteDatabase *db, int alertId) |
static bool | eraseAlertByAlertId (SQLiteDatabase *db, int alertId) |
static void | printOneLineSummary (SQLiteDatabase *db) |
static void | printAlertsSummary (SQLiteDatabase *db, const std::vector< std::shared_ptr< Alert >> &alerts, bool shouldPrintEverything=false) |
Variables | |
static const std::string | ALERTS_CAPABILITY_AGENT_CONFIGURATION_ROOT_KEY = "alertsCapabilityAgent" |
The key in our config file to find the root of settings for this Capability Agent. More... | |
static const std::string | ALERTS_CAPABILITY_AGENT_DB_FILE_PATH_KEY = "databaseFilePath" |
The key in our config file to find the database file path. More... | |
static const int | ALERT_EVENT_TYPE_ALARM = 1 |
A definition which we will store in the database to indicate Alarm type. More... | |
static const int | ALERT_EVENT_TYPE_TIMER = 2 |
A definition which we will store in the database to indicate Timer type. More... | |
static const int | ALERT_EVENT_TYPE_REMINDER = 3 |
A definition which we will store in the database to indicate Reminder type. More... | |
static const std::string | ALERT_EVENT_TYPE_ALARM_STRING = "ALARM" |
This is the string value this code will expect form an Alert of Alarm type. More... | |
static const std::string | ALERT_EVENT_TYPE_TIMER_STRING = "TIMER" |
This is the string value this code will expect form an Alert of Timer type. More... | |
static const std::string | ALERT_EVENT_TYPE_REMINDER_STRING = "REMINDER" |
This is the string value this code will expect form an Alert of Reminder type. More... | |
static const int | ALERT_STATE_UNSET = 1 |
A definition which we will store in the database to indicate an Alert's Unset state. More... | |
static const int | ALERT_STATE_SET = 2 |
A definition which we will store in the database to indicate an Alert's Set state. More... | |
static const int | ALERT_STATE_ACTIVATING = 3 |
A definition which we will store in the database to indicate an Alert's Activating state. More... | |
static const int | ALERT_STATE_ACTIVE = 4 |
A definition which we will store in the database to indicate an Alert's Active state. More... | |
static const int | ALERT_STATE_SNOOZING = 5 |
A definition which we will store in the database to indicate an Alert's Snoozing state. More... | |
static const int | ALERT_STATE_SNOOZED = 6 |
A definition which we will store in the database to indicate an Alert's Snoozed state. More... | |
static const int | ALERT_STATE_STOPPING = 7 |
A definition which we will store in the database to indicate an Alert's Stopping state. More... | |
static const int | ALERT_STATE_STOPPED = 8 |
A definition which we will store in the database to indicate an Alert's Stopped state. More... | |
static const int | ALERT_STATE_COMPLETED = 9 |
A definition which we will store in the database to indicate an Alert's Completed state. More... | |
static const int | ALERT_STATE_READY = 10 |
A definition which we will store in the database to indicate an Alert's Ready state. More... | |
static const std::string | DATABASE_COLUMN_ID_NAME = "id" |
The name of the 'id' field we will use as the primary key in our tables. More... | |
static const int | ALERTS_DATABASE_VERSION_ONE = 1 |
A symbolic name for version one of our database. More... | |
static const int | ALERTS_DATABASE_VERSION_TWO = 2 |
A symbolic name for version two of our database. More... | |
static const std::string | ALERTS_TABLE_NAME = "alerts" |
The name of the alerts table. More... | |
static const std::string | ALERTS_V2_TABLE_NAME = "alerts_v2" |
The name of the alerts (v2) table. More... | |
static const std::string | CREATE_ALERTS_TABLE_SQL_STRING |
The SQL string to create the alerts table. More... | |
static const std::string | ALERT_ASSETS_TABLE_NAME = "alertAssets" |
The name of the alertAssets table. More... | |
static const std::string | CREATE_ALERT_ASSETS_TABLE_SQL_STRING |
The SQL string to create the alertAssets table. More... | |
static const std::string | ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_NAME = "alertAssetPlayOrderItems" |
The name of the alertAssetPlayOrderItems table. More... | |
static const std::string | CREATE_ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_SQL_STRING |
The SQL string to create the alertAssetPlayOrderItems table. More... | |
|
static |
Utility function to convert an alert state into a value we can store in the database.
state | The state of an alert. | |
[out] | dbState | The destination of the converted state which may be stored in a database. |
|
static |
Utility function to convert an alert type string into a value we can store in the database.
alertType | A string reflecting the type of an alert. | |
[out] | dbType | The destination of the converted type which may be stored in a database. |
|
static |
Utility function to create the AlertAssetPlayOrderItems table within the database.
db | The SQLiteDatabase object. |
|
static |
Utility function to create the AlertAssets table within the database.
db | The SQLiteDatabase object. |
|
static |
Utility function to create the Alerts table within the database.
db | The SQLiteDatabase object. |
|
static |
Utility function to convert a database value for an alert state into its Alert
equivalent.
dbState | The state of an alert, as stored in the database. | |
[out] | dbState | The destination of the converted state. |
|
static |
A utility function to delete alert records from the database for a given alert id. This function will clean up records in the alerts table.
db | The database object. |
alertId | The alert id of the alert to be deleted. |
|
static |
A utility function to delete alert records from the database for a given alert id. This function will clean up records in the alertAssetPlayOrderItems table.
db | The database object. |
alertId | The alert id of the alert to be deleted. |
|
static |
A utility function to delete alert records from the database for a given alert id. This function will clean up records in the alertAssets table.
db | The database object. |
alertId | The alert id of the alert to be deleted. |
|
static |
A utility function to delete an alert from the database for a given alert id. This will clean up records in all tables which are associated with the alert.
db | The DB object. |
alertId | The alert id of the alert to be deleted. |
|
static |
Reads the assets order from the database and stores this data on the given map.
db | The database object to read data from. |
alertAssetOrderItemsMap | The map that will receive data. |
true
if data was loaded successfully from the database
|
static |
Loads asset data into the map.
db | The database object to read data from. |
alertAssetsMap | The map that will receive the assets. |
true
if data was loaded successfully
|
static |
Utility diagnostic function to print the details of all the alerts stored in the database.
db | The database object. |
shouldPrintEverything | If true , then all details of an alert will be printed. If false , then summary information will be printed instead. |
|
static |
Utility diagnostic function to print a one-line summary of all alerts in the database.
db | The database object. |
|
static |
|
static |
|
static |
String to identify log entries originating from this file.
|
static |
The name of the alertAssetPlayOrderItems table.
|
static |
The name of the alertAssets table.
|
static |
A definition which we will store in the database to indicate Alarm type.
|
static |
|
static |
A definition which we will store in the database to indicate Reminder type.
|
static |
|
static |
A definition which we will store in the database to indicate Timer type.
|
static |
|
static |
A definition which we will store in the database to indicate an Alert's Activating state.
|
static |
A definition which we will store in the database to indicate an Alert's Active state.
|
static |
A definition which we will store in the database to indicate an Alert's Completed state.
|
static |
A definition which we will store in the database to indicate an Alert's Ready state.
|
static |
A definition which we will store in the database to indicate an Alert's Set state.
|
static |
A definition which we will store in the database to indicate an Alert's Snoozed state.
|
static |
A definition which we will store in the database to indicate an Alert's Snoozing state.
|
static |
A definition which we will store in the database to indicate an Alert's Stopped state.
|
static |
A definition which we will store in the database to indicate an Alert's Stopping state.
|
static |
A definition which we will store in the database to indicate an Alert's Unset state.
|
static |
The key in our config file to find the root of settings for this Capability Agent.
|
static |
The key in our config file to find the database file path.
|
static |
A symbolic name for version one of our database.
|
static |
A symbolic name for version two of our database.
|
static |
The name of the alerts table.
|
static |
The name of the alerts (v2) table.
|
static |
The SQL string to create the alertAssetPlayOrderItems table.
|
static |
The SQL string to create the alertAssets table.
|
static |
The SQL string to create the alerts table.
|
static |
The name of the 'id' field we will use as the primary key in our tables.
AlexaClientSDK 1.19.0 - Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0