![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
A concrete implementation of BluetoothStorageInterface
using SQLite.
More...
#include <SQLiteBluetoothStorage.h>
Public Member Functions | |
BluetoothStorageInterface | |
bool | createDatabase () override |
bool | open () override |
void | close () override |
Close the database. More... | |
bool | clear () override |
bool | getUuid (const std::string &mac, std::string *uuid) override |
bool | getCategory (const std::string &uuid, std::string *category) override |
bool | getMac (const std::string &uuid, std::string *mac) override |
bool | getMacToUuid (std::unordered_map< std::string, std::string > *macToUuid) override |
bool | getMacToCategory (std::unordered_map< std::string, std::string > *macToCategory) override |
bool | getUuidToMac (std::unordered_map< std::string, std::string > *uuidToMac) override |
bool | getUuidToCategory (std::unordered_map< std::string, std::string > *uuidToCategory) override |
bool | getOrderedMac (bool ascending, std::list< std::string > *macs) override |
bool | insertByMac (const std::string &mac, const std::string &uuid, bool overwrite=true) override |
bool | updateByCategory (const std::string &uuid, const std::string &category) override |
bool | remove (const std::string &mac) override |
![]() | |
virtual | ~BluetoothStorageInterface ()=default |
Destructor. More... | |
Static Public Member Functions | |
static std::shared_ptr< BluetoothStorageInterface > | createBluetoothStorageInterface (const std::shared_ptr< avsCommon::utils::configuration::ConfigurationNode > &configurationRoot) |
static std::unique_ptr< SQLiteBluetoothStorage > | create (const avsCommon::utils::configuration::ConfigurationNode &configurationRoot) |
A concrete implementation of BluetoothStorageInterface
using SQLite.
|
overridevirtual |
Clear the database and remove all data.
Implements alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface.
|
overridevirtual |
Close the database.
Implements alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface.
|
static |
Create an instance of a SQLiteBluetoothStorage object.
configurationRoot | A ConfigurationNode containing the location of the .db file. Should take the form: "bluetooth" : { "databaseFilePath" : "<filePath>" } |
|
static |
Create an instance of a BluetoothStorageInterface
object.
configurationRoot | A shared pointer to a ConfigurationNode containing the location of the .db file. Should take the form: "bluetooth" : { "databaseFilePath" : "<filePath>" } |
|
overridevirtual |
Create the database.
Implements alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface.
|
overridevirtual |
Retrieve the category associated with a UUID.
uuid | The UUID in which the associated category will be retrieved. | |
[out] | category | The category of the associated UUID. |
Implements alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface.
|
overridevirtual |
Retrieve the MAC associated with a UUID.
uuid | The UUID in which the associated mac will be retrieved. | |
[out] | mac | The MAC address of the associated UUID. |
Implements alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface.
|
overridevirtual |
Retrieve a map of MAC to Category.
[out] | macToCategory | A map of MAC to Category mappings. |
Implements alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface.
|
overridevirtual |
Retrieve a map of MAC to UUID.
[out] | macToUuid | A map of MAC to UUID mappings. |
Implements alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface.
|
overridevirtual |
Gets a list of MAC Addresses ordered by their insertion order into the database.
ascending | Whether list is in ascending or descending order. | |
[out] | macs | The ordered macs. |
Implements alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface.
|
overridevirtual |
Retrieve the UUID associated with a MAC.
mac | The MAC address of the associated UUID. | |
[out] | uuid | The UUID in which the associated mac will be retrieved. |
Implements alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface.
|
overridevirtual |
Retrieve a map of UUID to Category.
[out] | uuidToCategory | A map of UUID to Category mappings. |
Implements alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface.
|
overridevirtual |
Retrieve a map of UUID to MAC.
[out] | uuidToMac | A map of UUID to MAC mappings. |
Implements alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface.
|
overridevirtual |
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.
mac | The MAC address. |
uuid | The UUID. |
overwrite | Whether or not to overwrite an existing entry with the same MAC address. |
Implements alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface.
|
overridevirtual |
Open the database.
Implements alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface.
|
overridevirtual |
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.
mac | The MAC address. |
Implements alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface.
|
overridevirtual |
Update an existing entry with category given a UUID. If there is no existing entry, the operation should fail.
uuid | The UUID. |
category | The category. |
Implements alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0