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

MockChannelObserver for tests. More...

Inheritance diagram for alexaClientSDK::afml::test::MockChannelObserver:
Inheritance graph
Collaboration diagram for alexaClientSDK::afml::test::MockChannelObserver:
Collaboration graph

Public Member Functions

void onFocusChanged (avsCommon::avs::FocusState state, avsCommon::avs::MixingBehavior behavior) override
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::ChannelObserverInterface
virtual ~ChannelObserverInterface ()=default

Detailed Description

MockChannelObserver for tests.

Member Function Documentation

◆ onFocusChanged()

void alexaClientSDK::afml::test::MockChannelObserver::onFocusChanged ( avsCommon::avs::FocusState  newFocus,
avsCommon::avs::MixingBehavior  behavior 

Used to notify the observer of the Channel of focus changes. Once called, the client should make a user observable change only and return immediately. Any additional work that needs to be done should be done on a separate thread or after returning. "User observable change" here refers to events that the end user of the product can visibly see or hear. For example, Alexa speech or music playing would be examples of user observable changes. Other work, such as database storing, logging, or communicating via network should be done on a different thread. Not doing so could result in delays for other clients trying to access the Channel.

newFocusThe new Focus of the channel.
behaviorThe mixingBehavior for the ChannelObserver to take as per the interrupt model
when newFocus is FocusState::FOREGROUND, the MixingBehavior shall be guaranteed to be PRIMARY when newFocus is FocusState::NONE, the MixingBehavior shall be guaranteed to be MUST_STOP

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

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

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