AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
StubStorage.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 ACSDKAUTHORIZATION_LWA_TEST_STUBSTORAGE_H_
17 #define ACSDKAUTHORIZATION_LWA_TEST_STUBSTORAGE_H_
18 
19 #include <mutex>
20 #include <string>
21 
23 
24 namespace alexaClientSDK {
25 namespace acsdkAuthorization {
26 namespace lwa {
27 namespace test {
28 
30 public:
31  bool openOrCreate() override;
32  bool open() override;
33  bool createDatabase() override;
34  bool setRefreshToken(const std::string& refreshToken) override;
35  bool clearRefreshToken() override;
36  bool getRefreshToken(std::string* refreshToken) override;
37  bool setUserId(const std::string& userId) override;
38  bool getUserId(std::string* userId) override;
39  bool clear() override;
40 
41 private:
42  std::mutex m_mutex;
43  std::string m_refreshToken;
44  std::string m_userId;
45 };
46 
47 } // namespace test
48 } // namespace lwa
49 } // namespace acsdkAuthorization
50 } // namespace alexaClientSDK
51 
52 #endif // ACSDKAUTHORIZATION_LWA_TEST_STUBSTORAGE_H_
Definition: AmdMetricWrapperTest.cpp:24
::std::string string
Definition: gtest-port.h:1097
bool clearRefreshToken() override
Definition: StubStorage.cpp:41
bool openOrCreate() override
Definition: StubStorage.cpp:23
bool createDatabase() override
Definition: StubStorage.cpp:27
bool getUserId(std::string *userId) override
Definition: StubStorage.cpp:63
bool open() override
Definition: StubStorage.cpp:31
bool setRefreshToken(const std::string &refreshToken) override
Definition: StubStorage.cpp:35
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
bool setUserId(const std::string &userId) override
Definition: StubStorage.cpp:57
bool clear() override
Definition: StubStorage.cpp:74
bool getRefreshToken(std::string *refreshToken) override
Definition: StubStorage.cpp:47

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