AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
BluetoothStorageInterface.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ACSDKBLUETOOTHINTERFACES_BLUETOOTHSTORAGEINTERFACE_H_
17 #define ACSDKBLUETOOTHINTERFACES_BLUETOOTHSTORAGEINTERFACE_H_
18 
19 #include <unordered_map>
20 #include <list>
21 
22 namespace alexaClientSDK {
23 namespace acsdkBluetoothInterfaces {
24 
27 public:
29  virtual ~BluetoothStorageInterface() = default;
30 
36  virtual bool createDatabase() = 0;
37 
43  virtual bool open() = 0;
44 
46  virtual void close() = 0;
47 
53  virtual bool clear() = 0;
54 
62  virtual bool getMac(const std::string& uuid, std::string* mac) = 0;
63 
71  virtual bool getUuid(const std::string& mac, std::string* uuid) = 0;
72 
80  virtual bool getCategory(const std::string& uuid, std::string* category) = 0;
81 
88  virtual bool getMacToUuid(std::unordered_map<std::string, std::string>* macToUuid) = 0;
89 
96  virtual bool getMacToCategory(std::unordered_map<std::string, std::string>* macToCategory) = 0;
97 
104  virtual bool getUuidToMac(std::unordered_map<std::string, std::string>* uuidToMac) = 0;
105 
112  virtual bool getUuidToCategory(std::unordered_map<std::string, std::string>* uuidToCategory) = 0;
113 
122  virtual bool getOrderedMac(bool ascending, std::list<std::string>* macs) = 0;
123 
133  virtual bool insertByMac(const std::string& mac, const std::string& uuid, bool overwrite) = 0;
134 
143  virtual bool updateByCategory(const std::string& uuid, const std::string& category) = 0;
144 
152  virtual bool remove(const std::string& mac) = 0;
153 };
154 
155 } // namespace acsdkBluetoothInterfaces
156 } // namespace alexaClientSDK
157 
158 #endif // ACSDKBLUETOOTHINTERFACES_BLUETOOTHSTORAGEINTERFACE_H_
virtual bool getUuidToMac(std::unordered_map< std::string, std::string > *uuidToMac)=0
virtual bool getMacToCategory(std::unordered_map< std::string, std::string > *macToCategory)=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 updateByCategory(const std::string &uuid, const std::string &category)=0
virtual bool getUuid(const std::string &mac, std::string *uuid)=0
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
virtual bool getMac(const std::string &uuid, std::string *mac)=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

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