AlexaClientSDK  1.19.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface Class Referenceabstract

A storage interface used for Bluetooth that should provide UUID to MAC mappings and maintain insertion order. More...

#include <BluetoothStorageInterface.h>

Inheritance diagram for alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface:
Inheritance graph
[legend]

Public Member Functions

virtual ~BluetoothStorageInterface ()=default
 Destructor. More...
 
virtual bool createDatabase ()=0
 
virtual bool open ()=0
 
virtual void close ()=0
 Close the database. More...
 
virtual bool clear ()=0
 
virtual bool getMac (const std::string &uuid, std::string *mac)=0
 
virtual bool getUuid (const std::string &mac, std::string *uuid)=0
 
virtual bool getCategory (const std::string &uuid, std::string *category)=0
 
virtual bool getMacToUuid (std::unordered_map< std::string, std::string > *macToUuid)=0
 
virtual bool getMacToCategory (std::unordered_map< std::string, std::string > *macToCategory)=0
 
virtual bool getUuidToMac (std::unordered_map< std::string, std::string > *uuidToMac)=0
 
virtual bool getUuidToCategory (std::unordered_map< std::string, std::string > *uuidToCategory)=0
 
virtual bool getOrderedMac (bool ascending, std::list< std::string > *macs)=0
 
virtual bool insertByMac (const std::string &mac, const std::string &uuid, bool overwrite)=0
 
virtual bool updateByCategory (const std::string &uuid, const std::string &category)=0
 
virtual bool remove (const std::string &mac)=0
 

Detailed Description

A storage interface used for Bluetooth that should provide UUID to MAC mappings and maintain insertion order.

Constructor & Destructor Documentation

◆ ~BluetoothStorageInterface()

virtual alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::~BluetoothStorageInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ clear()

virtual bool alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::clear ( )
pure virtual

Clear the database and remove all data.

Returns
A bool indicate success.

Implemented in alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage.

◆ close()

virtual void alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::close ( )
pure virtual

◆ createDatabase()

virtual bool alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::createDatabase ( )
pure virtual

Create the database.

Returns
A bool indicate success.

Implemented in alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage.

◆ getCategory()

virtual bool alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::getCategory ( const std::string &  uuid,
std::string *  category 
)
pure virtual

Retrieve the category associated with a UUID.

Parameters
uuidThe UUID in which the associated category will be retrieved.
[out]categoryThe category of the associated UUID.
Returns
A bool indicating success.

Implemented in alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage.

◆ getMac()

virtual bool alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::getMac ( const std::string &  uuid,
std::string *  mac 
)
pure virtual

Retrieve the MAC associated with a UUID.

Parameters
uuidThe UUID in which the associated mac will be retrieved.
[out]macThe MAC address of the associated UUID.
Returns
A bool indicating success.

Implemented in alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage.

◆ getMacToCategory()

virtual bool alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::getMacToCategory ( std::unordered_map< std::string, std::string > *  macToCategory)
pure virtual

Retrieve a map of MAC to Category.

Parameters
[out]macToCategoryA map of MAC to Category mappings.
Returns
A bool indicating success.

Implemented in alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage.

◆ getMacToUuid()

virtual bool alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::getMacToUuid ( std::unordered_map< std::string, std::string > *  macToUuid)
pure virtual

Retrieve a map of MAC to UUID.

Parameters
[out]macToUuidA map of MAC to UUID mappings.
Returns
A bool indicating success.

Implemented in alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage.

◆ getOrderedMac()

virtual bool alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::getOrderedMac ( bool  ascending,
std::list< std::string > *  macs 
)
pure virtual

Gets a list of MAC Addresses ordered by their insertion order into the database.

Parameters
ascendingWhether list is in ascending or descending order.
[out]macsThe ordered macs.
Returns
A bool indicating success.

Implemented in alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage.

◆ getUuid()

virtual bool alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::getUuid ( const std::string &  mac,
std::string *  uuid 
)
pure virtual

Retrieve the UUID associated with a MAC.

Parameters
macThe MAC address of the associated UUID.
[out]uuidThe UUID in which the associated mac will be retrieved.
Returns
A bool indicating success.

Implemented in alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage.

◆ getUuidToCategory()

virtual bool alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::getUuidToCategory ( std::unordered_map< std::string, std::string > *  uuidToCategory)
pure virtual

Retrieve a map of UUID to Category.

Parameters
[out]uuidToCategoryA map of UUID to Category mappings.
Returns
A bool indicating success.

Implemented in alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage.

◆ getUuidToMac()

virtual bool alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::getUuidToMac ( std::unordered_map< std::string, std::string > *  uuidToMac)
pure virtual

Retrieve a map of UUID to MAC.

Parameters
[out]uuidToMacA map of UUID to MAC mappings.
Returns
A bool indicating success.

Implemented in alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage.

◆ insertByMac()

virtual bool alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::insertByMac ( const std::string &  mac,
const std::string &  uuid,
bool  overwrite 
)
pure virtual

Insert into the database a MAC and UUID row. If an existing entry has the same MAC address, the operation should fail unless overwrite is specified.

Parameters
macThe MAC address.
uuidThe UUID.
overwriteWhether or not to overwrite an existing entry with the same MAC address.
Returns
A bool indicating success.

Implemented in alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage.

◆ open()

virtual bool alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::open ( )
pure virtual

Open the database.

Returns
A bool indicate success.

Implemented in alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage.

◆ remove()

virtual bool alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::remove ( const std::string &  mac)
pure virtual

Remove the entry by the MAC address. The operation is considered successful if the entry no longer exists after this call, including the case where the entry did not exist prior.

Parameters
macThe MAC address.
Returns
A bool indicating success.

Implemented in alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage.

◆ updateByCategory()

virtual bool alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface::updateByCategory ( const std::string &  uuid,
const std::string &  category 
)
pure virtual

Update an existing entry with category given a UUID. If there is no existing entry, the operation should fail.

Parameters
uuidThe UUID.
categoryThe category.
Returns
A bool indicating success.

Implemented in alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage.


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

AlexaClientSDK 1.19.0 - Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0