AlexaClientSDK  1.19.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Types | Public Member Functions | Static Public Member Functions | List of all members
alexaClientSDK::capabilityAgents::bluetooth::Bluetooth Class Reference

#include <Bluetooth.h>

Inheritance diagram for alexaClientSDK::capabilityAgents::bluetooth::Bluetooth:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::capabilityAgents::bluetooth::Bluetooth:
Collaboration graph
[legend]

Public Types

enum  StreamingState {
  StreamingState::INACTIVE, StreamingState::PAUSED, StreamingState::PENDING_PAUSED, StreamingState::PENDING_ACTIVE,
  StreamingState::ACTIVE
}
 
enum  FocusTransitionState { FocusTransitionState::INTERNAL, FocusTransitionState::PENDING_INTERNAL, FocusTransitionState::EXTERNAL }
 
enum  ScanningTransitionState { ScanningTransitionState::ACTIVE, ScanningTransitionState::PENDING_INACTIVE, ScanningTransitionState::INACTIVE }
 
using ObserverInterface = avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceObserverInterface
 
- Public Types inherited from alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface
enum  TagType {
  TagType::STRING, TagType::UINT, TagType::INT, TagType::DOUBLE,
  TagType::BOOLEAN
}
 The different types of metadata "stream tags". More...
 
using SourceId = MediaPlayerInterface::SourceId
 A type that identifies which source is currently being operated on. More...
 
typedef std::vector< TagKeyValueTypeVectorOfTags
 

Public Member Functions

void addObserver (std::shared_ptr< ObserverInterface > observer)
 
void removeObserver (std::shared_ptr< ObserverInterface > observer)
 
template<typename ServiceType >
std::shared_ptr< ServiceType > getService (std::shared_ptr< alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface > device)
 
CapabilityAgent Functions
avsCommon::avs::DirectiveHandlerConfiguration getConfiguration () const override
 
void handleDirectiveImmediately (std::shared_ptr< avsCommon::avs::AVSDirective > directive) override
 
