1 #ifndef _CONFIGURATION_H 2 #define _CONFIGURATION_H 15 #include <rapidjson/document.h> 16 #include <config_category.h> 18 #define STORAGE_CATEGORY "Storage" 19 #define CATEGORY_DESCRIPTION "Storage configuration" 20 #define ADVANCED "Advanced" 21 #define CONFIGURATION_CACHE_FILE "storage.json" 36 const char *
getValue(
const std::string& key);
37 bool hasValue(
const std::string& key);
38 bool setValue(
const std::string& key,
const std::string& value);
42 void getConfigCache(std::string& cache);
43 rapidjson::Document *document;
47 void updateStoragePluginConfig();
Fledge Logger class used to log to syslog.
Definition: logger.h:26
DefaultConfigCategory.
Definition: config_category.h:236
The storage service must handle its own configuration differently to other services as it is unable t...
Definition: configuration.h:32
DefaultConfigCategory * getDefaultCategory()
Return the default category to register with the core.
Definition: configuration.cpp:326
StorageConfiguration()
Constructor for storage service configuration class.
Definition: configuration.cpp:121
~StorageConfiguration()
Storage configuration destructor.
Definition: configuration.cpp:142
void updateCategory(const std::string &json)
Called when the configuration category is updated.
Definition: configuration.cpp:200
const char * getValue(const std::string &key)
Return a value from the cached configuration category.
Definition: configuration.cpp:167
bool hasValue(const std::string &key)
Return if a value exsits for the cached configuration category.
Definition: configuration.cpp:150
bool setValue(const std::string &key, const std::string &value)
Set the value of a configuration item.
Definition: configuration.cpp:185