summaryrefslogtreecommitdiffstats
path: root/lib/MiddleWare
diff options
context:
space:
mode:
authorZdenek Prikryl <zprikryl@redhat.com>2009-08-14 20:59:43 +0200
committerZdenek Prikryl <zprikryl@redhat.com>2009-08-14 20:59:43 +0200
commit3c226c987f5015e8184bfc4293ee9f9b2f7b8f67 (patch)
treeb2ec9e8f5ec3140008a15cccea4030c438dbe72e /lib/MiddleWare
parent15e44fefb8e0ce093e91bc0fd96302c6b77bf92a (diff)
downloadabrt-3c226c987f5015e8184bfc4293ee9f9b2f7b8f67.tar.gz
abrt-3c226c987f5015e8184bfc4293ee9f9b2f7b8f67.tar.xz
abrt-3c226c987f5015e8184bfc4293ee9f9b2f7b8f67.zip
added support for storing results from reporters (used from gui)
Diffstat (limited to 'lib/MiddleWare')
-rw-r--r--lib/MiddleWare/Database.h7
-rw-r--r--lib/MiddleWare/Plugin.h2
-rw-r--r--lib/MiddleWare/Reporter.h5
3 files changed, 10 insertions, 4 deletions
diff --git a/lib/MiddleWare/Database.h b/lib/MiddleWare/Database.h
index 36238469..6566f41b 100644
--- a/lib/MiddleWare/Database.h
+++ b/lib/MiddleWare/Database.h
@@ -40,6 +40,7 @@
#define DATABASE_COLUMN_DEBUG_DUMP_PATH "DebugDumpPath"
#define DATABASE_COLUMN_COUNT "Count"
#define DATABASE_COLUMN_REPORTED "Reported"
+#define DATABASE_COLUMN_MESSAGE "Message"
#define DATABASE_COLUMN_TIME "Time"
/**
@@ -52,6 +53,7 @@ typedef struct SDatabaseRow
std::string m_sDebugDumpDir; /**< A debugdump directory of a crash.*/
std::string m_sCount; /**< Crash rate.*/
std::string m_sReported; /**< Is a row reported?*/
+ std::string m_sMessage; /**< if a row is reported, then there can be store message abotu that*/
std::string m_sTime; /**< Time of last occurred crash with same local UUID*/
} database_row_t;
@@ -96,9 +98,12 @@ class CDatabase : public CPlugin
* A method, which sets that particular row was reported.
* @param pUUID A local UUID of a crash.
* @param pUID An UID of an user.
+ * @param pMessga A text explanation of reported problem (where
+ * it is stored etc...
*/
virtual void SetReported(const std::string& pUUID,
- const std::string& pUID) = 0;
+ const std::string& pUID,
+ const std::string& pMessage) = 0;
/**
* A method, which gets all rows which belongs to particular user.
* If the user is root, then all rows are returned. If there are no
diff --git a/lib/MiddleWare/Plugin.h b/lib/MiddleWare/Plugin.h
index a0b64aea..638840ff 100644
--- a/lib/MiddleWare/Plugin.h
+++ b/lib/MiddleWare/Plugin.h
@@ -26,7 +26,7 @@
#include <string>
#include <map>
-#define PLUGINS_MAGIC_NUMBER 5
+#define PLUGINS_MAGIC_NUMBER 6
#define PLUGINS_CONF_EXTENSION "conf"
#define PLUGINS_LIB_EXTENSION "so"
diff --git a/lib/MiddleWare/Reporter.h b/lib/MiddleWare/Reporter.h
index 810b3169..c74a10c3 100644
--- a/lib/MiddleWare/Reporter.h
+++ b/lib/MiddleWare/Reporter.h
@@ -38,9 +38,10 @@ class CReporter : public CPlugin
* by itself.
* @param pCrashReport A crash report.
* @param pArgs Plugin's arguments.
+ * @retun A message which can be displayed after a report is created.
*/
- virtual void Report(const map_crash_report_t& pCrashReport,
- const std::string& pArgs) = 0;
+ virtual std::string Report(const map_crash_report_t& pCrashReport,
+ const std::string& pArgs) = 0;
};
#endif /* REPORTER_H_ */