AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager Class Reference

#include <MockChannelVolumeInterface.h>

Inheritance diagram for alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager:
Collaboration graph
[legend]

Public Member Functions

avsCommon::sdkInterfaces::ChannelVolumeInterface::Type getSpeakerType () const
 
size_t getId () const
 
bool startDucking ()
 
bool stopDucking ()
 
bool setUnduckedVolume (int8_t volume)
 
bool setMute (bool mute)
 
bool getSpeakerSettings (avsCommon::sdkInterfaces::SpeakerInterface::SpeakerSettings *settings) const
 
 MockChannelVolumeManager (avsCommon::sdkInterfaces::ChannelVolumeInterface::Type type, std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface > speaker)
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface
virtual bool adjustUnduckedVolume (int8_t delta)
 
virtual ~ChannelVolumeInterface ()=default
 

Additional Inherited Members

- Public Types inherited from alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface
enum  Type { Type::AVS_SPEAKER_VOLUME, Type::AVS_ALERTS_VOLUME }
 

Constructor & Destructor Documentation

◆ MockChannelVolumeManager()

alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager::MockChannelVolumeManager ( avsCommon::sdkInterfaces::ChannelVolumeInterface::Type  type,
std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface speaker 
)
inline

Member Function Documentation

◆ getId()

size_t alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager::getId ( ) const
inlinevirtual

Get the unique identifier of the ChannelVolumeInterface.

Returns
The unique identifier.

Reimplemented from alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface.

◆ getSpeakerSettings()

bool alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager::getSpeakerSettings ( avsCommon::sdkInterfaces::SpeakerInterface::SpeakerSettings settings) const
inlinevirtual

Returns a SpeakerSettings object to indicate the current settings of the underlying speaker. Note that if the underlying Channel is attenuated, the settings returned must still return the unducked volume of the underlying speaker, as set by the most recent call to the setUnduckedVolume API.

Parameters
[out]settingsA SpeakerSettings object if successful.
Returns
true if the operation succeeded, false otherwise.

Implements alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface.

◆ getSpeakerType()

avsCommon::sdkInterfaces::ChannelVolumeInterface::Type alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager::getSpeakerType ( ) const
inlinevirtual

Get the Type associated with the underlying SpeakerInterface.

Returns
The Type.

Implements alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface.

◆ setMute()

bool alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager::setMute ( bool  mute)
inlinevirtual

Set the mute state of the underlying speaker.

Parameters
mutethe mute state to be set.
Returns
true if the operation succeeded, false otherwise.

Implements alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface.

◆ setUnduckedVolume()

bool alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager::setUnduckedVolume ( int8_t  volume)
inlinevirtual

Set the volume of the underlying speaker. This reflects the baseline volume settings for underlying Channel when it is not attenuated. If the underlying SpeakerInterface is ducked when this API is invoked, the corresponding unduckedVolume setting change is reflected upon the next stopDucking call.

Parameters
volumethe volume level to be set.
Returns
true if the operation succeeded, false otherwise.

Implements alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface.

◆ startDucking()

bool alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager::startDucking ( )
inlinevirtual

Start channel volume attenuation for the underlying speaker. The interface consults the volume curve function set in ChannelVolumeManager to determine the desired attenuated channel volume.

Returns
true if the operation succeeded, false otherwise. The API returns true, if the channel is already attenuated.

Implements alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface.

◆ stopDucking()

bool alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager::stopDucking ( )
inlinevirtual

Restores the channel volume for the underlying speaker.

Returns
true if the operation succeeded, false otherwise. The API returns true, if the channel was not attenuated.

Implements alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface.


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