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

An implementation of the BluetoothHostControllerInterface using BlueZ. More...

#include <BlueZHostController.h>

Inheritance diagram for alexaClientSDK::bluetoothImplementations::blueZ::BlueZHostController:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::bluetoothImplementations::blueZ::BlueZHostController:
Collaboration graph
[legend]

Public Member Functions

void onPropertyChanged (const GVariantMapReader &changesMap)
 
BluetoothHostControllerInterface Functions
virtual ~BlueZHostController ()=default
 
std::string getMac () const override
 
std::string getFriendlyName () const override
 
bool isDiscoverable () const override
 
std::future< bool > enterDiscoverableMode () override
 
std::future< bool > exitDiscoverableMode () override
 
bool isScanning () const override
 
std::future< bool > startScan () override
 
std::future< bool > stopScan () override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface
virtual ~BluetoothHostControllerInterface ()=default
 Destructor. More...
 

Static Public Member Functions

static std::unique_ptr< BlueZHostControllercreate (const std::string &adapterObjectPath)
 

Detailed Description

An implementation of the BluetoothHostControllerInterface using BlueZ.

Constructor & Destructor Documentation

◆ ~BlueZHostController()

virtual alexaClientSDK::bluetoothImplementations::blueZ::BlueZHostController::~BlueZHostController ( )
virtualdefault

Member Function Documentation

◆ create()

static std::unique_ptr<BlueZHostController> alexaClientSDK::bluetoothImplementations::blueZ::BlueZHostController::create ( const std::string &  adapterObjectPath)
static

Creates an instance of the BlueZHostController.

Parameters
adapterObjectPathThe object path of the adapter.
Returns
An instance if successful, else a nullptr.

◆ enterDiscoverableMode()

std::future<bool> alexaClientSDK::bluetoothImplementations::blueZ::BlueZHostController::enterDiscoverableMode ( )
overridevirtual

Set the adapter to become discoverable.

Returns
Indicates whether the operation was successful.

Implements alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface.

◆ exitDiscoverableMode()

std::future<bool> alexaClientSDK::bluetoothImplementations::blueZ::BlueZHostController::exitDiscoverableMode ( )
overridevirtual

Set the adapter to become non-discoverable.

Returns
Indicates whether the operation was successful.

Implements alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface.

◆ getFriendlyName()

std::string alexaClientSDK::bluetoothImplementations::blueZ::BlueZHostController::getFriendlyName ( ) const
overridevirtual

Getter for the friendly name of the adapter.

Returns
The friendly name of the adapter.

Implements alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface.

◆ getMac()

std::string alexaClientSDK::bluetoothImplementations::blueZ::BlueZHostController::getMac ( ) const
overridevirtual

Getter for the MAC address of the adapter.

Returns
The MAC address of the adapter.

Implements alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface.

◆ isDiscoverable()

bool alexaClientSDK::bluetoothImplementations::blueZ::BlueZHostController::isDiscoverable ( ) const
overridevirtual

Getter for the discoverability of the device. This must wait until any prior enterDiscoverableMode or exitDiscoverableMode methods have finished.

Returns
Whether the device is currently discoverable by other devices.

Implements alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface.

◆ isScanning()

bool alexaClientSDK::bluetoothImplementations::blueZ::BlueZHostController::isScanning ( ) const
overridevirtual

Getter for the scanning state of the device. This must wait until any prior startScan or stopScan methods have finished.

Returns
Whether the device is currently scanning for other devices.

Implements alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface.

◆ onPropertyChanged()

void alexaClientSDK::bluetoothImplementations::blueZ::BlueZHostController::onPropertyChanged ( const GVariantMapReader changesMap)

A function for BlueZDeviceManager to alert devices when its property has changed. This is to avoid having multiple objects subscribing to DBus events.

Parameters
changesMapA map containing the property changes of the device.

◆ startScan()

std::future<bool> alexaClientSDK::bluetoothImplementations::blueZ::BlueZHostController::startScan ( )
overridevirtual

Set the adapter to start scanning.

Returns
Indicates whether the operation was successful.

Implements alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface.

◆ stopScan()

std::future<bool> alexaClientSDK::bluetoothImplementations::blueZ::BlueZHostController::stopScan ( )
overridevirtual

Set the adapter to stop scanning.

Returns
Indicates whether the operation was successful.

Implements alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface.


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