diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-25 14:00:22 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-25 14:00:22 +0200 |
| commit | 3008b32dd0f78b0b2c09e05a7b47080c7cb75d38 (patch) | |
| tree | f5bd107a868b4cae9016481e1cc9abdaea9409f5 /src/Daemon/CommLayerServerDBus.cpp | |
| parent | 5bf3512df0529960ed4980251825b49a12eff894 (diff) | |
| download | abrt-3008b32dd0f78b0b2c09e05a7b47080c7cb75d38.tar.gz abrt-3008b32dd0f78b0b2c09e05a7b47080c7cb75d38.tar.xz abrt-3008b32dd0f78b0b2c09e05a7b47080c7cb75d38.zip | |
remove CreateReport() method from server machinery; add comments about DBus
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon/CommLayerServerDBus.cpp')
| -rw-r--r-- | src/Daemon/CommLayerServerDBus.cpp | 68 |
1 files changed, 39 insertions, 29 deletions
diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp index 4808739..7796bac 100644 --- a/src/Daemon/CommLayerServerDBus.cpp +++ b/src/Daemon/CommLayerServerDBus.cpp @@ -18,8 +18,8 @@ DBus::Connection *CCommLayerServerDBus::init_dbus(CCommLayerServerDBus *self) } CCommLayerServerDBus::CCommLayerServerDBus() -: CCommLayerServer(), - DBus::ObjectAdaptor(*init_dbus(this), CC_DBUS_PATH) +: + DBus::ObjectAdaptor(*init_dbus(this), CC_DBUS_PATH) { try { @@ -39,6 +39,11 @@ CCommLayerServerDBus::~CCommLayerServerDBus() { } + +/* + * DBus call handlers + */ + vector_crash_infos_t CCommLayerServerDBus::GetCrashInfos(const std::string &pSender) { vector_crash_infos_t crashInfos; @@ -87,63 +92,68 @@ map_crash_report_t CCommLayerServerDBus::GetJobResult(uint64_t pJobID, const std return crashReport; } -void CCommLayerServerDBus::Crash(const std::string& arg) +vector_map_string_string_t CCommLayerServerDBus::GetPluginsInfo() { - CDBusServer_adaptor::Crash(arg); + //FIXME: simplify? + vector_map_string_string_t plugins_info; + plugins_info = m_pObserver->GetPluginsInfo(); + return plugins_info; } -void CCommLayerServerDBus::AnalyzeComplete(const map_crash_report_t& arg1) +map_plugin_settings_t CCommLayerServerDBus::GetPluginSettings(const std::string& pName, const std::string& pSender) { - CDBusServer_adaptor::AnalyzeComplete(arg1); + unsigned long unix_uid = m_pConn->sender_unix_uid(pSender.c_str()); + return m_pObserver->GetPluginSettings(pName, to_string(unix_uid)); } -void CCommLayerServerDBus::Error(const std::string& arg1) +void CCommLayerServerDBus::SetPluginSettings(const std::string& pName, const std::string& pSender, const map_plugin_settings_t& pSettings) { - CDBusServer_adaptor::Error(arg1); + unsigned long unix_uid = m_pConn->sender_unix_uid(pSender.c_str()); + return m_pObserver->SetPluginSettings(pName, to_string(unix_uid), pSettings); } -void CCommLayerServerDBus::Update(const std::string& pDest, const std::string& pMessage) +void CCommLayerServerDBus::RegisterPlugin(const std::string& pName) { - CDBusServer_adaptor::Update(pDest, pMessage); + return m_pObserver->RegisterPlugin(pName); } -void CCommLayerServerDBus::JobDone(const std::string &pDest, uint64_t pJobID) +void CCommLayerServerDBus::UnRegisterPlugin(const std::string& pName) { - CDBusServer_adaptor::JobDone(pDest, pJobID); + return m_pObserver->UnRegisterPlugin(pName); } -void CCommLayerServerDBus::Warning(const std::string& pDest, const std::string& pMessage) + +/* + * DBus signal emitters + */ + +void CCommLayerServerDBus::Crash(const std::string& arg) { - CDBusServer_adaptor::Warning(pMessage); + CDBusServer_adaptor::Crash(arg); } -vector_map_string_string_t CCommLayerServerDBus::GetPluginsInfo() +void CCommLayerServerDBus::AnalyzeComplete(const map_crash_report_t& arg1) { - //FIXME: simplify? - vector_map_string_string_t plugins_info; - plugins_info = m_pObserver->GetPluginsInfo(); - return plugins_info; + CDBusServer_adaptor::AnalyzeComplete(arg1); } -map_plugin_settings_t CCommLayerServerDBus::GetPluginSettings(const std::string& pName, const std::string& pSender) +void CCommLayerServerDBus::Error(const std::string& arg1) { - unsigned long unix_uid = m_pConn->sender_unix_uid(pSender.c_str()); - return m_pObserver->GetPluginSettings(pName, to_string(unix_uid)); + CDBusServer_adaptor::Error(arg1); } -void CCommLayerServerDBus::RegisterPlugin(const std::string& pName) +void CCommLayerServerDBus::Update(const std::string& pDest, const std::string& pMessage) { - return m_pObserver->RegisterPlugin(pName); + CDBusServer_adaptor::Update(pDest, pMessage); } -void CCommLayerServerDBus::UnRegisterPlugin(const std::string& pName) +void CCommLayerServerDBus::JobDone(const std::string &pDest, uint64_t pJobID) { - return m_pObserver->UnRegisterPlugin(pName); + CDBusServer_adaptor::JobDone(pDest, pJobID); } -void CCommLayerServerDBus::SetPluginSettings(const std::string& pName, const std::string& pSender, const map_plugin_settings_t& pSettings) +void CCommLayerServerDBus::Warning(const std::string& pDest, const std::string& pMessage) { - unsigned long unix_uid = m_pConn->sender_unix_uid(pSender.c_str()); - return m_pObserver->SetPluginSettings(pName, to_string(unix_uid), pSettings); + CDBusServer_adaptor::Warning(pMessage); } |
