AlexaClientSDK  1.23.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
AlexaInterfaceMessageSenderInterface.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_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_ALEXAINTERFACEMESSAGESENDERINTERFACE_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_ALEXAINTERFACEMESSAGESENDERINTERFACE_H_
18 
19 #include <memory>
20 
23 
24 namespace alexaClientSDK {
25 namespace avsCommon {
26 namespace sdkInterfaces {
27 
32 public:
34  enum class ErrorResponseType {
37 
40 
43 
46 
49 
52 
55 
58 
61 
64 
67 
70 
73 
76 
79 
82 
85 
88 
91 
94 
97  };
98 
102  virtual ~AlexaInterfaceMessageSenderInterface() = default;
103 
115  virtual bool sendResponseEvent(
116  const std::string& instance,
117  const std::string& correlationToken,
118  const avsCommon::avs::AVSMessageEndpoint& endpoint,
119  const std::string& jsonPayload = "{}") = 0;
120 
132  virtual bool sendErrorResponseEvent(
133  const std::string& instance,
134  const std::string& correlationToken,
135  const avsCommon::avs::AVSMessageEndpoint& endpoint,
136  const ErrorResponseType errorType,
137  const std::string& errorMessage = "") = 0;
138 
148  virtual bool sendDeferredResponseEvent(
149  const std::string& instance,
150  const std::string& correlationToken,
151  const int estimatedDeferralInSeconds = 0) = 0;
152 
161 };
162 
165  switch (responseType) {
166  case avs::AlexaResponseType::SUCCESS: // not supported
202  }
204 }
205 
206 } // namespace sdkInterfaces
207 } // namespace avsCommon
208 } // namespace alexaClientSDK
209 
210 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_ALEXAINTERFACEMESSAGESENDERINTERFACE_H_
The endpoint can&#39;t handle the directive because it is in a calibration phase, such as warming up...
virtual bool sendDeferredResponseEvent(const std::string &instance, const std::string &correlationToken, const int estimatedDeferralInSeconds=0)=0
ErrorResponseType
The type of error when calling sendErrorResponseEvent().
Definition: AlexaInterfaceMessageSenderInterface.h:34
The caller does not have the permission to perform specified operation on endpoint.
AlexaResponseType
Definition: AlexaResponseType.h:30
The endpoint can&#39;t handle the directive because it&#39;s firmware is out of date.
The endpoint can&#39;t handle the directive because it has experienced a hardware malfunction.
The operation can&#39;t be performed because the endpoint is already in operation.
An error occurred that can&#39;t be described by one of the other error types.
static ErrorResponseType alexaResponseTypeToErrorType(const avsCommon::avs::AlexaResponseType responseType)
Definition: AlexaInterfaceMessageSenderInterface.h:164
The endpoint can&#39;t handle the directive because it is performing another action.
The endpoint can&#39;t be set to the specified value because it&#39;s outside the acceptable range...
Invalid value or unsupported value passed.
The endpoint was busy and could not perform the requested operation.
The endpoint can&#39;t be set to the specified value because it&#39;s outside the acceptable temperature rang...
The endpoint can&#39;t handle the directive because the battery power is too low.
The endpoint can&#39;t handle the requested operation because it is in a calibration phase, such as warming up.
virtual bool sendErrorResponseEvent(const std::string &instance, const std::string &correlationToken, const avsCommon::avs::AVSMessageEndpoint &endpoint, const ErrorResponseType errorType, const std::string &errorMessage="")=0
The endpoint can&#39;t handle the directive because it doesn&#39;t support the requested power level...
The endpoint could not perform the requested operation as its battery was low.
An error occurred that can&#39;t be described by one of the other error types.
The maximum rate at which an endpoint or bridge can process directives has been exceeded.
Definition: AVSMessageEndpoint.h:32
The maximum rate at which an endpoint or bridge can handle the requests has been exceeded.
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
The endpoint was busy and could not perform because it has experienced a hardware malfunction...
The endpoint can&#39;t be set to the specified value because it&#39;s outside the acceptable temperature rang...
The endpoint can&#39;t be set to the specified value because of its current mode of operation.
The endpoint can&#39;t be set to the specified value because it&#39;s outside the acceptable range...
Definition: AlexaInterfaceMessageSenderInterface.h:31
The endpoint can&#39;t be set to the specified value because of its current mode of operation.
The endpoint was busy and could not perform because its firmware is out of date.
virtual bool sendResponseEvent(const std::string &instance, const std::string &correlationToken, const avsCommon::avs::AVSMessageEndpoint &endpoint, const std::string &jsonPayload="{}")=0

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