AlexaClientSDK  1.25.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Typedefs | Functions
alexaClientSDK::acsdkSampleApplication Namespace Reference

Typedefs

using SampleApplicationOptionsComponent = acsdkManufactory::Component< std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface >, std::shared_ptr< avsCommon::utils::logger::Logger >, std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface >, acsdkManufactory::Import< std::shared_ptr< authorization::cblAuthDelegate::CBLAuthRequesterInterface > >, acsdkManufactory::Import< std::unique_ptr< avsCommon::utils::libcurlUtils::HttpPostInterface > >, acsdkManufactory::Import< std::shared_ptr< avsCommon::utils::DeviceInfo > >, acsdkManufactory::Import< std::shared_ptr< registrationManager::CustomerDataManagerInterface > >>
 
using SampleApplicationComponent = acsdkManufactory::Component< std::shared_ptr< authorization::cblAuthDelegate::CBLAuthRequesterInterface >, std::shared_ptr< avsCommon::avs::initialization::AlexaClientSDKInit >, std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface >, std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface >, std::shared_ptr< avsCommon::sdkInterfaces::LocaleAssetsManagerInterface >, std::shared_ptr< avsCommon::utils::DeviceInfo >, std::shared_ptr< avsCommon::utils::configuration::ConfigurationNode >, std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface >, std::shared_ptr< registrationManager::CustomerDataManagerInterface >, std::shared_ptr< sampleApp::UIManager > >
 

Functions

SampleApplicationOptionsComponent getSampleApplicationOptionsComponent (const std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface > &authDelegate=nullptr, const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > &metricRecorder=nullptr, const std::shared_ptr< avsCommon::utils::logger::Logger > &logger=nullptr)
 
static acsdkManufactory::Component< std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > > getMetricRecorderComponent (const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > &metricRecorder)
 
static acsdkManufactory::Component< std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface >, acsdkManufactory::Import< std::shared_ptr< authorization::cblAuthDelegate::CBLAuthRequesterInterface > >, acsdkManufactory::Import< std::shared_ptr< avsCommon::utils::DeviceInfo > >, acsdkManufactory::Import< std::shared_ptr< avsCommon::utils::configuration::ConfigurationNode > >, acsdkManufactory::Import< std::unique_ptr< avsCommon::utils::libcurlUtils::HttpPostInterface > >, acsdkManufactory::Import< std::shared_ptr< registrationManager::CustomerDataManagerInterface > > > getAuthDelegateComponent (const std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface > &authDelegate)
 
static acsdkManufactory::Component< std::shared_ptr< avsCommon::utils::logger::Logger > > getLoggerComponent (const std::shared_ptr< avsCommon::utils::logger::Logger > &logger)
 
SampleApplicationComponent getComponent (std::unique_ptr< avsCommon::avs::initialization::InitializationParameters > initParams, std::vector< std::shared_ptr< avsCommon::utils::RequiresShutdown >> &requiresShutdownList, const std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface > &authDelegate=nullptr, const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > &metricRecorder=nullptr, const std::shared_ptr< avsCommon::utils::logger::Logger > &logger=nullptr)
 
static std::shared_ptr< acsdkSampleApplicationInterfaces::UIManagerInterfacecreateUIManagerInterface (const std::shared_ptr< sampleApp::UIManager > &uiManager)
 
static std::function< std::shared_ptr< avsCommon::sdkInterfaces::LocaleAssetsManagerInterface > const std::shared_ptr< avsCommon::utils::configuration::ConfigurationNode > &)> getCreateLocaleAssetsManagerInterface (std::vector< std::shared_ptr< avsCommon::utils::RequiresShutdown >> &requiresShutdownList)
 

Typedef Documentation

◆ SampleApplicationComponent

Definition of the Manufactory component for the Sample App.

◆ SampleApplicationOptionsComponent

Definition of a Manufactory Component with default SampleApplication options.

Function Documentation

◆ createUIManagerInterface()

static std::shared_ptr<acsdkSampleApplicationInterfaces::UIManagerInterface> alexaClientSDK::acsdkSampleApplication::createUIManagerInterface ( const std::shared_ptr< sampleApp::UIManager > &  uiManager)
static

UIManagerInterface factory that just forwards the instance of UIManager.

Parameters
uiManagerThe UIManager instance that will provide the implementation.
Returns
The implementation of CBLAuthRequesterInterface to use.

◆ getAuthDelegateComponent()

Returns a component for AuthDelegateInterface, using a pre-built implementation if available but otherwise using the Sample App's default.

Parameters
authDelegateOptional AuthDelegateInterface implementation to inject to the manufactory.
Returns
A component that exports the AuthDelegateInterface.

If a custom authDelegate is provided, add that implementation. Otherwise, use defaults.

◆ getComponent()

