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

#include <ChannelObserverInterface.h>

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

Public Member Functions

virtual ~ChannelObserverInterface ()=default
 
virtual void onFocusChanged (avs::FocusState newFocus, avs::MixingBehavior behavior)=0
 

Detailed Description

A ChannelObserverInterface is an interface class that clients can extend to register for focus changes.

Constructor & Destructor Documentation

◆ ~ChannelObserverInterface()

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

Destructor.

Member Function Documentation

◆ onFocusChanged()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::ChannelObserverInterface::onFocusChanged ( avs::FocusState  newFocus,
avs::MixingBehavior  behavior 
)
pure virtual

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.

Parameters
newFocusThe new Focus of the channel.
behaviorThe mixingBehavior for the ChannelObserver to take as per the interrupt model
Note
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

Implemented in alexaClientSDK::integration::test::TestClient, alexaClientSDK::integration::test::TestClient, alexaClientSDK::afml::test::TestClient, alexaClientSDK::capabilityAgents::aip::AudioInputProcessor, alexaClientSDK::capabilityAgents::bluetooth::Bluetooth, alexaClientSDK::integration::test::TestClient, alexaClientSDK::integration::test::TestClient, alexaClientSDK::capabilityAgents::audioPlayer::AudioPlayer, alexaClientSDK::capabilityAgents::speechSynthesizer::SpeechSynthesizer, alexaClientSDK::capabilityAgents::alerts::AlertsCapabilityAgent, alexaClientSDK::capabilityAgents::templateRuntime::TemplateRuntime, alexaClientSDK::capabilityAgents::notifications::NotificationRenderer, alexaClientSDK::afml::test::MockChannelObserver, and alexaClientSDK::avsCommon::avs::CapabilityAgent.


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

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