AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Static Public Member Functions | List of all members
alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder Class Reference

#include <DeviceSettingsManagerBuilder.h>

Inheritance diagram for alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder:
Collaboration graph
[legend]

Public Member Functions

 DeviceSettingsManagerBuilder (std::shared_ptr< settings::storage::DeviceSettingStorageInterface > settingStorage, std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface > messageSender, std::shared_ptr< avsCommon::sdkInterfaces::AVSConnectionManagerInterface > connectionManager, std::shared_ptr< registrationManager::CustomerDataManagerInterface > dataManager, const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > &metricRecorder)
 
DeviceSettingsManagerBuilderwithDoNotDisturbSetting (const std::shared_ptr< capabilityAgents::doNotDisturb::DoNotDisturbCapabilityAgent > &dndCA)
 
DeviceSettingsManagerBuilderwithAlarmVolumeRampSetting ()
 
DeviceSettingsManagerBuilderwithWakeWordConfirmationSetting ()
 
DeviceSettingsManagerBuilderwithSpeechConfirmationSetting ()
 
DeviceSettingsManagerBuilderwithTimeZoneSetting (std::shared_ptr< avsCommon::sdkInterfaces::SystemTimeZoneInterface > systemTimeZone=nullptr)
 
DeviceSettingsManagerBuilderwithLocaleSetting (std::shared_ptr< avsCommon::sdkInterfaces::LocaleAssetsManagerInterface > localeAssetsManager)
 
DeviceSettingsManagerBuilderwithLocaleAndWakeWordsSettings (std::shared_ptr< avsCommon::sdkInterfaces::LocaleAssetsManagerInterface > localeAssetsManager)
 
DeviceSettingsManagerBuilderwithNetworkInfoSetting ()
 
template<size_t index>
std::shared_ptr< SettingType< index > > getSetting () const
 
template<size_t index>
settings::SettingConfiguration< SettingType< index > > getConfiguration () const
 
std::unique_ptr< settings::DeviceSettingsManagerbuild () override
 

Static Public Member Functions

static std::shared_ptr< settings::DeviceSettingsManagercreateDeviceSettingsManager (std::shared_ptr< settings::storage::DeviceSettingStorageInterface > settingStorage, std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface > messageSender, std::shared_ptr< avsCommon::sdkInterfaces::AVSConnectionManagerInterface > connectionManager, std::shared_ptr< registrationManager::CustomerDataManagerInterface > dataManager, std::shared_ptr< avsCommon::sdkInterfaces::LocaleAssetsManagerInterface > localeAssetsManager, std::shared_ptr< capabilityAgents::doNotDisturb::DoNotDisturbCapabilityAgent > doNotDisturbCapabilityAgent, const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > &metricRecorder, std::shared_ptr< avsCommon::sdkInterfaces::SystemTimeZoneInterface > systemTimezone=nullptr)
 

Detailed Description

The builder for DeviceSettingsManager.

Constructor & Destructor Documentation

◆ DeviceSettingsManagerBuilder()

alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder::DeviceSettingsManagerBuilder ( std::shared_ptr< settings::storage::DeviceSettingStorageInterface settingStorage,
std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface messageSender,
std::shared_ptr< avsCommon::sdkInterfaces::AVSConnectionManagerInterface connectionManager,
std::shared_ptr< registrationManager::CustomerDataManagerInterface dataManager,
const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > &  metricRecorder 
)

Constructor.

Parameters
settingStorageThe storage used for settings.
messageSenderSender used to send events related to this setting changes.
connectionManagerThe ACL connection manager.
dataManagerA dataManager object that will track the CustomerDataHandler.
metricRecorderThe MetricRecorderInterface instance used to log metrics.

Member Function Documentation

◆ build()

std::unique_ptr<settings::DeviceSettingsManager> alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder::build ( )
override

Builds a DeviceSettingsManager with the settings previously configured.

Returns
A pointer to a new DeviceSettingsManager if all settings were successfully built; nullptr otherwise.

◆ createDeviceSettingsManager()

static std::shared_ptr<settings::DeviceSettingsManager> alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder::createDeviceSettingsManager ( std::shared_ptr< settings::storage::DeviceSettingStorageInterface settingStorage,
std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface messageSender,
std::shared_ptr< avsCommon::sdkInterfaces::AVSConnectionManagerInterface connectionManager,
std::shared_ptr< registrationManager::CustomerDataManagerInterface dataManager,
std::shared_ptr< avsCommon::sdkInterfaces::LocaleAssetsManagerInterface localeAssetsManager,
std::shared_ptr< capabilityAgents::doNotDisturb::DoNotDisturbCapabilityAgent doNotDisturbCapabilityAgent,
const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > &  metricRecorder,
std::shared_ptr< avsCommon::sdkInterfaces::SystemTimeZoneInterface systemTimezone = nullptr 
)
static

