AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
ApiGatewayCapabilityAgent.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_APIGATEWAY_INCLUDE_APIGATEWAY_APIGATEWAYCAPABILITYAGENT_H_
17 #define ALEXA_CLIENT_SDK_CAPABILITYAGENTS_APIGATEWAY_INCLUDE_APIGATEWAY_APIGATEWAYCAPABILITYAGENT_H_
18 
19 #include <memory>
20 
26 
27 namespace alexaClientSDK {
28 namespace capabilityAgents {
29 namespace apiGateway {
30 
38 public:
46  static std::shared_ptr<ApiGatewayCapabilityAgent> create(
47  std::shared_ptr<avsCommon::sdkInterfaces::AVSGatewayManagerInterface> avsGatewayManager,
48  std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionEncounteredSender);
49 
53  void handleDirectiveImmediately(std::shared_ptr<avsCommon::avs::AVSDirective> directive) override;
54  void preHandleDirective(std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info) override;
55  void handleDirective(std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info) override;
56  void cancelDirective(std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info) override;
58 
61  std::unordered_set<std::shared_ptr<avsCommon::avs::CapabilityConfiguration>> getCapabilityConfigurations() override;
63 
66  void doShutdown() override;
68 
69 private:
77  std::shared_ptr<avsCommon::sdkInterfaces::AVSGatewayManagerInterface> avsGatewayManager,
78  std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionEncounteredSender);
79 
85  void executeHandleDirective(std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info);
86 
92  void executeSetHandlingCompleted(std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info);
93 
99  void removeDirective(std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info);
100 
108  void executeSendExceptionEncountered(
109  std::shared_ptr<DirectiveInfo> info,
110  const std::string& errorMessage,
112 
114  std::unordered_set<std::shared_ptr<avsCommon::avs::CapabilityConfiguration>> m_capabilityConfigurations;
115 
117  std::shared_ptr<avsCommon::sdkInterfaces::AVSGatewayManagerInterface> m_avsGatewayManager;
118 
121 };
122 
123 } // namespace apiGateway
124 } // namespace capabilityAgents
125 } // namespace alexaClientSDK
126 
127 #endif // ALEXA_CLIENT_SDK_CAPABILITYAGENTS_APIGATEWAY_INCLUDE_APIGATEWAY_APIGATEWAYCAPABILITYAGENT_H_
Definition: CapabilityAgent.h:47
::std::string string
Definition: gtest-port.h:1097
Single-thread executor implementation.
Definition: Executor.h:45
ExceptionErrorType
Definition: ExceptionErrorType.h:28
void handleDirective(std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
std::unordered_map< directiveRoutingRule::DirectiveRoutingRule, BlockingPolicy > DirectiveHandlerConfiguration
Definition: DirectiveHandlerConfiguration.h:32
static std::shared_ptr< ApiGatewayCapabilityAgent > create(std::shared_ptr< avsCommon::sdkInterfaces::AVSGatewayManagerInterface > avsGatewayManager, std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface > exceptionEncounteredSender)
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
void handleDirectiveImmediately(std::shared_ptr< avsCommon::avs::AVSDirective > directive) override
void cancelDirective(std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
void preHandleDirective(std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
std::unordered_set< std::shared_ptr< avsCommon::avs::CapabilityConfiguration > > getCapabilityConfigurations() override
avsCommon::avs::DirectiveHandlerConfiguration getConfiguration() const override

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