AlexaClientSDK  1.20.1
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
alexaClientSDK::capabilityAgents::system Namespace Reference

Namespaces

 test
 

Classes

class  LocaleHandler
 
class  ReportStateHandler
 
class  RevokeAuthorizationHandler
 
class  SoftwareInfoSender
 
class  SoftwareInfoSendRequest
 
class  StateReportGenerator
 
class  StateReportGeneratorTest
 
class  SystemCapabilityProvider
 
class  TimeZoneHandler
 
class  UserInactivityMonitor
 This class implements a CapabilityAgent that handles the SetEndpoint directive. More...
 

Typedefs

using MockSettingManager = SettingsManager< SettingInterface< bool >, SettingInterface< int >, SettingInterface< std::string > >
 Alias for setting manager configuration. More...
 

Enumerations

enum  Index { BOOL, INT, STRING }
 Index used for setting access. More...
 

Functions

static const std::string TAG ("LocaleHandler")
 String to identify log entries originating from this file. More...
 
static const std::string TAG ("ReportStateHandler")
 String to identify log entries originating from this file. More...
 
static bool initializeDataBase (storage::MiscStorageInterface &storage)
 
static const std::string TAG ("StateReportGenerator")
 String to identify log entries originating from this file. More...
 
static std::shared_ptr< avsCommon::avs::CapabilityConfigurationgetSystemCapabilityConfiguration (const std::shared_ptr< avsCommon::sdkInterfaces::LocaleAssetsManagerInterface > &localeAssetsManager)
 
static const std::string TAG ("TimeZoneHandler")
 String to identify log entries originating from this file. More...
 
static const std::string TAG ("UserInactivityMonitor")
 String to identify log entries originating from this file. More...
 
 TEST_F (StateReportGeneratorTest, test_createWithoutSettingManagerShouldFail)
 
 TEST_F (StateReportGeneratorTest, test_createWithEmptySettingManagerShouldSucceed)
 
 TEST_F (StateReportGeneratorTest, test_createWithFullSettingManagerShouldSucceed)
 
 TEST_F (StateReportGeneratorTest, test_generateReportWithFullSettingManager)
 
 TEST_F (StateReportGeneratorTest, test_generateReportWithPartialSettingManager)
 

Variables

static const std::string LOCALE_NAMESPACE = "System"
 This string holds the namespace for AVS enpointing. More...
 
static const std::string SET_LOCALE_DIRECTIVE = "SetLocales"
 This string holds the name of the directive that's being sent for setting the locale. More...
 
static const std::string LOCALE_REPORT_EVENT = "LocalesReport"
 This string holds the name of the event to report the locale. More...
 
static const std::string LOCALE_CHANGED_EVENT = "LocalesChanged"
 This string holds the name of the event to change the locale. More...
 
static const std::string LOCALE_PAYLOAD_KEY = "locales"
 This string holds the key for the locale in the payload. More...
 
static const std::string REPORT_STATE_NAMESPACE = "System"
 This string holds the namespace for AVS enpointing. More...
 
static const std::string REPORT_STATE_DIRECTIVE = "ReportState"
 This string holds the name of the directive that's being sent for report states. More...
 
static const std::string PENDING_REPORT_STATE_KEY = "pendingReportState"
 Key for pending report value. More...
 
static const std::string REPORT_STATE_COMPONENT_NAME = "ReportStateHandler"
 Component name used to store pending value in the misc storage. More...
 
static const std::string REPORT_STATE_TABLE = "ReportStateTable"
 The report state table name. More...
 
static const std::string PENDING_REPORT_VALUE = "true"
 The value we add to the database when a report is pending. More...
 
static const settings::SettingEventMetadata REPORT_STATE_METADATA
 This structure represents the report state event metadata. More...
 
static const std::string TAG {"RevokeAuthorizationHandler"}
 String to identify log entries originating from this file. More...
 
static const std::string REVOKE_NAMESPACE = "System"
 This string holds the namespace for AVS revoke. More...
 
static const std::string REVOKE_DIRECTIVE_NAME = "RevokeAuthorization"
 This string holds the name of the directive that's being sent for revoking. More...
 
