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

#include <AplClientBridge.h>

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

Public Member Functions

RequiresShutdown Functions
void doShutdown () override
 
AplOptionsInterface Functions

{

void sendMessage (const std::string &token, const std::string &payload) override
 
void resetViewhost (const std::string &token) override
 
std::string downloadResource (const std::string &source) override
 
std::chrono::milliseconds getTimezoneOffset () override
 
void onActivityStarted (const std::string &token, const std::string &source) override
 
void onActivityEnded (const std::string &token, const std::string &source) override
 
void onSendEvent (const std::string &token, const std::string &event) override
 
void onCommandExecutionComplete (const std::string &token, APLClient::AplCommandExecutionEvent event, const std::string &message) override
 
void onRenderDocumentComplete (const std::string &token, bool result, const std::string &error) override
 
void onVisualContextAvailable (const std::string &token, unsigned int stateRequestToken, const std::string &context) override
 
void onSetDocumentIdleTimeout (const std::string &token, const std::chrono::milliseconds &timeout) override
 
void onRenderingEvent (const std::string &token, APLClient::AplRenderingEvent event) override
 
void onFinish (const std::string &token) override
 
void onDataSourceFetchRequestEvent (const std::string &token, const std::string &type, const std::string &payload) override
 
void onRuntimeErrorEvent (const std::string &token, const std::string &payload) override
 
void onExtensionEvent (const std::string &aplToken, const std::string &uri, const std::string &name, const std::string &source, const std::string &params, unsigned int event, std::shared_ptr< APLClient::Extensions::AplCoreExtensionEventCallbackResultInterface > resultCallback) override
 
void logMessage (APLClient::LogLevel level, const std::string &source, const std::string &message) override
 
int getMaxNumberOfConcurrentDownloads () override
 
MessagingServerObserverInterface Functions

}

void onConnectionOpened () override
 
void onConnectionClosed () override
 
AudioPlayerObserverInterface methods
void onPlayerActivityChanged (avsCommon::avs::PlayerActivity state, const Context &context) override
 
TemplateRuntimePresentationAdapterObserverInterface Functions

}

void renderTemplateCard (const std::string &jsonPayload) override
 
void renderPlayerInfoCard (const std::string &jsonPayload, templateRuntimeInterfaces::TemplateRuntimeObserverInterface::AudioPlayerInfo audioPlayerInfo) override
 
void clearRenderTemplateCard () override
 
void clearPlayerInfoCard () override
 
ExternalMediaPlayerObserverInterface methods
void onLoginStateProvided (const std::string &playerId, acsdkExternalMediaPlayerInterfaces::ObservableSessionProperties sessionStateProperties) override
 
void onPlaybackStateProvided (const std::string &playerId, acsdkExternalMediaPlayerInterfaces::ObservablePlaybackStateProperties playbackStateProperties) override
 
AplBackstackExtensionObserverInterface Functions

}

void onRestoreDocumentState (std::shared_ptr< APLClient::AplDocumentState > documentState) override
 
AplAudioPlayerExtensionObserverInterface methods
void onAudioPlayerPlay () override
 } More...
 
void onAudioPlayerPause () override
 } More...
 
void onAudioPlayerNext () override
 } More...
 
void onAudioPlayerPrevious () override
 } More...
 
void onAudioPlayerSeekToPosition (int offsetInMilliseconds) override
 } More...
 
void onAudioPlayerToggle (const std::string &name, bool checked) override
 } More...
 
void onAudioPlayerSkipForward () override
 } More...
 
void onAudioPlayerSkipBackward () override
 } More...
 
void onAudioPlayerLyricDataFlushed (const std::string &token, long durationInMilliseconds, const std::string &lyricData) override
 } More...
 
void onUpdateTimer ()
 } More...
 
void setGUIManager (std::shared_ptr< gui::GUIServerInterface > guiManager)
 } More...
 
APLViewhostInterface functions
void renderDocument (const aplCapabilityCommonInterfaces::PresentationSession &presentationSession, const std::string &token, const std::string &document, const std::string &datasources, const std::string &supportedViewports, const std::string &windowId) override
 
void clearDocument (const std::string &token) override
 
void executeCommands (const std::string &jsonPayload, const std::string &token) override
 
void interruptCommandSequence (const std::string &token) override
 
void dataSourceUpdate (const std::string &sourceType, const std::string &jsonPayload, const std::string &token) override
 
void addObserver (const APLViewhostObserverInterfacePtr &observer) override
 
void removeObserver (const APLViewhostObserverInterfacePtr &observer) override
 
