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::defaultClient::DefaultClientBuilder Class Reference

#include <DefaultClientBuilder.h>

Inheritance diagram for alexaClientSDK::defaultClient::DefaultClientBuilder:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::defaultClient::DefaultClientBuilder:
Collaboration graph
[legend]

Public Member Functions

std::shared_ptr< DefaultClientconstruct (const std::shared_ptr< sdkClient::SDKClientRegistry > &sdkClientRegistry)
 
std::string name () override
 
- Public Member Functions inherited from alexaClientSDK::sdkClient::FeatureClientBuilderInterface
virtual ~FeatureClientBuilderInterface ()=default
 

Static Public Member Functions

static std::unique_ptr< DefaultClientBuildercreate (std::shared_ptr< avsCommon::utils::DeviceInfo > deviceInfo, std::shared_ptr< registrationManager::CustomerDataManagerInterface > customerDataManager, std::unordered_map< std::string, std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface >> externalMusicProviderMediaPlayers, std::unordered_map< std::string, std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface >> externalMusicProviderSpeakers, acsdkExternalMediaPlayer::ExternalMediaPlayer::AdapterCreationMap adapterCreationMap, std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > speakMediaPlayer, std::unique_ptr< avsCommon::utils::mediaPlayer::MediaPlayerFactoryInterface > audioMediaPlayerFactory, std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > alertsMediaPlayer, std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > notificationsMediaPlayer, std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > bluetoothMediaPlayer, std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > ringtoneMediaPlayer, std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > systemSoundMediaPlayer, std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface > speakSpeaker, std::vector< std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface >> audioSpeakers, std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface > alertsSpeaker, std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface > notificationsSpeaker, std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface > bluetoothSpeaker, std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface > ringtoneSpeaker, std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface > systemSoundSpeaker, std::multimap< avsCommon::sdkInterfaces::ChannelVolumeInterface::Type, std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface >> additionalSpeakers, std::shared_ptr< EqualizerRuntimeSetup > equalizerRuntimeSetup, std::shared_ptr< avsCommon::sdkInterfaces::audio::AudioFactoryInterface > audioFactory, std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface > authDelegate, std::shared_ptr< acsdkAlerts::storage::AlertStorageInterface > alertStorage, std::shared_ptr< certifiedSender::MessageStorageInterface > messageStorage, std::shared_ptr< acsdkNotificationsInterfaces::NotificationsStorageInterface > notificationsStorage, std::shared_ptr< settings::storage::DeviceSettingStorageInterface > deviceSettingStorage, std::shared_ptr< acsdkBluetoothInterfaces::BluetoothStorageInterface > bluetoothStorage, std::shared_ptr< avsCommon::sdkInterfaces::storage::MiscStorageInterface > miscStorage, std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::DialogUXStateObserverInterface >> alexaDialogStateObservers, std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::ConnectionStatusObserverInterface >> connectionObservers, std::shared_ptr< avsCommon::sdkInterfaces::InternetConnectionMonitorInterface > internetConnectionMonitor, bool isGuiSupported, std::shared_ptr< avsCommon::sdkInterfaces::CapabilitiesDelegateInterface > capabilitiesDelegate, std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager, std::shared_ptr< alexaClientSDK::acl::TransportFactoryInterface > transportFactory, std::shared_ptr< avsCommon::sdkInterfaces::AVSGatewayManagerInterface > avsGatewayManager, std::shared_ptr< avsCommon::sdkInterfaces::LocaleAssetsManagerInterface > localeAssetsManager, std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceConnectionRuleInterface >> enabledConnectionRules=std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceConnectionRuleInterface >>(), std::shared_ptr< avsCommon::sdkInterfaces::SystemTimeZoneInterface > systemTimezone=nullptr, avsCommon::sdkInterfaces::softwareInfo::FirmwareVersion firmwareVersion=avsCommon::sdkInterfaces::softwareInfo::INVALID_FIRMWARE_VERSION, bool sendSoftwareInfoOnConnected=false, std::shared_ptr< avsCommon::sdkInterfaces::SoftwareInfoSenderObserverInterface > softwareInfoSenderObserver=nullptr, std::unique_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceManagerInterface > bluetoothDeviceManager=nullptr, std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > metricRecorder=nullptr, std::shared_ptr< avsCommon::sdkInterfaces::PowerResourceManagerInterface > powerResourceManager=nullptr, std::shared_ptr< avsCommon::sdkInterfaces::diagnostics::DiagnosticsInterface > diagnostics=nullptr, std::shared_ptr< ExternalCapabilitiesBuilderInterface > externalCapabilitiesBuilder=nullptr, std::shared_ptr< avsCommon::sdkInterfaces::ChannelVolumeFactoryInterface > channelVolumeFactory=speakerManager::createChannelVolumeFactory(), bool startAlertSchedulingOnInitialization=true, std::shared_ptr< alexaClientSDK::acl::MessageRouterFactoryInterface > messageRouterFactory=std::make_shared< alexaClientSDK::acl::MessageRouterFactory >(), std::shared_ptr< avsCommon::sdkInterfaces::ExpectSpeechTimeoutHandlerInterface > expectSpeechTimeoutHandler=nullptr, capabilityAgents::aip::AudioProvider firstInteractionAudioProvider=capabilityAgents::aip::AudioProvider::null(), std::shared_ptr< alexaClientSDK::cryptoInterfaces::CryptoFactoryInterface > cryptoFactory=nullptr)
 

