AlexaClientSDK  1.25.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_
Definition: CapabilityAgent.h:47
void cancelDirective(std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
Definition: InteractionModelCapabilityAgent.cpp:254
ExceptionErrorType
Definition: ExceptionErrorType.h:28
Definition: InteractionModelCapabilityAgent.h:46
void preHandleDirective(std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
Definition: InteractionModelCapabilityAgent.cpp:144
std::unordered_set< std::shared_ptr< avsCommon::avs::CapabilityConfiguration > > getCapabilityConfigurations() override
Definition: InteractionModelCapabilityAgent.cpp:258
avsCommon::avs::DirectiveHandlerConfiguration getConfiguration() const override
Definition: InteractionModelCapabilityAgent.cpp:132
std::unordered_map< directiveRoutingRule::DirectiveRoutingRule, BlockingPolicy > DirectiveHandlerConfiguration
Definition: DirectiveHandlerConfiguration.h:32
void handleDirective(std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
Definition: InteractionModelCapabilityAgent.cpp:224
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
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
void handleDirectiveImmediately(std::shared_ptr< avsCommon::avs::AVSDirective > directive) override
Definition: InteractionModelCapabilityAgent.cpp:140
~InteractionModelCapabilityAgent()
Definition: InteractionModelCapabilityAgent.cpp:128

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