AlexaClientSDK
1.19.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <NotificationRendererInterface.h>
Public Member Functions | |
virtual | ~NotificationRendererInterface ()=default |
virtual void | addObserver (std::shared_ptr< NotificationRendererObserverInterface > observer)=0 |
virtual void | removeObserver (std::shared_ptr< NotificationRendererObserverInterface > observer)=0 |
virtual bool | renderNotification (std::function< std::pair< std::unique_ptr< std::istream >, const avsCommon::utils::MediaType >()> audioFactory, const std::string &url)=0 |
virtual bool | cancelNotificationRendering ()=0 |
Interface to an object that handles rendering notification audio clips.
|
virtualdefault |
|
pure virtual |
Add an observer to receive a notifications about rendering notification audio clips.
observer | The observer to call back. |
Implemented in alexaClientSDK::capabilityAgents::notifications::test::MockNotificationRenderer, and alexaClientSDK::capabilityAgents::notifications::NotificationRenderer.
|
pure virtual |
Cancel any ongoing rendering of a notification audio clip. Further render requests will be refused until an observer callback is made to indicate that rendering has finished (i.e. cancellation is complete).
Implemented in alexaClientSDK::capabilityAgents::notifications::test::MockNotificationRenderer, and alexaClientSDK::capabilityAgents::notifications::NotificationRenderer.
|
pure virtual |
Remove an observer from the set of observers to receive a notifications about rendering notification audio clips.
observer | The observer to call back. |
Implemented in alexaClientSDK::capabilityAgents::notifications::test::MockNotificationRenderer, and alexaClientSDK::capabilityAgents::notifications::NotificationRenderer.
|
pure virtual |
Render (play) a notification audio clip. If the asset at the specified url cannot be played for some reason, the default notification audio clip should be played, instead. If renderNotification is called while another rendering operation is in progress, this method fails and returns false.
audioFactory | A function that produces a pair of audio stream and media type char to play if the audio specified by url can not be played. |
url | URL of the preferred audio asset to play. |
Implemented in alexaClientSDK::capabilityAgents::notifications::NotificationRenderer.
AlexaClientSDK 1.19.0 - Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0