void onRenderDirectiveReceived (const std::string &token, const std::chrono::steady_clock::time_point &receiveTime) override
 
std::string getMaxAPLVersion () const override
 
void setMetricRecorder (std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > metricRecorder) override
 
void provideState (const std::string &aplToken, const unsigned int stateRequestToken) override
 
bool handleBack (const std::string &windowId) override
 
- Public Member Functions inherited from alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostInterface
virtual ~APLViewhostInterface ()=default
 
virtual void clearDocument ()
 
virtual void interruptCommandSequence ()
 
- Public Member Functions inherited from alexaClientSDK::aplCapabilityCommonInterfaces::VisualStateProviderInterface
virtual ~VisualStateProviderInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::acsdkAudioPlayerInterfaces::AudioPlayerObserverInterface
virtual ~AudioPlayerObserverInterface ()=default
 
virtual void onSeekActivity (const SeekStatus seekStatus, const Context &context)
 
- Public Member Functions inherited from alexaClientSDK::sampleApplications::common::TemplateRuntimePresentationAdapterObserverInterface
virtual ~TemplateRuntimePresentationAdapterObserverInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaPlayerObserverInterface
virtual ~ExternalMediaPlayerObserverInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::utils::RequiresShutdown
 RequiresShutdown (const std::string &name)
 
virtual ~RequiresShutdown ()
 Destructor. More...
 
const std::string & name () const
 
void shutdown ()
 
bool isShutdown () const
 
- Public Member Functions inherited from alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::APLClientHandlerInterface
virtual ~APLClientHandlerInterface ()=default
 

Static Public Member Functions

static std::shared_ptr< AplClientBridgecreate (std::shared_ptr< CachingDownloadManager > contentDownloadManager, std::shared_ptr< gui::GUIClientInterface > guiClient, AplClientBridgeParameter parameters)
 

APLClientHandlerInterface methods

void initializeRenderersRequest (const std::string &message) override
 Alias for APLViewhostObserverInterface function. More...
 
void metricsReport (const std::string &message) override
 Alias for APLViewhostObserverInterface function. More...
 
void viewhostEvent (const std::string &message) override
 Alias for APLViewhostObserverInterface function. More...
 
void renderCompleted (const std::string &message) override
 Alias for APLViewhostObserverInterface function. More...
 
void renderDocumentRequest (const std::string &message) override
 Alias for APLViewhostObserverInterface function. More...
 
void executeCommandsRequest (const std::string &message) override
 Alias for APLViewhostObserverInterface function. More...
 
void clearDocumentRequest (const std::string &message) override
 Alias for APLViewhostObserverInterface function. More...
 
void onMessage (const std::string &windowId, const std::string &message)
 } More...
 
void handleRenderingEvent (const std::string &token, APLClient::AplRenderingEvent event)
 Alias for APLViewhostObserverInterface function. More...
 
void handleDisplayMetrics (const std::string &windowId, const std::string &jsonPayload)
 Alias for APLViewhostObserverInterface function. More...
 
void initializeRenderer (const std::string &windowId, const std::set< std::string > &supportedExtensions)
 
void registerSharedExtension (const std::shared_ptr< APLClient::Extensions::AplCoreExtensionInterface > &extension)
 
std::shared_ptr< APLClient::AplClientRenderer > getAplClientRendererFromAplToken (const std::string &aplToken)
 
std::shared_ptr< APLClient::AplClientRenderer > getAplClientRendererFromWindowId (const std::string &windowId)
 
void setMediaProperties (std::shared_ptr< avsCommon::sdkInterfaces::MediaPropertiesInterface > mediaProperties)
 
void initialize ()
 

Additional Inherited Members

- Public Types inherited from alexaClientSDK::acsdkAudioPlayerInterfaces::AudioPlayerObserverInterface
enum  SeekStatus { SeekStatus::SEEK_START, SeekStatus::SEEK_COMPLETE }
 Enum representing Seek activities. More...
 

Member Function Documentation

◆ addObserver()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::addObserver ( const APLViewhostObserverInterfacePtr observer)
overridevirtual

Adds a viewhost observer

Parameters
observerthe observer to register

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostInterface.

◆ clearDocument()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::clearDocument ( const std::string &  token)
overridevirtual

Clear APL document

Parameters
tokentoken of document to clear

Reimplemented from alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostInterface.

◆ clearDocumentRequest()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::clearDocumentRequest ( const std::string &  message)
overridevirtual

◆ clearPlayerInfoCard()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::clearPlayerInfoCard ( )
overridevirtual

Used to notify when the player info card should be cleared.

Implements alexaClientSDK::sampleApplications::common::TemplateRuntimePresentationAdapterObserverInterface.

