A concrete implementation of BluetoothStorageInterface
using SQLite.
More...
#include <SQLiteBluetoothStorage.h>
|
|
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...
|
|
A concrete implementation of BluetoothStorageInterface
using SQLite.
◆ clear()
bool alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage::clear |
( |
| ) |
|
|
overridevirtual |
◆ close()
void alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage::close |
( |
| ) |
|
|
overridevirtual |
◆ create()
Create an instance of a SQLiteBluetoothStorage object.
- Parameters
-
configurationRoot | A ConfigurationNode containing the location of the .db file. Should take the form: "bluetooth" : { "databaseFilePath" : "<filePath>" } |
◆ createDatabase()
bool alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage::createDatabase |
( |
| ) |
|
|
overridevirtual |
◆ getCategory()
bool alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage::getCategory |
( |
const std::string & |
uuid, |
|
|
std::string * |
category |
|
) |
| |
|
overridevirtual |
◆ getMac()
bool alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage::getMac |
( |
const std::string & |
uuid, |
|
|
std::string * |
mac |
|
) |
| |
|
overridevirtual |
◆ getMacToCategory()
bool alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage::getMacToCategory |
( |
std::unordered_map< std::string, std::string > * |
macToCategory | ) |
|
|
overridevirtual |
◆ getMacToUuid()
bool alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage::getMacToUuid |
( |
std::unordered_map< std::string, std::string > * |
macToUuid | ) |
|
|
overridevirtual |
◆ getOrderedMac()
bool alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage::getOrderedMac |
( |
bool |
ascending, |
|
|
std::list< std::string > * |
macs |
|
) |
| |
|
overridevirtual |
◆ getUuid()
bool alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage::getUuid |
( |
const std::string & |
mac, |
|
|
std::string * |
uuid |
|
) |
| |
|
overridevirtual |
◆ getUuidToCategory()
bool alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage::getUuidToCategory |
( |
std::unordered_map< std::string, std::string > * |
uuidToCategory | ) |
|
|
overridevirtual |
◆ getUuidToMac()
bool alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage::getUuidToMac |
( |
std::unordered_map< std::string, std::string > * |
uuidToMac | ) |
|
|
overridevirtual |
◆ insertByMac()
bool alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage::insertByMac |
( |
const std::string & |
mac, |
|
|
const std::string & |
uuid, |
|
|
bool |
overwrite = true |
|
) |
| |
|
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.
- 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.
Implements alexaClientSDK::capabilityAgents::bluetooth::BluetoothStorageInterface.
◆ open()
bool alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage::open |
( |
| ) |
|
|
overridevirtual |
◆ remove()
bool alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage::remove |
( |
const std::string & |
mac | ) |
|
|
overridevirtual |
◆ updateByCategory()
bool alexaClientSDK::capabilityAgents::bluetooth::SQLiteBluetoothStorage::updateByCategory |
( |
const std::string & |
uuid, |
|
|
const std::string & |
category |
|
) |
| |
|
overridevirtual |
The documentation for this class was generated from the following files:
- /home/ANT.AMAZON.COM/womw/workplace/1.19_release/doxy/avs-device-sdk/CapabilityAgents/Bluetooth/include/Bluetooth/SQLiteBluetoothStorage.h
- /home/ANT.AMAZON.COM/womw/workplace/1.19_release/doxy/avs-device-sdk/CapabilityAgents/Bluetooth/src/SQLiteBluetoothStorage.cpp
AlexaClientSDK 1.19.0 - Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0