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

#include <BasicDeviceConnectionRule.h>

Inheritance diagram for alexaClientSDK::acsdkBluetooth::BasicDeviceConnectionRule:
Inheritance graph
Collaboration diagram for alexaClientSDK::acsdkBluetooth::BasicDeviceConnectionRule:
Collaboration graph

Public Member Functions

bool shouldExplicitlyConnect () override
bool shouldExplicitlyDisconnect () override
std::set< std::shared_ptr< BluetoothDeviceInterface > > devicesToDisconnect (std::map< DeviceCategory, std::set< std::shared_ptr< BluetoothDeviceInterface >>> connectedDevices) override
std::set< DeviceCategorygetDeviceCategories () override
std::set< std::string > getDependentProfiles () override
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceConnectionRuleInterface
virtual ~BluetoothDeviceConnectionRuleInterface ()=default

Static Public Member Functions

static std::shared_ptr< BasicDeviceConnectionRulecreate ()

Detailed Description

A class represents the basic connection rule the following Bluetooth device needs to follow: 1) DeviceCategory::PHONE 2) DeviceCategory::AUDIO_VIDEO 3) DeviceCategory::OTHER 4) DeviceCategory::UNKNOWN

This rule is created by default and enforces Bluetooth devices falling into the above DeviceCategory to follow. Any rule change for a certain DeviceCategory in the above list might need to refactor the Bluetooth CapabilityAgent.

Member Function Documentation

◆ create()

std::shared_ptr< BasicDeviceConnectionRule > alexaClientSDK::acsdkBluetooth::BasicDeviceConnectionRule::create ( )

A factory method to create a new instance of BasicDeviceConnectionRule.

an instance of BasicConnectionRule.

◆ devicesToDisconnect()

std::set< std::shared_ptr< BluetoothDeviceInterface > > alexaClientSDK::acsdkBluetooth::BasicDeviceConnectionRule::devicesToDisconnect ( std::map< DeviceCategory, std::set< std::shared_ptr< BluetoothDeviceInterface >>>  connectedDevices)

The rule to get a set of Bluetooth devices needed to disconnect when the Bluetooth device connects.

connectedDevicesthe current connected devices.
the set of Bluetooth devices needed to disconnect.

Bluetooth CapabilityAgent only supports single A2DP device connected at one time. Need to disconnect the connected A2DP device(if available) whenever a new A2DP connects.

Implements alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceConnectionRuleInterface.

◆ getDependentProfiles()

std::set< std::string > alexaClientSDK::acsdkBluetooth::BasicDeviceConnectionRule::getDependentProfiles ( )

Get the set of profile uuids which support those device categories defined in the connection rule.

The set of profile uuids.

Implements alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceConnectionRuleInterface.

◆ getDeviceCategories()

std::set< DeviceCategory > alexaClientSDK::acsdkBluetooth::BasicDeviceConnectionRule::getDeviceCategories ( )

Get the set of device categories using the connection rule.

The set of DeviceCategory of the connection rule.

Implements alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceConnectionRuleInterface.

◆ shouldExplicitlyConnect()

bool alexaClientSDK::acsdkBluetooth::BasicDeviceConnectionRule::shouldExplicitlyConnect ( )

The rule to explicitly connect the Bluetooth device after pair.

true if the caller needs to handle connect logic.

Implements alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceConnectionRuleInterface.

◆ shouldExplicitlyDisconnect()

bool alexaClientSDK::acsdkBluetooth::BasicDeviceConnectionRule::shouldExplicitlyDisconnect ( )

The rule to explicitly disconnect the Bluetooth device before unpair.

true if the caller needs to handle disconnect logic.

Implements alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceConnectionRuleInterface.

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

AlexaClientSDK 1.26.0 - Copyright 2016-2021, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0