diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-08-10 15:52:27 +0200 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-08-10 15:52:27 +0200 |
commit | c9e10d9e86fc1d6870374391b1d5c645150b1c05 (patch) | |
tree | 57068f85734d3b47befa26bd8b195486b99979d2 /lib | |
parent | 3bab9d79a01ac70a78c012eaa82dccaaa5c59ee5 (diff) | |
download | abrt-c9e10d9e86fc1d6870374391b1d5c645150b1c05.tar.gz abrt-c9e10d9e86fc1d6870374391b1d5c645150b1c05.tar.xz abrt-c9e10d9e86fc1d6870374391b1d5c645150b1c05.zip |
DBUS: added new method to get plugin settings
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CommLayer/CommLayerServerDBus.cpp | 5 | ||||
-rw-r--r-- | lib/CommLayer/CommLayerServerDBus.h | 1 | ||||
-rw-r--r-- | lib/CommLayer/DBusCommon.h | 1 | ||||
-rw-r--r-- | lib/CommLayer/DBusServerProxy.cpp | 14 | ||||
-rw-r--r-- | lib/CommLayer/DBusServerProxy.h | 17 | ||||
-rw-r--r-- | lib/CommLayer/Observer.h | 1 |
6 files changed, 32 insertions, 7 deletions
diff --git a/lib/CommLayer/CommLayerServerDBus.cpp b/lib/CommLayer/CommLayerServerDBus.cpp index 029cc91c..864a042d 100644 --- a/lib/CommLayer/CommLayerServerDBus.cpp +++ b/lib/CommLayer/CommLayerServerDBus.cpp @@ -115,3 +115,8 @@ vector_map_string_string_t CCommLayerServerDBus::GetPluginsInfo() plugins_info = m_pObserver->GetPluginsInfo(); return plugins_info; } + +map_plugin_settings_t CCommLayerServerDBus::GetPluginSettings(const std::string& pName) +{ + return m_pObserver->GetPluginSettings(pName); +} diff --git a/lib/CommLayer/CommLayerServerDBus.h b/lib/CommLayer/CommLayerServerDBus.h index 9301a10a..cae27421 100644 --- a/lib/CommLayer/CommLayerServerDBus.h +++ b/lib/CommLayer/CommLayerServerDBus.h @@ -27,6 +27,7 @@ class CCommLayerServerDBus 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 map_plugin_settings_t GetPluginSettings(const std::string& pName); 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 cdf30751..7ccaa8bc 100644 --- a/lib/CommLayer/DBusCommon.h +++ b/lib/CommLayer/DBusCommon.h @@ -24,3 +24,4 @@ #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; +typedef std::map<std::string, std::string> map_plugin_settings_t; diff --git a/lib/CommLayer/DBusServerProxy.cpp b/lib/CommLayer/DBusServerProxy.cpp index 6bf0fbde..18a7c0ca 100644 --- a/lib/CommLayer/DBusServerProxy.cpp +++ b/lib/CommLayer/DBusServerProxy.cpp @@ -31,6 +31,7 @@ CDBusServer_adaptor::CDBusServer_adaptor() register_method(CDBusServer_adaptor, DeleteDebugDump, _DeleteDebugDump_stub); register_method(CDBusServer_adaptor, GetJobResult, _GetJobResult_stub); register_method(CDBusServer_adaptor, GetPluginsInfo, _GetPluginsInfo_stub); + register_method(CDBusServer_adaptor, GetPluginSettings, _GetPluginSettings_stub); } /* reveal Interface introspection when we stabilize the API */ /* @@ -204,3 +205,16 @@ DBus::Message CDBusServer_adaptor::_GetPluginsInfo_stub(const DBus::CallMessage wi << plugins_info; return reply; } + +DBus::Message CDBusServer_adaptor::_GetPluginSettings_stub(const DBus::CallMessage &call) +{ + DBus::MessageIter ri = call.reader(); + std::string PluginName; + ri >> PluginName; + map_plugin_settings_t plugin_settings; + plugin_settings = GetPluginSettings(PluginName); + DBus::ReturnMessage reply(call); + DBus::MessageIter wi = reply.writer(); + wi << plugin_settings; + return reply; +} diff --git a/lib/CommLayer/DBusServerProxy.h b/lib/CommLayer/DBusServerProxy.h index 1a84f438..d7ad88a0 100644 --- a/lib/CommLayer/DBusServerProxy.h +++ b/lib/CommLayer/DBusServerProxy.h @@ -42,13 +42,15 @@ public: /* methods exported by this interface, * you will have to implement them in your ObjectAdaptor */ - 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 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; + + 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 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; + virtual map_plugin_settings_t GetPluginSettings(const std::string& pName) = 0; public: /* signal emitters for this interface @@ -71,6 +73,7 @@ private: DBus::Message _DeleteDebugDump_stub(const DBus::CallMessage &call); DBus::Message _GetJobResult_stub(const DBus::CallMessage &call); DBus::Message _GetPluginsInfo_stub(const DBus::CallMessage &call); + DBus::Message _GetPluginSettings_stub(const DBus::CallMessage &call); }; #endif diff --git a/lib/CommLayer/Observer.h b/lib/CommLayer/Observer.h index 42fd1479..8b3a85f7 100644 --- a/lib/CommLayer/Observer.h +++ b/lib/CommLayer/Observer.h @@ -26,6 +26,7 @@ class CObserver { 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; + virtual map_plugin_settings_t GetPluginSettings(const std::string& pName) = 0; }; #endif /* OBSERVER_H_ */ |