diff options
-rw-r--r-- | src/Daemon/Daemon.cpp | 30 | ||||
-rw-r--r-- | src/Daemon/MiddleWare.h | 2 | ||||
-rw-r--r-- | src/Daemon/Settings.cpp | 18 | ||||
-rw-r--r-- | src/Daemon/Settings.h | 15 |
4 files changed, 32 insertions, 33 deletions
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index 90bf6056..56c65d99 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -152,36 +152,36 @@ static void SetUpMW() { ::SetOpenGPGCheck(g_pSettings->GetOpenGPGCheck()); ::SetDatabase(g_pSettings->GetDatabase()); - CSettings::set_strings_t openGPGPublicKeys = g_pSettings->GetOpenGPGPublicKeys(); - CSettings::set_strings_t::iterator it_k; + set_strings_t openGPGPublicKeys = g_pSettings->GetOpenGPGPublicKeys(); + set_strings_t::iterator it_k; for (it_k = openGPGPublicKeys.begin(); it_k != openGPGPublicKeys.end(); it_k++) { ::AddOpenGPGPublicKey(*it_k); } - CSettings::set_strings_t blackList = g_pSettings->GetBlackList(); - CSettings::set_strings_t::iterator it_b; + set_strings_t blackList = g_pSettings->GetBlackList(); + set_strings_t::iterator it_b; for (it_b = blackList.begin(); it_b != blackList.end(); it_b++) { ::AddBlackListedPackage(*it_b); } - CSettings::set_strings_t enabledPlugins = g_pSettings->GetEnabledPlugins(); - CSettings::set_strings_t::iterator it_p; + set_strings_t enabledPlugins = g_pSettings->GetEnabledPlugins(); + set_strings_t::iterator it_p; for (it_p = enabledPlugins.begin(); it_p != enabledPlugins.end(); it_p++) { g_pPluginManager->RegisterPlugin(*it_p); } - CSettings::vector_pair_strings_t actionsAndReporters = g_pSettings->GetActionsAndReporters(); - CSettings::vector_pair_strings_t::iterator it_ar; + vector_pair_strings_t actionsAndReporters = g_pSettings->GetActionsAndReporters(); + vector_pair_strings_t::iterator it_ar; for (it_ar = actionsAndReporters.begin(); it_ar != actionsAndReporters.end(); it_ar++) { ::AddActionOrReporter((*it_ar).first, (*it_ar).second); } - CSettings::map_analyzer_actions_and_reporters_t analyzerActionsAndReporters = g_pSettings->GetAnalyzerActionsAndReporters(); - CSettings::map_analyzer_actions_and_reporters_t::iterator it_aar; + map_analyzer_actions_and_reporters_t analyzerActionsAndReporters = g_pSettings->GetAnalyzerActionsAndReporters(); + map_analyzer_actions_and_reporters_t::iterator it_aar; for (it_aar = analyzerActionsAndReporters.begin(); it_aar != analyzerActionsAndReporters.end(); it_aar++) { - CSettings::vector_pair_strings_t::iterator it_ar; + vector_pair_strings_t::iterator it_ar; for (it_ar = it_aar->second.begin(); it_ar != it_aar->second.end(); it_ar++) { ::AddAnalyzerActionOrReporter(it_aar->first, (*it_ar).first, (*it_ar).second); @@ -191,8 +191,8 @@ static void SetUpMW() static void SetUpCron() { - CSettings::map_cron_t cron = g_pSettings->GetCron(); - CSettings::map_cron_t::iterator it_c; + map_cron_t cron = g_pSettings->GetCron(); + map_cron_t::iterator it_c; for (it_c = cron.begin(); it_c != cron.end(); it_c++) { std::string::size_type pos = it_c->first.find(":"); @@ -229,7 +229,7 @@ static void SetUpCron() if (nS != -1) { - CSettings::vector_pair_strings_t::iterator it_ar; + vector_pair_strings_t::iterator it_ar; for (it_ar = it_c->second.begin(); it_ar != it_c->second.end(); it_ar++) { cron_callback_data_t* cronPeriodicCallbackData = new cron_callback_data_t((*it_ar).first, (*it_ar).second, timeout); @@ -261,7 +261,7 @@ static void SetUpCron() { timeout = nextTime - actTime; } - CSettings::vector_pair_strings_t::iterator it_ar; + vector_pair_strings_t::iterator it_ar; for (it_ar = it_c->second.begin(); it_ar != it_c->second.end(); it_ar++) { diff --git a/src/Daemon/MiddleWare.h b/src/Daemon/MiddleWare.h index ef49c233..fe380a00 100644 --- a/src/Daemon/MiddleWare.h +++ b/src/Daemon/MiddleWare.h @@ -122,7 +122,7 @@ std::string DeleteCrashInfo(const std::string& pUUID, */ mw_result_t SaveDebugDump(const std::string& pDebugDumpDir); /** - * Saves debugdump into database. If saving is sucessful + * Saves debugdump into database. If saving is successful, * it fills crash info. * @param pDebugDumpDir A debugdump directory. * @param pCrashInfo A crash info. diff --git a/src/Daemon/Settings.cpp b/src/Daemon/Settings.cpp index b12ceba6..4c85b999 100644 --- a/src/Daemon/Settings.cpp +++ b/src/Daemon/Settings.cpp @@ -160,7 +160,7 @@ void CSettings::ParseCron() } } -CSettings::vector_pair_strings_t CSettings::ParseListWithArgs(const std::string& pValue) +vector_pair_strings_t CSettings::ParseListWithArgs(const std::string& pValue) { vector_pair_strings_t pluginsWithArgs; unsigned int ii; @@ -208,7 +208,7 @@ CSettings::vector_pair_strings_t CSettings::ParseListWithArgs(const std::string& return pluginsWithArgs; } -CSettings::set_strings_t CSettings::ParseKey(const std::string& Key) +set_strings_t CSettings::ParseKey(const std::string& Key) { unsigned int ii; std::string item = ""; @@ -250,7 +250,7 @@ CSettings::set_strings_t CSettings::ParseKey(const std::string& Key) return set; } -CSettings::set_strings_t CSettings::ParseList(const std::string& pList) +set_strings_t CSettings::ParseList(const std::string& pList) { unsigned int ii; std::string item = ""; @@ -275,17 +275,17 @@ CSettings::set_strings_t CSettings::ParseList(const std::string& pList) } -const CSettings::set_strings_t& CSettings::GetBlackList() +const set_strings_t& CSettings::GetBlackList() { return m_setBlackList; } -const CSettings::set_strings_t& CSettings::GetEnabledPlugins() +const set_strings_t& CSettings::GetEnabledPlugins() { return m_setEnabledPlugins; } -const CSettings::set_strings_t& CSettings::GetOpenGPGPublicKeys() +const set_strings_t& CSettings::GetOpenGPGPublicKeys() { return m_setOpenGPGPublicKeys; } @@ -295,7 +295,7 @@ bool CSettings::GetOpenGPGCheck() return m_bOpenGPGCheck; } -const CSettings::map_analyzer_actions_and_reporters_t& CSettings::GetAnalyzerActionsAndReporters() +const map_analyzer_actions_and_reporters_t& CSettings::GetAnalyzerActionsAndReporters() { return m_mapAnalyzerActionsAndReporters; } @@ -305,7 +305,7 @@ const unsigned int& CSettings::GetMaxCrashReportsSize() return m_nMaxCrashReportsSize; } -const CSettings::vector_pair_strings_t& CSettings::GetActionsAndReporters() +const vector_pair_strings_t& CSettings::GetActionsAndReporters() { return m_vectorActionsAndReporters; } @@ -315,7 +315,7 @@ const std::string& CSettings::GetDatabase() return m_sDatabase; } -const CSettings::map_cron_t& CSettings::GetCron() +const map_cron_t& CSettings::GetCron() { return m_mapCron; } diff --git a/src/Daemon/Settings.h b/src/Daemon/Settings.h index 1bb264c1..8869c728 100644 --- a/src/Daemon/Settings.h +++ b/src/Daemon/Settings.h @@ -8,16 +8,15 @@ #include "MiddleWareTypes.h" +typedef std::map<std::string, std::string> map_settings_t; +typedef std::set<std::string> set_strings_t; +typedef std::pair<std::string, std::string> pair_string_string_t; +typedef std::vector<pair_string_string_t> vector_pair_strings_t; +typedef std::map<std::string, vector_pair_strings_t> map_analyzer_actions_and_reporters_t; +typedef std::map<std::string, vector_pair_strings_t> map_cron_t; + class CSettings { - public: - typedef std::map<std::string, std::string> map_settings_t; - typedef std::set<std::string> set_strings_t; - typedef std::pair<std::string, std::string> pair_string_string_t; - typedef std::vector<pair_string_string_t> vector_pair_strings_t; - typedef std::map<std::string, vector_pair_strings_t> map_analyzer_actions_and_reporters_t; - typedef std::map<std::string, vector_pair_strings_t> map_cron_t; - private: map_settings_t m_mapSettingsCommon; map_settings_t m_mapSettingsAnalyzerActionsAndReporters; |