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

#include <EqualizerCapabilityAgent.h>

Inheritance diagram for alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent:
Collaboration graph
[legend]

Public Member Functions

 ~EqualizerCapabilityAgent () override=default
 
CapabilityAgent Functions
avsCommon::avs::DirectiveHandlerConfiguration getConfiguration () const override
 
void handleDirectiveImmediately (std::shared_ptr< avsCommon::avs::AVSDirective > directive) override
 
void preHandleDirective (std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
 
void handleDirective (std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
 
void cancelDirective (std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
 
CapabilityConfigurationInterface Functions
std::unordered_set< std::shared_ptr< avsCommon::avs::CapabilityConfiguration > > getCapabilityConfigurations () override
 
void doShutdown () override
 
CustomerDataHandler Functions
void clearData () override
 
EqualizerControllerListenerInterface Functions
void onEqualizerStateChanged (const avsCommon::sdkInterfaces::audio::EqualizerState &state) override
 
void onEqualizerSameStateChanged (const avsCommon::sdkInterfaces::audio::EqualizerState &state) override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::audio::EqualizerControllerListenerInterface
virtual ~EqualizerControllerListenerInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::avs::CapabilityAgent
virtual ~CapabilityAgent ()=default
 
void preHandleDirective (std::shared_ptr< AVSDirective > directive, std::unique_ptr< sdkInterfaces::DirectiveHandlerResultInterface > result) override final
 
bool handleDirective (const std::string &messageId) override final
 
void cancelDirective (const std::string &messageId) override final
 
void onDeregistered () override
 
void onFocusChanged (FocusState newFocus, MixingBehavior behavior) override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface
virtual ~DirectiveHandlerInterface ()=default
 
virtual void handleDirectiveImmediately (std::shared_ptr< avsCommon::avs::AVSDirective > directive)=0
 
virtual void preHandleDirective (std::shared_ptr< avsCommon::avs::AVSDirective > directive, std::unique_ptr< DirectiveHandlerResultInterface > result)=0
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::ChannelObserverInterface
virtual ~ChannelObserverInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::StateProviderInterface
virtual ~StateProviderInterface ()=default
 
virtual void provideState (const avs::NamespaceAndName &stateProviderName, const ContextRequestToken stateRequestToken)
 
virtual void provideState (const avs::CapabilityTag &stateProviderName, const ContextRequestToken stateRequestToken)
 
virtual bool canStateBeRetrieved ()
 
virtual bool hasReportableStateProperties ()
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface
virtual ~ContextRequesterInterface ()=default
 
virtual void onContextAvailable (const std::string &jsonContext)
 
virtual void onContextAvailable (const endpoints::EndpointIdentifier &endpointId, const avs::AVSContext &endpointContext, ContextRequestToken requestToken)
 
virtual void onContextFailure (const ContextRequestError error)
 
virtual void onContextFailure (const ContextRequestError error, ContextRequestToken token)
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::CapabilityConfigurationInterface
virtual ~CapabilityConfigurationInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::utils::RequiresShutdown
 RequiresShutdown (const std::string &name)
 
virtual ~RequiresShutdown ()
 Destructor. More...
 
const std::string & name () const
 
void shutdown ()
 
bool isShutdown () const
 
- Public Member Functions inherited from alexaClientSDK::registrationManager::CustomerDataHandler
 CustomerDataHandler (std::shared_ptr< CustomerDataManager > customerDataManager)
 
virtual ~CustomerDataHandler ()
 

Static Public Member Functions

static std::shared_ptr< EqualizerCapabilityAgentcreate (std::shared_ptr< alexaClientSDK::equalizer::EqualizerController > equalizerController, std::shared_ptr< avsCommon::sdkInterfaces::CapabilitiesDelegateInterface > capabilitiesDelegate, std::shared_ptr< avsCommon::sdkInterfaces::audio::EqualizerStorageInterface > equalizerStorage, std::shared_ptr< registrationManager::CustomerDataManager > customerDataManager, std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface > exceptionEncounteredSender, std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager, std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface > messageSender)
 

Additional Inherited Members

- Protected Member Functions inherited from alexaClientSDK::avsCommon::avs::CapabilityAgent
 CapabilityAgent (const std::string &nameSpace, std::shared_ptr< sdkInterfaces::ExceptionEncounteredSenderInterface > exceptionEncounteredSender)
 
virtual std::shared_ptr< DirectiveInfocreateDirectiveInfo (std::shared_ptr< AVSDirective > directive, std::unique_ptr< sdkInterfaces::DirectiveHandlerResultInterface > result)
 
virtual void preHandleDirective (std::shared_ptr< DirectiveInfo > info)=0
 
virtual void handleDirective (std::shared_ptr< DirectiveInfo > info)=0
 
virtual void cancelDirective (std::shared_ptr< DirectiveInfo > info)=0
 
void removeDirective (const std::string &messageId)
 
void sendExceptionEncounteredAndReportFailed (std::shared_ptr< DirectiveInfo > info, const std::string &message, avsCommon::avs::ExceptionErrorType type=avsCommon::avs::ExceptionErrorType::INTERNAL_ERROR)
 
const std::pair< std::string, std::string > buildJsonEventString (const std::string &eventName, const std::string &dialogRequestIdString="", const std::string &payload="{}", const std::string &context="") const
 
- Protected Attributes inherited from alexaClientSDK::avsCommon::avs::CapabilityAgent
const std::string m_namespace
 The namespace of the capability agent. More...
 
std::shared_ptr< sdkInterfaces::ExceptionEncounteredSenderInterfacem_exceptionEncounteredSender
 Object to use to send exceptionEncountered messages. More...
 

Detailed Description

Capability Agent to handle EqualizerController AVS Interface.

Constructor & Destructor Documentation

◆ ~EqualizerCapabilityAgent()

alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent::~EqualizerCapabilityAgent ( )
overridedefault

Destructor.

Member Function Documentation

◆ cancelDirective()

void alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent::cancelDirective ( std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo info)
override

◆ clearData()

void alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent::clearData ( )
overridevirtual

Reset any internal state that may be associated with a particular user.

Warning
Object must succeed in deleting any customer data.
This method is called while CustomerDataManager is in a locked state. Do not call or wait for any CustomerDataManager operation.

Implements alexaClientSDK::registrationManager::CustomerDataHandler.

◆ create()

std::shared_ptr< EqualizerCapabilityAgent > alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent::create ( std::shared_ptr< alexaClientSDK::equalizer::EqualizerController equalizerController,
std::shared_ptr< avsCommon::sdkInterfaces::CapabilitiesDelegateInterface capabilitiesDelegate,
std::shared_ptr< avsCommon::sdkInterfaces::audio::EqualizerStorageInterface equalizerStorage,
std::shared_ptr< registrationManager::CustomerDataManager customerDataManager,
std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface exceptionEncounteredSender,
std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface contextManager,
std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface messageSender 
)
static

Factory method to create a capability agent instance.

Parameters
equalizerControllerAn SDK's component to control equalizer state and listen to its changes.
capabilitiesDelegateInterface to control DCF configuration.
equalizerStorageInterface to store equalizer state between runs.
customerDataManagerComponent to register Capability Agent as customer data container (equalizer state).
exceptionEncounteredSenderInterface to report exceptions to AVS.
contextManagerInterface to provide equalizer state to AVS.
messageSenderInterface to send events to AVS.
Returns
A new instance of EqualizerCapabilityAgent on success, nullptr otherwise.

◆ doShutdown()

void alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent::doShutdown ( )
overridevirtual

Prepares/enables this object to be deleted. This should be the last function called on this object prior to deleting (or resetting) its shared_ptr.

Warning
  • Attempting to call functions on this object after calling shutdown() can result in undefined behavior.
  • Neglecting to call shutdown() on this object can result in resource leaks or other undefined behavior.

Implements alexaClientSDK::avsCommon::utils::RequiresShutdown.

◆ getCapabilityConfigurations()

std::unordered_set< std::shared_ptr< avsCommon::avs::CapabilityConfiguration > > alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent::getCapabilityConfigurations ( )
overridevirtual

Returns the configurations of the capability interfaces being implemented.

Returns
A set of CapabilityConfigurations

Implements alexaClientSDK::avsCommon::sdkInterfaces::CapabilityConfigurationInterface.

◆ getConfiguration()

avsCommon::avs::DirectiveHandlerConfiguration alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent::getConfiguration ( ) const
overridevirtual

Returns the configuration of the directive handler.

The configuration consists of multiple directive routing rules and their respective blocking policy. The directives will be matched from the most specific rule (with all fields defined) to the least specific rule (which only matches the directive endpointId).

Returns
The avs::DirectiveHandlerConfiguration of the handler.

Implements alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface.

◆ handleDirective()

void alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent::handleDirective ( std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo info)
override

◆ handleDirectiveImmediately()

void alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent::handleDirectiveImmediately ( std::shared_ptr< avsCommon::avs::AVSDirective directive)
override

◆ onEqualizerSameStateChanged()

void alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent::onEqualizerSameStateChanged ( const avsCommon::sdkInterfaces::audio::EqualizerState newState)
overridevirtual

Receives the same state of the EqualizerController when equalizer setting is changed but to an identical state to the current state. This callback is called after all changes has been applied.

Parameters
newStateNew state of the EqualizerController.

Implements alexaClientSDK::avsCommon::sdkInterfaces::audio::EqualizerControllerListenerInterface.

◆ onEqualizerStateChanged()

void alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent::onEqualizerStateChanged ( const avsCommon::sdkInterfaces::audio::EqualizerState newState)
overridevirtual

Receives the new state of the EqualizerController. This callback is called after all changes has been applied.

Parameters
newStateNew state of the EqualizerController.

Implements alexaClientSDK::avsCommon::sdkInterfaces::audio::EqualizerControllerListenerInterface.

◆ preHandleDirective()

void alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent::preHandleDirective ( std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo info)
override

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

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