AlexaClientSDK  1.25.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface Class Referenceabstract

A storage interface used for Bluetooth that should provide UUID to MAC mappings and maintain insertion order. More...

#include <BluetoothStorageInterface.h>

Inheritance diagram for alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface:
Inheritance graph
[legend]

Public Member Functions

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
 

Detailed Description

A storage interface used for Bluetooth that should provide UUID to MAC mappings and maintain insertion order.

Constructor & Destructor Documentation

◆ ~BluetoothStorageInterface()

virtual alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::~BluetoothStorageInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ clear()

virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::clear ( )
pure virtual

Clear the database and remove all data.

Returns
A bool indicate success.

Implemented in alexaClientSDK::acsdkBluetooth::SQLiteBluetoothStorage.

◆ close()

virtual void alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::close ( )
pure virtual

Close the database.

Implemented in alexaClientSDK::acsdkBluetooth::SQLiteBluetoothStorage.

◆ createDatabase()

virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::createDatabase ( )
pure virtual

Create the database.

Returns
A bool indicate success.

Implemented in alexaClientSDK::acsdkBluetooth::SQLiteBluetoothStorage.

◆ getCategory()

virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::getCategory ( const std::string &  uuid,
std::string *  category 
)
pure virtual

Retrieve the category associated with a UUID.

Parameters
uuidThe UUID in which the associated category will be retrieved.
[out]categoryThe 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

Retrieve the MAC associated with a UUID.

Parameters
uuidThe UUID in which the associated mac will be retrieved.
[out]macThe MAC address of the associated UUID.
Returns
A bool indicating success.

Implemented in alexaClientSDK::acsdkBluetooth::SQLiteBluetoothStorage.

◆ getMacToCategory()

virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::getMacToCategory ( std::unordered_map< std::string, std::string > *  macToCategory)
pure virtual

Retrieve a map of MAC to Category.

Parameters
[out]macToCategoryA map of MAC to Category mappings.
Returns
A bool indicating success.

Implemented in alexaClientSDK::acsdkBluetooth::SQLiteBluetoothStorage.

◆ getMacToUuid()

virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::getMacToUuid ( std::unordered_map< std::string, std::string > *  macToUuid)
pure virtual

Retrieve a map of MAC to UUID.

Parameters
[out]macToUuidA map of MAC to UUID mappings.
Returns
A bool indicating success.

Implemented in alexaClientSDK::acsdkBluetooth::SQLiteBluetoothStorage.

◆ 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
ascendingWhether list is in ascending or descending order.
[out]macsThe 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

Retrieve the UUID associated with a MAC.

Parameters
macThe MAC address of the associated UUID.
[out]uuidThe UUID in which the associated mac will be retrieved.
Returns
A bool indicating success.

Implemented in alexaClientSDK::acsdkBluetooth::SQLiteBluetoothStorage.

◆ getUuidToCategory()

virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::getUuidToCategory ( std::unordered_map< std::string, std::string > *  uuidToCategory)
pure virtual

Retrieve a map of UUID to Category.

Parameters
[out]uuidToCategoryA map of UUID to Category mappings.
Returns
A bool indicating success.

Implemented in alexaClientSDK::acsdkBluetooth::SQLiteBluetoothStorage.

◆ getUuidToMac()

virtual bool alexaClientSDK::acsdkBluetoothInterfaces::BluetoothStorageInterface::getUuidToMac ( std::unordered_map< std::string, std::string > *  uuidToMac)
pure virtual

Retrieve a map of UUID to MAC.

Parameters
[out]uuidToMacA map of UUID to MAC mappings.
Returns
A bool indicating success.

Implemented in alexaClientSDK::acsdkBluetooth::SQLiteBluetoothStorage.

◆ 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
macThe MAC address.
uuidThe UUID.
overwriteWhether 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

Open the database.

Returns
A bool indicate success.

Implemented in alexaClientSDK::acsdkBluetooth::SQLiteBluetoothStorage.

◆ 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
macThe MAC address.
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

Update an existing entry with category given a UUID. If there is no existing entry, the operation should fail.

Parameters
uuidThe UUID.
categoryThe category.
Returns
A bool indicating success.

Implemented in alexaClientSDK::acsdkBluetooth::SQLiteBluetoothStorage.


The documentation for this class was generated from the following file:

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