aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/config.h6
-rw-r--r--src/config.cpp8
2 files changed, 11 insertions, 3 deletions
diff --git a/include/config.h b/include/config.h
index 1612cd7e7..03548319a 100644
--- a/include/config.h
+++ b/include/config.h
@@ -27,22 +27,22 @@ class Config
void set(const std::string&, const std::string&,
const std::string&, bool = true);
+ std::string option(const std::string&) const;
u32bit option_as_u32bit(const std::string&) const;
u32bit option_as_time(const std::string&) const;
bool option_as_bool(const std::string&) const;
std::vector<std::string> option_as_list(const std::string&) const;
+ void set_option(const std::string, const std::string&);
+
void add_alias(const std::string&, const std::string&);
std::string deref_alias(const std::string&) const;
- std::string option(const std::string&) const;
-
void load_inifile(const std::string&);
static void choose_sig_format(const std::string&, std::string&,
Signature_Format&);
private:
-
std::map<std::string, std::string> settings;
};
diff --git a/src/config.cpp b/src/config.cpp
index a3bcfa1fd..139e1d410 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -82,6 +82,14 @@ std::string Config::deref_alias(const std::string& key) const
}
/*************************************************
+* Set/Add an option *
+*************************************************/
+void Config::set_option(const std::string key, const std::string& value)
+ {
+ set("conf", key, value);
+ }
+
+/*************************************************
* Get an option value *
*************************************************/
std::string Config::option(const std::string& key) const