class WeaveConfigManager
Defined at line 69 of file ../../src/connectivity/weave/adaptation/weave_config_manager.h
Singleton class that accepts read/write calls to store key-value pairs.
This class loads a JSON file from a fixed location and uses it as its backing
store. Read requests are handled by quering the in-memory RapidJSON object,
while writes update both the in-memory object and commits the JSON to disk.
It is up to callers of this class to not open the same path across multiple
instances, to prevent R/W interleaving and corrupting the backing file.
Public Methods
void WeaveConfigManager (std::string path)
Defined at line 33 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
WEAVE_ERROR ReadConfigValue (const std::string & key, bool * value)
Defined at line 44 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
WEAVE_ERROR ReadConfigValue (const std::string & key, uint16_t * value)
Defined at line 57 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
WEAVE_ERROR ReadConfigValue (const std::string & key, uint32_t * value)
Defined at line 70 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
void ~WeaveConfigManager ()
Defined at line 73 of file ../../src/connectivity/weave/adaptation/weave_config_manager.h
void WeaveConfigManager (const WeaveConfigManager & )
Defined at line 74 of file ../../src/connectivity/weave/adaptation/weave_config_manager.h
void WeaveConfigManager (WeaveConfigManager && )
Defined at line 75 of file ../../src/connectivity/weave/adaptation/weave_config_manager.h
WeaveConfigManager & operator= (const WeaveConfigManager & )
Defined at line 76 of file ../../src/connectivity/weave/adaptation/weave_config_manager.h
WeaveConfigManager & operator= (WeaveConfigManager && )
Defined at line 77 of file ../../src/connectivity/weave/adaptation/weave_config_manager.h
WEAVE_ERROR ReadConfigValue (const std::string & key, uint64_t * value)
Defined at line 83 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
WEAVE_ERROR ReadConfigValueStr (const std::string & key, char * value, size_t value_size, size_t * out_size)
Defined at line 96 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
std::unique_ptr<WeaveConfigManager> CreateInstance (const std::string & path)
Returns a read/write interface to this instance of WeaveConfigManager.
Defined at line 111 of file ../../src/connectivity/weave/adaptation/weave_config_manager.h
WEAVE_ERROR ReadConfigValueArray (const std::string & key, std::vector<std::string> & out)
Defined at line 142 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
WEAVE_ERROR ReadConfigValueBin (const std::string & key, uint8_t * value, size_t value_size, size_t * out_size)
Defined at line 119 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
bool ConfigValueExists (const std::string & key)
Defined at line 211 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
WEAVE_ERROR WriteConfigValue (const std::string & key, bool value)
Defined at line 162 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
WEAVE_ERROR WriteConfigValue (const std::string & key, uint32_t value)
Defined at line 166 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
WEAVE_ERROR WriteConfigValue (const std::string & key, uint64_t value)
Defined at line 170 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
WEAVE_ERROR WriteConfigValueArray (const std::string & key, std::vector<std::string> & value)
Defined at line 191 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
WEAVE_ERROR WriteConfigValueStr (const std::string & key, const char * value, size_t value_size)
Defined at line 174 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
WEAVE_ERROR WriteConfigValueBin (const std::string & key, const uint8_t * value, size_t value_size)
Defined at line 184 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
WEAVE_ERROR ClearConfigValue (const std::string & key)
Defined at line 205 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
WEAVE_ERROR FactoryResetConfig ()
Defined at line 216 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
WEAVE_ERROR SetConfiguration (const std::string & path, const std::string & schema_path, bool should_replace)
Manager-only interface to set the given values on this configuration. The values in the
existing configuration will be overridden if should_replace is true.
Defined at line 254 of file ../../src/connectivity/weave/adaptation/weave_config_manager.cpp
Friends
WeaveConfigManager & WeaveConfigManager ()