AlexaClientSDK  1.20.1
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Public Member Functions | List of all members
alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface Class Referenceabstract

#include <SpeakerManagerInterface.h>

Inheritance diagram for alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface:
Inheritance graph
[legend]

Classes

struct  NotificationProperties
 

Public Member Functions

virtual std::future< bool > setVolume (ChannelVolumeInterface::Type type, int8_t volume, const NotificationProperties &properties)=0
 
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
 

Detailed Description

The SpeakerManagerInterface is used to control speaker settings across all ChannelVolumeInterface(s) associated with a given SpeakerInterface Type.

Constructor & Destructor Documentation

◆ ~SpeakerManagerInterface()

virtual alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface::~SpeakerManagerInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ 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.

Remarks
Note that after this method SpeakerManagerInterface instance will hold a reference to the ChannelVolumeInterface added.
Parameters
channelVolumeInterfaceThe ChannelVolumeInterface to be tracked

◆ addSpeakerManagerObserver()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface::addSpeakerManagerObserver ( std::shared_ptr< SpeakerManagerObserverInterface observer)
pure virtual

Adds an observer to be notified when the SpeakerManager changes the SpeakerInterface::SpeakerSettings of a any ChannelVolumeInterface Objects.

Parameters
observerThe observer to be notified when the SpeakerInterface::SpeakerSettings of a group successfully changes.

◆ adjustVolume() [1/2]

virtual std::future<bool> alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface::adjustVolume ( ChannelVolumeInterface::Type  type,
int8_t  delta,
const NotificationProperties properties 
)
pure virtual

Adjusts the volume for ChannelVolumeInterfaces of a certain Type with a volume delta.

Parameters
typeThe type of ChannelVolumeInterface to modify.
deltaThe delta to modify volume by. Values must be between [-100,100].
propertiesNotification 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.

Implemented in alexaClientSDK::capabilityAgents::speakerManager::SpeakerManager.

◆ adjustVolume() [2/2]

virtual std::future<bool> alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface::adjustVolume ( ChannelVolumeInterface::Type  type,
int8_t  delta,
bool  forceNoNotifications = false,
SpeakerManagerObserverInterface::Source  source = SpeakerManagerObserverInterface::Source::LOCAL_API 
)
pure virtual
Deprecated:

Adjusts the volume for ChannelVolumeInterfaces of a certain Type with a volume delta.

Parameters
typeThe type of ChannelVolumeInterface to modify.
deltaThe delta to modify volume by. Values must be between [-100,100].
forceNoNotificationsSetting 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.
sourceWhether 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.

Implemented in alexaClientSDK::capabilityAgents::speakerManager::SpeakerManager.

◆ getSpeakerSettings()

virtual std::future<bool> alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface::getSpeakerSettings ( ChannelVolumeInterface::Type  type,
SpeakerInterface::SpeakerSettings settings 
)
pure virtual

Gets the speaker settings.

Parameters
typeThe type of ChannelVolumeInterface to retrieve settings for.
[out]settingsThe 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.

Implemented in alexaClientSDK::capabilityAgents::speakerManager::SpeakerManager.

◆ removeSpeakerManagerObserver()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface::removeSpeakerManagerObserver ( std::shared_ptr< SpeakerManagerObserverInterface observer)
pure virtual

Removes an observer from being notified when the SpeakerManager changes the SpeakerInterface::SpeakerSettings of any ChannelVolumeInterface Objects.

Parameters
observerThe observer to be notified when the SpeakerInterface::SpeakerSettings of a group successfully changes.

◆ setMute() [1/2]

virtual std::future<bool> alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface::setMute ( ChannelVolumeInterface::Type  type,
bool  mute,
const NotificationProperties properties 
)
pure virtual

Sets the mute for ChannelVolumeInterfaces of a certain Type.

Parameters
typeThe type of ChannelVolumeInterface to modify.
muteA boolean indicating mute. true = mute, false = unmute.
propertiesNotification 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.

Implemented in alexaClientSDK::capabilityAgents::speakerManager::SpeakerManager.

◆ setMute() [2/2]

virtual std::future<bool> alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface::setMute ( ChannelVolumeInterface::Type  type,
bool  mute,
bool  forceNoNotifications = false,
SpeakerManagerObserverInterface::Source  source = SpeakerManagerObserverInterface::Source::LOCAL_API 
)
pure virtual
Deprecated:

Sets the mute for ChannelVolumeInterfaces of a certain Type.

Parameters
typeThe type of ChannelVolumeInterface to modify.
muteA boolean indicating mute. true = mute, false = unmute.
forceNoNotificationsSetting 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.
sourceWhether 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.

Implemented in alexaClientSDK::capabilityAgents::speakerManager::SpeakerManager.

◆ setVolume() [1/2]

virtual std::future<bool> alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface::setVolume ( ChannelVolumeInterface::Type  type,
int8_t  volume,
const NotificationProperties properties 
)
pure virtual

Set the volume for ChannelVolumeInterfaces of a certain Type.

Parameters
typeThe type of ChannelVolumeInterface to modify.
volumeThe volume to set. Values must be between [0,100].
propertiesNotification 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.

Implemented in alexaClientSDK::capabilityAgents::speakerManager::SpeakerManager.

◆ setVolume() [2/2]

virtual std::future<bool> alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface::setVolume ( ChannelVolumeInterface::Type  type,
int8_t  volume,
bool  forceNoNotifications = false,
SpeakerManagerObserverInterface::Source  source = SpeakerManagerObserverInterface::Source::LOCAL_API 
)
pure virtual
Deprecated:

Set the volume for ChannelVolumeInterfaces of a certain Type.

Parameters
typeThe type of ChannelVolumeInterface to modify.
volumeThe volume to set. Values must be between [0,100].
forceNoNotificationsSetting 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.
sourceWhether 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.

Implemented in alexaClientSDK::capabilityAgents::speakerManager::SpeakerManager.


The documentation for this class was generated from the following file:

AlexaClientSDK 1.20.1 - Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0