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

#include <APLDocumentObserverInterface.h>

Public Member Functions

virtual ~APLDocumentObserverInterface ()=default
 
virtual void onAPLDocumentSessionAvailable (const std::string &token, std::unique_ptr< APLDocumentSessionInterface > &&session)=0
 
virtual void onDocumentFinished (const std::string &token)=0
 
virtual void onRenderDocumentComplete (const std::string &token, bool result, const std::string &error)
 
virtual void onRenderDocumentComplete (const std::string &token, bool result, const std::string &error, const std::chrono::steady_clock::time_point &timestamp)
 
virtual void onCommandExecutionComplete (const std::string &token, bool result, const std::string &error)=0
 
virtual void onDataSourceUpdateComplete (const std::string &token, bool result, const std::string &error)=0
 
virtual void onSendEvent (const std::string &token, const std::string &arguments, const std::string &components, const std::string &source)=0
 
virtual void onVisualContextAvailable (const std::string &token, const unsigned int requestToken, const std::string &visualContext)=0
 
virtual void onDataSourceFetch (const std::string &token, const std::string &dataSourceType, const std::string &payload)=0
 
virtual void onRuntimeError (const std::string &token, const std::string &payload)=0
 

Detailed Description

A APLDocumentObserverInterface allows for observing the lifecycle of rendered APL documents.

Constructor & Destructor Documentation

◆ ~APLDocumentObserverInterface()

virtual alexaClientSDK::acsdkAlexaPresentationInterfaces::APLDocumentObserverInterface::~APLDocumentObserverInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ onAPLDocumentSessionAvailable()

virtual void alexaClientSDK::acsdkAlexaPresentationInterfaces::APLDocumentObserverInterface::onAPLDocumentSessionAvailable ( const std::string &  token,
std::unique_ptr< APLDocumentSessionInterface > &&  session 
)
pure virtual

Callback when document session is available. Session may be stored to further influence the document being rendered.

Parameters
tokenpresentationToken of document session available
sessionDocumentSession object

◆ onCommandExecutionComplete()

virtual void alexaClientSDK::acsdkAlexaPresentationInterfaces::APLDocumentObserverInterface::onCommandExecutionComplete ( const std::string &  token,
bool  result,
const std::string &  error 
)
pure virtual

Callback when execute command is complete

Parameters
tokenpresentationToken of document
resulttrue if successful, false otherwise
errorerror string if available

◆ onDataSourceFetch()

virtual void alexaClientSDK::acsdkAlexaPresentationInterfaces::APLDocumentObserverInterface::onDataSourceFetch ( const std::string &  token,
const std::string &  dataSourceType,
const std::string &  payload 
)
pure virtual

Callback for data source fetch request

Parameters
tokenpresentationToken of document
dataSourceTypeapl defined list data source type
payloadjson payload of data source fetch request

◆ onDataSourceUpdateComplete()

virtual void alexaClientSDK::acsdkAlexaPresentationInterfaces::APLDocumentObserverInterface::onDataSourceUpdateComplete ( const std::string &  token,
bool  result,
const std::string &  error 
)
pure virtual

Callback when data source update is complete

Parameters
tokenpresentationToken of document
resulttrue if successful, false otherwise
errorerror string if available

◆ onDocumentFinished()

virtual void alexaClientSDK::acsdkAlexaPresentationInterfaces::APLDocumentObserverInterface::onDocumentFinished ( const std::string &  token)
pure virtual

Callback when document has finished displaying

Parameters
tokenpresentationToken of document

◆ onRenderDocumentComplete() [1/2]

virtual void alexaClientSDK::acsdkAlexaPresentationInterfaces::APLDocumentObserverInterface::onRenderDocumentComplete ( const std::string &  token,
bool  result,
const std::string &  error 
)
inlinevirtual

Callback when document rendering is complete

Parameters
tokenpresentationToken of document
resulttrue if rendering was successful, false otherwise
errorerror string if available

◆ onRenderDocumentComplete() [2/2]

virtual void alexaClientSDK::acsdkAlexaPresentationInterfaces::APLDocumentObserverInterface::onRenderDocumentComplete ( const std::string &  token,
bool  result,
const std::string &  error,
const std::chrono::steady_clock::time_point &  timestamp 
)
inlinevirtual

◆ onRuntimeError()

virtual void alexaClientSDK::acsdkAlexaPresentationInterfaces::APLDocumentObserverInterface::onRuntimeError ( const std::string &  token,
const std::string &  payload 
)
pure virtual

Callback when runtime error occurs in document

Parameters
tokenpresentationToken of document
payloadjson payload of runtime error

◆ onSendEvent()

virtual void alexaClientSDK::acsdkAlexaPresentationInterfaces::APLDocumentObserverInterface::onSendEvent ( const std::string &  token,
const std::string &  arguments,
const std::string &  components,
const std::string &  source 
)
pure virtual

Callback for send event request

Parameters
tokenpresentationToken of document
argumentsArguments array of SendEvent command
componentsObject containing the component of the SendEvent command
sourceObject detailing component which generated the command

◆ onVisualContextAvailable()

virtual void alexaClientSDK::acsdkAlexaPresentationInterfaces::APLDocumentObserverInterface::onVisualContextAvailable ( const std::string &  token,
const unsigned int  requestToken,
const std::string &  visualContext 
)
pure virtual

Callback to provide information about what is currently displayed on screen. Should be provided to ContextManagerInterface in response to provideState calls.

Parameters
tokenpresentationToken of document
requestTokentoken correlating context to provideState request
visualContextjson payload of document visual context

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