diff options
| author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-08-17 11:48:18 +0200 |
|---|---|---|
| committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-08-17 11:48:18 +0200 |
| commit | 19329569c399e944d24d293c5ee90c945ed482a1 (patch) | |
| tree | ed90a82a85a36e614b397a784bda46b91cb7a6e3 /lib/CommLayer | |
| parent | 3c226c987f5015e8184bfc4293ee9f9b2f7b8f67 (diff) | |
| download | abrt-19329569c399e944d24d293c5ee90c945ed482a1.tar.gz abrt-19329569c399e944d24d293c5ee90c945ed482a1.tar.xz abrt-19329569c399e944d24d293c5ee90c945ed482a1.zip | |
GUI now show the status window after report to let user know how did it go.
Diffstat (limited to 'lib/CommLayer')
| -rw-r--r-- | lib/CommLayer/CommLayerServer.h | 2 | ||||
| -rw-r--r-- | lib/CommLayer/CommLayerServerDBus.cpp | 12 | ||||
| -rw-r--r-- | lib/CommLayer/CommLayerServerDBus.h | 3 | ||||
| -rw-r--r-- | lib/CommLayer/CommLayerServerSocket.cpp | 7 | ||||
| -rw-r--r-- | lib/CommLayer/CommLayerServerSocket.h | 3 | ||||
| -rw-r--r-- | lib/CommLayer/DBusCommon.h | 1 | ||||
| -rw-r--r-- | lib/CommLayer/DBusServerProxy.cpp | 2 | ||||
| -rw-r--r-- | lib/CommLayer/DBusServerProxy.h | 2 | ||||
| -rw-r--r-- | lib/CommLayer/Observer.h | 2 |
9 files changed, 22 insertions, 12 deletions
diff --git a/lib/CommLayer/CommLayerServer.h b/lib/CommLayer/CommLayerServer.h index 0acb7d7..7601fa1 100644 --- a/lib/CommLayer/CommLayerServer.h +++ b/lib/CommLayer/CommLayerServer.h @@ -37,7 +37,7 @@ class CCommLayerServer { virtual vector_crash_infos_t GetCrashInfos(const std::string &pSender) = 0; virtual map_crash_report_t CreateReport(const std::string &pUUID,const std::string &pSender) = 0; - virtual bool Report(map_crash_report_t pReport,const std::string &pSender) = 0; + virtual report_status_t Report(map_crash_report_t pReport,const std::string &pSender) = 0; virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pSender) = 0; public: diff --git a/lib/CommLayer/CommLayerServerDBus.cpp b/lib/CommLayer/CommLayerServerDBus.cpp index 5d5972a..90a7878 100644 --- a/lib/CommLayer/CommLayerServerDBus.cpp +++ b/lib/CommLayer/CommLayerServerDBus.cpp @@ -61,11 +61,12 @@ uint64_t CCommLayerServerDBus::CreateReport_t(const std::string &pUUID,const std return job_id; } -bool CCommLayerServerDBus::Report(map_crash_report_t pReport,const std::string &pSender) +report_status_t CCommLayerServerDBus::Report(map_crash_report_t pReport,const std::string &pSender) { + report_status_t rs; unsigned long unix_uid = m_pConn->sender_unix_uid(pSender.c_str()); - m_pObserver->Report(pReport, to_string(unix_uid)); - return true; + rs = m_pObserver->Report(pReport, to_string(unix_uid)); + return rs; } bool CCommLayerServerDBus::DeleteDebugDump(const std::string& pUUID, const std::string& pSender) @@ -108,6 +109,11 @@ void CCommLayerServerDBus::JobDone(const std::string &pDest, uint64_t pJobID) CDBusServer_adaptor::JobDone(pDest, pJobID); } +void CCommLayerServerDBus::Warning(const std::string& pDest, const std::string& pMessage) +{ + CDBusServer_adaptor::Warning(pMessage); +} + vector_map_string_string_t CCommLayerServerDBus::GetPluginsInfo() { //FIXME: simplify? diff --git a/lib/CommLayer/CommLayerServerDBus.h b/lib/CommLayer/CommLayerServerDBus.h index 736a445..d241c63 100644 --- a/lib/CommLayer/CommLayerServerDBus.h +++ b/lib/CommLayer/CommLayerServerDBus.h @@ -23,7 +23,7 @@ class CCommLayerServerDBus /*FIXME: fix CLI and remove this stub*/ virtual map_crash_report_t CreateReport(const std::string &pUUID,const std::string &pSender){map_crash_report_t retval; return retval;}; virtual uint64_t CreateReport_t(const std::string &pUUID,const std::string &pSender); - virtual bool Report(map_crash_report_t pReport,const std::string &pSender); + virtual report_status_t Report(map_crash_report_t pReport,const std::string &pSender); virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pSender); virtual map_crash_report_t GetJobResult(uint64_t pJobID, const std::string& pSender); virtual vector_map_string_string_t GetPluginsInfo(); @@ -37,5 +37,6 @@ class CCommLayerServerDBus virtual void Error(const std::string& arg1); virtual void Update(const std::string& pDest, const std::string& pMessage); virtual void JobDone(const std::string &pDest, uint64_t pJobID); + virtual void Warning(const std::string& pDest, const std::string& pMessage); }; diff --git a/lib/CommLayer/CommLayerServerSocket.cpp b/lib/CommLayer/CommLayerServerSocket.cpp index dd00489..f5466d4 100644 --- a/lib/CommLayer/CommLayerServerSocket.cpp +++ b/lib/CommLayer/CommLayerServerSocket.cpp @@ -219,10 +219,11 @@ map_crash_report_t CCommLayerServerSocket::CreateReport(const std::string &pUUID return crashReport; } -bool CCommLayerServerSocket::Report(map_crash_report_t pReport, const std::string& pSender) +report_status_t CCommLayerServerSocket::Report(map_crash_report_t pReport, const std::string& pSender) { - m_pObserver->Report(pReport, pSender); - return true; + report_status_t rs; + rs = m_pObserver->Report(pReport, pSender); + return rs; } bool CCommLayerServerSocket::DeleteDebugDump(const std::string& pUUID, const std::string& pSender) diff --git a/lib/CommLayer/CommLayerServerSocket.h b/lib/CommLayer/CommLayerServerSocket.h index 409780f..2dc9a7a 100644 --- a/lib/CommLayer/CommLayerServerSocket.h +++ b/lib/CommLayer/CommLayerServerSocket.h @@ -1,4 +1,5 @@ #include "CommLayerServer.h" +#include "DBusCommon.h" #include <glib.h> #define SOCKET_FILE VAR_RUN"/abrt.socket" @@ -27,7 +28,7 @@ class CCommLayerServerSocket : public CCommLayerServer virtual vector_crash_infos_t GetCrashInfos(const std::string &pSender); virtual map_crash_report_t CreateReport(const std::string &pUUID,const std::string &pSender); - virtual bool Report(map_crash_report_t pReport, const std::string& pSender); + virtual report_status_t Report(map_crash_report_t pReport, const std::string& pSender); virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pSender); virtual void Crash(const std::string& arg1); diff --git a/lib/CommLayer/DBusCommon.h b/lib/CommLayer/DBusCommon.h index 7ccaa8b..0addf08 100644 --- a/lib/CommLayer/DBusCommon.h +++ b/lib/CommLayer/DBusCommon.h @@ -25,3 +25,4 @@ typedef std::map<std::string, std::string> map_string_string_t; typedef std::vector<map_string_string_t> vector_map_string_string_t; typedef std::map<std::string, std::string> map_plugin_settings_t; +typedef std::map<std::string, vector_strings_t> report_status_t; diff --git a/lib/CommLayer/DBusServerProxy.cpp b/lib/CommLayer/DBusServerProxy.cpp index 5c785ce..5730fd5 100644 --- a/lib/CommLayer/DBusServerProxy.cpp +++ b/lib/CommLayer/DBusServerProxy.cpp @@ -168,7 +168,7 @@ DBus::Message CDBusServer_adaptor::_Report_stub(const DBus::CallMessage &call) DBus::MessageIter ri = call.reader(); map_crash_report_t argin1; ri >> argin1; - bool argout1 = Report(argin1, call.sender()); + report_status_t argout1 = Report(argin1, call.sender()); DBus::ReturnMessage reply(call); DBus::MessageIter wi = reply.writer(); wi << argout1; diff --git a/lib/CommLayer/DBusServerProxy.h b/lib/CommLayer/DBusServerProxy.h index 5f767bc..a68a44f 100644 --- a/lib/CommLayer/DBusServerProxy.h +++ b/lib/CommLayer/DBusServerProxy.h @@ -46,7 +46,7 @@ public: virtual vector_crash_infos_t GetCrashInfos(const std::string &pDBusSender) = 0; virtual map_crash_report_t CreateReport(const std::string &pUUID, const std::string &pDBusSender) = 0; virtual uint64_t CreateReport_t(const std::string &pUUID, const std::string &pDBusSender) = 0; - virtual bool Report(map_crash_report_t pReport, const std::string &pDBusSender) = 0; + virtual report_status_t Report(map_crash_report_t pReport, const std::string &pDBusSender) = 0; virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pDBusSender) = 0; virtual map_crash_report_t GetJobResult(uint64_t pJobID, const std::string& pDBusSender) = 0; virtual vector_map_string_string_t GetPluginsInfo() = 0; diff --git a/lib/CommLayer/Observer.h b/lib/CommLayer/Observer.h index 46b6226..02b51ce 100644 --- a/lib/CommLayer/Observer.h +++ b/lib/CommLayer/Observer.h @@ -22,7 +22,7 @@ class CObserver { std::cout << "DEFAULT OBSERVER"; return 0; } - virtual bool Report(map_crash_report_t pReport, const std::string &pSender) = 0; + virtual report_status_t Report(map_crash_report_t pReport, const std::string &pSender) = 0; virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pSender) = 0; virtual map_crash_report_t GetJobResult(uint64_t pJobID, const std::string &pSender) = 0; virtual vector_map_string_string_t GetPluginsInfo() = 0; |