void preHandleDirective (std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
 
void handleDirective (std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
 
void cancelDirective (std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
 
void onFocusChanged (avsCommon::avs::FocusState newFocus, avsCommon::avs::MixingBehavior behavior) override
 
CapabilityConfigurationInterface Functions
std::unordered_set< std::shared_ptr< avsCommon::avs::CapabilityConfiguration > > getCapabilityConfigurations () override
 
void onContextAvailable (const std::string &jsonContext) override
 
void onContextFailure (const avsCommon::sdkInterfaces::ContextRequestError error) override
 
void doShutdown () override
 
MediaPlayerObserverInterface Functions
void onFirstByteRead (avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface::SourceId id, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override
 
void onPlaybackStarted (avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface::SourceId id, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override
 
void onPlaybackStopped (avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface::SourceId id, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override
 
void onPlaybackFinished (avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface::SourceId id, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override
 
void onPlaybackError (avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface::SourceId id, const avsCommon::utils::mediaPlayer::ErrorType &type, std::string error, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override
 
CustomerDataHandler Functions
void clearData () override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::avs::CapabilityAgent
virtual ~CapabilityAgent ()=default
 
void preHandleDirective (std::shared_ptr< AVSDirective > directive, std::unique_ptr< sdkInterfaces::DirectiveHandlerResultInterface > result) override final
 
bool handleDirective (const std::string &messageId) override final
 
void cancelDirective (const std::string &messageId) override final
 
void onDeregistered () override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface
virtual ~DirectiveHandlerInterface ()=default
 
virtual void handleDirectiveImmediately (std::shared_ptr< avsCommon::avs::AVSDirective > directive)=0
 
virtual void preHandleDirective (std::shared_ptr< avsCommon::avs::AVSDirective > directive, std::unique_ptr< DirectiveHandlerResultInterface > result)=0
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::ChannelObserverInterface
virtual ~ChannelObserverInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::StateProviderInterface
virtual ~StateProviderInterface ()=default
 
virtual void provideState (const avs::NamespaceAndName &stateProviderName, const ContextRequestToken stateRequestToken)
 
virtual void provideState (const avs::CapabilityTag &stateProviderName, const ContextRequestToken stateRequestToken)
 
virtual bool canStateBeRetrieved ()
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface
virtual ~ContextRequesterInterface ()=default
 
virtual void onContextAvailable (const endpoints::EndpointIdentifier &endpointId, const avs::AVSContext &endpointContext, ContextRequestToken requestToken)
 
virtual void onContextFailure (const ContextRequestError error, ContextRequestToken token)
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::utils::bluetooth::BluetoothEventListenerInterface
virtual ~BluetoothEventListenerInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::utils::bluetooth::FormattedAudioStreamAdapterListener
virtual ~FormattedAudioStreamAdapterListener ()=default
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::CapabilityConfigurationInterface
virtual ~CapabilityConfigurationInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface
virtual ~MediaPlayerObserverInterface ()=default
 
virtual void onPlaybackPaused (SourceId id, const MediaPlayerState &state)
 
virtual void onPlaybackResumed (SourceId id, const MediaPlayerState &state)
 
virtual void onBufferUnderrun (SourceId id, const MediaPlayerState &state)
 
virtual void onBufferRefilled (SourceId id, const MediaPlayerState &state)
 
virtual void onBufferingComplete (SourceId id, const MediaPlayerState &state)
 
virtual void onTags (SourceId id, std::unique_ptr< const VectorOfTags > vectorOfTags, const MediaPlayerState &state)
 
- 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::registrationManager::CustomerDataHandler
 CustomerDataHandler (std::shared_ptr< CustomerDataManager > customerDataManager)
 
virtual ~CustomerDataHandler ()
 

Static Public Member Functions

static std::shared_ptr< Bluetoothcreate (std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager, std::shared_ptr< avsCommon::sdkInterfaces::FocusManagerInterface > focusManager, std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface > messageSender, std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface > exceptionEncounteredSender, std::shared_ptr< BluetoothStorageInterface > bluetoothStorage, std::unique_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceManagerInterface > deviceManager, std::shared_ptr< avsCommon::utils::bluetooth::BluetoothEventBus > eventBus, std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > mediaPlayer, std::shared_ptr< registrationManager::CustomerDataManager > customerDataManager, std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceConnectionRuleInterface >> enabledConnectionRules, std::shared_ptr< avsCommon::sdkInterfaces::ChannelVolumeInterface > bluetoothChannelVolumeInterface, std::shared_ptr< BluetoothMediaInputTransformer > mediaInputTransformer=nullptr)
 

Protected Member Functions

BluetoothEventBusListenerInterface Functions
void onEventFired (const avsCommon::utils::bluetooth::BluetoothEvent &event) override
 
- Protected Member Functions inherited from alexaClientSDK::avsCommon::avs::CapabilityAgent
 CapabilityAgent (const std::string &nameSpace, std::shared_ptr< sdkInterfaces::ExceptionEncounteredSenderInterface > exceptionEncounteredSender)
 
virtual std::shared_ptr< DirectiveInfocreateDirectiveInfo (std::shared_ptr< AVSDirective > directive, std::unique_ptr< sdkInterfaces::DirectiveHandlerResultInterface > result)
 
virtual void preHandleDirective (std::shared_ptr< DirectiveInfo > info)=0
 
virtual void handleDirective (std::shared_ptr< DirectiveInfo > info)=0
 
virtual void cancelDirective (std::shared_ptr< DirectiveInfo > info)=0
 
void removeDirective (const std::string &messageId)
 
void sendExceptionEncounteredAndReportFailed (std::shared_ptr< DirectiveInfo > info, const std::string &message, avsCommon::avs::ExceptionErrorType type=avsCommon::avs::ExceptionErrorType::INTERNAL_ERROR)
 
const std::pair< std::string, std::string > buildJsonEventString (const std::string &eventName, const std::string &dialogRequestIdString="", const std::string &payload="{}", const std::string &context="") const
 

Additional Inherited Members

- Protected Attributes inherited from alexaClientSDK::avsCommon::avs::CapabilityAgent
const std::string m_namespace
 The namespace of the capability agent. More...
 
std::shared_ptr< sdkInterfaces::ExceptionEncounteredSenderInterfacem_exceptionEncounteredSender
 Object to use to send exceptionEncountered messages. More...
 

Detailed Description

The Bluetooth Capability Agent is responsible for implementing the Bluetooth AVS interface. This consists of two areas of responsibilities:

  1. The connectivity of devices. This includes scanning, pairing and connecting.
  2. The management of profiles. This includes: media control (AVRCP, Audio/Video Remote Control Profile) media playback (A2DP, Advanced Audio Distribution Profile) Human Interface Device Profile Serial Port Profile and Hands-Free Profile.

The Bluetooth agent will handle directives from AVS and requests from peer devices. Examples include pairing and connection requests, as well as media playback requests. Some examples of this are:

Connectivity is defined as when two devices have paired and established connections of all applicable services (A2DP, AVRCP, etc). Alexa supports multiple connected multimedia devices but doesn't support multiple A2DP connected devices. The agent enforces the connected devices to follow some Bluetooth device connection rules based on DeviceCategory. For example, If a A2DP device is currently connected, attempting to connect a second A2DP device should force a disconnect on the currently connected device. However, if a A2DP device is currently connected, attempting to connected a SPP/HID device should not cause a disconnect on the currently connected device.

Interfaces in AVSCommon/SDKInterfaces/Bluetooth can be implemented for customers who wish to use their own Bluetooth stack. The Bluetooth agent operates based on events. Please refer to the BluetoothEvents.h file for a list of events that must be sent.

Supported Profiles

Profiles listed under here refer to the Capability Agent's support of these profiles in relation to AVS. This does not speak about support for them at other layers (the stack, client applications, etc).

  1. AVRCP (Controller, Target)
  2. A2DP (Sink, Source)
  3. HFP
  4. HID
  5. SPP

Member Typedef Documentation

◆ ObserverInterface

Member Enumeration Documentation

◆ FocusTransitionState

An enum that represents how the Bluetooth class expects to lose focus.

Enumerator
INTERNAL 

Focus in Bluetooth class is lost because it explicitly released focus.

PENDING_INTERNAL 

Focus in Bluetooth class that will be lost because it explicitly released focus. This state prevents foreground or background focus changes from setting the state to EXTERNAL before the none focus change has had the chance to set the state to INTERNAL.

EXTERNAL 

Focus in Bluetooth class is lost because another class has taken focus.

◆ ScanningTransitionState

An enum that is used to represent the Bluetooth scanning state and if a state change should result in a scan report being sent to the Alexa service.

Enumerator
ACTIVE 

The device is currently scanning.

Any state change should result in sending a scan report.

This state is set when a SCAN_DEVICES directive is sent from the Alexa service.

PENDING_INACTIVE 

The device is not scanning.

A state change to inactive should not result in sending a scan report.

This state is set when a EXIT_DISCOVERABLE_MODE directive is sent or scan mode is disabled as part of the PAIR_DEVICES directive.

INACTIVE 

The device is not scanning.

A state change to inactive should not result in sending a scan report.

This state is set when a state change to inactive is recieved and the previous state was PENDING_INACTIVE.

◆ StreamingState

An enum representing the streaming states.

Enumerator
INACTIVE 

Initial state or after a disconnect.

PAUSED 

Media playback is no longer occurring.

PENDING_PAUSED 

AVRCP Pause is sent, waiting for local playback to stop.

PENDING_ACTIVE 

AVRCP Play is sent, waiting for local playback to start.

ACTIVE 

Media playback is currently ongoing.

Member Function Documentation

◆ addObserver()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::addObserver ( std::shared_ptr< ObserverInterface observer)

Adds a bluetooth device observer.

Parameters
observerThe BluetoothDeviceObserverInterface to add.

◆ cancelDirective()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::cancelDirective ( std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo info)
override

◆ clearData()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::clearData ( )
overridevirtual

Reset any internal state that may be associated with a particular user.

Warning
Object must succeed in deleting any customer data.
This method is called while CustomerDataManager is in a locked state. Do not call or wait for any CustomerDataManager operation.

Implements alexaClientSDK::registrationManager::CustomerDataHandler.

◆ create()

std::shared_ptr< Bluetooth > alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::create ( std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface contextManager,
std::shared_ptr< avsCommon::sdkInterfaces::FocusManagerInterface focusManager,
std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface messageSender,
std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface exceptionEncounteredSender,
std::shared_ptr< BluetoothStorageInterface bluetoothStorage,
std::unique_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceManagerInterface deviceManager,
std::shared_ptr< avsCommon::utils::bluetooth::BluetoothEventBus eventBus,
std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface mediaPlayer,
std::shared_ptr< registrationManager::CustomerDataManager customerDataManager,
std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceConnectionRuleInterface >>  enabledConnectionRules,
std::shared_ptr< avsCommon::sdkInterfaces::ChannelVolumeInterface bluetoothChannelVolumeInterface,
std::shared_ptr< BluetoothMediaInputTransformer mediaInputTransformer = nullptr 
)
static

Creates an instance of the Bluetooth capability agent.

Parameters
contextManagerResponsible for managing the context.
focusManagerResponsible for managing the focus.
messageSenderResponsible for sending events to AVS.
exceptionEncounteredSenderResponsible for sending exceptions to AVS.
bluetoothStorageThe storage component for the Bluetooth CA.
deviceManagerResponsible for management of Bluetooth devices.
eventBusA bus to abstract Bluetooth stack specific messages.
mediaPlayerThe Media Player which will handle playback.
customerDataManagerObject that will track the CustomerDataHandler.
enabledConnectionRulesThe set of devices connection rules enabled by the Bluetooth stack from customers.
bluetoothChannelVolumeInterfaceThe ChannelVolumeInterface used to control bluetooth channel volume
mediaInputTransformerTransforms incoming Media commands if supported.

◆ doShutdown()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::doShutdown ( )
overridevirtual

Prepares/enables this object to be deleted. This should be the last function called on this object prior to deleting (or resetting) its shared_ptr.

Warning
  • Attempting to call functions on this object after calling shutdown() can result in undefined behavior.
  • Neglecting to call shutdown() on this object can result in resource leaks or other undefined behavior.

Implements alexaClientSDK::avsCommon::utils::RequiresShutdown.

◆ getCapabilityConfigurations()

std::unordered_set< std::shared_ptr< avsCommon::avs::CapabilityConfiguration > > alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::getCapabilityConfigurations ( )
overridevirtual

Returns the configurations of the capability interfaces being implemented.

Returns
A set of CapabilityConfigurations

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

◆ getConfiguration()

DirectiveHandlerConfiguration alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::getConfiguration ( ) const
overridevirtual

Returns the configuration of the directive handler.

The configuration consists of multiple directive routing rules and their respective blocking policy. The directives will be matched from the most specific rule (with all fields defined) to the least specific rule (which only matches the directive endpointId).

Returns
The avs::DirectiveHandlerConfiguration of the handler.

Implements alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface.

◆ getService()

template<typename ServiceType >
std::shared_ptr<ServiceType> alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::getService ( std::shared_ptr< alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface device)

◆ handleDirective()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::handleDirective ( std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo info)
override

◆ handleDirectiveImmediately()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::handleDirectiveImmediately ( std::shared_ptr< avsCommon::avs::AVSDirective directive)
override

◆ onContextAvailable()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::onContextAvailable ( const std::string &  jsonContext)
overridevirtual

This is called by the ContextManager once the context is ready and available.

Deprecated:
This method is being deprecated since it cannot specify the source endpoint.
Note
The ContextRequester should perform minimum processing and return quickly. Otherwise it will block the processing of updating the of other ContextProviders.
Parameters
jsonContextContext information.Context provided is of the format {"context"[{...}, {...}]}

Reimplemented from alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface.

◆ onContextFailure()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::onContextFailure ( const avsCommon::sdkInterfaces::ContextRequestError  error)
overridevirtual

The contextManager calls this if it is unable to process a getContext request successfully.

Deprecated:
This method is being deprecated since it cannot specify the optional token.
Note
The ContextRequester should perform minimum processing and return quickly. Otherwise it will block the processing of updating the of other ContextProviders.
Parameters
errorThe reason why the getContext request failed.

Reimplemented from alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface.

◆ onEventFired()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::onEventFired ( const avsCommon::utils::bluetooth::BluetoothEvent event)
overrideprotectedvirtual

Method called to process an event of the specific type.

Parameters
eventEvent to be processed

Cloud initiated disconnect.

Device initiated disconnect.

Cloud initiated connect.

Device initiated connect.

Implements alexaClientSDK::avsCommon::utils::bluetooth::BluetoothEventListenerInterface.

◆ onFirstByteRead()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::onFirstByteRead ( avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface::SourceId  id,
const avsCommon::utils::mediaPlayer::MediaPlayerState state 
)
overridevirtual

This is an indication to the observer that the MediaPlayer has read its first byte of data.

Parameters
idThe id of the source to which this callback corresponds to.
stateMetadata about the media player state

Implements alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface.

◆ onFocusChanged()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::onFocusChanged ( avsCommon::avs::FocusState  newFocus,
avsCommon::avs::MixingBehavior  behavior 
)
overridevirtual

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

Reimplemented from alexaClientSDK::avsCommon::avs::CapabilityAgent.

◆ onPlaybackError()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::onPlaybackError ( avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface::SourceId  id,
const avsCommon::utils::mediaPlayer::ErrorType type,
std::string  error,
const avsCommon::utils::mediaPlayer::MediaPlayerState state 
)
overridevirtual

This is an indication to the observer that the MediaPlayer encountered an error. Errors can occur during playback.

Note
The observer must quickly return from this callback. Failure to do so could block the MediaPlayer from further processing.
Parameters
idThe id of the source to which this callback corresponds to.
typeThe type of error encountered by the MediaPlayerInterface.
errorThe error encountered by the MediaPlayerInterface.
stateMetadata about the media player state

Implements alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface.

◆ onPlaybackFinished()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::onPlaybackFinished ( avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface::SourceId  id,
const avsCommon::utils::mediaPlayer::MediaPlayerState state 
)
overridevirtual

This is an indication to the observer that the MediaPlayer finished the source.

Note
The observer must quickly return to quickly from this callback. Failure to do so could block the MediaPlayer from further processing.
Parameters
idThe id of the source to which this callback corresponds to.
stateMetadata about the media player state

Implements alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface.

◆ onPlaybackStarted()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::onPlaybackStarted ( avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface::SourceId  id,
const avsCommon::utils::mediaPlayer::MediaPlayerState state 
)
overridevirtual

This is an indication to the observer that the MediaPlayer has started playing the source specified by the id.

Note
The observer must quickly return to quickly from this callback. Failure to do so could block the MediaPlayer from further processing.
Parameters
idThe id of the source to which this callback corresponds to.
stateMetadata about the media player state

Implements alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface.

◆ onPlaybackStopped()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::onPlaybackStopped ( avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface::SourceId  id,
const avsCommon::utils::mediaPlayer::MediaPlayerState state 
)
overridevirtual

This is an indication to the observer that the MediaPlayer has stopped the source.

Note
The observer must quickly return from this callback. Failure to do so could block the MediaPlayer from further processing.
Parameters
idThe id of the source to which this callback corresponds to.
stateMetadata about the media player state

Reimplemented from alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface.

◆ preHandleDirective()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::preHandleDirective ( std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo info)
override

◆ removeObserver()

void alexaClientSDK::capabilityAgents::bluetooth::Bluetooth::removeObserver ( std::shared_ptr< ObserverInterface observer)

Removes a bluetooth device observer.

Parameters
observerThe BluetoothDeviceObserverInterface to remove.

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

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