15 #ifndef ACSDKBLUETOOTH_SQLITEBLUETOOTHSTORAGE_H_ 16 #define ACSDKBLUETOOTH_SQLITEBLUETOOTHSTORAGE_H_ 19 #include <unordered_map> 20 #include <unordered_set> 30 namespace acsdkBluetooth {
43 const std::shared_ptr<avsCommon::utils::configuration::ConfigurationNode>& configurationRoot);
53 static std::unique_ptr<SQLiteBluetoothStorage>
create(
60 void close()
override;
61 bool clear()
override;
65 bool getMacToUuid(std::unordered_map<std::string, std::string>* macToUuid)
override;
66 bool getMacToCategory(std::unordered_map<std::string, std::string>* macToCategory)
override;
67 bool getUuidToMac(std::unordered_map<std::string, std::string>* uuidToMac)
override;
68 bool getUuidToCategory(std::unordered_map<std::string, std::string>* uuidToCategory)
override;
69 bool getOrderedMac(
bool ascending, std::list<std::string>* macs)
override;
97 bool getSingleRowLocked(
98 std::unique_ptr<storage::sqliteStorage::SQLiteStatement>& statement,
99 std::unordered_map<std::string, std::string>* row);
111 bool getMappingsLocked(
114 std::unordered_map<std::string, std::string>* mappings);
126 bool getAssociatedDataLocked(
142 bool updateValueLocked(
158 bool insertEntryLocked(
169 bool isDatabaseMigratedLocked();
177 bool migrateDatabaseLocked();
180 std::mutex m_databaseMutex;
189 #endif // ACSDKBLUETOOTH_SQLITEBLUETOOTHSTORAGE_H_ Definition: ConfigurationNode.h:71
bool getUuidToCategory(std::unordered_map< std::string, std::string > *uuidToCategory) override
bool createDatabase() override
bool getUuid(const std::string &mac, std::string *uuid) override
::std::string string
Definition: gtest-port.h:1097
bool getMacToCategory(std::unordered_map< std::string, std::string > *macToCategory) override
bool getMacToUuid(std::unordered_map< std::string, std::string > *macToUuid) override
A concrete implementation of BluetoothStorageInterface using SQLite.
Definition: SQLiteBluetoothStorage.h:33
bool insertByMac(const std::string &mac, const std::string &uuid, bool overwrite=true) override
bool getOrderedMac(bool ascending, std::list< std::string > *macs) override
A storage interface used for Bluetooth that should provide UUID to MAC mappings and maintain insertio...
Definition: BluetoothStorageInterface.h:26
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Definition: SQLiteDatabase.h:36
static std::shared_ptr< BluetoothStorageInterface > createBluetoothStorageInterface(const std::shared_ptr< avsCommon::utils::configuration::ConfigurationNode > &configurationRoot)
bool getMac(const std::string &uuid, std::string *mac) override
static std::unique_ptr< SQLiteBluetoothStorage > create(const avsCommon::utils::configuration::ConfigurationNode &configurationRoot)
bool getCategory(const std::string &uuid, std::string *category) override
bool updateByCategory(const std::string &uuid, const std::string &category) override
bool getUuidToMac(std::unordered_map< std::string, std::string > *uuidToMac) override
void close() override
Close the database.
static const std::string key
The database key to be used by the protocol given the METADATA object.
Definition: SharedAVSSettingProtocolTest.cpp:58