AlexaClientSDK  3.0.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
[legend]
Collaboration diagram for alexaClientSDK::acsdkBluetooth::BasicDeviceConnectionRule:
Collaboration graph
[legend]

Public Member Functions

BluetoothDeviceConnectionRuleInterface
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()

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

A factory method to create a new instance of BasicDeviceConnectionRule.

Returns
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)
overridevirtual

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

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

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

◆ getDependentProfiles()

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

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

Returns
The set of profile uuids.

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

◆ getDeviceCategories()

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

Get the set of device categories using the connection rule.

Returns
The set of DeviceCategory of the connection rule.

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

◆ shouldExplicitlyConnect()

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

The rule to explicitly connect the Bluetooth device after pair.

Returns
true if the caller needs to handle connect logic.

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

◆ shouldExplicitlyDisconnect()

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

The rule to explicitly disconnect the Bluetooth device before unpair.

Returns
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 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