AlexaClientSDK  1.25.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 
134  virtual bool sendResponseEvent(
135  const std::string& instance,
136  const std::string& correlationToken,
137  const avsCommon::avs::AVSMessageEndpoint& endpoint,
138  const std::string& responseNamespace,
139  const std::string& responseName,
140  const std::string& jsonPayload = "{}") = 0;
141 
153  virtual bool sendErrorResponseEvent(
154  const std::string& instance,
155  const std::string& correlationToken,
156  const avsCommon::avs::AVSMessageEndpoint& endpoint,
157  const ErrorResponseType errorType,
158  const std::string& errorMessage = "") = 0;
159 
171  virtual bool sendErrorResponseEvent(
172  const std::string& instance,
173  const std::string& correlationToken,
174  const avsCommon::avs::AVSMessageEndpoint& endpoint,
175  const std::string& responseNamespace,
176  const std::string& jsonPayload = "{}") = 0;
177 
187  virtual bool sendDeferredResponseEvent(
188  const std::string& instance,
189  const std::string& correlationToken,
190  const int estimatedDeferralInSeconds = 0) = 0;
191 
200 };
201 
204  switch (responseType) {
205  case avs::AlexaResponseType::SUCCESS: // not supported
241  }
243 }
244 
245 } // namespace sdkInterfaces
246 } // namespace avsCommon
247 } // namespace alexaClientSDK
248 
249 #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:203
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.25.0 - Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0