summaryrefslogtreecommitdiffstats
path: root/lib/MiddleWare/MiddleWare.cpp
diff options
context:
space:
mode:
authorZdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com>2009-04-16 17:54:20 +0200
committerZdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com>2009-04-16 17:54:20 +0200
commitb67b664e6f3019a142996c5bdc3a2e8c32f4306a (patch)
tree95aaf34561d8abc9cd59da1229b4ff620ac194e0 /lib/MiddleWare/MiddleWare.cpp
parentd71fe39576ded4e9567f5f938e9ef67183bb8afd (diff)
downloadabrt-b67b664e6f3019a142996c5bdc3a2e8c32f4306a.tar.gz
abrt-b67b664e6f3019a142996c5bdc3a2e8c32f4306a.tar.xz
abrt-b67b664e6f3019a142996c5bdc3a2e8c32f4306a.zip
- reporter plugins can tak an argiment
- added "Reporters" option which allows report basic info after a crash occurs - fixed interface of plugins
Diffstat (limited to 'lib/MiddleWare/MiddleWare.cpp')
-rw-r--r--lib/MiddleWare/MiddleWare.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/MiddleWare/MiddleWare.cpp b/lib/MiddleWare/MiddleWare.cpp
index e1e679a..bc8e9de 100644
--- a/lib/MiddleWare/MiddleWare.cpp
+++ b/lib/MiddleWare/MiddleWare.cpp
@@ -182,8 +182,8 @@ void CMiddleWare::Report(const std::string& pDebugDumpDir)
set_reporters_t::iterator it_r;
for (it_r = m_setReporters.begin(); it_r != m_setReporters.end(); it_r++)
{
- CReporter* reporter = m_pPluginManager->GetReporter(*it_r);
- reporter->Report(crashReport);
+ CReporter* reporter = m_pPluginManager->GetReporter((*it_r).first);
+ reporter->Report(crashReport, (*it_r).second);
}
}
@@ -206,8 +206,8 @@ void CMiddleWare::Report(const map_crash_report_t& pCrashReport)
it_r != m_mapAnalyzerReporters[analyzer].end();
it_r++)
{
- CReporter* reporter = m_pPluginManager->GetReporter(*it_r);
- reporter->Report(pCrashReport);
+ CReporter* reporter = m_pPluginManager->GetReporter((*it_r).first);
+ reporter->Report(pCrashReport, (*it_r).second);
}
}
@@ -337,7 +337,7 @@ void CMiddleWare::RunAnalyzerActions(const std::string& pAnalyzer, const std::st
{
if (m_mapAnalyzerActions.find(pAnalyzer) != m_mapAnalyzerActions.end())
{
- set_actions_t::iterator it_a;
+ set_pairt_strings_t::iterator it_a;
for (it_a = m_mapAnalyzerActions[pAnalyzer].begin();
it_a != m_mapAnalyzerActions[pAnalyzer].end();
it_a++)
@@ -491,9 +491,10 @@ void CMiddleWare::AddBlackListedPackage(const std::string& pPackage)
}
void CMiddleWare::AddAnalyzerReporter(const std::string& pAnalyzer,
- const std::string& pReporter)
+ const std::string& pReporter,
+ const std::string& pArgs)
{
- m_mapAnalyzerReporters[pAnalyzer].insert(pReporter);
+ m_mapAnalyzerReporters[pAnalyzer].insert(make_pair(pReporter, pArgs));
}
void CMiddleWare::AddAnalyzerAction(const std::string& pAnalyzer,
@@ -503,7 +504,8 @@ void CMiddleWare::AddAnalyzerAction(const std::string& pAnalyzer,
m_mapAnalyzerActions[pAnalyzer].insert(make_pair(pAction, pArgs));
}
-void CMiddleWare::AddReporter(const std::string& pReporter)
+void CMiddleWare::AddReporter(const std::string& pReporter,
+ const std::string& pArgs)
{
- m_setReporters.insert(pReporter);
+ m_setReporters.insert(make_pair(pReporter, pArgs));
}