summaryrefslogtreecommitdiffstats
path: root/lib/CommLayer
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-08-06 17:09:18 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-08-06 17:09:18 +0200
commitc133ae4049f68a9e32a85c9ead40c83613851b22 (patch)
tree62df41a87e42aea41995e228c571324c1e4ea218 /lib/CommLayer
parent6c35b832998b807c35eef0ffc1cce93262d5550c (diff)
parentb9c0e8f9f8b3148e7ffc95b4eaf25299d9ead2a2 (diff)
downloadabrt-c133ae4049f68a9e32a85c9ead40c83613851b22.tar.gz
abrt-c133ae4049f68a9e32a85c9ead40c83613851b22.tar.xz
abrt-c133ae4049f68a9e32a85c9ead40c83613851b22.zip
Merge branch 'master' of ssh://vda@git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib/CommLayer')
-rw-r--r--lib/CommLayer/CommLayerServerDBus.cpp14
-rw-r--r--lib/CommLayer/CommLayerServerDBus.h1
-rw-r--r--lib/CommLayer/DBusCommon.h2
-rw-r--r--lib/CommLayer/DBusServerProxy.cpp11
-rw-r--r--lib/CommLayer/DBusServerProxy.h2
-rw-r--r--lib/CommLayer/Observer.h4
6 files changed, 32 insertions, 2 deletions
diff --git a/lib/CommLayer/CommLayerServerDBus.cpp b/lib/CommLayer/CommLayerServerDBus.cpp
index ad3c2db..029cc91 100644
--- a/lib/CommLayer/CommLayerServerDBus.cpp
+++ b/lib/CommLayer/CommLayerServerDBus.cpp
@@ -22,7 +22,11 @@ CCommLayerServerDBus::CCommLayerServerDBus()
}
catch(DBus::Error err)
{
- throw CABRTException(EXCEP_FATAL, "CCommLayerServerDBus::CCommLayerServerDBus(): Error while requesting dbus name - have you reloaded the dbus settings?");
+ throw CABRTException(EXCEP_FATAL, std::string(__func__) +
+ "\nPlease check if:\n"
+ + " * abrt is being run with root permissions\n"
+ + " * you have reloaded the dbus\n"+
+ + "Original exception was:\n " + err.what());
}
}
@@ -103,3 +107,11 @@ void CCommLayerServerDBus::JobDone(const std::string &pDest, uint64_t pJobID)
{
CDBusServer_adaptor::JobDone(pDest, pJobID);
}
+
+vector_map_string_string_t CCommLayerServerDBus::GetPluginsInfo()
+{
+ //FIXME: simplify?
+ vector_map_string_string_t plugins_info;
+ plugins_info = m_pObserver->GetPluginsInfo();
+ return plugins_info;
+}
diff --git a/lib/CommLayer/CommLayerServerDBus.h b/lib/CommLayer/CommLayerServerDBus.h
index df5d93d..9301a10 100644
--- a/lib/CommLayer/CommLayerServerDBus.h
+++ b/lib/CommLayer/CommLayerServerDBus.h
@@ -26,6 +26,7 @@ class CCommLayerServerDBus
virtual bool 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();
virtual void Crash(const std::string& arg1);
virtual void AnalyzeComplete(map_crash_report_t arg1);
diff --git a/lib/CommLayer/DBusCommon.h b/lib/CommLayer/DBusCommon.h
index 0ea94d3..cdf3075 100644
--- a/lib/CommLayer/DBusCommon.h
+++ b/lib/CommLayer/DBusCommon.h
@@ -22,3 +22,5 @@
#define CC_DBUS_IFACE "com.redhat.abrt"
#include "CrashTypes.h"
+typedef std::map<std::string, std::string> map_string_string_t;
+typedef std::vector<map_string_string_t> vector_map_string_string_t;
diff --git a/lib/CommLayer/DBusServerProxy.cpp b/lib/CommLayer/DBusServerProxy.cpp
index d4aee84..6bf0fbd 100644
--- a/lib/CommLayer/DBusServerProxy.cpp
+++ b/lib/CommLayer/DBusServerProxy.cpp
@@ -30,6 +30,7 @@ CDBusServer_adaptor::CDBusServer_adaptor()
register_method(CDBusServer_adaptor, Report, _Report_stub);
register_method(CDBusServer_adaptor, DeleteDebugDump, _DeleteDebugDump_stub);
register_method(CDBusServer_adaptor, GetJobResult, _GetJobResult_stub);
+ register_method(CDBusServer_adaptor, GetPluginsInfo, _GetPluginsInfo_stub);
}
/* reveal Interface introspection when we stabilize the API */
/*
@@ -193,3 +194,13 @@ DBus::Message CDBusServer_adaptor::_GetJobResult_stub(const DBus::CallMessage &c
wi << report;
return reply;
}
+
+DBus::Message CDBusServer_adaptor::_GetPluginsInfo_stub(const DBus::CallMessage &call)
+{
+ vector_map_string_string_t plugins_info;
+ plugins_info = GetPluginsInfo();
+ DBus::ReturnMessage reply(call);
+ DBus::MessageIter wi = reply.writer();
+ wi << plugins_info;
+ return reply;
+}
diff --git a/lib/CommLayer/DBusServerProxy.h b/lib/CommLayer/DBusServerProxy.h
index ae597e2..78fb28b 100644
--- a/lib/CommLayer/DBusServerProxy.h
+++ b/lib/CommLayer/DBusServerProxy.h
@@ -48,6 +48,7 @@ public:
virtual bool 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;
public:
/* signal emitters for this interface
@@ -69,6 +70,7 @@ private:
DBus::Message _Report_stub(const DBus::CallMessage &call);
DBus::Message _DeleteDebugDump_stub(const DBus::CallMessage &call);
DBus::Message _GetJobResult_stub(const DBus::CallMessage &call);
+ DBus::Message _GetPluginsInfo_stub(const DBus::CallMessage &call);
};
#endif
diff --git a/lib/CommLayer/Observer.h b/lib/CommLayer/Observer.h
index 880a792..81e7695 100644
--- a/lib/CommLayer/Observer.h
+++ b/lib/CommLayer/Observer.h
@@ -1,7 +1,8 @@
#ifndef OBSERVER_H_
#define OBSERVER_H_
-#include "CrashTypes.h"
+//FIXME: move all common types to AbrtTypes.h ??
+#include "DBusCommon.h"
#include <string>
#include <stdint.h>
@@ -19,6 +20,7 @@ class CObserver {
virtual bool 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;
};
#endif /* OBSERVER_H_ */