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

#include <AudioActivityTracker.h>

Inheritance diagram for alexaClientSDK::afml::AudioActivityTracker:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::afml::AudioActivityTracker:
Collaboration graph
[legend]

Public Member Functions

StateProviderInterface Functions
void provideState (const avsCommon::avs::NamespaceAndName &stateProviderName, unsigned int stateRequestToken) override
 
ActivityTrackerInterface Functions
void notifyOfActivityUpdates (const std::vector< Channel::State > &channelStates) override
 
CapabilityConfigurationInterface Functions
std::unordered_set< std::shared_ptr< avsCommon::avs::CapabilityConfiguration > > getCapabilityConfigurations () override
 
- 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
 
- Public Member Functions inherited from alexaClientSDK::afml::ActivityTrackerInterface
virtual ~ActivityTrackerInterface ()=default
 Destructor. More...
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::CapabilityConfigurationInterface
virtual ~CapabilityConfigurationInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::StateProviderInterface
virtual ~StateProviderInterface ()=default
 
virtual void provideState (const avs::CapabilityTag &stateProviderName, const ContextRequestToken stateRequestToken)
 
virtual bool canStateBeRetrieved ()
 
virtual bool hasReportableStateProperties ()
 
virtual bool shouldQueryState ()
 

Static Public Member Functions

static acsdkManufactory::Annotated< avsCommon::sdkInterfaces::AudioFocusAnnotation, ActivityTrackerInterfacecreateAudioActivityTrackerInterface (std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager, std::shared_ptr< acsdkShutdownManagerInterfaces::ShutdownNotifierInterface > shutdownNotifier, acsdkManufactory::Annotated< avsCommon::sdkInterfaces::endpoints::DefaultEndpointAnnotation, avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesRegistrarInterface > defaultEndpointCapabilitiesRegistrar)
 
static std::shared_ptr< AudioActivityTrackercreate (std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager)
 

Additional Inherited Members

Detailed Description

The AudioActivityTracker implements the ActivityTrackerInterface and gets notification from the FocusManager any activities in the audio channels. It also implements the StateProviderInterface and will provide to AVS the activity of the audio channels as described in Focus Management.

Member Function Documentation

◆ create()

static std::shared_ptr<AudioActivityTracker> alexaClientSDK::afml::AudioActivityTracker::create ( std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface contextManager)
static

Creates a new AudioActivityTracker instance.

Parameters
contextManagerThe AVS Context manager used to generate system context for events.
Returns
A std::shared_ptr to the new AudioActivityTracker instance, or nullptr if the operation failed.

◆ createAudioActivityTrackerInterface()

Creates a new ActivityTrackerInterface instance, annotated with AudioFocusAnnotation.

Parameters
contextManagerThe AVS Context manager used to generate system context for events.
shutdownNotifierThe object to notify this instance when it is time to shut down.
defaultEndpointCapabilitiesRegistrarThe capabilities registrar for the default endpoint with which to register this capability.
Returns
An Annotated std::shared_ptr to the new AudioActivityTracker instance, or nullptr if the operation failed.

◆ getCapabilityConfigurations()

std::unordered_set<std::shared_ptr<avsCommon::avs::CapabilityConfiguration> > alexaClientSDK::afml::AudioActivityTracker::getCapabilityConfigurations ( )
overridevirtual

Returns the configurations of the capability interfaces being implemented.

Returns
A set of CapabilityConfigurations

Implements alexaClientSDK::avsCommon::sdkInterfaces::CapabilityConfigurationInterface.

◆ notifyOfActivityUpdates()

void alexaClientSDK::afml::AudioActivityTracker::notifyOfActivityUpdates ( const std::vector< Channel::State > &  channelStates)
overridevirtual

This function is called whenever an activity in FocusManager causes updates to a vector of channels.

Parameters
channelStatesA vector of Channel::State that has been updated.

Implements alexaClientSDK::afml::ActivityTrackerInterface.

◆ provideState()

void alexaClientSDK::afml::AudioActivityTracker::provideState ( const avsCommon::avs::NamespaceAndName stateProviderName,
unsigned int  stateRequestToken 
)
overridevirtual

A request to a StateProvider to provide the state. The StateProvider should perform minimum processing and return quickly, otherwise it will block the processing of updating the states of other StateProviders. The ContextManager specifies a token which it uses to track the getContext request associated with this provideState request. The stateProviderInterface must use the same token when it updates its state via the setState call.

: The setState method MUST be called from a different thread from where the provideState method is being called from.

Parameters
stateProviderNameThe name of the state provider.
stateRequestTokenThe token to use in the setState call.
Deprecated:
NamespaceAndName is being deprecated. Use the CapabilityMessageIdentifier version instead.

Reimplemented from alexaClientSDK::avsCommon::sdkInterfaces::StateProviderInterface.


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