summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorZdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com>2009-04-02 14:08:26 +0200
committerZdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com>2009-04-02 14:08:26 +0200
commitfd1adf298726ccb55bbc8b4801543be6e3e0befb (patch)
tree1231097e046276a2ee236e6e0bc3b7021281a28f /lib
parent8e42e0af34641cb0e7d20ec6c2dfcadae4811436 (diff)
downloadabrt-fd1adf298726ccb55bbc8b4801543be6e3e0befb.tar.gz
abrt-fd1adf298726ccb55bbc8b4801543be6e3e0befb.tar.xz
abrt-fd1adf298726ccb55bbc8b4801543be6e3e0befb.zip
try to add action plugin, not complete commit
Diffstat (limited to 'lib')
-rw-r--r--lib/MiddleWare/MiddleWare.cpp10
-rw-r--r--lib/MiddleWare/MiddleWare.h9
-rw-r--r--lib/MiddleWare/MiddleWareTypes.h1
3 files changed, 12 insertions, 8 deletions
diff --git a/lib/MiddleWare/MiddleWare.cpp b/lib/MiddleWare/MiddleWare.cpp
index 109fc3a..a99fb6e 100644
--- a/lib/MiddleWare/MiddleWare.cpp
+++ b/lib/MiddleWare/MiddleWare.cpp
@@ -137,6 +137,7 @@ void CMiddleWare::CreateCrashReport(const std::string& pUUID,
dd.SaveText(FILENAME_UUID, UUID);
dd.Close();
+ //RunAnalyzerActions(analyzer, row.m_sDebugDumpDir);
DebugDumpToCrashReport(row.m_sDebugDumpDir, pCrashReport);
crash_file_t file;
@@ -290,6 +291,10 @@ int CMiddleWare::SaveUUIDToDebugDump(const std::string& pDebugDumpDir)
return 1;
}
+void CMiddleWare::RunAnalyzerActions(const std::string& pAnalyzer, const std::string& pDebugDumpDir)
+{
+}
+
int CMiddleWare::SaveDebugDumpToDatabase(const std::string& pDebugDumpDir, crash_info_t& pCrashInfo)
{
CDatabase* database = m_pPluginManager->GetDatabase(m_sDatabase);
@@ -443,8 +448,7 @@ void CMiddleWare::AddAnalyzerReporter(const std::string& pAnalyzer,
}
void CMiddleWare::AddAnalyzerAction(const std::string& pAnalyzer,
- const std::string& pAction,
- const vector_strings_t& pArgs)
+ const set_actions_t& pActions)
{
- m_mapAnalyzerActions[pAnalyzer][pAction] = pArgs;
+ m_mapAnalyzerActions[pAnalyzer] = pActions;
}
diff --git a/lib/MiddleWare/MiddleWare.h b/lib/MiddleWare/MiddleWare.h
index 2986b7e..7774954 100644
--- a/lib/MiddleWare/MiddleWare.h
+++ b/lib/MiddleWare/MiddleWare.h
@@ -36,8 +36,8 @@ class CMiddleWare
typedef set_strings_t set_enabled_plugins_t;
typedef set_strings_t set_reporters_t;
typedef std::map<std::string, set_reporters_t> map_reporter_associations_t;
- typedef std::map<std::string, vector_strings_t> map_single_actions_t;
- typedef std::map<std::string, map_single_actions_t> map_action_associations_t;
+ typedef std::set<pair_string_string_t> set_actions_t;
+ typedef std::map<std::string, set_actions_t> map_action_associations_t;
CPluginManager* m_pPluginManager;
CRPM m_RPM;
@@ -54,7 +54,7 @@ class CMiddleWare
const std::string& pDebugDumpDir);
void CreateReport(const std::string& pAnalyzer,
const std::string& pDebugDumpDir);
-
+ void RunAnalyzerActions(const std::string& pAnalyzer, const std::string& pDebugDumpDir);
void DebugDumpToCrashReport(const std::string& pDebugDumpDir,
crash_report_t& pCrashReport);
@@ -98,8 +98,7 @@ class CMiddleWare
void AddAnalyzerReporter(const std::string& pAnalyzer,
const std::string& pReporter);
void AddAnalyzerAction(const std::string& pAnalyzer,
- const std::string& pAction,
- const vector_strings_t& pArgs);
+ const set_actions_t& pActions);
};
#endif /*MIDDLEWARE_H_*/
diff --git a/lib/MiddleWare/MiddleWareTypes.h b/lib/MiddleWare/MiddleWareTypes.h
index 5f8ee6a..fe37715 100644
--- a/lib/MiddleWare/MiddleWareTypes.h
+++ b/lib/MiddleWare/MiddleWareTypes.h
@@ -7,6 +7,7 @@
#include <string>
typedef std::vector<std::string> vector_strings_t;
+typedef std::pair<std::string, std::string> pair_string_string_t;
typedef std::map<std::string, std::string> map_string_string_t;
typedef std::set<std::string> set_strings_t;