static const std::string TAG {"SoftwareInfoSender"}
 String to identify log entries originating from this file. More...
 
static const std::string NAMESPACE_SYSTEM = "System"
 
static const NamespaceAndName REPORT_SOFTWARE_INFO (NAMESPACE_SYSTEM, "ReportSoftwareInfo")
 Namespace, Name pair for System.ReportSoftwareInfo. More...
 
static const std::string TAG {"SoftwareInfoSendRequest"}
 String to identify log entries originating from this file. More...
 
static const std::string NAMESPACE_SYSTEM = "System"
 This string holds the "System" namespace. More...
 
static const std::string NAME_SOFTWARE_INFO = "SoftwareInfo"
 This string holds the name of the "SoftwareInfo" event. More...
 
static const char FIRMWARE_VERSION_STRING [] = "firmwareVersion"
 JSON value for the firmwareVersion field of the SoftwareInfo event. More...
 
static std::vector< int > RETRY_TABLE
 Approximate amount of time to wait between retries. More...
 
static avsCommon::utils::RetryTimer RETRY_TIMER (RETRY_TABLE)
 Object for calculating retry timeout values. More...
 
static const std::string TAG {"SystemCapabilityProvider"}
 String to identify log entries originating from this file. More...
 
static const std::string SYSTEM_CAPABILITY_INTERFACE_TYPE = "AlexaInterface"
 
static const std::string SYSTEM_CAPABILITY_INTERFACE_NAME = "System"
 System interface name. More...
 
static const std::string SYSTEM_CAPABILITY_INTERFACE_VERSION = "2.0"
 System interface version. More...
 
static const std::string LOCALES_CONFIGURATION_KEY = "locales"
 LOCALES_CONFIGURATION_KEY. More...
 
static const std::string LOCALE_COMBINATION_CONFIGURATION_KEY = "localeCombinations"
 Locale Combinations Key. More...
 
static const std::string TIMEZONE_NAMESPACE = "System"
 This string holds the namespace for AVS enpointing. More...
 
static const std::string SET_TIMEZONE_DIRECTIVE = "SetTimeZone"
 This string holds the name of the directive that's being sent for setting the timezone. More...
 
static const std::string TIMEZONE_REPORT_EVENT = "TimeZoneReport"
 This string holds the name of the event to report the timezone. More...
 
static const std::string TIMEZONE_CHANGED_EVENT = "TimeZoneChanged"
 This string holds the name of the event to change the timezone. More...
 
static const std::string TIMEZONE_PAYLOAD_KEY = "timeZone"
 This string holds the key for the timezone in the payload. More...
 
static const int SECONDS_IN_HOUR = 3600
 Number of seconds in one hour. More...
 
static const std::string USER_INACTIVITY_MONITOR_NAMESPACE = "System"
 String to identify the AVS namespace of the event we send. More...
 
static const std::string INACTIVITY_EVENT_NAME = "UserInactivityReport"
 String to identify the AVS name of the event we send. More...
 
static const std::string INACTIVITY_EVENT_PAYLOAD_KEY = "inactiveTimeInSeconds"
 String to identify the key of the payload associated to the inactivity. More...
 
static const std::string RESET_DIRECTIVE_NAME = "ResetUserInactivity"
 String to identify the AVS name of the directive we receive. More...
 
Mock values and string representantion.
constexpr bool BOOL_SETTING_VALUE = true
 
constexpr int INT_SETTING_VALUE = 10
 
static const std::string BOOL_SETTING_STRING_VALUE = "true"
 
static const std::string INT_SETTING_STRING_VALUE = "10"
 
static const std::string STRING_SETTING_VALUE = "string"
 
static const std::string STRING_SETTING_STRING_VALUE = R"("string")"
 

Typedef Documentation

◆ MockSettingManager

Alias for setting manager configuration.

Enumeration Type Documentation

◆ Index

Index used for setting access.

Enumerator
BOOL 
INT 
STRING 

Function Documentation

◆ getSystemCapabilityConfiguration()

std::shared_ptr< avsCommon::avs::CapabilityConfiguration > alexaClientSDK::capabilityAgents::system::getSystemCapabilityConfiguration ( const std::shared_ptr< avsCommon::sdkInterfaces::LocaleAssetsManagerInterface > &  localeAssetsManager)
static