Factory method that creates a DeviceSettingsManager.

Parameters
settingStorageThe storage used for settings.
messageSenderSender used to send events related to this setting changes.
connectionManagerThe ACL connection manager.
dataManagerA dataManager object that will track the CustomerDataHandler.
localeAssetsManagerThe object that manages locale assets.
doNotDisturbCapabilityAgentThe DoNotDisturb CA. This parameter is needed because currently the DoNotDisturbSetting is managed differently than other settings in the SDK (ACSDK-2279). This is a legacy anti-pattern, and other CAs should be injected with the DeviceSettingsManager (as opposed to the DeviceSettingsManager being injected with the DND CA, as seen here).
metricRecorderThe MetricRecorderInterface instance used to log metrics.
systemTimezoneOptional parameter responsible for validating / applying timezone changes system wide.

◆ getConfiguration()

template<size_t index>
settings::SettingConfiguration< DeviceSettingsManagerBuilder::SettingType< index > > alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder::getConfiguration ( ) const

Gets the setting configuration for the given index.

Template Parameters
indexThe setting index.
Returns
The setting configuration. An empty setting will be returned if the setting wasn't configured.
Note
This function should be used after build() has been called.

◆ getSetting()

template<size_t index>
std::shared_ptr< DeviceSettingsManagerBuilder::SettingType< index > > alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder::getSetting ( ) const

Gets the setting for the given index.

Template Parameters
indexThe setting index.
Returns
A pointer for the setting kept in index if the setting has been built; nullptr otherwise.
Note
This function should be used after build() has been called.

◆ withAlarmVolumeRampSetting()

DeviceSettingsManagerBuilder& alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder::withAlarmVolumeRampSetting ( )

Configures alarm volume ramp setting.

Returns
This builder to allow nested calls.

◆ withDoNotDisturbSetting()

DeviceSettingsManagerBuilder& alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder::withDoNotDisturbSetting ( const std::shared_ptr< capabilityAgents::doNotDisturb::DoNotDisturbCapabilityAgent > &  dndCA)

Configures do not disturb setting.

Parameters
dndCAThe do not disturb capability agent which is actually responsible for building the setting.
Returns
This builder to allow nested calls.

◆ withLocaleAndWakeWordsSettings()

DeviceSettingsManagerBuilder& alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder::withLocaleAndWakeWordsSettings ( std::shared_ptr< avsCommon::sdkInterfaces::LocaleAssetsManagerInterface localeAssetsManager)

Configures locale and wake words setting.

Parameters
localeAssetsManagerThe locale assets manager is responsible for validating / applying locale related changes.
Returns
This builder to allow nested calls.

◆ withLocaleSetting()

DeviceSettingsManagerBuilder& alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder::withLocaleSetting ( std::shared_ptr< avsCommon::sdkInterfaces::LocaleAssetsManagerInterface localeAssetsManager)

Configures locale setting.

Parameters
localeAssetsManagerThe locale assets manager is responsible for validating / applying locale changes.
Returns
This builder to allow nested calls.

◆ withNetworkInfoSetting()

DeviceSettingsManagerBuilder& alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder::withNetworkInfoSetting ( )

Configures network info setting.

Returns
This builder to allow nested calls.

◆ withSpeechConfirmationSetting()

DeviceSettingsManagerBuilder& alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder::withSpeechConfirmationSetting ( )

Configures speech confirmation setting.

Returns
This builder to allow nested calls.

◆ withTimeZoneSetting()

DeviceSettingsManagerBuilder& alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder::withTimeZoneSetting ( std::shared_ptr< avsCommon::sdkInterfaces::SystemTimeZoneInterface systemTimeZone = nullptr)

Configures time zone setting.

Parameters
systemTimeZoneThe system timezone is an optional parameter responsible for validating / applying timezone changes system wide.
Returns
This builder to allow nested calls.

◆ withWakeWordConfirmationSetting()

DeviceSettingsManagerBuilder& alexaClientSDK::acsdkDeviceSettingsManager::DeviceSettingsManagerBuilder::withWakeWordConfirmationSetting ( )

Configures wake word confirmation setting.

Returns
This builder to allow nested calls.

The documentation for this class was generated from the following file:

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