AlexaClientSDK  1.26.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_
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::sendResponseEvent
virtual bool sendResponseEvent(const std::string &instance, const std::string &correlationToken, const avsCommon::avs::AVSMessageEndpoint &endpoint, const std::string &jsonPayload="{}")=0
alexaClientSDK::avsCommon::avs::AlexaResponseType::NOT_IN_OPERATION
@ NOT_IN_OPERATION
The endpoint is not in operation.
alexaClientSDK::avsCommon::avs::AlexaResponseType::ENDPOINT_UNREACHABLE
@ ENDPOINT_UNREACHABLE
The endpoint is unreachable or offline.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::sendDeferredResponseEvent
virtual bool sendDeferredResponseEvent(const std::string &instance, const std::string &correlationToken, const int estimatedDeferralInSeconds=0)=0
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::NOT_SUPPORTED_IN_CURRENT_MODE
@ NOT_SUPPORTED_IN_CURRENT_MODE
The endpoint can't be set to the specified value because of its current mode of operation.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::TEMPERATURE_VALUE_OUT_OF_RANGE
@ TEMPERATURE_VALUE_OUT_OF_RANGE
The endpoint can't be set to the specified value because it's outside the acceptable temperature rang...
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::HARDWARE_MALFUNCTION
@ HARDWARE_MALFUNCTION
The endpoint can't handle the directive because it has experienced a hardware malfunction.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType
ErrorResponseType
The type of error when calling sendErrorResponseEvent().
Definition: AlexaInterfaceMessageSenderInterface.h:34
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface
Definition: AlexaInterfaceMessageSenderInterface.h:31
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::INVALID_VALUE
@ INVALID_VALUE
The directive contains a value that is not valid for the target endpoint.
alexaClientSDK::avsCommon::avs::AlexaResponseType
AlexaResponseType
Definition: AlexaResponseType.h:30
alexaClientSDK::avsCommon::avs::AlexaResponseType::VALUE_OUT_OF_RANGE
@ VALUE_OUT_OF_RANGE
The endpoint can't be set to the specified value because it's outside the acceptable range.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::EXPIRED_AUTHORIZATION_CREDENTIAL
@ EXPIRED_AUTHORIZATION_CREDENTIAL
The authorization credential provided by Alexa has expired.
alexaClientSDK::avsCommon::avs::AlexaResponseType::NOT_CALIBRATED
@ NOT_CALIBRATED
The endpoint can't handle the requested operation because it is in a calibration phase,...
AVSMessageEndpoint.h
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::ENDPOINT_UNREACHABLE
@ ENDPOINT_UNREACHABLE
The endpoint is unreachable or offline.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::NOT_CALIBRATED
@ NOT_CALIBRATED
The endpoint can't handle the directive because it is in a calibration phase, such as warming up.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::~AlexaInterfaceMessageSenderInterface
virtual ~AlexaInterfaceMessageSenderInterface()=default
alexaClientSDK::avsCommon::avs::AlexaResponseType::BRIDGE_UNREACHABLE
@ BRIDGE_UNREACHABLE
The bridge is unreachable or offline.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::alexaResponseTypeToErrorType
static ErrorResponseType alexaResponseTypeToErrorType(const avsCommon::avs::AlexaResponseType responseType)
Definition: AlexaInterfaceMessageSenderInterface.h:203
alexaClientSDK::avsCommon::avs::AlexaResponseType::FIRMWARE_OUT_OF_DATE
@ FIRMWARE_OUT_OF_DATE
The endpoint was busy and could not perform because its firmware is out of date.
alexaClientSDK::avsCommon::avs::AlexaResponseType::NOT_SUPPORTED_IN_CURRENT_MODE
@ NOT_SUPPORTED_IN_CURRENT_MODE
The endpoint can't be set to the specified value because of its current mode of operation.
AlexaResponseType.h
alexaClientSDK::avsCommon::avs::AlexaResponseType::INVALID_VALUE
@ INVALID_VALUE
Invalid value or unsupported value passed.
alexaClientSDK::avsCommon::avs::AlexaResponseType::SUCCESS
@ SUCCESS
Success.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::BRIDGE_UNREACHABLE
@ BRIDGE_UNREACHABLE
The bridge is unreachable or offline.
alexaClientSDK::avsCommon::avs::AlexaResponseType::INTERNAL_ERROR
@ INTERNAL_ERROR
An error occurred that can't be described by one of the other error types.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::sendErrorResponseEvent
virtual bool sendErrorResponseEvent(const std::string &instance, const std::string &correlationToken, const avsCommon::avs::AVSMessageEndpoint &endpoint, const ErrorResponseType errorType, const std::string &errorMessage="")=0
alexaClientSDK::avsCommon::avs::AlexaResponseType::TEMPERATURE_VALUE_OUT_OF_RANGE
@ TEMPERATURE_VALUE_OUT_OF_RANGE
The endpoint can't be set to the specified value because it's outside the acceptable temperature rang...
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::RATE_LIMIT_EXCEEDED
@ RATE_LIMIT_EXCEEDED
The maximum rate at which an endpoint or bridge can process directives has been exceeded.
alexaClientSDK::avsCommon::avs::AlexaResponseType::INSUFFICIENT_PERMISSIONS
@ INSUFFICIENT_PERMISSIONS
The caller does not have the permission to perform specified operation on endpoint.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::ENDPOINT_BUSY
@ ENDPOINT_BUSY
The endpoint can't handle the directive because it is performing another action.
alexaClientSDK::avsCommon::avs::AlexaResponseType::POWER_LEVEL_NOT_SUPPORTED
@ POWER_LEVEL_NOT_SUPPORTED
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::ALREADY_IN_OPERATION
@ ALREADY_IN_OPERATION
The operation can't be performed because the endpoint is already in operation.
alexaClientSDK
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
alexaClientSDK::avsCommon::avs::AlexaResponseType::HARDWARE_MALFUNCTION
@ HARDWARE_MALFUNCTION
The endpoint was busy and could not perform because it has experienced a hardware malfunction.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::INTERNAL_ERROR
@ INTERNAL_ERROR
An error occurred that can't be described by one of the other error types.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::VALUE_OUT_OF_RANGE
@ VALUE_OUT_OF_RANGE
The endpoint can't be set to the specified value because it's outside the acceptable range.
alexaClientSDK::avsCommon::avs::AlexaResponseType::ENDPOINT_LOW_POWER
@ ENDPOINT_LOW_POWER
The endpoint could not perform the requested operation as its battery was low.
alexaClientSDK::avsCommon::avs::AlexaResponseType::ENDPOINT_BUSY
@ ENDPOINT_BUSY
The endpoint was busy and could not perform the requested operation.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::POWER_LEVEL_NOT_SUPPORTED
@ POWER_LEVEL_NOT_SUPPORTED
The endpoint can't handle the directive because it doesn't support the requested power level.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::FIRMWARE_OUT_OF_DATE
@ FIRMWARE_OUT_OF_DATE
The endpoint can't handle the directive because it's firmware is out of date.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::NO_SUCH_ENDPOINT
@ NO_SUCH_ENDPOINT
The endpoint does not exist, or no longer exists.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::ENDPOINT_LOW_POWER
@ ENDPOINT_LOW_POWER
The endpoint can't handle the directive because the battery power is too low.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::NOT_IN_OPERATION
@ NOT_IN_OPERATION
The endpoint is not in operation.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::INSUFFICIENT_PERMISSIONS
@ INSUFFICIENT_PERMISSIONS
AVS does not have permissions to perform the specified action on the endpoint.
alexaClientSDK::avsCommon::avs::AlexaResponseType::RATE_LIMIT_EXCEEDED
@ RATE_LIMIT_EXCEEDED
The maximum rate at which an endpoint or bridge can handle the requests has been exceeded.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::INVALID_DIRECTIVE
@ INVALID_DIRECTIVE
The directive is not supported or is malformed.
alexaClientSDK::avsCommon::avs::AlexaResponseType::ALREADY_IN_OPERATION
@ ALREADY_IN_OPERATION
Endpoint already in operation.
alexaClientSDK::avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface::ErrorResponseType::INVALID_AUTHORIZATION_CREDENTIAL
@ INVALID_AUTHORIZATION_CREDENTIAL
The authorization credential provided by Alexa is invalid.
alexaClientSDK::avsCommon::avs::AVSMessageEndpoint
Definition: AVSMessageEndpoint.h:32

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