◆ clearRenderTemplateCard()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::clearRenderTemplateCard ( )
overridevirtual

Used to notify when the render template card should be cleared.

Implements alexaClientSDK::sampleApplications::common::TemplateRuntimePresentationAdapterObserverInterface.

◆ create()

static std::shared_ptr<AplClientBridge> alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::create ( std::shared_ptr< CachingDownloadManager contentDownloadManager,
std::shared_ptr< gui::GUIClientInterface guiClient,
AplClientBridgeParameter  parameters 
)
static

◆ dataSourceUpdate()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::dataSourceUpdate ( const std::string &  sourceType,
const std::string &  data,
const std::string &  token 
)
overridevirtual

Update the data source payload for a given APL document

Parameters
sourceTypeAPL spec source type for data update
dataJSON string containing new data payload associated with APL document
tokenPresentation token to identify document to update

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostInterface.

◆ doShutdown()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::doShutdown ( )
overridevirtual

Prepares/enables this object to be deleted. This should be the last function called on this object prior to deleting (or resetting) its shared_ptr.

Warning
  • Attempting to call functions on this object after calling shutdown() can result in undefined behavior.
  • Neglecting to call shutdown() on this object can result in resource leaks or other undefined behavior.

Implements alexaClientSDK::avsCommon::utils::RequiresShutdown.

◆ downloadResource()

std::string alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::downloadResource ( const std::string &  source)
override

◆ executeCommands()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::executeCommands ( const std::string &  commands,
const std::string &  token 
)
overridevirtual

Execute commands referenced in APL document

Parameters
documentJSON string containing APL command to execute
tokenPresentation token to identify document to execute commands on

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostInterface.

◆ executeCommandsRequest()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::executeCommandsRequest ( const std::string &  message)
overridevirtual

◆ getAplClientRendererFromAplToken()

std::shared_ptr<APLClient::AplClientRenderer> alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::getAplClientRendererFromAplToken ( const std::string &  aplToken)

Returns a shared pointer to the AplClientRenderer holding root-context for a given aplToken Note:- This is not a thread safe method, avoid calling this method outside executor context

Parameters
theAPL token in context
Returns
the instance of APLClientRenderer if found, else nullptr

◆ getAplClientRendererFromWindowId()

std::shared_ptr<APLClient::AplClientRenderer> alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::getAplClientRendererFromWindowId ( const std::string &  windowId)

Returns a shared pointer to the AplClientRenderer holding root-context for a target window ID Note:- This is not a thread safe method, avoid calling this method outside executor context

Parameters
thewindow id in context
Returns
the instance of APLClientRenderer if found, else nullptr

◆ getMaxAPLVersion()

std::string alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::getMaxAPLVersion ( ) const
overridevirtual

Retrieves the maximum APL version supported by this runtime

Returns
the max supported APL version

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostInterface.

◆ getMaxNumberOfConcurrentDownloads()

int alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::getMaxNumberOfConcurrentDownloads ( )
override

◆ getTimezoneOffset()

std::chrono::milliseconds alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::getTimezoneOffset ( )
override

◆ handleBack()

bool alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::handleBack ( const std::string &  windowId)
overridevirtual

Handle back navigation

Parameters
windowIdThe window ID on which to perform the back action
Returns
true if the viewhost can handle back, false otherwise

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostInterface.

◆ handleDisplayMetrics()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::handleDisplayMetrics ( const std::string &  windowId,
const std::string &  jsonPayload 
)

Alias for APLViewhostObserverInterface function.

◆ handleRenderingEvent()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::handleRenderingEvent ( const std::string &  token,
APLClient::AplRenderingEvent  event 
)

Alias for APLViewhostObserverInterface function.

◆ initialize()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::initialize ( )

Initializes the IPC handlers implemented by the APLClientBridge.

◆ initializeRenderer()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::initializeRenderer ( const std::string &  windowId,
const std::set< std::string > &  supportedExtensions 
)

Initialize empty client renderer and load corresponding supported extensions

Parameters
windowIdid of the window to be created
supportedExtensionsURIs of all supported APL extensions for this window

◆ initializeRenderersRequest()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::initializeRenderersRequest ( const std::string &  message)
overridevirtual

◆ interruptCommandSequence()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::interruptCommandSequence ( const std::string &  token)
overridevirtual

Interrupt active command sequence

Parameters
tokentoken of document to interrupt

Reimplemented from alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostInterface.

◆ logMessage()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::logMessage ( APLClient::LogLevel  level,
const std::string &  source,
const std::string &  message 
)
override

