AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Protected Member Functions | List of all members
alexaClientSDK::avsCommon::utils::bluetooth::BluetoothEvent Class Reference

Base class for a BluetoothEvent. More...

#include <BluetoothEvents.h>

Inheritance diagram for alexaClientSDK::avsCommon::utils::bluetooth::BluetoothEvent:
Inheritance graph
[legend]

Public Member Functions

virtual ~BluetoothEvent ()=default
 
BluetoothEventType getType () const
 
std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterfacegetDevice () const
 
avsCommon::sdkInterfaces::bluetooth::DeviceState getDeviceState () const
 
MediaStreamingState getMediaStreamingState () const
 
std::shared_ptr< A2DPRolegetA2DPRole () const
 
std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::services::MediaCommandgetMediaCommand () const
 
bool isScanning () const
 
bool isA2DPEnabled () const
 

Protected Member Functions

 BluetoothEvent (BluetoothEventType type, std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface > device=nullptr, avsCommon::sdkInterfaces::bluetooth::DeviceState deviceState=avsCommon::sdkInterfaces::bluetooth::DeviceState::IDLE, MediaStreamingState mediaStreamingState=MediaStreamingState::IDLE, std::shared_ptr< A2DPRole > role=nullptr, std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::services::MediaCommand > mediaCommand=nullptr, bool scanningState=false, bool a2dpEnable=false)
 

Detailed Description

Base class for a BluetoothEvent.

Constructor & Destructor Documentation

◆ ~BluetoothEvent()

virtual alexaClientSDK::avsCommon::utils::bluetooth::BluetoothEvent::~BluetoothEvent ( )
virtualdefault

Destructor.

◆ BluetoothEvent()

alexaClientSDK::avsCommon::utils::bluetooth::BluetoothEvent::BluetoothEvent ( BluetoothEventType  type,
std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface device = nullptr,
avsCommon::sdkInterfaces::bluetooth::DeviceState  deviceState = avsCommon::sdkInterfaces::bluetooth::DeviceState::IDLE,
MediaStreamingState  mediaStreamingState = MediaStreamingState::IDLE,
std::shared_ptr< A2DPRole role = nullptr,
std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::services::MediaCommand mediaCommand = nullptr,
bool  scanningState = false,
bool  a2dpEnable = false 
)
inlineprotected

Constructor

Parameters
typeEvent type
deviceBluetoothDeviceInterface associated with the event
deviceStateDeviceState associated with the event
mediaStreamingStateMediaStreamingState associated with the event
roleThe A2DP role the AVS device is acting as
mediaCommandThe received MediaCommand if applicable

Member Function Documentation

◆ getA2DPRole()

std::shared_ptr< A2DPRole > alexaClientSDK::avsCommon::utils::bluetooth::BluetoothEvent::getA2DPRole ( ) const
inline

Get A2DPRole associated with the event

Returns
A2DPRole associated with the event or null if not applicable.

◆ getDevice()

std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface > alexaClientSDK::avsCommon::utils::bluetooth::BluetoothEvent::getDevice ( ) const
inline

Get BluetoothDeviceInterface associated with the event. The value depends on the event type

Returns
BluetoothDeviceInterface associated with the event or nullptr

◆ getDeviceState()

avsCommon::sdkInterfaces::bluetooth::DeviceState alexaClientSDK::avsCommon::utils::bluetooth::BluetoothEvent::getDeviceState ( ) const
inline

Get DeviceState associated with the event

Returns
DeviceState associated with the event

◆ getMediaCommand()

std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::services::MediaCommand > alexaClientSDK::avsCommon::utils::bluetooth::BluetoothEvent::getMediaCommand ( ) const
inline

Get MediaCommand associated with the event

Returns
MediaCommand associated with the event or null if not applicable

◆ getMediaStreamingState()

MediaStreamingState alexaClientSDK::avsCommon::utils::bluetooth::BluetoothEvent::getMediaStreamingState ( ) const
inline

Get MediaStreamingState associated with the event

Returns
MediaStreamingState associated with the event

◆ getType()

BluetoothEventType alexaClientSDK::avsCommon::utils::bluetooth::BluetoothEvent::getType ( ) const
inline

Get event type

Returns
Event type.

◆ isA2DPEnabled()

bool alexaClientSDK::avsCommon::utils::bluetooth::BluetoothEvent::isA2DPEnabled ( ) const
inline

Get the current enable/disable state of the A2DP profiles.

Returns
Whether the event requires to enable the A2DP profiles.

◆ isScanning()

bool alexaClientSDK::avsCommon::utils::bluetooth::BluetoothEvent::isScanning ( ) const
inline

Get the current scanning state of the host device.

Returns
Whether the device is currently scanning for other devices.

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