From 4e3c479a0f279926e0bd9a359a0ee57b334e976e Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Fri, 8 Dec 2017 14:22:19 +0100 Subject: Replaced tinytoml with libconfig --- lib/settings/configuration.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/settings/configuration.h') diff --git a/lib/settings/configuration.h b/lib/settings/configuration.h index e0f1872..548b816 100644 --- a/lib/settings/configuration.h +++ b/lib/settings/configuration.h @@ -18,8 +18,8 @@ ** ******************************************************************************/ -#ifndef SETTINGS_H -#define SETTINGS_H +#ifndef CONFIGURATION_H +#define CONFIGURATION_H #include #include @@ -36,6 +36,8 @@ public: ~Configuration(); bool readUserConfiguration(const std::string &path); + bool writeUserConfiguration(const std::string &path); + bool readDefaultConfiguration(const std::string &data); std::vector children(const char *name = ""); @@ -54,6 +56,9 @@ private: libconfig::Config *m_defaultCfg; }; +// replace ~ with home +std::string& patchHome(std::string &path, const std::string &home); + // instantiate functions // this needs to be done because the implementation is in the cpp file @@ -89,4 +94,4 @@ extern template void Configuration::setValue(std::string path, const bool extern template void Configuration::setValue(std::string path, const std::string &val); -#endif // SETTINGS_H +#endif // CONFIGURATION_H -- cgit v1.2.1