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

A test observer that mocks out the ChannelObserverInterface#onFocusChanged() call. More...

Inheritance diagram for alexaClientSDK::afml::test::TestClient:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::afml::test::TestClient:
Collaboration graph
[legend]

Classes

struct  testClientInfo
 

Public Member Functions

 TestClient (const std::string &channelName, const std::string &interfaceName)
 
std::shared_ptr< FocusManagerInterface::ActivitycreateActivity (ContentType contentType=ContentType::NONMIXABLE, std::chrono::milliseconds patience=std::chrono::milliseconds(0))
 
const std::string & getChannelName () const
 
const std::string & getInterfaceName () const
 
void onFocusChanged (FocusState focusState, MixingBehavior behavior) override
 
testClientInfo waitForFocusOrMixingBehaviorChange (std::chrono::milliseconds timeout)
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::ChannelObserverInterface
virtual ~ChannelObserverInterface ()=default
 

Detailed Description

A test observer that mocks out the ChannelObserverInterface#onFocusChanged() call.

Constructor & Destructor Documentation

◆ TestClient()

alexaClientSDK::afml::test::TestClient::TestClient ( const std::string &  channelName,
const std::string &  interfaceName 
)
inline

Constructor.

Member Function Documentation

◆ createActivity()

std::shared_ptr<FocusManagerInterface::Activity> alexaClientSDK::afml::test::TestClient::createActivity ( ContentType  contentType = ContentType::NONMIXABLE,
std::chrono::milliseconds  patience = std::chrono::milliseconds(0) 
)
inline

◆ getChannelName()

const std::string& alexaClientSDK::afml::test::TestClient::getChannelName ( ) const
inline

◆ getInterfaceName()

const std::string& alexaClientSDK::afml::test::TestClient::getInterfaceName ( ) const
inline

◆ onFocusChanged()

void alexaClientSDK::afml::test::TestClient::onFocusChanged ( FocusState  focusState,
MixingBehavior  behavior 
)
inlineoverridevirtual

Implementation of the ChannelObserverInterface#onFocusChanged() callback.

Parameters
focusStateThe new focus state of the Channel observer.
behaviorThe new MixingBehavior of the Channel observer.

Implements alexaClientSDK::avsCommon::sdkInterfaces::ChannelObserverInterface.

◆ waitForFocusOrMixingBehaviorChange()

testClientInfo alexaClientSDK::afml::test::TestClient::waitForFocusOrMixingBehaviorChange ( std::chrono::milliseconds  timeout)
inline

Waits for the ChannelObserverInterface#onFocusChanged() callback.

Parameters
timeoutThe amount of time to wait for the callback.
focusChangedAn output parameter that notifies the caller whether a callback occurred.
Returns
Returns true if the callback occured within the timeout period and false otherwise.

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