AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
PropertiesInterface.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_PROPERTIESINTERFACE_H_
17 #define ACSDK_PROPERTIESINTERFACES_PROPERTIESINTERFACE_H_
18 
19 #include <string>
20 #include <unordered_set>
21 #include <vector>
22 
23 namespace alexaClientSDK {
24 namespace propertiesInterfaces {
25 
27 
38 public:
41  typedef std::vector<unsigned char> Bytes;
42 
44  virtual ~PropertiesInterface() noexcept = default;
45 
47 
58  virtual bool getString(const std::string& key, std::string& value) noexcept = 0;
59 
61 
75  virtual bool putString(const std::string& key, const std::string& value) noexcept = 0;
76 
78 
88  virtual bool getBytes(const std::string& key, Bytes& value) noexcept = 0;
89 
91 
105  virtual bool putBytes(const std::string& key, const Bytes& value) noexcept = 0;
106 
108 
116  virtual bool getKeys(std::unordered_set<std::string>& keys) noexcept = 0;
117 
119 
127  virtual bool remove(const std::string& key) noexcept = 0;
128 
130 
136  virtual bool clear() noexcept = 0;
137 };
138 
139 } // namespace propertiesInterfaces
140 } // namespace alexaClientSDK
141 
142 #endif // ACSDK_PROPERTIESINTERFACES_PROPERTIESINTERFACE_H_
virtual bool getKeys(std::unordered_set< std::string > &keys) noexcept=0
Method to inspect existing properties.
virtual bool getString(const std::string &key, std::string &value) noexcept=0
Method to load string value from configuration.
Definition: CapabilityConfiguration.h:190
virtual bool putBytes(const std::string &key, const Bytes &value) noexcept=0
Method to store binary value into configuration.
This class provides an interface to a simple key/value container.
Definition: PropertiesInterface.h:37
std::vector< unsigned char > Bytes
Bytes data type. This data type represent a continuous byte array.
Definition: PropertiesInterface.h:41
virtual bool remove(const std::string &key) noexcept=0
Removes a property with a given name.
virtual ~PropertiesInterface() noexcept=default
Destructor.
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
virtual bool putString(const std::string &key, const std::string &value) noexcept=0
Method to store string value into configuration.
const
Definition: upload.py:398
virtual bool clear() noexcept=0
Removes all properties from a configuration container.
virtual bool getBytes(const std::string &key, Bytes &value) noexcept=0
Method to load binary value from configuration.
default
Definition: upload.py:394
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