Additional Inherited Members

- Protected Member Functions inherited from alexaClientSDK::sdkClient::FeatureClientBuilderInterface
template<typename ComponentType >
ACSDK_INLINE_VISIBILITY void addRequiredType ()
 

Detailed Description

The DefaultClientBuilder is used to construct DefaultClient when used with the ClientBuilder

Member Function Documentation

◆ construct()

std::shared_ptr<DefaultClient> alexaClientSDK::defaultClient::DefaultClientBuilder::construct ( const std::shared_ptr< sdkClient::SDKClientRegistry > &  sdkClientRegistry)

Function used by SDKClientBuilder to construct an instance of DefaultClient

Parameters
sdkClientRegistryThe SDKClientRegistry object
Returns
An instance of the DefaultClient, or nullptr if creation failed

◆ create()

static std::unique_ptr<DefaultClientBuilder> alexaClientSDK::defaultClient::DefaultClientBuilder::create ( std::shared_ptr< avsCommon::utils::DeviceInfo deviceInfo,
std::shared_ptr< registrationManager::CustomerDataManagerInterface customerDataManager,
std::unordered_map< std::string, std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface >>  externalMusicProviderMediaPlayers,
std::unordered_map< std::string, std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface >>  externalMusicProviderSpeakers,
acsdkExternalMediaPlayer::ExternalMediaPlayer::AdapterCreationMap  adapterCreationMap,
std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface speakMediaPlayer,
std::unique_ptr< avsCommon::utils::mediaPlayer::MediaPlayerFactoryInterface audioMediaPlayerFactory,
std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface alertsMediaPlayer,
std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface notificationsMediaPlayer,
std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface bluetoothMediaPlayer,
std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface ringtoneMediaPlayer,
std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface systemSoundMediaPlayer,
std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface speakSpeaker,
std::vector< std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface >>  audioSpeakers,
std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface alertsSpeaker,
std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface notificationsSpeaker,
std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface bluetoothSpeaker,
std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface ringtoneSpeaker,
std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface systemSoundSpeaker,
std::multimap< avsCommon::sdkInterfaces::ChannelVolumeInterface::Type, std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface >>  additionalSpeakers,
std::shared_ptr< EqualizerRuntimeSetup equalizerRuntimeSetup,
std::shared_ptr< avsCommon::sdkInterfaces::audio::AudioFactoryInterface audioFactory,
std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface authDelegate,
std::shared_ptr< acsdkAlerts::storage::AlertStorageInterface alertStorage,
std::shared_ptr< certifiedSender::MessageStorageInterface messageStorage,
std::shared_ptr< acsdkNotificationsInterfaces::NotificationsStorageInterface notificationsStorage,
std::shared_ptr< settings::storage::DeviceSettingStorageInterface deviceSettingStorage,
std::shared_ptr< acsdkBluetoothInterfaces::BluetoothStorageInterface bluetoothStorage,
std::shared_ptr< avsCommon::sdkInterfaces::storage::MiscStorageInterface miscStorage,
std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::DialogUXStateObserverInterface >>  alexaDialogStateObservers,
std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::ConnectionStatusObserverInterface >>  connectionObservers,
std::shared_ptr< avsCommon::sdkInterfaces::InternetConnectionMonitorInterface internetConnectionMonitor,
bool  isGuiSupported,
std::shared_ptr< avsCommon::sdkInterfaces::CapabilitiesDelegateInterface capabilitiesDelegate,
std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface contextManager,
std::shared_ptr< alexaClientSDK::acl::TransportFactoryInterface transportFactory,
std::shared_ptr< avsCommon::sdkInterfaces::AVSGatewayManagerInterface avsGatewayManager,
std::shared_ptr< avsCommon::sdkInterfaces::LocaleAssetsManagerInterface localeAssetsManager,
std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceConnectionRuleInterface >>  enabledConnectionRules = std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceConnectionRuleInterface >>(),
std::shared_ptr< avsCommon::sdkInterfaces::SystemTimeZoneInterface systemTimezone = nullptr,
avsCommon::sdkInterfaces::softwareInfo::FirmwareVersion  firmwareVersion = avsCommon::sdkInterfaces::softwareInfo::INVALID_FIRMWARE_VERSION,
bool  sendSoftwareInfoOnConnected = false,
std::shared_ptr< avsCommon::sdkInterfaces::SoftwareInfoSenderObserverInterface softwareInfoSenderObserver = nullptr,
std::unique_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceManagerInterface bluetoothDeviceManager = nullptr,
std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface metricRecorder = nullptr,
std::shared_ptr< avsCommon::sdkInterfaces::PowerResourceManagerInterface powerResourceManager = nullptr,
std::shared_ptr< avsCommon::sdkInterfaces::diagnostics::DiagnosticsInterface diagnostics = nullptr,
std::shared_ptr< ExternalCapabilitiesBuilderInterface externalCapabilitiesBuilder = nullptr,
std::shared_ptr< avsCommon::sdkInterfaces::ChannelVolumeFactoryInterface channelVolumeFactory = speakerManager::createChannelVolumeFactory(),
bool  startAlertSchedulingOnInitialization = true,
std::shared_ptr< alexaClientSDK::acl::MessageRouterFactoryInterface messageRouterFactory = std::make_shared< alexaClientSDK::acl::MessageRouterFactory >(),
std::shared_ptr< avsCommon::sdkInterfaces::ExpectSpeechTimeoutHandlerInterface expectSpeechTimeoutHandler = nullptr,
capabilityAgents::aip::AudioProvider  firstInteractionAudioProvider = capabilityAgents::aip::AudioProvider::null(),
std::shared_ptr< alexaClientSDK::cryptoInterfaces::CryptoFactoryInterface cryptoFactory = nullptr 
)
static

