AlexaClientSDK
1.23.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <InteractionModelCapabilityAgent.h>
Static Public Member Functions | |
static std::shared_ptr< InteractionModelCapabilityAgent > | create (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< DirectiveInfo > | createDirectiveInfo (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::ExceptionEncounteredSenderInterface > | m_exceptionEncounteredSender |
Object to use to send exceptionEncountered messages. More... | |
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.
alexaClientSDK::capabilityAgents::interactionModel::InteractionModelCapabilityAgent::~InteractionModelCapabilityAgent | ( | ) |
Destructor.
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.
observer | A new observer to be added to the list of observers. |
|
override |
|
static |
Creates an instance of the Interaction Model capability agent.
directiveSequencer | The Directive Sequencer responsible for processing AVS directives. |
exceptionEncounteredSender | The object to use for sending AVS Exception messages. |
|
overridevirtual |
Returns the configurations of the capability interfaces being implemented.
Implements alexaClientSDK::avsCommon::sdkInterfaces::CapabilityConfigurationInterface.
|
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).
avs::DirectiveHandlerConfiguration
of the handler. Implements alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface.
|
override |
|
override |
|
override |
void alexaClientSDK::capabilityAgents::interactionModel::InteractionModelCapabilityAgent::removeObserver | ( | std::shared_ptr< avsCommon::sdkInterfaces::InteractionModelRequestProcessingObserverInterface > | observer | ) |
Removes an observer.
observer | The observer to be removed from the list of observers. |
AlexaClientSDK 1.23.0 - Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0