AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
In-memory stub implementation of PropertiesInterface
.
More...
#include <StubProperties.h>
Public Member Functions | |
PropertiesFactoryInterface functions. | |
bool | getString (const std::string &key, std::string &value) noexcept override |
Method to load string value from configuration. More... | |
bool | putString (const std::string &key, const std::string &value) noexcept override |
Method to store string value into configuration. More... | |
bool | getBytes (const std::string &key, Bytes &value) noexcept override |
Method to load binary value from configuration. More... | |
bool | putBytes (const std::string &key, const Bytes &value) noexcept override |
Method to store binary value into configuration. More... | |
bool | getKeys (std::unordered_set< std::string > &keys) noexcept override |
Method to inspect existing properties. More... | |
bool | remove (const std::string &key) noexcept override |
Removes a property with a given name. More... | |
bool | clear () noexcept override |
Removes all properties from a configuration container. More... | |
Public Member Functions inherited from alexaClientSDK::propertiesInterfaces::PropertiesInterface | |
virtual | ~PropertiesInterface () noexcept=default |
Destructor. More... | |
Additional Inherited Members | |
Public Types inherited from alexaClientSDK::propertiesInterfaces::PropertiesInterface | |
typedef std::vector< unsigned char > | Bytes |
Bytes data type. This data type represent a continuous byte array. More... | |
In-memory stub implementation of PropertiesInterface
.
This class provides in-memory implementation of PropertiesInterface
. Users can create instances of this class by using StubPropertiesFactory.
|
overridevirtualnoexcept |
Removes all properties from a configuration container.
This method removes all properties from a configuration container.
Implements alexaClientSDK::propertiesInterfaces::PropertiesInterface.
|
overridevirtualnoexcept |
Method to load binary value from configuration.
This method loads binary value from configuration. If the value in the storage is not binary data, the method behaviour is undefined.
[in] | key | Configuration key. |
[out] | value | If the method completes successfully, value will contain loaded value. Otherwise contents of value is unmodified. |
Implements alexaClientSDK::propertiesInterfaces::PropertiesInterface.
|
overridevirtualnoexcept |
Method to inspect existing properties.
This method provides a set of known property keys from a configuration container.
[out] | keys | Container for property keys. If method completes successfully, keys will contain all property names. On error, the contents of keys is undefined. |
Implements alexaClientSDK::propertiesInterfaces::PropertiesInterface.
|
overridevirtualnoexcept |
Method to load string value from configuration.
This method loads string value from configuration. If the value in the storage is not a string, the method behaviour is undefined.
[in] | key | Configuration key. |
[out] | value | Result container. If the method completes successfully, value will contain loaded value. Otherwise contents of value is unmodified. |
Implements alexaClientSDK::propertiesInterfaces::PropertiesInterface.
|
overridevirtualnoexcept |
Method to store binary value into configuration.
This method stores binary value into configuration. If there is an existing value for the the same key, the value is overwritten.
If operation fails, the implementation shall make a best effort for either keeping value unmodified, or clear it to prevent data corruption. Other properties shall not be impacted in case of an error.
[in] | key | Configuration key. |
[in] | value | Value to store. |
Implements alexaClientSDK::propertiesInterfaces::PropertiesInterface.
|
overridevirtualnoexcept |
Method to store string value into configuration.
This method stores string value into configuration. If there is an existing value for the the same key, the value is overwritten.
If operation fails, the implementation shall make a best effort for either keeping value unmodified, or clear it to prevent data corruption. Other properties shall not be impacted in case of an error.
[in] | key | Configuration key. |
[in] | value | Value to store. |
Implements alexaClientSDK::propertiesInterfaces::PropertiesInterface.
|
overridevirtualnoexcept |
Removes a property with a given name.
This method removes a property with a given name from a configuration container. If the property doesn't exist, the method succeeds.
[in] | key | Configuration key to remove. |
Implements alexaClientSDK::propertiesInterfaces::PropertiesInterface.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0