AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::capabilityAgents::mrm::test::MockMRMHandler Class Reference
Inheritance diagram for alexaClientSDK::capabilityAgents::mrm::test::MockMRMHandler:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::capabilityAgents::mrm::test::MockMRMHandler:
Collaboration graph
[legend]

Public Member Functions

 MockMRMHandler ()
 
 MOCK_CONST_METHOD0 (getVersionString, std::string())
 
 MOCK_METHOD4 (handleDirective, bool(const std::string &, const std::string &, const std::string &, const std::string &))
 
 MOCK_METHOD0 (doShutdown, void())
 
 MOCK_METHOD1 (onCallStateChange, void(bool))
 
 MOCK_METHOD1 (setObserver, void(std::shared_ptr< avsCommon::sdkInterfaces::RenderPlayerInfoCardsObserverInterface >))
 
void onSpeakerSettingsChanged (const ChannelVolumeInterface::Type &type)
 
void onUserInactivityReportSent ()
 
bool waitForSpeakerSettingChanged (const ChannelVolumeInterface::Type &expectedType, const std::chrono::milliseconds timeout)
 
bool waitForUserInactivityReport (const std::chrono::milliseconds timeout)
 
- Public Member Functions inherited from alexaClientSDK::capabilityAgents::mrm::MRMHandlerInterface
 MRMHandlerInterface (const std::string &shutdownName)
 
virtual ~MRMHandlerInterface () override=default
 
virtual std::string getVersionString () const =0
 
virtual bool handleDirective (const std::string &nameSpace, const std::string &name, const std::string &messageId, const std::string &payload)=0
 
virtual void onCallStateChange (bool active)=0
 
virtual void onDialogUXStateChanged (avsCommon::sdkInterfaces::DialogUXStateObserverInterface::DialogUXState newState)=0
 
virtual void setObserver (std::shared_ptr< avsCommon::sdkInterfaces::RenderPlayerInfoCardsObserverInterface > observer)=0
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerObserverInterface
virtual void onSpeakerSettingsChanged (const Source &source, const ChannelVolumeInterface::Type &type, const SpeakerInterface::SpeakerSettings &settings)=0
 
virtual ~SpeakerManagerObserverInterface ()=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
 

Additional Inherited Members

- Public Types inherited from alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerObserverInterface
enum  Source { Source::DIRECTIVE, Source::LOCAL_API, Source::EXTERNAL_CLIENT }
 Indicates whether the source of the call is from an AVS Directive or through a Local API call. More...
 
- Protected Member Functions inherited from alexaClientSDK::avsCommon::utils::RequiresShutdown
virtual void doShutdown ()=0
 

Detailed Description

Class with which to mock a connection to AVS.

Constructor & Destructor Documentation

◆ MockMRMHandler()

alexaClientSDK::capabilityAgents::mrm::test::MockMRMHandler::MockMRMHandler ( )
inline

Constructor.

Member Function Documentation

◆ MOCK_CONST_METHOD0()

alexaClientSDK::capabilityAgents::mrm::test::MockMRMHandler::MOCK_CONST_METHOD0 ( getVersionString  ,
std::string()   
)

◆ MOCK_METHOD0()

alexaClientSDK::capabilityAgents::mrm::test::MockMRMHandler::MOCK_METHOD0 ( doShutdown  ,
void()   
)

◆ MOCK_METHOD1() [1/2]

alexaClientSDK::capabilityAgents::mrm::test::MockMRMHandler::MOCK_METHOD1 ( onCallStateChange  ,
void(bool)   
)

◆ MOCK_METHOD1() [2/2]

alexaClientSDK::capabilityAgents::mrm::test::MockMRMHandler::MOCK_METHOD1 ( setObserver  ,
void(std::shared_ptr< avsCommon::sdkInterfaces::RenderPlayerInfoCardsObserverInterface >)   
)

◆ MOCK_METHOD4()

alexaClientSDK::capabilityAgents::mrm::test::MockMRMHandler::MOCK_METHOD4 ( handleDirective  ,
bool(const std::string &, const std::string &, const std::string &, const std::string &)   
)

◆ onSpeakerSettingsChanged()

void alexaClientSDK::capabilityAgents::mrm::test::MockMRMHandler::onSpeakerSettingsChanged ( const ChannelVolumeInterface::Type type)
inline

overridden function, minus the explicit override, since gtest does not use override.

◆ onUserInactivityReportSent()

void alexaClientSDK::capabilityAgents::mrm::test::MockMRMHandler::onUserInactivityReportSent ( )
inlinevirtual

overridden function, minus the explicit override, since gtest does not use override.

Implements alexaClientSDK::capabilityAgents::mrm::MRMHandlerInterface.

◆ waitForSpeakerSettingChanged()

bool alexaClientSDK::capabilityAgents::mrm::test::MockMRMHandler::waitForSpeakerSettingChanged ( const ChannelVolumeInterface::Type expectedType,
const std::chrono::milliseconds  timeout 
)
inline

Function to wait for a speaker setting of a particular type to change. Will return true if a speaker of the desired type did change within the timeout, or if a non-waited-upon change occurred before this call was made.

Parameters
expectedTypeThe type of the speaker we are waiting for.
timeoutHow long we wish to wait for the change to occur.
Returns
Whether the change occurred within the timeout, or if a non-waited-upon change occurred before this call.

◆ waitForUserInactivityReport()

bool alexaClientSDK::capabilityAgents::mrm::test::MockMRMHandler::waitForUserInactivityReport ( const std::chrono::milliseconds  timeout)
inline

Function to wait for a System.UserInactivityReport to be sent. Will return true if an exception was sent within the timeout, or if a non-waited-upon report occurred before this call was made.

Parameters
timeoutHow long we wish to wait for the report to occur.
Returns
Whether the report occurred within the timeout, or if a non-waited-upon report occurred before this call.

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