AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
StubProperties.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 ACSDK_PROPERTIESINTERFACES_TEST_STUBPROPERTIES_H_
17 #define ACSDK_PROPERTIESINTERFACES_TEST_STUBPROPERTIES_H_
18 
19 #include <memory>
20 #include <unordered_map>
21 #include <unordered_set>
22 
26 
27 namespace alexaClientSDK {
28 namespace propertiesInterfaces {
29 namespace test {
30 
32 
40 public:
43  bool getString(const std::string& key, std::string& value) noexcept override;
44  bool putString(const std::string& key, const std::string& value) noexcept override;
45  bool getBytes(const std::string& key, Bytes& value) noexcept override;
46  bool putBytes(const std::string& key, const Bytes& value) noexcept override;
47  bool getKeys(std::unordered_set<std::string>& keys) noexcept override;
48  bool remove(const std::string& key) noexcept override;
49  bool clear() noexcept override;
51 private:
52  friend class StubPropertiesFactory;
53 
54  StubProperties(const std::shared_ptr<StubPropertiesFactory>& owner, const std::string& configUri) noexcept;
55 
57  std::string createFullyQualifiedName(const std::string& keyName) noexcept;
58 
60  std::string createKeyPrefix() noexcept;
61 
63  const std::shared_ptr<StubPropertiesFactory> m_owner;
64 
66  const std::string m_configUri;
67 };
68 
69 } // namespace test
70 } // namespace propertiesInterfaces
71 } // namespace alexaClientSDK
72 
73 #endif // ACSDK_PROPERTIESINTERFACES_TEST_STUBPROPERTIES_H_
bool putBytes(const std::string &key, const Bytes &value) noexcept override
Method to store binary value into configuration.
bool clear() noexcept override
Removes all properties from a configuration container.
Definition: AmdMetricWrapperTest.cpp:24
::std::string string
Definition: gtest-port.h:1097
Definition: CapabilityConfiguration.h:190
This class provides an interface to a simple key/value container.
Definition: PropertiesInterface.h:37
In-memory stub implementation of PropertiesFactoryInterface.
Definition: StubPropertiesFactory.h:36
bool getKeys(std::unordered_set< std::string > &keys) noexcept override
Method to inspect existing properties.
std::vector< unsigned char > Bytes
Bytes data type. This data type represent a continuous byte array.
Definition: PropertiesInterface.h:41
bool getString(const std::string &key, std::string &value) noexcept override
Method to load string value from configuration.
bool putString(const std::string &key, const std::string &value) noexcept override
Method to store string value into configuration.
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
bool getBytes(const std::string &key, Bytes &value) noexcept override
Method to load binary value from configuration.
const
Definition: upload.py:398
In-memory stub implementation of PropertiesInterface.
Definition: StubProperties.h:39
static const std::string key
The database key to be used by the protocol given the METADATA object.
Definition: SharedAVSSettingProtocolTest.cpp:58

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