![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <APLCapabilityAgentInterface.h>
Public Member Functions | |
virtual | ~APLCapabilityAgentInterface ()=default |
virtual void | onActiveDocumentChanged (const PresentationToken &token, const PresentationSession &session)=0 |
virtual void | clearExecuteCommands (const PresentationToken &token=std::string(), const bool markAsFailed=true)=0 |
virtual void | sendUserEvent (const aplEventPayload::UserEvent &payload)=0 |
virtual void | sendDataSourceFetchRequestEvent (const aplEventPayload::DataSourceFetch &payload)=0 |
virtual void | sendRuntimeErrorEvent (const aplEventPayload::RuntimeError &payload)=0 |
virtual void | onVisualContextAvailable (avsCommon::sdkInterfaces::ContextRequestToken requestToken, const aplEventPayload::VisualContext &visualContext)=0 |
virtual void | processRenderDocumentResult (const PresentationToken &token, const bool result, const std::string &error)=0 |
virtual void | processExecuteCommandsResult (const PresentationToken &token, APLCommandExecutionEvent event, const std::string &error)=0 |
virtual void | recordRenderComplete (const std::chrono::steady_clock::time_point ×tamp)=0 |
virtual void | proactiveStateReport ()=0 |
Defines a Contract for clients to communicate with the APL Capability agent.
|
virtualdefault |
Destructor.
|
pure virtual |
This function clears last received ExecuteCommands
directive (if it's still active) and mark them as failed.
token | The token. This should be passed in if we are clearing execute commands due to APL-specific trigger (eg. Finish command). This should be left empty if we are clearing due to global triggers (eg. back navigation) |
markAsFailed | Whether to mark the cleared commands as failed. |
Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.
|
pure virtual |
This function notifies the APL CA that the active document has been replaced.
token | The new active document token |
session | The new presentation session |
Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.
|
pure virtual |
This function is called by the clients to provide the visual context to be passed to AVS.
requestToken | The token of the request for which this function is called. This should match the request token provided in VisualStateProviderInterface |
context | The visual state to be passed to AVS. The caller of this function is responsible to pass the payload as it defined in aplEventPayload::VisualContext |
Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.
|
pure virtual |
The function notifies the CA to initiate a proactive state report
Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.
|
pure virtual |
Process result of ExecuteCommands directive.
token | request token |
event | the command result as defined in APLCommandExecutionEvent |
error | error message provided in case if result is false |
Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.
|
pure virtual |
Process result of RenderDocument directive.
token | document presentationToken. |
result | rendering result (true on rendered, false on exception). |
error | error message provided in case if result is false |
Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.
|
pure virtual |
Record the finish event for currently rendering document
timestamp | The timestamp at which the document was rendered |
Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.
|
pure virtual |
Send DataSourceFetchRequest
to AVS
payload | The DataSourceFetchRequest event payload. The caller of this function is responsible to pass the payload as it defined in aplEventPayload::DataSourceFetch . |
Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.
|
pure virtual |
Send RuntimeError
to AVS
payload | The RuntimeError event payload. The caller of this function is responsible to pass the payload as it defined in aplEventPayload::RuntimeError . |
Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.
|
pure virtual |
Send UserEvent
to AVS
payload | The UserEvent event payload. The caller of this function is responsible to pass the payload as it defined in aplEventPayload::UserEvent . |
Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0