AlexaClientSDK  1.23.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::capabilityAgents::interactionModel::InteractionModelCapabilityAgent Class Reference

#include <InteractionModelCapabilityAgent.h>

Inheritance diagram for alexaClientSDK::capabilityAgents::interactionModel::InteractionModelCapabilityAgent:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::capabilityAgents::interactionModel::InteractionModelCapabilityAgent:
Collaboration graph
[legend]

Public Member Functions

void addObserver (std::shared_ptr< avsCommon::sdkInterfaces::InteractionModelRequestProcessingObserverInterface > observer)
 
void removeObserver (std::shared_ptr< avsCommon::sdkInterfaces::InteractionModelRequestProcessingObserverInterface > observer)
 
 ~InteractionModelCapabilityAgent ()
 
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
 
- 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
 

Static Public Member Functions

static std::shared_ptr< InteractionModelCapabilityAgentcreate (std::shared_ptr< avsCommon::sdkInterfaces::DirectiveSequencerInterface > directiveSequencer, std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface > exceptionEncounteredSender)
 

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

The Interaction Model Capability Agent provides a way for AVS cloud initiated actions to be executed by the client.

When AVS requires the client to execute an action, it will send an InteractionModel.NewDialogRequest directive to set a dialogRequestId on the DirectiveSequencer.

Once dialogRequestId is set, the DirectiveSequencer can then expect directives with the actions tagged with the dialogRequestId.

Constructor & Destructor Documentation

◆ ~InteractionModelCapabilityAgent()

alexaClientSDK::capabilityAgents::interactionModel::InteractionModelCapabilityAgent::~InteractionModelCapabilityAgent ( )

Destructor.

Member Function Documentation

◆ addObserver()

void alexaClientSDK::capabilityAgents::interactionModel::InteractionModelCapabilityAgent::addObserver ( std::shared_ptr< avsCommon::sdkInterfaces::InteractionModelRequestProcessingObserverInterface observer)

Adds an observer to be notified when either the RequestProcessingStarted or the RequestProcessingCompleted directives are received.

Parameters
observerA new observer to be added to the list of observers.

◆ cancelDirective()

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

◆ create()

std::shared_ptr< InteractionModelCapabilityAgent > alexaClientSDK::capabilityAgents::interactionModel::InteractionModelCapabilityAgent::create ( std::shared_ptr< avsCommon::sdkInterfaces::DirectiveSequencerInterface directiveSequencer,
std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface exceptionEncounteredSender 
)
static

Creates an instance of the Interaction Model capability agent.

Parameters
directiveSequencerThe Directive Sequencer responsible for processing AVS directives.
exceptionEncounteredSenderThe object to use for sending AVS Exception messages.

◆ getCapabilityConfigurations()

std::unordered_set< std::shared_ptr< CapabilityConfiguration > > alexaClientSDK::capabilityAgents::interactionModel::InteractionModelCapabilityAgent::getCapabilityConfigurations ( )
overridevirtual

Returns the configurations of the capability interfaces being implemented.

Returns
A set of CapabilityConfigurations

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

◆ getConfiguration()

DirectiveHandlerConfiguration alexaClientSDK::capabilityAgents::interactionModel::InteractionModelCapabilityAgent::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::interactionModel::InteractionModelCapabilityAgent::handleDirective ( std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo info)
override

◆ handleDirectiveImmediately()

void alexaClientSDK::capabilityAgents::interactionModel::InteractionModelCapabilityAgent::handleDirectiveImmediately ( std::shared_ptr< avsCommon::avs::AVSDirective directive)
override

◆ preHandleDirective()

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

◆ removeObserver()

void alexaClientSDK::capabilityAgents::interactionModel::InteractionModelCapabilityAgent::removeObserver ( std::shared_ptr< avsCommon::sdkInterfaces::InteractionModelRequestProcessingObserverInterface observer)

Removes an observer.

Parameters
observerThe observer to be removed from the list of observers.

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

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