A storage interface used for Bluetooth that should provide UUID to MAC mappings and maintain insertion order.
More...
#include <BluetoothStorageInterface.h>
|
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 |
|
A storage interface used for Bluetooth that should provide UUID to MAC mappings and maintain insertion order.
◆ ~BluetoothStorageInterface()
virtual alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::~BluetoothStorageInterface |
( |
| ) |
|
|
virtualdefault |
◆ clear()
virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::clear |
( |
| ) |
|
|
pure virtual |
◆ close()
virtual void alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::close |
( |
| ) |
|
|
pure virtual |
◆ createDatabase()
virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::createDatabase |
( |
| ) |
|
|
pure virtual |
◆ getCategory()
virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::getCategory |
( |
const std::string & |
uuid, |
|
|
std::string * |
category |
|
) |
| |
|
pure virtual |
Retrieve the category associated with a UUID.
- Parameters
-
| uuid | The UUID in which the associated category will be retrieved. |
[out] | category | The category of the associated UUID. |
- Returns
- A bool indicating success.
Implemented in alexaClientSDK::acsdkBluetooth::SQLiteBluetoothStorage.
◆ getMac()
virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::getMac |
( |
const std::string & |
uuid, |
|
|
std::string * |
mac |
|
) |
| |
|
pure virtual |
◆ getMacToCategory()
virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::getMacToCategory |
( |
std::unordered_map< std::string, std::string > * |
macToCategory | ) |
|
|
pure virtual |
◆ getMacToUuid()
virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::getMacToUuid |
( |
std::unordered_map< std::string, std::string > * |
macToUuid | ) |
|
|
pure virtual |
◆ getOrderedMac()
virtual bool alexaClientSDK::acsdkBluetoothInterfaces::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
-
| ascending | Whether list is in ascending or descending order. |
[out] | macs | The ordered macs. |
- Returns
- A bool indicating success.
Implemented in alexaClientSDK::acsdkBluetooth::SQLiteBluetoothStorage.
◆ getUuid()
virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::getUuid |
( |
const std::string & |
mac, |
|
|
std::string * |
uuid |
|
) |
| |
|
pure virtual |
◆ getUuidToCategory()
virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::getUuidToCategory |
( |
std::unordered_map< std::string, std::string > * |
uuidToCategory | ) |
|
|
pure virtual |
◆ getUuidToMac()
virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::getUuidToMac |
( |
std::unordered_map< std::string, std::string > * |
uuidToMac | ) |
|
|
pure virtual |
◆ insertByMac()
virtual bool alexaClientSDK::acsdkBluetoothInterfaces::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
-
mac | The MAC address. |
uuid | The UUID. |
overwrite | Whether or not to overwrite an existing entry with the same MAC address. |
- Returns
- A bool indicating success.
Implemented in alexaClientSDK::acsdkBluetooth::SQLiteBluetoothStorage.
◆ open()
virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::open |
( |
| ) |
|
|
pure virtual |
◆ remove()
virtual bool alexaClientSDK::acsdkBluetoothInterfaces::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
-
- Returns
- A bool indicating success.
Implemented in alexaClientSDK::acsdkBluetooth::SQLiteBluetoothStorage.
◆ updateByCategory()
virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::updateByCategory |
( |
const std::string & |
uuid, |
|
|
const std::string & |
category |
|
) |
| |
|
pure virtual |
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