◆ metricsReport()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::metricsReport ( const std::string &  message)
overridevirtual

◆ onActivityEnded()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onActivityEnded ( const std::string &  token,
const std::string &  source 
)
override

◆ onActivityStarted()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onActivityStarted ( const std::string &  token,
const std::string &  source 
)
override

◆ onAudioPlayerLyricDataFlushed()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onAudioPlayerLyricDataFlushed ( const std::string &  token,
long  durationInMilliseconds,
const std::string &  lyricData 
)
override

}

◆ onAudioPlayerNext()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onAudioPlayerNext ( )
override

}

◆ onAudioPlayerPause()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onAudioPlayerPause ( )
override

}

◆ onAudioPlayerPlay()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onAudioPlayerPlay ( )
override

}

◆ onAudioPlayerPrevious()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onAudioPlayerPrevious ( )
override

}

◆ onAudioPlayerSeekToPosition()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onAudioPlayerSeekToPosition ( int  offsetInMilliseconds)
override

}

◆ onAudioPlayerSkipBackward()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onAudioPlayerSkipBackward ( )
override

}

◆ onAudioPlayerSkipForward()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onAudioPlayerSkipForward ( )
override

}

◆ onAudioPlayerToggle()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onAudioPlayerToggle ( const std::string &  name,
bool  checked 
)
override

}

◆ onCommandExecutionComplete()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onCommandExecutionComplete ( const std::string &  token,
APLClient::AplCommandExecutionEvent  event,
const std::string &  message 
)
override

◆ onConnectionClosed()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onConnectionClosed ( )
overridevirtual

◆ onConnectionOpened()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onConnectionOpened ( )
overridevirtual

◆ onDataSourceFetchRequestEvent()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onDataSourceFetchRequestEvent ( const std::string &  token,
const std::string &  type,
const std::string &  payload 
)
override

◆ onExtensionEvent()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onExtensionEvent ( const std::string &  aplToken,
const std::string &  uri,
const std::string &  name,
const std::string &  source,
const std::string &  params,
unsigned int  event,
std::shared_ptr< APLClient::Extensions::AplCoreExtensionEventCallbackResultInterface >  resultCallback 
)
override

◆ onFinish()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onFinish ( const std::string &  token)
override

◆ onLoginStateProvided()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onLoginStateProvided ( const std::string &  playerId,
acsdkExternalMediaPlayerInterfaces::ObservableSessionProperties  sessionStateProperties 
)
overridevirtual

This function is called when the login state is provided as a state observer

Parameters
playerIdthe ExternalMediaAdapter being reported on
sessionStatePropertiesthe observable session properties being reported

Implements alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaPlayerObserverInterface.

◆ onMessage()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onMessage ( const std::string &  windowId,
const std::string &  message 
)

}

◆ onPlaybackStateProvided()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onPlaybackStateProvided ( const std::string &  playerId,
acsdkExternalMediaPlayerInterfaces::ObservablePlaybackStateProperties  playbackStateProperties 
)
overridevirtual

This function is called when the playback state is provided as a state observer

Parameters
playerIdthe ExternalMediaAdapter being reported on
playbackStatePropertiesthe observable playback state properties being reported

Implements alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaPlayerObserverInterface.

◆ onPlayerActivityChanged()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onPlayerActivityChanged ( avsCommon::avs::PlayerActivity  state,
const Context context 
)
overridevirtual

Used to notify the observer when the AudioPlayer has a change in PlayerActivity.

Parameters
stateThe PlayerActivity of the AudioPlayer.
contextThe Context of the AudioPlayer.

Implements alexaClientSDK::acsdkAudioPlayerInterfaces::AudioPlayerObserverInterface.

◆ onRenderDirectiveReceived()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onRenderDirectiveReceived ( const std::string &  token,
const std::chrono::steady_clock::time_point &  receiveTime 
)
overridevirtual

Used for metrics purposes, notifies the APLRuntime of the time when the directive was received

Parameters
tokentoken of the document
receiveTimeThe receive time

Reimplemented from alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostInterface.

◆ onRenderDocumentComplete()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onRenderDocumentComplete ( const std::string &  token,
bool  result,
const std::string &  error 
)
override

◆ onRenderingEvent()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onRenderingEvent ( const std::string &  token,
APLClient::AplRenderingEvent  event 
)
override

◆ onRestoreDocumentState()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onRestoreDocumentState ( std::shared_ptr< APLClient::AplDocumentState >  documentState)
override

◆ onRuntimeErrorEvent()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onRuntimeErrorEvent ( const std::string &  token,
const std::string &  payload 
)
override