Creates the System capability configuration.

Parameters
localeAssetsManagerThe locale assets manager that provides supported locales.
Returns
The System capability configuration.

◆ initializeDataBase()

static bool alexaClientSDK::capabilityAgents::system::initializeDataBase ( storage::MiscStorageInterface storage)
static

Initialize the storage.

Parameters
storageThe storage to be initialized.
Returns
true if it succeeded, false otherwise.

◆ TAG() [1/5]

static const std::string alexaClientSDK::capabilityAgents::system::TAG ( "StateReportGenerator"  )
static

String to identify log entries originating from this file.

◆ TAG() [2/5]

static const std::string alexaClientSDK::capabilityAgents::system::TAG ( "ReportStateHandler"  )
static

String to identify log entries originating from this file.

◆ TAG() [3/5]

static const std::string alexaClientSDK::capabilityAgents::system::TAG ( "TimeZoneHandler"  )
static

String to identify log entries originating from this file.

◆ TAG() [4/5]

static const std::string alexaClientSDK::capabilityAgents::system::TAG ( "UserInactivityMonitor"  )
static

String to identify log entries originating from this file.

◆ TAG() [5/5]

static const std::string alexaClientSDK::capabilityAgents::system::TAG ( "LocaleHandler"  )
static

String to identify log entries originating from this file.

◆ TEST_F() [1/5]

alexaClientSDK::capabilityAgents::system::TEST_F ( StateReportGeneratorTest  ,
test_createWithoutSettingManagerShouldFail   
)

◆ TEST_F() [2/5]

alexaClientSDK::capabilityAgents::system::TEST_F ( StateReportGeneratorTest  ,
test_createWithEmptySettingManagerShouldSucceed   
)

◆ TEST_F() [3/5]

alexaClientSDK::capabilityAgents::system::TEST_F ( StateReportGeneratorTest  ,
test_createWithFullSettingManagerShouldSucceed   
)

◆ TEST_F() [4/5]

alexaClientSDK::capabilityAgents::system::TEST_F ( StateReportGeneratorTest  ,
test_generateReportWithFullSettingManager   
)

◆ TEST_F() [5/5]

alexaClientSDK::capabilityAgents::system::TEST_F ( StateReportGeneratorTest  ,
test_generateReportWithPartialSettingManager   
)

Variable Documentation

◆ BOOL_SETTING_STRING_VALUE

const std::string alexaClientSDK::capabilityAgents::system::BOOL_SETTING_STRING_VALUE = "true"
static

◆ BOOL_SETTING_VALUE

constexpr bool alexaClientSDK::capabilityAgents::system::BOOL_SETTING_VALUE = true

◆ FIRMWARE_VERSION_STRING

const char alexaClientSDK::capabilityAgents::system::FIRMWARE_VERSION_STRING[] = "firmwareVersion"
static

JSON value for the firmwareVersion field of the SoftwareInfo event.

◆ INACTIVITY_EVENT_NAME

const std::string alexaClientSDK::capabilityAgents::system::INACTIVITY_EVENT_NAME = "UserInactivityReport"
static

String to identify the AVS name of the event we send.

◆ INACTIVITY_EVENT_PAYLOAD_KEY

const std::string alexaClientSDK::capabilityAgents::system::INACTIVITY_EVENT_PAYLOAD_KEY = "inactiveTimeInSeconds"
static

String to identify the key of the payload associated to the inactivity.

◆ INT_SETTING_STRING_VALUE

const std::string alexaClientSDK::capabilityAgents::system::INT_SETTING_STRING_VALUE = "10"
static

◆ INT_SETTING_VALUE

constexpr int alexaClientSDK::capabilityAgents::system::INT_SETTING_VALUE = 10

◆ LOCALE_CHANGED_EVENT

const std::string alexaClientSDK::capabilityAgents::system::LOCALE_CHANGED_EVENT = "LocalesChanged"
static

This string holds the name of the event to change the locale.

◆ LOCALE_COMBINATION_CONFIGURATION_KEY

