![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <AlexaInterfaceMessageSenderInterface.h>
Public Member Functions | |
virtual | ~AlexaInterfaceMessageSenderInterface ()=default |
virtual bool | sendResponseEvent (const std::string &instance, const std::string &correlationToken, const avsCommon::avs::AVSMessageEndpoint &endpoint, const std::string &jsonPayload="{}")=0 |
virtual bool | sendResponseEvent (const std::string &instance, const std::string &correlationToken, const avsCommon::avs::AVSMessageEndpoint &endpoint, const std::string &responseNamespace, const std::string &responseName, const std::string &jsonPayload="{}")=0 |
virtual bool | sendErrorResponseEvent (const std::string &instance, const std::string &correlationToken, const avsCommon::avs::AVSMessageEndpoint &endpoint, const ErrorResponseType errorType, const std::string &errorMessage="")=0 |
virtual bool | sendErrorResponseEvent (const std::string &instance, const std::string &correlationToken, const avsCommon::avs::AVSMessageEndpoint &endpoint, const std::string &responseNamespace, const std::string &jsonPayload="{}")=0 |
virtual bool | sendDeferredResponseEvent (const std::string &instance, const std::string &correlationToken, const int estimatedDeferralInSeconds=0)=0 |
Static Public Member Functions | |
static std::string | alexaVideoErrorResponseToString (AlexaVideoErrorResponseType responseType) |
static ErrorResponseType | alexaResponseTypeToErrorType (const avsCommon::avs::AlexaResponseType responseType) |
Messaging interface to allow CapabilityAgents to send common AlexaInterface events.
|
strong |
The type of video error when calling sendErrorResponseEvent() with Alexa.Video.ErrorResponse
event. https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-video-errorresponse.html
|
strong |
The type of error when calling sendErrorResponseEvent() with Alexa.ErrorResponse
event. https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-errorresponse.html
|
virtualdefault |
Destructor.
|
inlinestatic |
Convert an AlexaResponseType to its corresponding ErrorResponseType. Note that any AlexaResponseType that does not map to ErrorResponseType will return INTERNAL_ERROR.
responseType | the response type to convert. |
|
inlinestatic |
Convert AlexaVideoErrorResponseType
type to its corresponding string. Note that any invalid AlexaVideoErrorResponseType
will return an empty string.
responseType | the response type to convert. |
|
pure virtual |
Send an Alexa.DeferredResponse event. The message is enqueued for sending and this method returns immediately (non-blocking).
instance | The instance ID of the responding capability. |
correlationToken | The correlation token from the directive to which we are responding. |
estimatedDeferralInSeconds | number of seconds until the response is expected. |
Implemented in alexaClientSDK::capabilityAgents::alexa::AlexaInterfaceMessageSender.
|
pure virtual |
Send an Alexa.ErrorResponse event. The message is enqueued for sending and this method returns immediately (non-blocking).
instance | The instance ID of the responding capability. |
correlationToken | The correlation token from the directive to which we are responding. |
endpoint | The AVSMessageEndpoint to identify the endpoint related to this event. |
errorType | the error type. |
errorMessage | a string containing the error message (optional). |
Implemented in alexaClientSDK::capabilityAgents::alexa::AlexaInterfaceMessageSender.
|
pure virtual |
Send an error response event for namespace and name. The message is enqueued for sending and this method returns immediately (non-blocking).
instance | The instance ID of the responding capability. |
correlationToken | The correlation token from the directive to which we are responding. |
endpoint | The AVSMessageEndpoint to identify the endpoint related to this event. |
responseNamespace | a string containing the namespace for this response. |
jsonPayload | a payload containing the error type and message (optional). |
Implemented in alexaClientSDK::capabilityAgents::alexa::AlexaInterfaceMessageSender.
|
pure virtual |
Send an Alexa.Response event. Since these events require context, the event will be enqueued and this method will return immediately (non-blocking). The message will be sent once context has been received from ContextManager.
instance | The instance ID of the responding capability. |
correlationToken | The correlation token from the directive to which we are responding. |
endpoint | The AVSMessageEndpoint to identify the endpoint related to this event. |
jsonPayload | a JSON string representing the payload for the response event (optional). |
Implemented in alexaClientSDK::capabilityAgents::alexa::AlexaInterfaceMessageSender.
|
pure virtual |
Send an Response event. Since these events require context, the event will be enqueued and this method will return immediately (non-blocking). The message will be sent once context has been received from ContextManager.
instance | The instance ID of the responding capability. |
correlationToken | The correlation token from the directive to which we are responding. |
endpoint | The AVSMessageEndpoint to identify the endpoint related to this event. |
responseNamespace | The namespace of response event |
responseName | The name of response event |
jsonPayload | a JSON string representing the payload for the response event (optional). |
Implemented in alexaClientSDK::capabilityAgents::alexa::AlexaInterfaceMessageSender.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0