AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Represents a Bluetooth Device. More...
#include <BluetoothDeviceInterface.h>
Classes | |
struct | MetaData |
Public Member Functions | |
virtual | ~BluetoothDeviceInterface ()=default |
Destructor. More... | |
virtual std::string | getMac () const =0 |
virtual std::string | getFriendlyName () const =0 |
virtual DeviceState | getDeviceState ()=0 |
virtual MetaData | getDeviceMetaData ()=0 |
virtual bool | isPaired ()=0 |
virtual std::future< bool > | pair ()=0 |
virtual std::future< bool > | unpair ()=0 |
virtual bool | isConnected ()=0 |
virtual std::future< bool > | connect ()=0 |
virtual std::future< bool > | disconnect ()=0 |
virtual bool | setPairingPin (const std::string &pin)=0 |
virtual std::vector< std::shared_ptr< services::SDPRecordInterface > > | getSupportedServices ()=0 |
virtual std::shared_ptr< services::BluetoothServiceInterface > | getService (std::string uuid)=0 |
virtual utils::bluetooth::MediaStreamingState | getStreamingState ()=0 |
virtual bool | toggleServiceConnection (bool enabled, std::shared_ptr< services::BluetoothServiceInterface > service)=0 |
Represents a Bluetooth Device.
|
virtualdefault |
Destructor.
|
pure virtual |
Initiate a connect with this device.
Implemented in alexaClientSDK::bluetoothImplementations::blueZ::BlueZBluetoothDevice, and alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::test::MockBluetoothDevice.
|
pure virtual |
Initiate a disconnect with this device.
Implemented in alexaClientSDK::bluetoothImplementations::blueZ::BlueZBluetoothDevice, and alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::test::MockBluetoothDevice.
|
pure virtual |
Getter for the Bluetooth device metadata.
Implemented in alexaClientSDK::bluetoothImplementations::blueZ::BlueZBluetoothDevice, and alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::test::MockBluetoothDevice.
|
pure virtual |
Getter for the DeviceState
.
DeviceState
of the current device. Implemented in alexaClientSDK::bluetoothImplementations::blueZ::BlueZBluetoothDevice, and alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::test::MockBluetoothDevice.
|
pure virtual |
Getter for the friendly name.
Implemented in alexaClientSDK::bluetoothImplementations::blueZ::BlueZBluetoothDevice, and alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::test::MockBluetoothDevice.
|
pure virtual |
Getter for the MAC address.
Implemented in alexaClientSDK::bluetoothImplementations::blueZ::BlueZBluetoothDevice, and alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::test::MockBluetoothDevice.
|
pure virtual |
Get the Bluetooth service that this device supports.
uuid | the uuid of the Bluetooth Service. |
BluetoothServiceInterface
if supported, else a nullptr. Implemented in alexaClientSDK::bluetoothImplementations::blueZ::BlueZBluetoothDevice, and alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::test::MockBluetoothDevice.
|
pure virtual |
Implemented in alexaClientSDK::bluetoothImplementations::blueZ::BlueZBluetoothDevice, and alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::test::MockBluetoothDevice.
|
pure virtual |
Implemented in alexaClientSDK::bluetoothImplementations::blueZ::BlueZBluetoothDevice, and alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::test::MockBluetoothDevice.
|
pure virtual |
Getter for the paired state of the device. This should return the state after any pending state changes have been resolved.
Implemented in alexaClientSDK::bluetoothImplementations::blueZ::BlueZBluetoothDevice, and alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::test::MockBluetoothDevice.
|
pure virtual |
Getter for the paired state of the device. This should return the state after any pending state changes have been resolved.
Implemented in alexaClientSDK::bluetoothImplementations::blueZ::BlueZBluetoothDevice, and alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::test::MockBluetoothDevice.
|
pure virtual |
Initiate a pair with this device.
Implemented in alexaClientSDK::bluetoothImplementations::blueZ::BlueZBluetoothDevice, and alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::test::MockBluetoothDevice.
|
pure virtual |
Sets the pairing pin for the current pairing attempt. PIN length can range from 4 to 16 alphanumeric characters, though most devices will only accept numeric characters in the PIN. Expected call flow is: pair() -> PIN request callback -> setPairingPin()
pin | BT pairing pin |
Implemented in alexaClientSDK::bluetoothImplementations::blueZ::BlueZBluetoothDevice, and alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::test::MockBluetoothDevice.
|
pure virtual |
Toggle the profile of a device, which restricts the future connection/disconnection.
enabled | True if need to connect the certain profile, false to disconnect. |
service | The target profile to toggle. |
Implemented in alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::test::MockBluetoothDevice.
|
pure virtual |
Initiate an unpair with this device.
Implemented in alexaClientSDK::bluetoothImplementations::blueZ::BlueZBluetoothDevice, and alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::test::MockBluetoothDevice.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0