diff options
Diffstat (limited to 'lib/MiddleWare/MiddleWare.cpp')
| -rw-r--r-- | lib/MiddleWare/MiddleWare.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/MiddleWare/MiddleWare.cpp b/lib/MiddleWare/MiddleWare.cpp index d2d12a0d..e1e679a8 100644 --- a/lib/MiddleWare/MiddleWare.cpp +++ b/lib/MiddleWare/MiddleWare.cpp @@ -173,6 +173,20 @@ void CMiddleWare::CreateCrashReport(const std::string& pUUID, add_crash_data_to_crash_report(pCrashReport, CD_REPRODUCE, CD_TXT, CD_ISEDITABLE, "1.\n2.\n3.\n"); } +void CMiddleWare::Report(const std::string& pDebugDumpDir) +{ + map_crash_report_t crashReport; + + DebugDumpToCrashReport(pDebugDumpDir, crashReport); + + 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); + } +} + void CMiddleWare::Report(const map_crash_report_t& pCrashReport) { if (pCrashReport.find(CD_MWANALYZER) == pCrashReport.end() || @@ -488,3 +502,8 @@ void CMiddleWare::AddAnalyzerAction(const std::string& pAnalyzer, { m_mapAnalyzerActions[pAnalyzer].insert(make_pair(pAction, pArgs)); } + +void CMiddleWare::AddReporter(const std::string& pReporter) +{ + m_setReporters.insert(pReporter); +} |
