summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-08-11 15:33:20 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2009-08-11 15:33:20 +0200
commit13329d88e147fac7cafcdebcafd1859a74a27aa9 (patch)
tree6d4b83a7c6cc1cd982c0cfcc84b6e36f07b83865 /lib
parentb67dd4c5d4a2fdce4c6f27234b4f3dc41462d9ba (diff)
downloadabrt-13329d88e147fac7cafcdebcafd1859a74a27aa9.tar.gz
abrt-13329d88e147fac7cafcdebcafd1859a74a27aa9.tar.xz
abrt-13329d88e147fac7cafcdebcafd1859a74a27aa9.zip
DBUS: exposed methods Un/RegisterPlugin
Diffstat (limited to 'lib')
-rw-r--r--lib/CommLayer/CommLayerServerDBus.cpp12
-rw-r--r--lib/CommLayer/CommLayerServerDBus.h2
-rw-r--r--lib/CommLayer/DBusServerProxy.cpp24
-rw-r--r--lib/CommLayer/DBusServerProxy.h4
-rw-r--r--lib/CommLayer/Observer.h2
5 files changed, 44 insertions, 0 deletions
diff --git a/lib/CommLayer/CommLayerServerDBus.cpp b/lib/CommLayer/CommLayerServerDBus.cpp
index 864a042..d2b6d4d 100644
--- a/lib/CommLayer/CommLayerServerDBus.cpp
+++ b/lib/CommLayer/CommLayerServerDBus.cpp
@@ -120,3 +120,15 @@ map_plugin_settings_t CCommLayerServerDBus::GetPluginSettings(const std::string&
{
return m_pObserver->GetPluginSettings(pName);
}
+
+
+void CCommLayerServerDBus::RegisterPlugin(const std::string& pName)
+{
+ return m_pObserver->RegisterPlugin(pName);
+}
+
+void CCommLayerServerDBus::UnRegisterPlugin(const std::string& pName)
+{
+ return m_pObserver->UnRegisterPlugin(pName);
+}
+
diff --git a/lib/CommLayer/CommLayerServerDBus.h b/lib/CommLayer/CommLayerServerDBus.h
index cae2742..bec7567 100644
--- a/lib/CommLayer/CommLayerServerDBus.h
+++ b/lib/CommLayer/CommLayerServerDBus.h
@@ -28,6 +28,8 @@ class CCommLayerServerDBus
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);
+ void RegisterPlugin(const std::string& pName);
+ void UnRegisterPlugin(const std::string& pName);
virtual void Crash(const std::string& arg1);
virtual void AnalyzeComplete(map_crash_report_t arg1);
diff --git a/lib/CommLayer/DBusServerProxy.cpp b/lib/CommLayer/DBusServerProxy.cpp
index 18a7c0c..0693c6d 100644
--- a/lib/CommLayer/DBusServerProxy.cpp
+++ b/lib/CommLayer/DBusServerProxy.cpp
@@ -32,6 +32,8 @@ CDBusServer_adaptor::CDBusServer_adaptor()
register_method(CDBusServer_adaptor, GetJobResult, _GetJobResult_stub);
register_method(CDBusServer_adaptor, GetPluginsInfo, _GetPluginsInfo_stub);
register_method(CDBusServer_adaptor, GetPluginSettings, _GetPluginSettings_stub);
+ register_method(CDBusServer_adaptor, RegisterPlugin, _RegisterPlugin_stub);
+ register_method(CDBusServer_adaptor, UnRegisterPlugin, _UnRegisterPlugin_stub);
}
/* reveal Interface introspection when we stabilize the API */
/*
@@ -218,3 +220,25 @@ DBus::Message CDBusServer_adaptor::_GetPluginSettings_stub(const DBus::CallMessa
wi << plugin_settings;
return reply;
}
+
+DBus::Message CDBusServer_adaptor::_RegisterPlugin_stub(const DBus::CallMessage &call)
+{
+ DBus::MessageIter ri = call.reader();
+ std::string PluginName;
+ ri >> PluginName;
+ RegisterPlugin(PluginName);
+ DBus::ReturnMessage reply(call);
+ //DBus::MessageIter wi = reply.writer();
+ //wi << plugin_settings;
+ return reply;
+}
+
+DBus::Message CDBusServer_adaptor::_UnRegisterPlugin_stub(const DBus::CallMessage &call)
+{
+ DBus::MessageIter ri = call.reader();
+ std::string PluginName;
+ ri >> PluginName;
+ UnRegisterPlugin(PluginName);
+ DBus::ReturnMessage reply(call);
+ return reply;
+}
diff --git a/lib/CommLayer/DBusServerProxy.h b/lib/CommLayer/DBusServerProxy.h
index d7ad88a..495309b 100644
--- a/lib/CommLayer/DBusServerProxy.h
+++ b/lib/CommLayer/DBusServerProxy.h
@@ -51,6 +51,8 @@ public:
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;
+ virtual void RegisterPlugin(const std::string& pName) = 0;
+ virtual void UnRegisterPlugin(const std::string& pName) = 0;
public:
/* signal emitters for this interface
@@ -74,6 +76,8 @@ private:
DBus::Message _GetJobResult_stub(const DBus::CallMessage &call);
DBus::Message _GetPluginsInfo_stub(const DBus::CallMessage &call);
DBus::Message _GetPluginSettings_stub(const DBus::CallMessage &call);
+ DBus::Message _RegisterPlugin_stub(const DBus::CallMessage &call);
+ DBus::Message _UnRegisterPlugin_stub(const DBus::CallMessage &call);
};
#endif
diff --git a/lib/CommLayer/Observer.h b/lib/CommLayer/Observer.h
index 8b3a85f..ec7268e 100644
--- a/lib/CommLayer/Observer.h
+++ b/lib/CommLayer/Observer.h
@@ -27,6 +27,8 @@ class CObserver {
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;
+ virtual void RegisterPlugin(const std::string& pName) = 0;
+ virtual void UnRegisterPlugin(const std::string& pName) = 0;
};
#endif /* OBSERVER_H_ */