AlexaClientSDK  1.26.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>


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()

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 

Create a SampleApplication.

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.
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.

httpContentFetcherFactoryThe HTTPContentFetcherFactory to be used while creating the mediaPlayers.
equalizerRuntimeSetupEqualizer runtime setup to register equalizers
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 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 a SampleAppReturnCode.

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

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