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

#include <APLViewhostObserverInterface.h>

Inheritance diagram for alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostObserverInterface:
Inheritance graph
[legend]

Public Member Functions

virtual ~APLViewhostObserverInterface ()=default
 
virtual void onCommandExecutionComplete (const std::string &token, APLClient::AplCommandExecutionEvent event, const std::string &message)=0
 
virtual void onRenderDocumentComplete (const std::string &token, bool result, const std::string &error, const std::chrono::steady_clock::time_point &timestamp)=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 unsigned int requestToken, const std::string &token, const std::string &version, const std::string &visualContext, const std::string &datasourceContext)
 
virtual void onDataSourceUpdateComplete (const std::string &token, bool result, const std::string &error)
 
virtual void onDataSourceFetch (const std::string &token, const std::string &dataSourceType, const std::string &payload)
 
virtual void onRuntimeError (const std::string &token, const std::string &payload)
 
virtual void onDocumentFinished (const std::string &token)
 
virtual void onOpenURL (const std::string &token, const std::string &url)
 
virtual void onDocumentCleared (const std::string &token)
 
virtual void onSetDocumentIdleTimeout (const std::string &token, const std::chrono::milliseconds &timeout)=0
 

Detailed Description

Observer interface used for callbacks from the APL Viewhost implementation.

Constructor & Destructor Documentation

◆ ~APLViewhostObserverInterface()

virtual alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostObserverInterface::~APLViewhostObserverInterface ( )
virtualdefault

Destructor

Member Function Documentation

◆ onCommandExecutionComplete()

virtual void alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostObserverInterface::onCommandExecutionComplete ( const std::string &  token,
APLClient::AplCommandExecutionEvent  event,
const std::string &  message 
)
pure virtual

Callback when command execution is complete.

Parameters
tokenthe presentation token corresponding to the document being executed
eventthe command execution event.
messagethe execute command completion message.

Implemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::APLDocumentSession.

◆ onDataSourceFetch()

virtual void alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostObserverInterface::onDataSourceFetch ( const std::string &  token,
const std::string &  dataSourceType,
const std::string &  payload 
)
inlinevirtual

Callback when document requires a data source update

Parameters
tokenthe presentation token corresponding to the document requiring the update
dataSourceTypethe data source type requiring update
payloadThe payload of the fetch request

Reimplemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::APLDocumentSession.

◆ onDataSourceUpdateComplete()

virtual void alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostObserverInterface::onDataSourceUpdateComplete ( const std::string &  token,
bool  result,
const std::string &  error 
)
inlinevirtual

Callback when data source update is complete.

Parameters
tokenthe presentation token corresponding to the document being updated
resulttrue if successful, false otherwise
errorerror string if available

Reimplemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::APLDocumentSession.

◆ onDocumentCleared()

virtual void alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostObserverInterface::onDocumentCleared ( const std::string &  token)
inlinevirtual

Callback when a document has been cleared

Parameters
tokenthe presentation of the cleared document

Reimplemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::APLDocumentSession.

◆ onDocumentFinished()

virtual void alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostObserverInterface::onDocumentFinished ( const std::string &  token)
inlinevirtual

Callback when document is no longer displayed

Parameters
tokenthe presentation token corresponding to the document encountering the error

Reimplemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::APLDocumentSession.

◆ onOpenURL()

virtual void alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostObserverInterface::onOpenURL ( const std::string &  token,
const std::string &  url 
)
inlinevirtual

Callback when an open URL command occurs

Parameters
tokenthe presentation token
urlthe url to open

Reimplemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::APLDocumentSession.

◆ onRenderDocumentComplete()

virtual void alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostObserverInterface::onRenderDocumentComplete ( const std::string &  token,
bool  result,
const std::string &  error,
const std::chrono::steady_clock::time_point &  timestamp 
)
pure virtual

Callback when render document is complete.

Parameters
tokenthe presentation token corresponding to the document being rendered
resulttrue if successful, false otherwise
timestampThe timestamp at which the document was rendered

Implemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::APLDocumentSession.

◆ onRuntimeError()

virtual void alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostObserverInterface::onRuntimeError ( const std::string &  token,
const std::string &  payload 
)
inlinevirtual

Callback when document receives a runtime error

Parameters
tokenthe presentation token corresponding to the document encountering the error
payloadThe payload of the error

Reimplemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::APLDocumentSession.

◆ onSendEvent()

virtual void alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostObserverInterface::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
tokenthe presentation token corresponding to the document sending the event
argumentsArguments array of SendEvent command
componentsObject containing the component of the SendEvent command
sourceObject detailing component which generated the command

Implemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::APLDocumentSession.

◆ onSetDocumentIdleTimeout()

virtual void alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostObserverInterface::onSetDocumentIdleTimeout ( const std::string &  token,
const std::chrono::milliseconds &  timeout 
)
pure virtual

Callback when a document timeout needs to be updated

Parameters
tokenthe presentation token
timeoutupdated timeout value

Implemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::APLDocumentSession.

◆ onVisualContextAvailable()

virtual void alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostObserverInterface::onVisualContextAvailable ( const unsigned int  requestToken,
const std::string &  token,
const std::string &  version,
const std::string &  visualContext,
const std::string &  datasourceContext 
)
inlinevirtual

callback when a new visual context is available

Parameters
requestTokentoken which was provided with the original visual context request
tokenthe presentation token corresponding to the document providing the context.
versionthe version of the UI component on the device.
visualContextserialized visual context
datasourceContextserialized datasource context

Reimplemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::APLDocumentSession.


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