Creates and initializes a default AVS SDK client. To connect the client to AVS, users should make a call to connect() after creation.

Parameters
deviceInfoDeviceInfo which reflects the device setup credentials.
customerDataManagerCustomerDataManager instance to be used by RegistrationManager and instances of all classes extending CustomDataHandler.
externalMusicProviderMediaPlayersThe map of <players, mediaPlayer> to use to play content from each external music provider.
externalMusicProviderSpeakersThe map of <players, speaker> to use to track volume of each external music provider media player.
adapterCreationMapThe map of <players, adapterCreationMethod> to use when creating the adapters for the different music providers supported by ExternalMediaPlayer.
speakMediaPlayerThe media player to use to play Alexa speech from.
audioMediaPlayerFactoryThe media player factory to use to generate players for Alexa audio content.
alertsMediaPlayerThe media player to use to play alerts from.
notificationsMediaPlayerThe media player to play notification indicators.
bluetoothMediaPlayerThe media player to play bluetooth content.
ringtoneMediaPlayerThe media player to play Comms ringtones.
systemSoundMediaPlayerThe media player to play system sounds.
speakSpeakerThe speaker to control volume of Alexa speech.
audioSpeakersA list of speakers to control volume of Alexa audio content.
alertsSpeakerThe speaker to control volume of alerts.
notificationsSpeakerThe speaker to control volume of notifications.
bluetoothSpeakerThe speaker to control volume of bluetooth.
ringtoneSpeakerThe speaker to control volume of Comms ringtones.
systemSoundSpeakerThe speaker to control volume of system sounds.
additionalSpeakersA map of additional speakers to receive volume changes. #ifdef ENABLE_COMMS_AUDIO_PROXY
commsMediaPlayerThe media player to play Comms calling audio.
commsSpeakerThe speaker to control volume of Comms calling audio.
sharedDataStreamThe stream to use which has the audio from microphone. #endif
equalizerRuntimeSetupEqualizer component runtime setup
audioFactoryThe audioFactory is a component that provides unique audio streams.
authDelegateThe component that provides the client with valid LWA authorization.
alertStorageThe storage interface that will be used to store alerts.
messageStorageThe storage interface that will be used to store certified sender messages.
notificationsStorageThe storage interface that will be used to store notification indicators.
deviceSettingStorageThe storage interface that will be used to store device settings.
bluetoothStorageThe storage interface that will be used to store bluetooth data.
miscStorageThe storage interface that will be used to store key / value pairs.
alexaDialogStateObserversObservers that can be used to be notified of Alexa dialog related UX state changes.
connectionObserversObservers that can be used to be notified of connection status changes.
isGuiSupportedWhether the device supports GUI.
capabilitiesDelegateThe component that provides the client with the ability to send messages to the Capabilities API.
contextManagerThe ContextManager which will provide the context for various components.
transportFactoryThe object passed in here will be used whenever a new transport object for AVS communication is needed.
avsGatewayManagerThe AVSGatewayManager instance used to create the ApiGateway CA.
localeAssetsManagerThe device locale assets manager.
enabledConnectionRulesThe set of BluetoothDeviceConnectionRuleInterface instances used to create the Bluetooth CA.
systemTimezoneOptional object used to set the system timezone.
firmwareVersionThe firmware version to report to AVS or INVALID_FIRMWARE_VERSION.
sendSoftwareInfoOnConnectedWhether to send SoftwareInfo upon connecting to AVS.
softwareInfoSenderObserverObject to receive notifications about sending SoftwareInfo.
bluetoothDeviceManagerThe BluetoothDeviceManager instance used to create the Bluetooth CA.
metricRecorderThe metric recorder object used to capture metrics.
powerResourceManagerObject to manage power resource.
diagnosticsDiagnostics interface which provides suite of APIs for diagnostic insight into SDK.
externalCapabilitiesBuilderOptional object used to build capabilities that are not included in the SDK.
channelVolumeFactoryOptional object used to build ChannelVolumeInterface in the SDK.
startAlertSchedulingOnInitializationWhether to start scheduling alerts after client initialization. If this is set to false, no alert scheduling will occur until onSystemClockSynchronized is called.
messageRouterFactoryObject used to instantiate MessageRouter in the SDK.
expectSpeechTimeoutHandlerAn optional object that applications may provide to specify external handling of the ExpectSpeech directive's timeout. If provided, this function must remain valid for the lifetime of the AudioInputProcessor.
firstInteractionAudioProviderOptional object used in the first interaction started from the alexa voice service
cryptoFactoryOptional Encryption facilities factory.
Returns
A std::unique_ptr to a DefaultClient if all went well or nullptr otherwise.

◆ name()

std::string alexaClientSDK::defaultClient::DefaultClientBuilder::name ( )
overridevirtual

FeatureClientBuilderInterface functions

Implements alexaClientSDK::sdkClient::FeatureClientBuilderInterface.


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