AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Functions | Variables
alexaClientSDK::acsdkAlerts::storage Namespace Reference

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 void submitMetric (const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > metricRecorder, const std::string &eventName, const int count)
 
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 createOfflineAlertsTable (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 (int dbVersion, SQLiteDatabase *db, int alertId)
 
static bool eraseOfflineAlert (const int dbVersion, SQLiteDatabase *db, const std::string &token)
 
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 std::string OFFLINE_STOPPED_ALERT_TOKEN_KEY = "token"
 The value of the offline stopped alert token key. More...
 
static const std::string OFFLINE_STOPPED_ALERT_SCHEDULED_TIME_KEY = "scheduledTime"
 The value of the offline stopped alert scheduledTime key. More...
 
static const std::string OFFLINE_STOPPED_ALERT_EVENT_TIME_KEY = "eventTime"
 The value of the offline stopped alert eventTime key. More...
 
static const std::string OFFLINE_STOPPED_ALERT_ID_KEY = "id"
 The value of the offline stopped alert id key. 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 std::string DATABASE_COLUMN_TOKEN_NAME = "token"
 The name of the 'token' field used in alerts table. More...
 
static const std::string DATABASE_COLUMN_TYPE_NAME = "type"
 The name of the 'type' field used in alerts table. More...
 
static const std::string DATABASE_COLUMN_STATE_NAME = "state"
 The name of the 'state' field used in alerts table. More...
 
static const std::string DATABASE_COLUMN_SCHEDULED_TIME_UNIX_NAME = "scheduled_time_unix"
 The name of the 'scheduled_time_unix' field used in alerts table. More...
 
static const std::string DATABASE_COLUMN_SCHEDULED_TIME_ISO_8601_NAME = "scheduled_time_iso_8601"
 The name of the 'scheduled_time_iso_8601' field used in alerts table. More...
 
static const std::string DATABASE_COLUMN_ASSET_LOOP_COUNT_NAME = "asset_loop_count"
 The name of the 'asset_loop_count' field used in alerts table. More...
 
static const std::string DATABASE_COLUMN_ASSET_LOOP_PAUSE_MILLISECONDS_NAME = "asset_loop_pause_milliseconds"
 The name of the 'asset_loop_pause_milliseconds' field used in alerts table. More...
 
static const std::string DATABASE_COLUMN_BACKGROUND_ASSET_NAME = "background_asset"
 The name of the 'background_asset' field used in alerts table. More...
 
static const std::string DATABASE_COLUMN_ORIGINAL_TIME_NAME = "original_time"
 The name of the 'original_time' field used in alerts table. More...
 
static const std::string DATABASE_COLUMN_LABEL_NAME = "label"
 The name of the 'label' field used in alerts table. More...
 
static const std::string DATABASE_COLUMN_CREATED_TIME_NAME = "created_time_iso_8601"
 The name of the 'created_time_iso_8601' field used in alerts table. More...
 
static const int ALERTS_DATABASE_VERSION_TWO = 2
 A symbolic name for version two of our database. More...
 
static const int ALERTS_DATABASE_VERSION_THREE = 3
 A symbolic name for version three of our database. More...
 
static const std::string ALERTS_V2_TABLE_NAME = "alerts_v2"
 The name of the alerts (v2) table. More...
 
static const std::string ALERTS_V3_TABLE_NAME = "alerts_v3"
 The name of the alerts (v3) 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 OFFLINE_ALERTS_TABLE_NAME = "offlineAlerts"
 The name of the offline alerts (v1) table. More...
 
static const std::string OFFLINE_ALERTS_V2_TABLE_NAME = "offlineAlerts_v2"
 The name of the offline alerts (v2) table. More...
 
static const int OFFLINE_ALERTS_DATABASE_VERSION_ONE = 1
 A symbolic name for version one of our offline alerts database. More...
 
static const int OFFLINE_ALERTS_DATABASE_VERSION_TWO = 2
 A symbolic name for version two of our offline alerts database. More...
 
static const std::string CREATE_OFFLINE_ALERTS_TABLE_SQL_STRING
 The SQL string to create the offline alerts 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 const std::string ALERT_METRIC_PREFIX = "ALERT-"
 The prefix for alert metrics. More...
 
static const std::string ALERT_DATABASE_OPEN_FAILED = "databaseOpenFailed"
 The event names for metrics. More...
 
static const std::string OFFLINE_ALERTS_V1ToV2_MIGRATION_FAILED = "offlineAlertsV1ToV2MigrationFailed"
 
static const std::string ALERTS_V2ToV3_MIGRATION_FAILED = "alertsV2ToV3MigrationFailed"
 
static const std::string CREATE_OFFLINE_ALERTS_V2_FAILED = "createOfflineAlertsV2Failed"
 
static const std::string CREATE_ALERTS_V3_FAILED = "createAlertsV3Failed"
 
static const std::string CREATE_DATABASE_FAILED = "createDatabaseFailed"
 
static const std::vector< int > RETRY_TABLE = {10, 20, 40}
 The table with entries for retry times in milliseconds. More...
 
static const size_t RETRY_TIME_MAXIMUM = RETRY_TABLE.size()
 The maximum retry times. More...
 

Function Documentation

◆ alertStateToDbField()

static bool alexaClientSDK::acsdkAlerts::storage::alertStateToDbField ( Alert::State  state,
int *  dbState 
)
static

Utility function to convert an alert state into a value we can store in the database.

Parameters
stateThe state of an alert.
[out]dbStateThe destination of the converted state which may be stored in a database.
Returns
Whether the state was successfully converted.

◆ alertTypeToDbField()

static bool alexaClientSDK::acsdkAlerts::storage::alertTypeToDbField ( const std::string &  alertType,
int *  dbType 
)
static

Utility function to convert an alert type string into a value we can store in the database.

Parameters
alertTypeA string reflecting the type of an alert.
[out]dbTypeThe destination of the converted type which may be stored in a database.
Returns
Whether the type was successfully converted.

◆ createAlertAssetPlayOrderItemsTable()

static bool alexaClientSDK::acsdkAlerts::storage::createAlertAssetPlayOrderItemsTable ( SQLiteDatabase db)
static

Utility function to create the AlertAssetPlayOrderItems table within the database.

Parameters
dbThe SQLiteDatabase object.
Returns
Whether the table was successfully created.

◆ createAlertAssetsTable()

static bool alexaClientSDK::acsdkAlerts::storage::createAlertAssetsTable ( SQLiteDatabase db)
static

Utility function to create the AlertAssets table within the database.

Parameters
dbThe SQLiteDatabase object.
Returns
Whether the table was successfully created.

◆ createAlertsTable()

static bool alexaClientSDK::acsdkAlerts::storage::createAlertsTable ( SQLiteDatabase db)
static

Utility function to create the Alerts table within the database.

Parameters
dbThe SQLiteDatabase object.
Returns
Whether the table was successfully created.

◆ createOfflineAlertsTable()

static bool alexaClientSDK::acsdkAlerts::storage::createOfflineAlertsTable ( SQLiteDatabase db)
static

Utility function to create the offline Alerts table within the database.

Parameters
dbThe SQLiteDatabase object.
Returns
Whether the table was successfully created.

◆ dbFieldToAlertState()

static bool alexaClientSDK::acsdkAlerts::storage::dbFieldToAlertState ( int  dbState,
Alert::State state 
)
static

Utility function to convert a database value for an alert state into its Alert equivalent.

Parameters
dbStateThe state of an alert, as stored in the database.
[out]dbStateThe destination of the converted state.
Returns
Whether the database value was successfully converted.

◆ eraseAlert()

static bool alexaClientSDK::acsdkAlerts::storage::eraseAlert ( int  dbVersion,
SQLiteDatabase db,
int  alertId 
)
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.

Parameters
dbVersionThe version of the alerts table.
dbThe database object.
alertIdThe alert id of the alert to be deleted.
Returns
Whether the delete operation was successful.

◆ eraseAlertAssetPlayOrderItems()

static bool alexaClientSDK::acsdkAlerts::storage::eraseAlertAssetPlayOrderItems ( SQLiteDatabase db,
int  alertId 
)
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.

Parameters
dbThe database object.
alertIdThe alert id of the alert to be deleted.
Returns
Whether the delete operation was successful.

◆ eraseAlertAssets()

static bool alexaClientSDK::acsdkAlerts::storage::eraseAlertAssets ( SQLiteDatabase db,
int  alertId 
)
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.

Parameters
dbThe database object.
alertIdThe alert id of the alert to be deleted.
Returns
Whether the delete operation was successful.

◆ eraseAlertByAlertId()

static bool alexaClientSDK::acsdkAlerts::storage::eraseAlertByAlertId ( SQLiteDatabase db,
int  alertId 
)
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.

Parameters
dbThe DB object.
alertIdThe alert id of the alert to be deleted.
Returns
Whether the delete operation was successful.

◆ eraseOfflineAlert()

static bool alexaClientSDK::acsdkAlerts::storage::eraseOfflineAlert ( const int  dbVersion,
SQLiteDatabase db,
const std::string &  token 
)
static

A utility function to delete alert records from the offline database for a given alert id. This function will clean up records in the offline alerts table.

Parameters
dbThe database object.
tokenThe AVS token to identify the alert.
Returns
Whether the delete operation was successful.

◆ loadAlertAssetPlayOrderItems()

static bool alexaClientSDK::acsdkAlerts::storage::loadAlertAssetPlayOrderItems ( SQLiteDatabase db,
std::map< int, std::set< AssetOrderItem, AssetOrderItemCompare >> *  alertAssetOrderItemsMap 
)
static

Reads the assets order from the database and stores this data on the given map.

Parameters
dbThe database object to read data from.
alertAssetOrderItemsMapThe map that will receive data.
Returns
true if data was loaded successfully from the database

◆ loadAlertAssets()

static bool alexaClientSDK::acsdkAlerts::storage::loadAlertAssets ( SQLiteDatabase db,
std::map< int, std::vector< Alert::Asset >> *  alertAssetsMap 
)
static

Loads asset data into the map.

Parameters
dbThe database object to read data from.
alertAssetsMapThe map that will receive the assets.
Returns
true if data was loaded successfully

◆ printAlertsSummary()

static void alexaClientSDK::acsdkAlerts::storage::printAlertsSummary ( SQLiteDatabase db,
const std::vector< std::shared_ptr< Alert >> &  alerts,
bool  shouldPrintEverything = false 
)
static

Utility diagnostic function to print the details of all the alerts stored in the database.

Parameters
dbThe database object.
shouldPrintEverythingIf true, then all details of an alert will be printed. If false, then summary information will be printed instead.

◆ printOneLineSummary()

static void alexaClientSDK::acsdkAlerts::storage::printOneLineSummary ( SQLiteDatabase db)
static

Utility diagnostic function to print a one-line summary of all alerts in the database.

Parameters
dbThe database object.

◆ storeAlertAssetPlayOrderItems()

static bool alexaClientSDK::acsdkAlerts::storage::storeAlertAssetPlayOrderItems ( SQLiteDatabase db,
int  alertId,
const std::vector< std::string > &  assetPlayOrderItems 
)
static

◆ storeAlertAssets()

static bool alexaClientSDK::acsdkAlerts::storage::storeAlertAssets ( SQLiteDatabase db,
int  alertId,
const std::unordered_map< std::string, Alert::Asset > &  assets 
)
static

◆ submitMetric()

static void alexaClientSDK::acsdkAlerts::storage::submitMetric ( const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface metricRecorder,
const std::string &  eventName,
const int  count 
)
static

Submits a metric for a given event name.

Parameters
metricRecorderThe MetricRecorderInterface used to record metrics.
eventNameThe name of the metric event.
countThe number of data point to be added.

◆ TAG()

static const std::string alexaClientSDK::acsdkAlerts::storage::TAG ( "SQLiteAlertStorage"  )
static

String to identify log entries originating from this file.

Variable Documentation

◆ ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_NAME = "alertAssetPlayOrderItems"
static

The name of the alertAssetPlayOrderItems table.

◆ ALERT_ASSETS_TABLE_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::ALERT_ASSETS_TABLE_NAME = "alertAssets"
static

The name of the alertAssets table.

◆ ALERT_DATABASE_OPEN_FAILED

const std::string alexaClientSDK::acsdkAlerts::storage::ALERT_DATABASE_OPEN_FAILED = "databaseOpenFailed"
static

The event names for metrics.

◆ ALERT_EVENT_TYPE_ALARM

const int alexaClientSDK::acsdkAlerts::storage::ALERT_EVENT_TYPE_ALARM = 1
static

A definition which we will store in the database to indicate Alarm type.

◆ ALERT_EVENT_TYPE_ALARM_STRING

const std::string alexaClientSDK::acsdkAlerts::storage::ALERT_EVENT_TYPE_ALARM_STRING = "ALARM"
static

This is the string value this code will expect form an Alert of Alarm type.

◆ ALERT_EVENT_TYPE_REMINDER

const int alexaClientSDK::acsdkAlerts::storage::ALERT_EVENT_TYPE_REMINDER = 3
static

A definition which we will store in the database to indicate Reminder type.

◆ ALERT_EVENT_TYPE_REMINDER_STRING

const std::string alexaClientSDK::acsdkAlerts::storage::ALERT_EVENT_TYPE_REMINDER_STRING = "REMINDER"
static

This is the string value this code will expect form an Alert of Reminder type.

◆ ALERT_EVENT_TYPE_TIMER

const int alexaClientSDK::acsdkAlerts::storage::ALERT_EVENT_TYPE_TIMER = 2
static

A definition which we will store in the database to indicate Timer type.

◆ ALERT_EVENT_TYPE_TIMER_STRING

const std::string alexaClientSDK::acsdkAlerts::storage::ALERT_EVENT_TYPE_TIMER_STRING = "TIMER"
static

This is the string value this code will expect form an Alert of Timer type.

◆ ALERT_METRIC_PREFIX

const std::string alexaClientSDK::acsdkAlerts::storage::ALERT_METRIC_PREFIX = "ALERT-"
static

The prefix for alert metrics.

◆ ALERT_STATE_ACTIVATING

const int alexaClientSDK::acsdkAlerts::storage::ALERT_STATE_ACTIVATING = 3
static

A definition which we will store in the database to indicate an Alert's Activating state.

◆ ALERT_STATE_ACTIVE

const int alexaClientSDK::acsdkAlerts::storage::ALERT_STATE_ACTIVE = 4
static

A definition which we will store in the database to indicate an Alert's Active state.

◆ ALERT_STATE_COMPLETED

const int alexaClientSDK::acsdkAlerts::storage::ALERT_STATE_COMPLETED = 9
static

A definition which we will store in the database to indicate an Alert's Completed state.

◆ ALERT_STATE_READY

const int alexaClientSDK::acsdkAlerts::storage::ALERT_STATE_READY = 10
static

A definition which we will store in the database to indicate an Alert's Ready state.

◆ ALERT_STATE_SET

const int alexaClientSDK::acsdkAlerts::storage::ALERT_STATE_SET = 2
static

A definition which we will store in the database to indicate an Alert's Set state.

◆ ALERT_STATE_SNOOZED

const int alexaClientSDK::acsdkAlerts::storage::ALERT_STATE_SNOOZED = 6
static

A definition which we will store in the database to indicate an Alert's Snoozed state.

◆ ALERT_STATE_SNOOZING

const int alexaClientSDK::acsdkAlerts::storage::ALERT_STATE_SNOOZING = 5
static

A definition which we will store in the database to indicate an Alert's Snoozing state.

◆ ALERT_STATE_STOPPED

const int alexaClientSDK::acsdkAlerts::storage::ALERT_STATE_STOPPED = 8
static

A definition which we will store in the database to indicate an Alert's Stopped state.

◆ ALERT_STATE_STOPPING

const int alexaClientSDK::acsdkAlerts::storage::ALERT_STATE_STOPPING = 7
static

A definition which we will store in the database to indicate an Alert's Stopping state.

◆ ALERT_STATE_UNSET

const int alexaClientSDK::acsdkAlerts::storage::ALERT_STATE_UNSET = 1
static

A definition which we will store in the database to indicate an Alert's Unset state.

◆ ALERTS_CAPABILITY_AGENT_CONFIGURATION_ROOT_KEY

const std::string alexaClientSDK::acsdkAlerts::storage::ALERTS_CAPABILITY_AGENT_CONFIGURATION_ROOT_KEY = "alertsCapabilityAgent"
static

The key in our config file to find the root of settings for this Capability Agent.

◆ ALERTS_CAPABILITY_AGENT_DB_FILE_PATH_KEY

const std::string alexaClientSDK::acsdkAlerts::storage::ALERTS_CAPABILITY_AGENT_DB_FILE_PATH_KEY = "databaseFilePath"
static

The key in our config file to find the database file path.

◆ ALERTS_DATABASE_VERSION_THREE

const int alexaClientSDK::acsdkAlerts::storage::ALERTS_DATABASE_VERSION_THREE = 3
static

A symbolic name for version three of our database.

◆ ALERTS_DATABASE_VERSION_TWO

const int alexaClientSDK::acsdkAlerts::storage::ALERTS_DATABASE_VERSION_TWO = 2
static

A symbolic name for version two of our database.

◆ ALERTS_V2_TABLE_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::ALERTS_V2_TABLE_NAME = "alerts_v2"
static

The name of the alerts (v2) table.

◆ ALERTS_V2ToV3_MIGRATION_FAILED

const std::string alexaClientSDK::acsdkAlerts::storage::ALERTS_V2ToV3_MIGRATION_FAILED = "alertsV2ToV3MigrationFailed"
static

◆ ALERTS_V3_TABLE_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::ALERTS_V3_TABLE_NAME = "alerts_v3"
static

The name of the alerts (v3) table.

◆ CREATE_ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_SQL_STRING

const std::string alexaClientSDK::acsdkAlerts::storage::CREATE_ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_SQL_STRING
static
Initial value:
= std::string("CREATE TABLE ") +
"id INT PRIMARY KEY NOT NULL," +
"alert_id INT NOT NULL," +
"asset_play_order_position INT NOT NULL," +
"asset_play_order_token TEXT NOT NULL);"
static const std::string ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_NAME
The name of the alertAssetPlayOrderItems table.
Definition: SQLiteAlertStorage.cpp:192

The SQL string to create the alertAssetPlayOrderItems table.

◆ CREATE_ALERT_ASSETS_TABLE_SQL_STRING

const std::string alexaClientSDK::acsdkAlerts::storage::CREATE_ALERT_ASSETS_TABLE_SQL_STRING
static
Initial value:
= std::string("CREATE TABLE ") +
"id INT PRIMARY KEY NOT NULL," +
"alert_id INT NOT NULL," +
"avs_id TEXT NOT NULL," +
"url TEXT NOT NULL);"
static const std::string ALERT_ASSETS_TABLE_NAME
The name of the alertAssets table.
Definition: SQLiteAlertStorage.cpp:159

The SQL string to create the alertAssets table.

◆ CREATE_ALERTS_TABLE_SQL_STRING

const std::string alexaClientSDK::acsdkAlerts::storage::CREATE_ALERTS_TABLE_SQL_STRING
static
Initial value:
= std::string("CREATE TABLE ") +
DATABASE_COLUMN_ID_NAME + " INT PRIMARY KEY NOT NULL," +
DATABASE_COLUMN_TOKEN_NAME + " TEXT NOT NULL," +
DATABASE_COLUMN_TYPE_NAME + " INT NOT NULL," +
DATABASE_COLUMN_STATE_NAME + " INT NOT NULL," +
DATABASE_COLUMN_ORIGINAL_TIME_NAME + " TEXT NOT NULL," +
DATABASE_COLUMN_LABEL_NAME + " TEXT NOT NULL," +
DATABASE_COLUMN_CREATED_TIME_NAME + " TEXT NOT NULL);"
static const std::string DATABASE_COLUMN_ASSET_LOOP_PAUSE_MILLISECONDS_NAME
The name of the &#39;asset_loop_pause_milliseconds&#39; field used in alerts table.
Definition: SQLiteAlertStorage.cpp:118
static const std::string DATABASE_COLUMN_TOKEN_NAME
The name of the &#39;token&#39; field used in alerts table.
Definition: SQLiteAlertStorage.cpp:106
static const std::string DATABASE_COLUMN_ID_NAME
The name of the &#39;id&#39; field we will use as the primary key in our tables.
Definition: SQLiteAlertStorage.cpp:104
static const std::string DATABASE_COLUMN_SCHEDULED_TIME_UNIX_NAME
The name of the &#39;scheduled_time_unix&#39; field used in alerts table.
Definition: SQLiteAlertStorage.cpp:112
static const std::string DATABASE_COLUMN_TYPE_NAME
The name of the &#39;type&#39; field used in alerts table.
Definition: SQLiteAlertStorage.cpp:108
static const std::string DATABASE_COLUMN_BACKGROUND_ASSET_NAME
The name of the &#39;background_asset&#39; field used in alerts table.
Definition: SQLiteAlertStorage.cpp:120
static const std::string DATABASE_COLUMN_LABEL_NAME
The name of the &#39;label&#39; field used in alerts table.
Definition: SQLiteAlertStorage.cpp:124
static const std::string DATABASE_COLUMN_STATE_NAME
The name of the &#39;state&#39; field used in alerts table.
Definition: SQLiteAlertStorage.cpp:110
static const std::string DATABASE_COLUMN_SCHEDULED_TIME_ISO_8601_NAME
The name of the &#39;scheduled_time_iso_8601&#39; field used in alerts table.
Definition: SQLiteAlertStorage.cpp:114
static const std::string DATABASE_COLUMN_ASSET_LOOP_COUNT_NAME
The name of the &#39;asset_loop_count&#39; field used in alerts table.
Definition: SQLiteAlertStorage.cpp:116
static const std::string ALERTS_V3_TABLE_NAME
The name of the alerts (v3) table.
Definition: SQLiteAlertStorage.cpp:138
static const std::string DATABASE_COLUMN_CREATED_TIME_NAME
The name of the &#39;created_time_iso_8601&#39; field used in alerts table.
Definition: SQLiteAlertStorage.cpp:126
static const std::string DATABASE_COLUMN_ORIGINAL_TIME_NAME
The name of the &#39;original_time&#39; field used in alerts table.
Definition: SQLiteAlertStorage.cpp:122

The SQL string to create the alerts table.

◆ CREATE_ALERTS_V3_FAILED

const std::string alexaClientSDK::acsdkAlerts::storage::CREATE_ALERTS_V3_FAILED = "createAlertsV3Failed"
static

◆ CREATE_DATABASE_FAILED

const std::string alexaClientSDK::acsdkAlerts::storage::CREATE_DATABASE_FAILED = "createDatabaseFailed"
static

◆ CREATE_OFFLINE_ALERTS_TABLE_SQL_STRING

const std::string alexaClientSDK::acsdkAlerts::storage::CREATE_OFFLINE_ALERTS_TABLE_SQL_STRING
static
Initial value:
= std::string("CREATE TABLE ") +
"id INT PRIMARY KEY NOT NULL," +
"token TEXT NOT NULL," +
"scheduled_time_iso_8601 TEXT NOT NULL," +
"event_time_iso_8601 TEXT NOT NULL);"
static const std::string OFFLINE_ALERTS_V2_TABLE_NAME
The name of the offline alerts (v2) table.
Definition: SQLiteAlertStorage.cpp:174

The SQL string to create the offline alerts table.

◆ CREATE_OFFLINE_ALERTS_V2_FAILED

const std::string alexaClientSDK::acsdkAlerts::storage::CREATE_OFFLINE_ALERTS_V2_FAILED = "createOfflineAlertsV2Failed"
static

◆ DATABASE_COLUMN_ASSET_LOOP_COUNT_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::DATABASE_COLUMN_ASSET_LOOP_COUNT_NAME = "asset_loop_count"
static

The name of the 'asset_loop_count' field used in alerts table.

◆ DATABASE_COLUMN_ASSET_LOOP_PAUSE_MILLISECONDS_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::DATABASE_COLUMN_ASSET_LOOP_PAUSE_MILLISECONDS_NAME = "asset_loop_pause_milliseconds"
static

The name of the 'asset_loop_pause_milliseconds' field used in alerts table.

◆ DATABASE_COLUMN_BACKGROUND_ASSET_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::DATABASE_COLUMN_BACKGROUND_ASSET_NAME = "background_asset"
static

The name of the 'background_asset' field used in alerts table.

◆ DATABASE_COLUMN_CREATED_TIME_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::DATABASE_COLUMN_CREATED_TIME_NAME = "created_time_iso_8601"
static

The name of the 'created_time_iso_8601' field used in alerts table.

◆ DATABASE_COLUMN_ID_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::DATABASE_COLUMN_ID_NAME = "id"
static

The name of the 'id' field we will use as the primary key in our tables.

◆ DATABASE_COLUMN_LABEL_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::DATABASE_COLUMN_LABEL_NAME = "label"
static

The name of the 'label' field used in alerts table.

◆ DATABASE_COLUMN_ORIGINAL_TIME_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::DATABASE_COLUMN_ORIGINAL_TIME_NAME = "original_time"
static

The name of the 'original_time' field used in alerts table.

◆ DATABASE_COLUMN_SCHEDULED_TIME_ISO_8601_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::DATABASE_COLUMN_SCHEDULED_TIME_ISO_8601_NAME = "scheduled_time_iso_8601"
static

The name of the 'scheduled_time_iso_8601' field used in alerts table.

◆ DATABASE_COLUMN_SCHEDULED_TIME_UNIX_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::DATABASE_COLUMN_SCHEDULED_TIME_UNIX_NAME = "scheduled_time_unix"
static

The name of the 'scheduled_time_unix' field used in alerts table.

◆ DATABASE_COLUMN_STATE_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::DATABASE_COLUMN_STATE_NAME = "state"
static

The name of the 'state' field used in alerts table.

◆ DATABASE_COLUMN_TOKEN_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::DATABASE_COLUMN_TOKEN_NAME = "token"
static

The name of the 'token' field used in alerts table.

◆ DATABASE_COLUMN_TYPE_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::DATABASE_COLUMN_TYPE_NAME = "type"
static

The name of the 'type' field used in alerts table.

◆ OFFLINE_ALERTS_DATABASE_VERSION_ONE

const int alexaClientSDK::acsdkAlerts::storage::OFFLINE_ALERTS_DATABASE_VERSION_ONE = 1
static

A symbolic name for version one of our offline alerts database.

◆ OFFLINE_ALERTS_DATABASE_VERSION_TWO

const int alexaClientSDK::acsdkAlerts::storage::OFFLINE_ALERTS_DATABASE_VERSION_TWO = 2
static

A symbolic name for version two of our offline alerts database.

◆ OFFLINE_ALERTS_TABLE_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::OFFLINE_ALERTS_TABLE_NAME = "offlineAlerts"
static

The name of the offline alerts (v1) table.

◆ OFFLINE_ALERTS_V1ToV2_MIGRATION_FAILED

const std::string alexaClientSDK::acsdkAlerts::storage::OFFLINE_ALERTS_V1ToV2_MIGRATION_FAILED = "offlineAlertsV1ToV2MigrationFailed"
static

◆ OFFLINE_ALERTS_V2_TABLE_NAME

const std::string alexaClientSDK::acsdkAlerts::storage::OFFLINE_ALERTS_V2_TABLE_NAME = "offlineAlerts_v2"
static

The name of the offline alerts (v2) table.

◆ OFFLINE_STOPPED_ALERT_EVENT_TIME_KEY

const std::string alexaClientSDK::acsdkAlerts::storage::OFFLINE_STOPPED_ALERT_EVENT_TIME_KEY = "eventTime"
static

The value of the offline stopped alert eventTime key.

◆ OFFLINE_STOPPED_ALERT_ID_KEY

const std::string alexaClientSDK::acsdkAlerts::storage::OFFLINE_STOPPED_ALERT_ID_KEY = "id"
static

The value of the offline stopped alert id key.

◆ OFFLINE_STOPPED_ALERT_SCHEDULED_TIME_KEY

const std::string alexaClientSDK::acsdkAlerts::storage::OFFLINE_STOPPED_ALERT_SCHEDULED_TIME_KEY = "scheduledTime"
static

The value of the offline stopped alert scheduledTime key.

◆ OFFLINE_STOPPED_ALERT_TOKEN_KEY

const std::string alexaClientSDK::acsdkAlerts::storage::OFFLINE_STOPPED_ALERT_TOKEN_KEY = "token"
static

The value of the offline stopped alert token key.

◆ RETRY_TABLE

const std::vector<int> alexaClientSDK::acsdkAlerts::storage::RETRY_TABLE = {10, 20, 40}
static

The table with entries for retry times in milliseconds.

◆ RETRY_TIME_MAXIMUM

const size_t alexaClientSDK::acsdkAlerts::storage::RETRY_TIME_MAXIMUM = RETRY_TABLE.size()
static

The maximum retry times.

AlexaClientSDK 1.26.0 - Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0