#include <SpeakerManagerInterface.h>
|
virtual std::future< bool > | setVolume (ChannelVolumeInterface::Type type, int8_t volume, const NotificationProperties &properties)=0 |
|
virtual void | onExternalSpeakerSettingsUpdate (ChannelVolumeInterface::Type type, const SpeakerInterface::SpeakerSettings &speakerSettings, const NotificationProperties &properties) |
|
virtual std::future< bool > | adjustVolume (ChannelVolumeInterface::Type type, int8_t delta, const NotificationProperties &properties)=0 |
|
virtual std::future< bool > | setMute (ChannelVolumeInterface::Type type, bool mute, const NotificationProperties &properties)=0 |
|
virtual std::future< bool > | setVolume (ChannelVolumeInterface::Type type, int8_t volume, bool forceNoNotifications=false, SpeakerManagerObserverInterface::Source source=SpeakerManagerObserverInterface::Source::LOCAL_API)=0 |
|
virtual std::future< bool > | adjustVolume (ChannelVolumeInterface::Type type, int8_t delta, bool forceNoNotifications=false, SpeakerManagerObserverInterface::Source source=SpeakerManagerObserverInterface::Source::LOCAL_API)=0 |
|
virtual std::future< bool > | setMute (ChannelVolumeInterface::Type type, bool mute, bool forceNoNotifications=false, SpeakerManagerObserverInterface::Source source=SpeakerManagerObserverInterface::Source::LOCAL_API)=0 |
|
virtual std::future< bool > | getSpeakerSettings (ChannelVolumeInterface::Type type, SpeakerInterface::SpeakerSettings *settings)=0 |
|
virtual void | addSpeakerManagerObserver (std::shared_ptr< SpeakerManagerObserverInterface > observer)=0 |
|
virtual void | removeSpeakerManagerObserver (std::shared_ptr< SpeakerManagerObserverInterface > observer)=0 |
|
virtual void | addChannelVolumeInterface (std::shared_ptr< ChannelVolumeInterface > channelVolumeInterface)=0 |
|
virtual | ~SpeakerManagerInterface ()=default |
|
The SpeakerManagerInterface
is used to control speaker settings across all ChannelVolumeInterface(s)
associated with a given SpeakerInterface
Type.
◆ ~SpeakerManagerInterface()
virtual alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface::~SpeakerManagerInterface |
( |
| ) |
|
|
virtualdefault |
◆ addChannelVolumeInterface()
virtual void alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface::addChannelVolumeInterface |
( |
std::shared_ptr< ChannelVolumeInterface > |
channelVolumeInterface | ) |
|
|
pure virtual |
Adds a ChannelVolumeInterface
object to be tracked by SpeakerManagerInterface
. This method is not guaranteed to be thread safe and should be called during the initialization step only. All ChannelVolumeInterfaces added this way must be destroyed during the shutdown process.
- Parameters
-
◆ addSpeakerManagerObserver()
virtual void alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface::addSpeakerManagerObserver |
( |
std::shared_ptr< SpeakerManagerObserverInterface > |
observer | ) |
|
|
pure virtual |
◆ adjustVolume() [1/2]
Adjusts the volume for ChannelVolumeInterfaces of a certain Type
with a volume delta.
- Parameters
-
type | The type of ChannelVolumeInterface to modify. |
delta | The delta to modify volume by. Values must be between [-100,100]. |
properties | Notification properties that specify how the volume change will be notified. |
- Returns
- A future to be set with the operation's result. The future must be checked for validity before attempting to obtain the shared state. An invalid future indicates an internal error, and the caller should not assume the operation was successful.
◆ adjustVolume() [2/2]
- Deprecated:
Adjusts the volume for ChannelVolumeInterfaces of a certain Type
with a volume delta.
- Parameters
-
type | The type of ChannelVolumeInterface to modify. |
delta | The delta to modify volume by. Values must be between [-100,100]. |
forceNoNotifications | Setting this to true will ensure no event is sent and no observer is notified. Setting this to false does not guarantee that a notification will be sent. |
source | Whether the call is a result from an AVS directive or local interaction. |
- Returns
- A future to be set with the operation's result. The future must be checked for validity before attempting to obtain the shared state. An invalid future indicates an internal error, and the caller should not assume the operation was successful.
◆ getSpeakerSettings()
Gets the speaker settings.
- Parameters
-
| type | The type of ChannelVolumeInterface to retrieve settings for. |
[out] | settings | The settings if the operation was successful. |
- Returns
- A future to be set with the operation's result. The future must be checked for validity before attempting to obtain the shared state. An invalid future indicates an internal error, and the caller should not assume the operation was successful.
◆ onExternalSpeakerSettingsUpdate()
Handle an external volume/mute state event in the system and update the settings.
A volume could be changed either using SpeakerManager instance or using any other component which support volume change. In the case, volume on the device is being updated by some other component, this interface could be used to update the speaker settings of the associated ChannelVolumeInterface
. This interface does not modify/change the volume or mute. It should be used to update speaker settings within SpeakerManager and notify AVS/observers if required of this change.
- Parameters
-
type | The type of ChannelVolumeInterface to retrieve settings for. |
speakerSettings | New updated value. Values must be between [0,100] |
properties | Notification properties that specify how the volume change will be notified. |
◆ removeSpeakerManagerObserver()
virtual void alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface::removeSpeakerManagerObserver |
( |
std::shared_ptr< SpeakerManagerObserverInterface > |
observer | ) |
|
|
pure virtual |
◆ setMute() [1/2]
Sets the mute for ChannelVolumeInterfaces of a certain Type
.
- Parameters
-
type | The type of ChannelVolumeInterface to modify. |
mute | A boolean indicating mute. true = mute, false = unmute. |
properties | Notification properties that specify how the mute change will be notified. |
- Returns
- A future to be set with the operation's result. The future must be checked for validity before attempting to obtain the shared state. An invalid future indicates an internal error, and the caller should not assume the operation was successful.
◆ setMute() [2/2]
- Deprecated:
Sets the mute for ChannelVolumeInterfaces of a certain Type
.
- Parameters
-
type | The type of ChannelVolumeInterface to modify. |
mute | A boolean indicating mute. true = mute, false = unmute. |
forceNoNotifications | Setting this to true will ensure no event is sent and no observer is notified. Setting this to false does not guarantee that a notification will be sent. |
source | Whether the call is a result from an AVS directive or local interaction. |
- Returns
- A future to be set with the operation's result. The future must be checked for validity before attempting to obtain the shared state. An invalid future indicates an internal error, and the caller should not assume the operation was successful.
◆ setVolume() [1/2]
Set the volume for ChannelVolumeInterfaces of a certain Type
.
- Parameters
-
type | The type of ChannelVolumeInterface to modify. |
volume | The volume to set. Values must be between [0,100]. |
properties | Notification properties that specify how the volume change will be notified. |
- Returns
- A future to be set with the operation's result. The future must be checked for validity before attempting to obtain the shared state. An invalid future indicates an internal error, and the caller should not assume the operation was successful.
◆ setVolume() [2/2]
- Deprecated:
Set the volume for ChannelVolumeInterfaces of a certain Type
.
- Parameters
-
type | The type of ChannelVolumeInterface to modify. |
volume | The volume to set. Values must be between [0,100]. |
forceNoNotifications | Setting this to true will ensure no event is sent and no observer is notified. Setting this to false does not guarantee that a notification will be sent. |
source | Whether the call is a result from an AVS directive or local interaction. |
- Returns
- A future to be set with the operation's result. The future must be checked for validity before attempting to obtain the shared state. An invalid future indicates an internal error, and the caller should not assume the operation was successful.
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