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

#include <IPCAPLAgent.h>

Inheritance diagram for alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent:
Collaboration graph
[legend]

Public Member Functions

virtual ~IPCAPLAgent ()=default
 
APLCapabilityAgentInterface functions
void setAPLMaxVersion (const std::string &APLMaxVersion)
 
void onDocumentDismissed (const std::string &token)
 
void onActiveDocumentChanged (const std::string &token, const aplCapabilityCommonInterfaces::PresentationSession &session) override
 
void addObserver (std::shared_ptr< aplCapabilityCommonInterfaces::APLCapabilityAgentObserverInterface > observer)
 
void removeObserver (std::shared_ptr< aplCapabilityCommonInterfaces::APLCapabilityAgentObserverInterface > observer)
 
void clearExecuteCommands (const std::string &token=std::string(), bool markAsFailed=true) override
 
void sendUserEvent (const alexaClientSDK::aplCapabilityCommonInterfaces::aplEventPayload::UserEvent &payload) override
 
void sendDataSourceFetchRequestEvent (const alexaClientSDK::aplCapabilityCommonInterfaces::aplEventPayload::DataSourceFetch &fetchPayload) override
 
void sendRuntimeErrorEvent (const alexaClientSDK::aplCapabilityCommonInterfaces::aplEventPayload::RuntimeError &payload) override
 
void onVisualContextAvailable (alexaClientSDK::avsCommon::sdkInterfaces::ContextRequestToken requestToken, const alexaClientSDK::aplCapabilityCommonInterfaces::aplEventPayload::VisualContext &visualContext) override
 
void processRenderDocumentResult (const std::string &token, const bool result, const std::string &error) override
 
void processExecuteCommandsResult (const std::string &token, alexaClientSDK::aplCapabilityCommonInterfaces::APLCommandExecutionEvent event, const std::string &error) override
 
void recordRenderComplete (const std::chrono::steady_clock::time_point &timestamp) override
 
void proactiveStateReport () override
 
- Public Member Functions inherited from alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface
virtual ~APLCapabilityAgentInterface ()=default
 

Static Public Member Functions

static std::shared_ptr< IPCAPLAgentcreate (std::shared_ptr< gui::GUIClientInterface > guiClient)
 

Detailed Description

IPC APL Agent used for routing APL runtime events from documents initiated by an IPC client.

Constructor & Destructor Documentation

◆ ~IPCAPLAgent()

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

Destructor.

Member Function Documentation

◆ addObserver()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent::addObserver ( std::shared_ptr< aplCapabilityCommonInterfaces::APLCapabilityAgentObserverInterface observer)

◆ clearExecuteCommands()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent::clearExecuteCommands ( const std::string &  token = std::string(),
bool  markAsFailed = true 
)
overridevirtual

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.

Implements alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface.

◆ create()

static std::shared_ptr<IPCAPLAgent> alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent::create ( std::shared_ptr< gui::GUIClientInterface guiClient)
static

Create a IPCAPLAgent

Parameters
guiClientA pointer to a GUI Client.
Returns
an instance of IPCAPLAgent.

◆ onActiveDocumentChanged()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent::onActiveDocumentChanged ( const std::string &  token,
const aplCapabilityCommonInterfaces::PresentationSession session 
)
overridevirtual

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

Implements alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface.

◆ onDocumentDismissed()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent::onDocumentDismissed ( const std::string &  token)

◆ onVisualContextAvailable()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent::onVisualContextAvailable ( alexaClientSDK::avsCommon::sdkInterfaces::ContextRequestToken  requestToken,
const alexaClientSDK::aplCapabilityCommonInterfaces::aplEventPayload::VisualContext visualContext 
)
overridevirtual

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

Implements alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface.

◆ proactiveStateReport()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent::proactiveStateReport ( )
overridevirtual

The function notifies the CA to initiate a proactive state report

Implements alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface.

◆ processExecuteCommandsResult()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent::processExecuteCommandsResult ( const std::string &  token,
alexaClientSDK::aplCapabilityCommonInterfaces::APLCommandExecutionEvent  event,
const std::string &  error 
)
overridevirtual

Process result of ExecuteCommands directive.

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

Implements alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface.

◆ processRenderDocumentResult()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent::processRenderDocumentResult ( const std::string &  token,
const bool  result,
const std::string &  error 
)
overridevirtual

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

Implements alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface.

◆ recordRenderComplete()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent::recordRenderComplete ( const std::chrono::steady_clock::time_point &  timestamp)
overridevirtual

Record the finish event for currently rendering document

Parameters
timestampThe timestamp at which the document was rendered

Implements alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface.

◆ removeObserver()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent::removeObserver ( std::shared_ptr< aplCapabilityCommonInterfaces::APLCapabilityAgentObserverInterface observer)

◆ sendDataSourceFetchRequestEvent()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent::sendDataSourceFetchRequestEvent ( const alexaClientSDK::aplCapabilityCommonInterfaces::aplEventPayload::DataSourceFetch payload)
overridevirtual

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.

Implements alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface.

◆ sendRuntimeErrorEvent()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent::sendRuntimeErrorEvent ( const alexaClientSDK::aplCapabilityCommonInterfaces::aplEventPayload::RuntimeError payload)
overridevirtual

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.

Implements alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface.

◆ sendUserEvent()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent::sendUserEvent ( const alexaClientSDK::aplCapabilityCommonInterfaces::aplEventPayload::UserEvent payload)
overridevirtual

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.

Implements alexaClientSDK::aplCapabilityCommonInterfaces::APLCapabilityAgentInterface.

◆ setAPLMaxVersion()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::IPCAPLAgent::setAPLMaxVersion ( const std::string &  APLMaxVersion)

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