From 13329d88e147fac7cafcdebcafd1859a74a27aa9 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Tue, 11 Aug 2009 15:33:20 +0200 Subject: DBUS: exposed methods Un/RegisterPlugin --- src/Daemon/CrashWatcher.cpp | 32 ++++++++++++++++++++++++++++++++ src/Daemon/CrashWatcher.h | 3 +++ 2 files changed, 35 insertions(+) (limited to 'src') diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp index 344dda7..0b98454 100644 --- a/src/Daemon/CrashWatcher.cpp +++ b/src/Daemon/CrashWatcher.cpp @@ -908,3 +908,35 @@ map_plugin_settings_t CCrashWatcher::GetPluginSettings(const std::string& pName) Warning(e.what()); } } + +void CCrashWatcher::RegisterPlugin(const std::string& pName) +{ + try + { + m_pMW->RegisterPlugin(pName); + } + catch(CABRTException &e) + { + if (e.type() == EXCEP_FATAL) + { + throw e; + } + Warning(e.what()); + } +} + +void CCrashWatcher::UnRegisterPlugin(const std::string& pName) +{ + try + { + m_pMW->UnRegisterPlugin(pName); + } + catch(CABRTException &e) + { + if (e.type() == EXCEP_FATAL) + { + throw e; + } + Warning(e.what()); + } +} diff --git a/src/Daemon/CrashWatcher.h b/src/Daemon/CrashWatcher.h index 68a21a5..689d210 100644 --- a/src/Daemon/CrashWatcher.h +++ b/src/Daemon/CrashWatcher.h @@ -130,8 +130,11 @@ class CCrashWatcher virtual bool Report(map_crash_report_t pReport, const std::string &pUID); virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pUID); virtual map_crash_report_t GetJobResult(uint64_t pJobID, const std::string& pSender); + /* plugins related */ virtual vector_map_string_string_t GetPluginsInfo(); virtual map_plugin_settings_t GetPluginSettings(const std::string& pName); + void RegisterPlugin(const std::string& pName); + void UnRegisterPlugin(const std::string& pName); /* Observer methods */ void Status(const std::string& pMessage,const std::string& pDest="0"); -- cgit