◆ onSendEvent()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onSendEvent ( const std::string &  token,
const std::string &  event 
)
override

◆ onSetDocumentIdleTimeout()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onSetDocumentIdleTimeout ( const std::string &  token,
const std::chrono::milliseconds &  timeout 
)
override

◆ onUpdateTimer()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onUpdateTimer ( )

}

◆ onVisualContextAvailable()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::onVisualContextAvailable ( const std::string &  token,
unsigned int  stateRequestToken,
const std::string &  context 
)
override

◆ provideState()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::provideState ( const std::string &  token,
const unsigned int  stateRequestToken 
)
overridevirtual

A request to a VisualStateProvider to provide the state. The requester specifies a token which the VisualStateProvider must use when it updates the state via the onVisualContextAvailable call to APL Capability Agent.

Parameters
tokenThe token of the last displaying document to get the correct context in the onVisualContextAvailable call.
stateRequestTokenThe token to use in the onVisualContextAvailable call.

Implements alexaClientSDK::aplCapabilityCommonInterfaces::VisualStateProviderInterface.

◆ registerSharedExtension()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::registerSharedExtension ( const std::shared_ptr< APLClient::Extensions::AplCoreExtensionInterface > &  extension)

Adds the given extension to m_sharedRegisteredExtensions map.

Parameters
extensionPointer to AplCoreExtensionInterface which is being added to m_sharedRegisteredExtensions.

◆ removeObserver()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::removeObserver ( const APLViewhostObserverInterfacePtr observer)
overridevirtual

Removes a viewhost observer.

Parameters
observerthe observer to unregister

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostInterface.

◆ renderCompleted()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::renderCompleted ( const std::string &  message)
overridevirtual

◆ renderDocument()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::renderDocument ( const aplCapabilityCommonInterfaces::PresentationSession presentationSession,
const std::string &  token,
const std::string &  document,
const std::string &  datasources,
const std::string &  supportedViewports,
const std::string &  windowId 
)
overridevirtual

Render an APL document with extra associated data payload

Parameters
presentationSessionThe presentation session associated with this renderDocument request
documentJSON string containing APL document
dataJSON string containing data payload associated with APL document
tokenPresentation token uniquely identifying the document
supportedViewportsViewports supported by this document
windowIdTarget windowId to display the document within

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostInterface.

◆ renderDocumentRequest()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::renderDocumentRequest ( const std::string &  message)
overridevirtual

◆ renderPlayerInfoCard()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::renderPlayerInfoCard ( const std::string &  jsonPayload,
templateRuntimeInterfaces::TemplateRuntimeObserverInterface::AudioPlayerInfo  audioPlayerInfo 
)
overridevirtual

Used to notify when a RenderPlayerInfo presentation is ready to display. Once called, the client should render the PlayerInfo display card based on the metadata provided in the payload in structured JSON format.

Parameters
jsonPayloadThe payload of the RenderPlayerInfo directive in structured JSON format.
audioPlayerInfoInformation on the AudioPlayer.

Implements alexaClientSDK::sampleApplications::common::TemplateRuntimePresentationAdapterObserverInterface.

◆ renderTemplateCard()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::renderTemplateCard ( const std::string &  jsonPayload)
overridevirtual

Used to notify when a RenderTemplate presentation is ready to display. Once called, the client should render the Template display card based on the metadata provided in the payload in structured JSON format.

Note
The payload may contain customer sensitive information and should be used with utmost care. Failure to do so may result in exposing or mishandling of customer data.
Parameters
jsonPayloadThe payload of the RenderTemplate directive in structured JSON format.

Implements alexaClientSDK::sampleApplications::common::TemplateRuntimePresentationAdapterObserverInterface.

◆ resetViewhost()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::resetViewhost ( const std::string &  token)
override

◆ sendMessage()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::sendMessage ( const std::string &  token,
const std::string &  payload 
)
override

◆ setGUIManager()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::setGUIManager ( std::shared_ptr< gui::GUIServerInterface guiManager)

}

◆ setMediaProperties()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::setMediaProperties ( std::shared_ptr< avsCommon::sdkInterfaces::MediaPropertiesInterface mediaProperties)

Sets the media properties to be used to extract the media player state

Parameters
mediaProperties

◆ setMetricRecorder()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::setMetricRecorder ( std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface metricRecorder)
overridevirtual

Sets the metrics recorder to be used by the runtime to record and emit metric events.

Parameters
metricRecorderShared pointer to the MetricRecorderInterface

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::APLViewhostInterface.

◆ viewhostEvent()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::AplClientBridge::viewhostEvent ( const std::string &  message)
overridevirtual

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