const std::string alexaClientSDK::capabilityAgents::system::LOCALE_COMBINATION_CONFIGURATION_KEY = "localeCombinations"
static

Locale Combinations Key.

◆ LOCALE_NAMESPACE

const std::string alexaClientSDK::capabilityAgents::system::LOCALE_NAMESPACE = "System"
static

This string holds the namespace for AVS enpointing.

◆ LOCALE_PAYLOAD_KEY

const std::string alexaClientSDK::capabilityAgents::system::LOCALE_PAYLOAD_KEY = "locales"
static

This string holds the key for the locale in the payload.

◆ LOCALE_REPORT_EVENT

const std::string alexaClientSDK::capabilityAgents::system::LOCALE_REPORT_EVENT = "LocalesReport"
static

This string holds the name of the event to report the locale.

◆ LOCALES_CONFIGURATION_KEY

const std::string alexaClientSDK::capabilityAgents::system::LOCALES_CONFIGURATION_KEY = "locales"
static

LOCALES_CONFIGURATION_KEY.

◆ NAME_SOFTWARE_INFO

const std::string alexaClientSDK::capabilityAgents::system::NAME_SOFTWARE_INFO = "SoftwareInfo"
static

This string holds the name of the "SoftwareInfo" event.

◆ NAMESPACE_SYSTEM [1/2]

const std::string alexaClientSDK::capabilityAgents::system::NAMESPACE_SYSTEM = "System"
static

◆ NAMESPACE_SYSTEM [2/2]

const std::string alexaClientSDK::capabilityAgents::system::NAMESPACE_SYSTEM = "System"
static

This string holds the "System" namespace.

◆ PENDING_REPORT_STATE_KEY

const std::string alexaClientSDK::capabilityAgents::system::PENDING_REPORT_STATE_KEY = "pendingReportState"
static

Key for pending report value.

◆ PENDING_REPORT_VALUE

const std::string alexaClientSDK::capabilityAgents::system::PENDING_REPORT_VALUE = "true"
static

The value we add to the database when a report is pending.

◆ REPORT_SOFTWARE_INFO

const NamespaceAndName alexaClientSDK::capabilityAgents::system::REPORT_SOFTWARE_INFO(NAMESPACE_SYSTEM, "ReportSoftwareInfo")
static

Namespace, Name pair for System.ReportSoftwareInfo.

◆ REPORT_STATE_COMPONENT_NAME

const std::string alexaClientSDK::capabilityAgents::system::REPORT_STATE_COMPONENT_NAME = "ReportStateHandler"
static

Component name used to store pending value in the misc storage.

◆ REPORT_STATE_DIRECTIVE

const std::string alexaClientSDK::capabilityAgents::system::REPORT_STATE_DIRECTIVE = "ReportState"
static

This string holds the name of the directive that's being sent for report states.

◆ REPORT_STATE_METADATA

const settings::SettingEventMetadata alexaClientSDK::capabilityAgents::system::REPORT_STATE_METADATA
static
Initial value:
std::string(),
std::string("StateReport"),
std::string("states")}
static const std::string REPORT_STATE_NAMESPACE
This string holds the namespace for AVS enpointing.
Definition: ReportStateHandler.cpp:44

This structure represents the report state event metadata.

◆ REPORT_STATE_NAMESPACE

const std::string alexaClientSDK::capabilityAgents::system::REPORT_STATE_NAMESPACE = "System"
static

This string holds the namespace for AVS enpointing.

◆ REPORT_STATE_TABLE

const std::string alexaClientSDK::capabilityAgents::system::REPORT_STATE_TABLE = "ReportStateTable"
static

The report state table name.

◆ RESET_DIRECTIVE_NAME

const std::string alexaClientSDK::capabilityAgents::system::RESET_DIRECTIVE_NAME = "ResetUserInactivity"
static

String to identify the AVS name of the directive we receive.

◆ RETRY_TABLE

std::vector<int> alexaClientSDK::capabilityAgents::system::RETRY_TABLE
static
Initial value:
= {
1000,
5000,
25000,
1250000,
}

Approximate amount of time to wait between retries.

◆ RETRY_TIMER

