summaryrefslogtreecommitdiffstats
path: root/src/Daemon/Settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Daemon/Settings.cpp')
-rw-r--r--src/Daemon/Settings.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/Daemon/Settings.cpp b/src/Daemon/Settings.cpp
index 83aad1e..fd377e3 100644
--- a/src/Daemon/Settings.cpp
+++ b/src/Daemon/Settings.cpp
@@ -23,7 +23,6 @@ static map_settings_t s_mapSettingsCommon;
static map_settings_t s_mapSettingsAnalyzerActionsAndReporters;
static map_settings_t s_mapSettingsCron;
-
static set_strings_t ParseList(const std::string& pList)
{
unsigned int ii;
@@ -391,3 +390,34 @@ void SaveSettings(const char* pPath)
fOut.close();
}
}
+
+void SetSettings(const map_abrt_settings_t& pSettings)
+{
+ if (pSettings.find(SECTION_COMMON) != pSettings.end())
+ {
+ s_mapSettingsCommon = pSettings.find(SECTION_COMMON)->second;
+ ParseCommon();
+ }
+ if (pSettings.find(SECTION_ANALYZER_ACTIONS_AND_REPORTERS) != pSettings.end())
+ {
+ s_mapSettingsAnalyzerActionsAndReporters = pSettings.find(SECTION_ANALYZER_ACTIONS_AND_REPORTERS)->second;
+ ParseAnalyzerActionsAndReporters();
+ }
+ if (pSettings.find(SECTION_CRON) != pSettings.end())
+ {
+ s_mapSettingsCron = pSettings.find(SECTION_CRON)->second;
+ ParseCron();
+ }
+}
+
+map_abrt_settings_t GetSettings()
+{
+ map_abrt_settings_t ABRTSettings;
+
+ ABRTSettings[SECTION_COMMON] = s_mapSettingsCommon;
+ ABRTSettings[SECTION_ANALYZER_ACTIONS_AND_REPORTERS] = s_mapSettingsAnalyzerActionsAndReporters;
+ ABRTSettings[SECTION_CRON] = s_mapSettingsCron;
+
+ return ABRTSettings;
+}
+