SampleApplicationComponent alexaClientSDK::acsdkSampleApplication::getComponent ( std::unique_ptr< avsCommon::avs::initialization::InitializationParameters initParams,
std::vector< std::shared_ptr< avsCommon::utils::RequiresShutdown >> &  requiresShutdownList,
const std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface > &  authDelegate = nullptr,
const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > &  metricRecorder = nullptr,
const std::shared_ptr< avsCommon::utils::logger::Logger > &  logger = nullptr 
)

Get the manufactory Component for acsdkSampleApp.

For applications that have not transitioned to using the manufactory to instantiate SDK components, they can provide pre-built custom implementations of the AuthDelegateInterface and MetricRecorderInterface.

Parameters
initParamsThe InitializationParameters to use when initializing the SDK Sample App.
requiresShutdownListThe RequiresShutdown vector to which newly instantiated objects can be added.
authDelegateOptional pre-built implementation of AuthDelegateInterface to add to the manufactory. Default is nullptr.
MetricRecorderInterfaceOptional pre-built implementation of MetricRecorderInterface to add to the manufactory. Default is nullptr.
loggerOptional pre-built implementation of Logger to add to the manufactory. Default is nullptr.
Returns
The manufactory Component for acsdkSampleApp.

This initializes the SDK with the InitializationParameters. The factory method is primary, meaning it will be called before other factory methods in the manufactory.

The below components specify commonly-changed application options, such as AuthDelegateInterface. Applications may want to replace these components with their own to specify custom implementations. Applications may also directly pass pre-built custom implementations of AuthDelegateInterface, Logger, or MetricRecorderInterface to the SampleApplicationOptionsComponent.

These interfaces are implemented for the Sample App, but applications may want to customize these (e.g. the CBLAuthRequesterInterface).

These objects are shared by many components in the SDK. Applications are not expected to change these.

This initializes the SDK with the InitializationParameters. The factory method is primary, meaning it will be called before other factory methods in the manufactory.

The below components specify commonly-changed application options, such as AuthDelegateInterface. Applications may want to replace these components with their own to specify custom implementations. Applications may also directly pass pre-built custom implementations of AuthDelegateInterface, Logger, or MetricRecorderInterface to the SampleApplicationOptionsComponent.

These interfaces are implemented for the Sample App, but applications may want to customize these (e.g. the CBLAuthRequesterInterface).

These objects are shared by many components in the SDK. Applications are not expected to change these.

◆ getCreateLocaleAssetsManagerInterface()

static std::function<std::shared_ptr<avsCommon::sdkInterfaces::LocaleAssetsManagerInterface> const std::shared_ptr<avsCommon::utils::configuration::ConfigurationNode>&)> alexaClientSDK::acsdkSampleApplication::getCreateLocaleAssetsManagerInterface ( std::vector< std::shared_ptr< avsCommon::utils::RequiresShutdown >> &  requiresShutdownList)
static

Function that returns a factory to instantiate LocaleAssetsManagerInterface.

Parameters
requiresShutdownList- The vector of RequiresShutdown pointers to which the LocaleAssetsManager will be added.
Returns
An std::function to instantiate LocaleAssetsManagerInterface.

◆ getLoggerComponent()

static acsdkManufactory::Component<std::shared_ptr<avsCommon::utils::logger::Logger> > alexaClientSDK::acsdkSampleApplication::getLoggerComponent ( const std::shared_ptr< avsCommon::utils::logger::Logger > &  logger)
static

Returns a component for Logger, using a pre-built implementation if available but otherwise using the Sample App's default.

Parameters
loggerOptional Logger implementation to inject to the manufactory.
Returns
A component that exports the Logger.

◆ getMetricRecorderComponent()

static acsdkManufactory::Component<std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> > alexaClientSDK::acsdkSampleApplication::getMetricRecorderComponent ( const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > &  metricRecorder)
static

Returns a component for MetricRecorderInterface, using a pre-built implementation if available but otherwise using the Sample App's default.

Parameters
metricRecorderOptional MetricRecorderInterface implementation to inject to the manufactory.
Returns
A component that exports the MetricRecorderInterface.

If a custom metricRecorder is provided, add that implementation. Otherwise, use defaults.

◆ getSampleApplicationOptionsComponent()

SampleApplicationOptionsComponent alexaClientSDK::acsdkSampleApplication::getSampleApplicationOptionsComponent ( const std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface > &  authDelegate = nullptr,
const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > &  metricRecorder = nullptr,
const std::shared_ptr< avsCommon::utils::logger::Logger > &  logger = nullptr 
)

Get the Manufactory Component for the default SampleApplication options.

For applications that have not transitioned to using the manufactory to instantiate SDK components, they can provide pre-built custom implementations of the AuthDelegateInterface and MetricRecorderInterface.

Parameters
authDelegateOptional pre-built implementation of AuthDelegateInterface to add to the manufactory. Default is nullptr.
metricRecorderOptional pre-built implementation of MetricRecorderInterface to add to the manufactory. Default is nullptr.
loggerOptional pre-built implementation of Logger to add to the manufactory. Default is nullptr.
Returns
The Manufactory Component for the default SampleApplication options

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