AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface Class Referenceabstract

#include <APLCapabilityAgentInterface.h>

Inheritance diagram for alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface:
Inheritance graph
[legend]

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 &timestamp)=0
 
virtual void proactiveStateReport ()=0
 

Detailed Description

Defines a Contract for clients to communicate with the APL Capability agent.

Constructor & Destructor Documentation

◆ ~APLCapabilityAgentInterface()

virtual alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface::~APLCapabilityAgentInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ clearExecuteCommands()

virtual void alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface::clearExecuteCommands ( const PresentationToken token = std::string(),
const bool  markAsFailed = true 
)
pure virtual

This function clears last received ExecuteCommands directive (if it's still active) and mark them as failed.

Parameters
tokenThe 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)
markAsFailedWhether to mark the cleared commands as failed.

Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.

◆ onActiveDocumentChanged()

virtual void alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface::onActiveDocumentChanged ( const PresentationToken token,
const PresentationSession session 
)
pure virtual

This function notifies the APL CA that the active document has been replaced.

Note
A change to the active document does not indicate that the previous document was dismissed.
Parameters
tokenThe new active document token
sessionThe new presentation session

Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.

◆ onVisualContextAvailable()

virtual void alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface::onVisualContextAvailable ( avsCommon::sdkInterfaces::ContextRequestToken  requestToken,
const aplEventPayload::VisualContext visualContext 
)
pure virtual

This function is called by the clients to provide the visual context to be passed to AVS.

Parameters
requestTokenThe token of the request for which this function is called. This should match the request token provided in VisualStateProviderInterface
contextThe 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.

◆ proactiveStateReport()

virtual void alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface::proactiveStateReport ( )
pure virtual

The function notifies the CA to initiate a proactive state report

Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.

◆ processExecuteCommandsResult()

virtual void alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface::processExecuteCommandsResult ( const PresentationToken token,
APLCommandExecutionEvent  event,
const std::string &  error 
)
pure virtual

Process result of ExecuteCommands directive.

Parameters
tokenrequest token
eventthe command result as defined in APLCommandExecutionEvent
errorerror message provided in case if result is false

Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.

◆ processRenderDocumentResult()

virtual void alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface::processRenderDocumentResult ( const PresentationToken token,
const bool  result,
const std::string &  error 
)
pure virtual

Process result of RenderDocument directive.

Parameters
tokendocument presentationToken.
resultrendering result (true on rendered, false on exception).
errorerror message provided in case if result is false

Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.

◆ recordRenderComplete()

virtual void alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface::recordRenderComplete ( const std::chrono::steady_clock::time_point &  timestamp)
pure virtual

Record the finish event for currently rendering document

Parameters
timestampThe timestamp at which the document was rendered

Implemented in alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, and alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent.

◆ sendDataSourceFetchRequestEvent()

virtual void alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface::sendDataSourceFetchRequestEvent ( const aplEventPayload::DataSourceFetch payload)
pure virtual

Send DataSourceFetchRequest to AVS

Parameters
payloadThe 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.

◆ sendRuntimeErrorEvent()

virtual void alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface::sendRuntimeErrorEvent ( const aplEventPayload::RuntimeError payload)
pure virtual

Send RuntimeError to AVS

Parameters
payloadThe 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.

◆ sendUserEvent()

virtual void alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface::sendUserEvent ( const aplEventPayload::UserEvent payload)
pure virtual

Send UserEvent to AVS

Parameters
payloadThe 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.


The documentation for this class was generated from the following file:

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