avsCommon::utils::RetryTimer alexaClientSDK::capabilityAgents::system::RETRY_TIMER(RETRY_TABLE)
static

Object for calculating retry timeout values.

◆ REVOKE_DIRECTIVE_NAME

const std::string alexaClientSDK::capabilityAgents::system::REVOKE_DIRECTIVE_NAME = "RevokeAuthorization"
static

This string holds the name of the directive that's being sent for revoking.

◆ REVOKE_NAMESPACE

const std::string alexaClientSDK::capabilityAgents::system::REVOKE_NAMESPACE = "System"
static

This string holds the namespace for AVS revoke.

◆ SECONDS_IN_HOUR

const int alexaClientSDK::capabilityAgents::system::SECONDS_IN_HOUR = 3600
static

Number of seconds in one hour.

◆ SET_LOCALE_DIRECTIVE

const std::string alexaClientSDK::capabilityAgents::system::SET_LOCALE_DIRECTIVE = "SetLocales"
static

This string holds the name of the directive that's being sent for setting the locale.

◆ SET_TIMEZONE_DIRECTIVE

const std::string alexaClientSDK::capabilityAgents::system::SET_TIMEZONE_DIRECTIVE = "SetTimeZone"
static

This string holds the name of the directive that's being sent for setting the timezone.

◆ STRING_SETTING_STRING_VALUE

const std::string alexaClientSDK::capabilityAgents::system::STRING_SETTING_STRING_VALUE = R"("string")"
static

◆ STRING_SETTING_VALUE

const std::string alexaClientSDK::capabilityAgents::system::STRING_SETTING_VALUE = "string"
static

◆ SYSTEM_CAPABILITY_INTERFACE_NAME

const std::string alexaClientSDK::capabilityAgents::system::SYSTEM_CAPABILITY_INTERFACE_NAME = "System"
static

System interface name.

◆ SYSTEM_CAPABILITY_INTERFACE_TYPE

const std::string alexaClientSDK::capabilityAgents::system::SYSTEM_CAPABILITY_INTERFACE_TYPE = "AlexaInterface"
static

System capability constants System interface type

◆ SYSTEM_CAPABILITY_INTERFACE_VERSION

const std::string alexaClientSDK::capabilityAgents::system::SYSTEM_CAPABILITY_INTERFACE_VERSION = "2.0"
static

System interface version.

◆ TAG [1/4]

const std::string alexaClientSDK::capabilityAgents::system::TAG {"SystemCapabilityProvider"}
static

String to identify log entries originating from this file.

◆ TAG [2/4]

const std::string alexaClientSDK::capabilityAgents::system::TAG {"RevokeAuthorizationHandler"}
static

String to identify log entries originating from this file.

◆ TAG [3/4]

const std::string alexaClientSDK::capabilityAgents::system::TAG {"SoftwareInfoSender"}
static

String to identify log entries originating from this file.

◆ TAG [4/4]

const std::string alexaClientSDK::capabilityAgents::system::TAG {"SoftwareInfoSendRequest"}
static

String to identify log entries originating from this file.

◆ TIMEZONE_CHANGED_EVENT

const std::string alexaClientSDK::capabilityAgents::system::TIMEZONE_CHANGED_EVENT = "TimeZoneChanged"
static

This string holds the name of the event to change the timezone.

◆ TIMEZONE_NAMESPACE

const std::string alexaClientSDK::capabilityAgents::system::TIMEZONE_NAMESPACE = "System"
static

This string holds the namespace for AVS enpointing.

◆ TIMEZONE_PAYLOAD_KEY

const std::string alexaClientSDK::capabilityAgents::system::TIMEZONE_PAYLOAD_KEY = "timeZone"
static

This string holds the key for the timezone in the payload.

◆ TIMEZONE_REPORT_EVENT

const std::string alexaClientSDK::capabilityAgents::system::TIMEZONE_REPORT_EVENT = "TimeZoneReport"
static

This string holds the name of the event to report the timezone.

◆ USER_INACTIVITY_MONITOR_NAMESPACE

const std::string alexaClientSDK::capabilityAgents::system::USER_INACTIVITY_MONITOR_NAMESPACE = "System"
static

String to identify the AVS namespace of the event we send.

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