aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/config.hh
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2020-05-27 14:39:02 +0200
committerAndreas Rammhold <andreas@rammhold.de>2020-05-27 17:47:18 +0200
commite1b8c64c04b40694418de87e3e0d118cf0677bfc (patch)
tree05a8f2c5d753b468579c3d4b781f57acbaeaf98e /src/libutil/config.hh
parent93129cf1ddf7f91ddec11ba7a6a364ab54f345c5 (diff)
config.cc: extract parts of applyConfigFile into applyConfig
This moves the actual parsing of configuration contents into applyConfig which applyConfigFile is then going to call. By changing this we can now test the configuration file parsing without actually create a file on disk.
Diffstat (limited to 'src/libutil/config.hh')
-rw-r--r--src/libutil/config.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libutil/config.hh b/src/libutil/config.hh
index 7ea78fdaf..b04cba88b 100644
--- a/src/libutil/config.hh
+++ b/src/libutil/config.hh
@@ -33,6 +33,7 @@ public:
virtual void getSettings(std::map<std::string, SettingInfo> & res, bool overridenOnly = false) = 0;
+ void applyConfig(const std::string & contents, const std::string & path = "<unknown>");
void applyConfigFile(const Path & path);
virtual void resetOverriden() = 0;