AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage Class Reference

#include <StubStorage.h>

Inheritance diagram for alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage:
Collaboration graph
[legend]

Public Member Functions

bool openOrCreate () override
 
bool open () override
 
bool createDatabase () override
 
bool setRefreshToken (const std::string &refreshToken) override
 
bool clearRefreshToken () override
 
bool getRefreshToken (std::string *refreshToken) override
 
bool setUserId (const std::string &userId) override
 
bool getUserId (std::string *userId) override
 
bool clear () override
 
- Public Member Functions inherited from alexaClientSDK::acsdkAuthorizationInterfaces::lwa::LWAAuthorizationStorageInterface
virtual ~LWAAuthorizationStorageInterface ()=default
 

Member Function Documentation

◆ clear()

bool alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage::clear ( )
overridevirtual

A utility function to clear all records from storage. Note that the storage will still exist, it will just have not content.

Returns
Whether the database was successfully cleared.

Implements alexaClientSDK::acsdkAuthorizationInterfaces::lwa::LWAAuthorizationStorageInterface.

◆ clearRefreshToken()

bool alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage::clearRefreshToken ( )
overridevirtual

Clear the stored refresh token value.

Returns
Whether the refresh token was successfully cleared.

Implements alexaClientSDK::acsdkAuthorizationInterfaces::lwa::LWAAuthorizationStorageInterface.

◆ createDatabase()

bool alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage::createDatabase ( )
overridevirtual
Deprecated:
The recommendation is to use use openOrCreate().

Creates a new database with the given filepath. If the file specified already exists, or if a database is already being handled by this object, then this function returns false.

Returns
true If the database is created ok, or false if either the file exists or a database is already being handled by this object.

Implements alexaClientSDK::acsdkAuthorizationInterfaces::lwa::LWAAuthorizationStorageInterface.

◆ getRefreshToken()

bool alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage::getRefreshToken ( std::string *  refreshToken)
overridevirtual

Get the stored refresh token value.

Parameters
[out]refreshToken
Returns
Whether or not the operation was successful.

Implements alexaClientSDK::acsdkAuthorizationInterfaces::lwa::LWAAuthorizationStorageInterface.

◆ getUserId()

bool alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage::getUserId ( std::string *  userId)
overridevirtual

Retrieves the UserId associated with the account.

Parameters
[out]userId
Returns
Whether or not the operation was successful.

Implements alexaClientSDK::acsdkAuthorizationInterfaces::lwa::LWAAuthorizationStorageInterface.

◆ open()

bool alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage::open ( )
overridevirtual
Deprecated:
The recommendation is to use use openOrCreate().

Open a database with the given filepath. If this object is already managing an open database, or the file does not exist, or there is a problem opening the database, this function returns false.

Returns
true If the database is opened ok, false if either the file does not exist, if this object is already managing an open database, or if there is another internal reason the database could not be opened.

Implements alexaClientSDK::acsdkAuthorizationInterfaces::lwa::LWAAuthorizationStorageInterface.

◆ openOrCreate()

bool alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage::openOrCreate ( )
overridevirtual

Open the database with the given filepath or creates it if it does not exist.

Returns
true If the database is opened and usable. false if this object is already managing an open database, or if there is another internal reason the database is unusable.

Implements alexaClientSDK::acsdkAuthorizationInterfaces::lwa::LWAAuthorizationStorageInterface.

◆ setRefreshToken()

bool alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage::setRefreshToken ( const std::string &  refreshToken)
overridevirtual

Set the stored refresh token value.

Parameters
refreshTokenThe refresh token to insert into the database.
Returns
Whether the refresh token was successfully stored.

Implements alexaClientSDK::acsdkAuthorizationInterfaces::lwa::LWAAuthorizationStorageInterface.

◆ setUserId()

bool alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage::setUserId ( const std::string &  userId)
overridevirtual

Stores the UserId associated with the account.

Parameters
userIdThe userId to store.

Implements alexaClientSDK::acsdkAuthorizationInterfaces::lwa::LWAAuthorizationStorageInterface.


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

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