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

#include <CapabilitiesDelegateStorageInterface.h>

Inheritance diagram for alexaClientSDK::capabilitiesDelegate::storage::CapabilitiesDelegateStorageInterface:
Inheritance graph
[legend]

Public Member Functions

virtual ~CapabilitiesDelegateStorageInterface ()=default
 
virtual bool createDatabase ()=0
 
virtual bool open ()=0
 
virtual void close ()=0
 
virtual bool store (const std::string &endpointId, const std::string &endpointConfig)=0
 
virtual bool store (const std::unordered_map< std::string, std::string > &endpointIdToConfigMap)=0
 
virtual bool load (std::unordered_map< std::string, std::string > *endpointConfigMap)=0
 
virtual bool load (const std::string &endpointId, std::string *endpointConfig)=0
 
virtual bool erase (const std::string &endpointId)=0
 
virtual bool erase (const std::unordered_map< std::string, std::string > &endpointIdToConfigMap)=0
 
virtual bool clearDatabase ()=0
 

Detailed Description

An Interface class which defines APIs for interacting with a database for storing, loading and modifying capabilities information.

Note
: The implementation of this interface should be thread safe.

Constructor & Destructor Documentation

◆ ~CapabilitiesDelegateStorageInterface()

virtual alexaClientSDK::capabilitiesDelegate::storage::CapabilitiesDelegateStorageInterface::~CapabilitiesDelegateStorageInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ clearDatabase()

virtual bool alexaClientSDK::capabilitiesDelegate::storage::CapabilitiesDelegateStorageInterface::clearDatabase ( )
pure virtual

Erases the entire storage.

Returns
True if clear operation was successful, false if there was a failure to erase the database.

Implemented in alexaClientSDK::capabilitiesDelegate::storage::SQLiteCapabilitiesDelegateStorage.

◆ close()

virtual void alexaClientSDK::capabilitiesDelegate::storage::CapabilitiesDelegateStorageInterface::close ( )
pure virtual

◆ createDatabase()

virtual bool alexaClientSDK::capabilitiesDelegate::storage::CapabilitiesDelegateStorageInterface::createDatabase ( )
pure virtual

Creates a new database.

Returns
True if successful, else false.

Implemented in alexaClientSDK::capabilitiesDelegate::storage::SQLiteCapabilitiesDelegateStorage.

◆ erase() [1/2]

virtual bool alexaClientSDK::capabilitiesDelegate::storage::CapabilitiesDelegateStorageInterface::erase ( const std::string &  endpointId)
pure virtual

Erases a single endpointConfig from the database.

Parameters
endpointIdThe endpointId key to erase from storage.
Returns
True if successful, else false.

Implemented in alexaClientSDK::capabilitiesDelegate::storage::SQLiteCapabilitiesDelegateStorage.

◆ erase() [2/2]

virtual bool alexaClientSDK::capabilitiesDelegate::storage::CapabilitiesDelegateStorageInterface::erase ( const std::unordered_map< std::string, std::string > &  endpointIdToConfigMap)
pure virtual

Erases a vector of endpoint Ids from the data base.

Parameters
endpointIdToConfigMapthe endpointId to Configuration map.
Returns
True if successful, else false.

Implemented in alexaClientSDK::capabilitiesDelegate::storage::SQLiteCapabilitiesDelegateStorage.

◆ load() [1/2]

virtual bool alexaClientSDK::capabilitiesDelegate::storage::CapabilitiesDelegateStorageInterface::load ( std::unordered_map< std::string, std::string > *  endpointConfigMap)
pure virtual

Loads the endpointConfigMap.

Parameters
endpointConfigMapThe endpoint config map pointer.
Returns
True if successful, else false.

Implemented in alexaClientSDK::capabilitiesDelegate::storage::SQLiteCapabilitiesDelegateStorage.

◆ load() [2/2]

virtual bool alexaClientSDK::capabilitiesDelegate::storage::CapabilitiesDelegateStorageInterface::load ( const std::string &  endpointId,
std::string *  endpointConfig 
)
pure virtual

Loads the endpointConfig with the given endpoint Id.

Parameters
endpointIdThe endpointId key used to load data from the storage.
endpointConfigThe pointer to the endpointConfig that will be updated, if the key is present in storage.
Returns
True if successful, else false.

Implemented in alexaClientSDK::capabilitiesDelegate::storage::SQLiteCapabilitiesDelegateStorage.

◆ open()

virtual bool alexaClientSDK::capabilitiesDelegate::storage::CapabilitiesDelegateStorageInterface::open ( )
pure virtual

Opens the database.

Returns
True if successful, else false.

Implemented in alexaClientSDK::capabilitiesDelegate::storage::SQLiteCapabilitiesDelegateStorage.

◆ store() [1/2]

virtual bool alexaClientSDK::capabilitiesDelegate::storage::CapabilitiesDelegateStorageInterface::store ( const std::string &  endpointId,
const std::string &  endpointConfig 
)
pure virtual

Stores the endpointConfig with the endpointId in the database.

Parameters
endpointIdThe endpoint ID string.
endpointConfigThe full endpoint config sent in the discovery.
Returns
True if successful, else false.

Implemented in alexaClientSDK::capabilitiesDelegate::storage::SQLiteCapabilitiesDelegateStorage.

◆ store() [2/2]

virtual bool alexaClientSDK::capabilitiesDelegate::storage::CapabilitiesDelegateStorageInterface::store ( const std::unordered_map< std::string, std::string > &  endpointIdToConfigMap)
pure virtual

Stores the endpointConfigMap.

Parameters
endpointIdToConfigMapThe endpointId to configuration map.
Returns
True if successful, else false.

Implemented in alexaClientSDK::capabilitiesDelegate::storage::SQLiteCapabilitiesDelegateStorage.


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