AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
InteractionModelCapabilityAgent.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ALEXA_CLIENT_SDK_CAPABILITYAGENTS_INTERACTIONMODEL_ACSDKINTERACTIONMODEL_PRIVATEINCLUDE_ACSDKINTERACTIONMODEL_INTERACTIONMODELCAPABILITYAGENT_H_
17 #define ALEXA_CLIENT_SDK_CAPABILITYAGENTS_INTERACTIONMODEL_ACSDKINTERACTIONMODEL_PRIVATEINCLUDE_ACSDKINTERACTIONMODEL_INTERACTIONMODELCAPABILITYAGENT_H_
18 
19 #include <memory>
20 #include <set>
21 #include <string>
22 
32 
33 namespace alexaClientSDK {
34 namespace acsdkInteractionModel {
35 
49 public:
60  static std::shared_ptr<InteractionModelCapabilityAgent> create(
61  std::shared_ptr<avsCommon::sdkInterfaces::DirectiveSequencerInterface> directiveSequencer,
62  std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionEncounteredSender,
63  std::shared_ptr<acsdkInteractionModelInterfaces::InteractionModelNotifierInterface> interactionModelNotifier,
67 
72 
76  void handleDirectiveImmediately(std::shared_ptr<avsCommon::avs::AVSDirective> directive) override;
77  void preHandleDirective(std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info) override;
78  void handleDirective(std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info) override;
79  void cancelDirective(std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info) override;
81 
84  std::unordered_set<std::shared_ptr<avsCommon::avs::CapabilityConfiguration>> getCapabilityConfigurations() override;
86 
87 private:
97  std::shared_ptr<avsCommon::sdkInterfaces::DirectiveSequencerInterface> directiveSequencer,
98  std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionEncounteredSender,
99  std::shared_ptr<acsdkInteractionModelInterfaces::InteractionModelNotifierInterface> interactionModelNotifier);
100 
109  bool handleDirectiveHelper(
110  std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info,
111  std::string* errMessage,
113 
115  std::unordered_set<std::shared_ptr<avsCommon::avs::CapabilityConfiguration>> m_capabilityConfigurations;
116 
118  std::shared_ptr<avsCommon::sdkInterfaces::DirectiveSequencerInterface> m_directiveSequencer;
119 
121  std::shared_ptr<acsdkInteractionModelInterfaces::InteractionModelNotifierInterface> m_interactionModelNotifier;
122 };
123 } // namespace acsdkInteractionModel
124 } // namespace alexaClientSDK
125 
126 #endif // ALEXA_CLIENT_SDK_CAPABILITYAGENTS_INTERACTIONMODEL_ACSDKINTERACTIONMODEL_PRIVATEINCLUDE_ACSDKINTERACTIONMODEL_INTERACTIONMODELCAPABILITYAGENT_H_
alexaClientSDK::acsdkInteractionModel::InteractionModelCapabilityAgent::preHandleDirective
void preHandleDirective(std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
Definition: InteractionModelCapabilityAgent.cpp:144
alexaClientSDK::acsdkInteractionModel::InteractionModelCapabilityAgent::getCapabilityConfigurations
std::unordered_set< std::shared_ptr< avsCommon::avs::CapabilityConfiguration > > getCapabilityConfigurations() override
Definition: InteractionModelCapabilityAgent.cpp:258
alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesRegistrarInterface
Definition: EndpointCapabilitiesRegistrarInterface.h:35
EndpointCapabilitiesRegistrarInterface.h
InteractionModelRequestProcessingObserverInterface.h
alexaClientSDK::avsCommon::sdkInterfaces::CapabilityConfigurationInterface
Definition: CapabilityConfigurationInterface.h:32
alexaClientSDK::acsdkInteractionModel::InteractionModelCapabilityAgent
Definition: InteractionModelCapabilityAgent.h:46
alexaClientSDK::acsdkInteractionModel::InteractionModelCapabilityAgent::getConfiguration
avsCommon::avs::DirectiveHandlerConfiguration getConfiguration() const override
Definition: InteractionModelCapabilityAgent.cpp:132
alexaClientSDK::acsdkInteractionModel::InteractionModelCapabilityAgent::cancelDirective
void cancelDirective(std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
Definition: InteractionModelCapabilityAgent.cpp:254
alexaClientSDK::acsdkInteractionModel::InteractionModelCapabilityAgent::handleDirective
void handleDirective(std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
Definition: InteractionModelCapabilityAgent.cpp:224
alexaClientSDK::acsdkManufactory::Annotated
Definition: Annotated.h:35
CapabilityAgent.h
alexaClientSDK::avsCommon::avs::ExceptionErrorType
ExceptionErrorType
Definition: ExceptionErrorType.h:28
alexaClientSDK
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
DirectiveSequencerInterface.h
alexaClientSDK::avsCommon::avs::DirectiveHandlerConfiguration
std::unordered_map< directiveRoutingRule::DirectiveRoutingRule, BlockingPolicy > DirectiveHandlerConfiguration
Definition: DirectiveHandlerConfiguration.h:32
alexaClientSDK::avsCommon::sdkInterfaces::endpoints::DefaultEndpointAnnotation
Definition: DefaultEndpointAnnotation.h:26
alexaClientSDK::avsCommon::avs::CapabilityAgent
Definition: CapabilityAgent.h:47
alexaClientSDK::acsdkInteractionModel::InteractionModelCapabilityAgent::handleDirectiveImmediately
void handleDirectiveImmediately(std::shared_ptr< avsCommon::avs::AVSDirective > directive) override
Definition: InteractionModelCapabilityAgent.cpp:140
DefaultEndpointAnnotation.h
alexaClientSDK::acsdkInteractionModel::InteractionModelCapabilityAgent::~InteractionModelCapabilityAgent
~InteractionModelCapabilityAgent()
Definition: InteractionModelCapabilityAgent.cpp:128
InteractionModelNotifierInterface.h
Annotated.h
alexaClientSDK::acsdkInteractionModel::InteractionModelCapabilityAgent::create
static std::shared_ptr< InteractionModelCapabilityAgent > create(std::shared_ptr< avsCommon::sdkInterfaces::DirectiveSequencerInterface > directiveSequencer, std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface > exceptionEncounteredSender, std::shared_ptr< acsdkInteractionModelInterfaces::InteractionModelNotifierInterface > interactionModelNotifier, acsdkManufactory::Annotated< avsCommon::sdkInterfaces::endpoints::DefaultEndpointAnnotation, avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesRegistrarInterface > endpointCapabilitiesRegistrar)
Definition: InteractionModelCapabilityAgent.cpp:85
CapabilityConfiguration.h
CapabilityConfigurationInterface.h

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