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

Class to manage the top-level components of the AVS Client Application. More...

#include <SampleApplication.h>

Classes

class  AdapterRegistration
 
class  MediaPlayerRegistration
 

Public Member Functions

SampleAppReturnCode run ()
 
 ~SampleApplication ()
 Destructor which manages the SampleApplication shutdown sequence. More...
 
std::shared_ptr< alexaClientSDK::defaultClient::DefaultClientgetDefaultClient ()
 
bool createMediaPlayersForAdapters (const std::shared_ptr< avsCommon::sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface > &httpContentFetcherFactory, std::shared_ptr< defaultClient::EqualizerRuntimeSetup > equalizerRuntimeSetup)
 

Static Public Member Functions

static std::unique_ptr< SampleApplicationcreate (std::shared_ptr< alexaClientSDK::sampleApp::ConsoleReader > consoleReader, const std::vector< std::string > &configFiles, const std::string &logLevel="", std::shared_ptr< avsCommon::sdkInterfaces::diagnostics::DiagnosticsInterface > diagnostics=nullptr)
 

Detailed Description

Class to manage the top-level components of the AVS Client Application.

Constructor & Destructor Documentation

◆ ~SampleApplication()

alexaClientSDK::sampleApp::SampleApplication::~SampleApplication ( )

Destructor which manages the SampleApplication shutdown sequence.

Member Function Documentation

◆ create()

static std::unique_ptr<SampleApplication> alexaClientSDK::sampleApp::SampleApplication::create ( std::shared_ptr< alexaClientSDK::sampleApp::ConsoleReader consoleReader,
const std::vector< std::string > &  configFiles,
const std::string &  logLevel = "",
std::shared_ptr< avsCommon::sdkInterfaces::diagnostics::DiagnosticsInterface diagnostics = nullptr 
)
static

Create a SampleApplication.

Parameters
consoleReaderThe ConsoleReader to read inputs from console.
configFilesThe vector of configuration files.
logLevelThe level of logging to enable. If this parameter is an empty string, the SDK's default logging level will be used.
diagnosticsAn optional DiagnosticsInterface object to provide diagnostics on the SDK.
Returns
A new SampleApplication, or nullptr if the operation failed.

◆ createMediaPlayersForAdapters()

bool alexaClientSDK::sampleApp::SampleApplication::createMediaPlayersForAdapters ( const std::shared_ptr< avsCommon::sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface > &  httpContentFetcherFactory,
std::shared_ptr< defaultClient::EqualizerRuntimeSetup equalizerRuntimeSetup 
)

Method to create mediaPlayers for the optional music provider adapters plugged into the SDK.

Parameters
httpContentFetcherFactoryThe HTTPContentFetcherFactory to be used while creating the mediaPlayers.
equalizerRuntimeSetupEqualizer runtime setup to register equalizers
Returns
true if the mediaPlayer of all the registered adapters could be created false otherwise.

◆ getDefaultClient()

std::shared_ptr<alexaClientSDK::defaultClient::DefaultClient> alexaClientSDK::sampleApp::SampleApplication::getDefaultClient ( )

Exposes the default client.

Returns
Returns a reference to the DefaultClient.

◆ run()

SampleAppReturnCode alexaClientSDK::sampleApp::SampleApplication::run ( )

Runs the application, blocking until the user asks the application to quit or a device reset is triggered.

Returns
Returns a SampleAppReturnCode.

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