AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Namespaces | Classes | Enumerations | Functions | Variables
alexaClientSDK::properties Namespace Reference

Properties Implementation. More...

Namespaces

 test
 Test cases for Properties Implementation.
 

Classes

class  ErrorCallbackInterface
 Callback interface to handle errors. More...
 
class  MiscStorageUriMapperInterface
 Interface to map properties config URI into component name and table name. More...
 
class  SimpleMiscStorageUriMapper
 Generic URI mapper for MiscStorageInterface adapter. More...
 

Enumerations

enum  StatusCode {
  StatusCode::SUCCESS = 1, StatusCode::UNKNOWN_ERROR = 2, StatusCode::HSM_ERROR = 3, StatusCode::CRYPTO_ERROR = 4,
  StatusCode::DIGEST_ERROR = 5, StatusCode::INNER_PROPERTIES_ERROR = 6
}
 Possible error causes. More...
 
enum  Action { Action::CONTINUE = 1, Action::FAIL = 2, Action::CLEAR_DATA = 3, Action::RETRY = 4 }
 Error action. More...
 

Functions

std::shared_ptr< PropertiesFactoryInterfacecreateEncryptedPropertiesFactory (const std::shared_ptr< PropertiesFactoryInterface > &innerFactory, const std::shared_ptr< CryptoFactoryInterface > &cryptoFactory, const std::shared_ptr< KeyStoreInterface > &keyStore) noexcept
 Creates properties factory with encryption support by wrapping a factory without encryption support. More...
 
std::shared_ptr< PropertiesFactoryInterfacecreateEncryptedPropertiesFactory (const std::shared_ptr< MiscStorageInterface > &innerStorage, const std::shared_ptr< MiscStorageUriMapperInterface > &uriMapper, const std::shared_ptr< CryptoFactoryInterface > &cryptoFactory, const std::shared_ptr< KeyStoreInterface > &keyStore) noexcept
 Creates properties factory with encryption support by wrapping a MiscStorageInterface. More...
 
bool setErrorCallback (const std::weak_ptr< ErrorCallbackInterface > &callback, uint32_t maxRetries=DEFAULT_MAX_RETRIES, std::weak_ptr< ErrorCallbackInterface > *previous=nullptr) noexcept
 Sets an error callback. More...
 
std::shared_ptr< PropertiesFactoryInterfacecreatePropertiesFactory (const std::shared_ptr< MiscStorageInterface > &innerStorage, const std::shared_ptr< MiscStorageUriMapperInterface > &nameMapper=SimpleMiscStorageUriMapper::create()) noexcept
 Creates PropertiesFactoryInterface from MiscStorageInterface. More...
 

Variables

static constexpr uint32_t DEFAULT_MAX_RETRIES = 16u
 Default number of retries when using error callback interface. More...
 
static constexpr uint32_t UNLIMITED_RETRIES = UINT32_MAX
 Unlimited number of retries when using error callback interface. More...
 

Detailed Description

Properties Implementation.

Function Documentation

◆ createEncryptedPropertiesFactory()

std::shared_ptr<PropertiesFactoryInterface> alexaClientSDK::properties::createEncryptedPropertiesFactory ( const std::shared_ptr< PropertiesFactoryInterface > &  innerFactory,
const std::shared_ptr< CryptoFactoryInterface > &  cryptoFactory,
const std::shared_ptr< KeyStoreInterface > &  keyStore 
)
noexcept

Creates properties factory with encryption support by wrapping a factory without encryption support.

Encrypted properties factory protects all values using AES-256 cipher. The data key is stored as one of the underlying properties with reserved name "$acsdkEncryption$" in encrypted form. Hardware security module is used for storing the main encryption key and wrapping/unwrapping data keys.

When client code accesses PropertiesInterface through encrypted PropertiesFactoryInterface, all existing data is automatically converted into encrypted form.

Parameters
[in]innerFactoryProperties factory without encryption support.
[in]cryptoFactoryCrypto factory reference. This parameter must not be nullptr.
[in]keyStoreKey store factory reference. This parameter must not be nullptr.
Returns
Properties factory reference or nullptr on error.

Variable Documentation

◆ DEFAULT_MAX_RETRIES

constexpr uint32_t alexaClientSDK::properties::DEFAULT_MAX_RETRIES = 16u
static

Default number of retries when using error callback interface.

Number of retries limits number of error handling attempts when implementation encounters a recoverable error. If retry callback requests more than the given number of retries, the operation is considered as failed.

See also
setErrorCallback()

◆ UNLIMITED_RETRIES

constexpr uint32_t alexaClientSDK::properties::UNLIMITED_RETRIES = UINT32_MAX
static

Unlimited number of retries when using error callback interface.

If this value is used when setting error callback, the implementation will never give up on retries unless callback tell to do so.

See also
setErrorCallback()

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