diff options
-rw-r--r-- | src/daemon/CommLayerServerDBus.cpp | 48 | ||||
-rw-r--r-- | src/daemon/PluginManager.cpp | 29 | ||||
-rw-r--r-- | src/daemon/PluginManager.h | 14 | ||||
-rw-r--r-- | src/gui/CCDBusBackend.py | 7 | ||||
-rw-r--r-- | src/gui/PluginsSettingsDialog.py | 31 |
5 files changed, 0 insertions, 129 deletions
diff --git a/src/daemon/CommLayerServerDBus.cpp b/src/daemon/CommLayerServerDBus.cpp index ecff0920..28d6ee05 100644 --- a/src/daemon/CommLayerServerDBus.cpp +++ b/src/daemon/CommLayerServerDBus.cpp @@ -350,48 +350,6 @@ static int handle_GetPluginSettings(DBusMessage* call, DBusMessage* reply) return 0; } -#ifdef PLUGIN_DYNAMIC_LOAD_UNLOAD -static int handle_RegisterPlugin(DBusMessage* call, DBusMessage* reply) -{ - int r; - DBusMessageIter in_iter; - dbus_message_iter_init(call, &in_iter); - const char* PluginName; - r = load_val(&in_iter, PluginName); - if (r != ABRT_DBUS_LAST_FIELD) - { - error_msg("dbus call %s: parameter type mismatch", __func__ + 7); - return -1; - } - - const char * sender = dbus_message_get_sender(call); - g_pPluginManager->RegisterPluginDBUS(PluginName, sender); - - send_flush_and_unref(reply); - return 0; -} - -static int handle_UnRegisterPlugin(DBusMessage* call, DBusMessage* reply) -{ - int r; - DBusMessageIter in_iter; - dbus_message_iter_init(call, &in_iter); - const char* PluginName; - r = load_val(&in_iter, PluginName); - if (r != ABRT_DBUS_LAST_FIELD) - { - error_msg("dbus call %s: parameter type mismatch", __func__ + 7); - return -1; - } - - const char * sender = dbus_message_get_sender(call); - g_pPluginManager->UnRegisterPluginDBUS(PluginName, sender); - - send_flush_and_unref(reply); - return 0; -} -#endif - static int handle_GetSettings(DBusMessage* call, DBusMessage* reply) { map_abrt_settings_t result = GetSettings(); @@ -453,12 +411,6 @@ static DBusHandlerResult message_received(DBusConnection* conn, DBusMessage* msg r = handle_GetPluginsInfo(msg, reply); else if (strcmp(member, "GetPluginSettings") == 0) r = handle_GetPluginSettings(msg, reply); -#ifdef PLUGIN_DYNAMIC_LOAD_UNLOAD - else if (strcmp(member, "RegisterPlugin") == 0) - r = handle_RegisterPlugin(msg, reply); - else if (strcmp(member, "UnRegisterPlugin") == 0) - r = handle_UnRegisterPlugin(msg, reply); -#endif else if (strcmp(member, "GetSettings") == 0) r = handle_GetSettings(msg, reply); else if (strcmp(member, "SetSettings") == 0) diff --git a/src/daemon/PluginManager.cpp b/src/daemon/PluginManager.cpp index d5c86c09..0f7b983d 100644 --- a/src/daemon/PluginManager.cpp +++ b/src/daemon/PluginManager.cpp @@ -230,35 +230,6 @@ void CPluginManager::UnLoadPlugin(const char *pName) } } -#ifdef PLUGIN_DYNAMIC_LOAD_UNLOAD -void CPluginManager::RegisterPluginDBUS(const char *pName, const char *pDBUSSender) -{ - int polkit_result = polkit_check_authorization(pDBUSSender, - "org.fedoraproject.abrt.change-daemon-settings"); - if (polkit_result == PolkitYes) - { -//TODO: report success/failure - LoadPlugin(pName); - } else - { - log("User %s not authorized, returned %d", pDBUSSender, polkit_result); - } -} - -void CPluginManager::UnRegisterPluginDBUS(const char *pName, const char *pDBUSSender) -{ - int polkit_result = polkit_check_authorization(pDBUSSender, - "org.fedoraproject.abrt.change-daemon-settings"); - if (polkit_result == PolkitYes) - { - UnLoadPlugin(pName); - } else - { - log("user %s not authorized, returned %d", pDBUSSender, polkit_result); - } -} -#endif - CAction* CPluginManager::GetAction(const char *pName, bool silent) { CPlugin *plugin = LoadPlugin(pName); diff --git a/src/daemon/PluginManager.h b/src/daemon/PluginManager.h index ed2818b3..1d2b4bd3 100644 --- a/src/daemon/PluginManager.h +++ b/src/daemon/PluginManager.h @@ -83,20 +83,6 @@ class CPluginManager * @param pName A plugin name. */ void UnLoadPlugin(const char *pName); -#ifdef PLUGIN_DYNAMIC_LOAD_UNLOAD - /** - * A method, which registers particular plugin. - * @param pName A plugin name. - */ - void RegisterPluginDBUS(const char *pName, const char *pDBUSSender); - /** - * A method, which unregister particular plugin, - * called via DBUS - * @param pName A plugin name. - * @param pDBUSSender DBUS user identification - */ - void UnRegisterPluginDBUS(const char *pName, const char *pDBUSSender); -#endif /** * A method, which returns instance of particular action plugin. * @param pName A plugin name. diff --git a/src/gui/CCDBusBackend.py b/src/gui/CCDBusBackend.py index c3e8f0ab..b983d141 100644 --- a/src/gui/CCDBusBackend.py +++ b/src/gui/CCDBusBackend.py @@ -208,13 +208,6 @@ class DBusManager(gobject.GObject): settings = self.daemon().GetPluginSettings(plugin_name) return settings -# "Enable" toggling in GUI is disabled for now. Grep for PLUGIN_DYNAMIC_LOAD_UNLOAD -# def registerPlugin(self, plugin_name): -# return self.daemon().RegisterPlugin(plugin_name) -# -# def unRegisterPlugin(self, plugin_name): -# return self.daemon().UnRegisterPlugin(plugin_name) - def getSettings(self): return self.daemon().GetSettings() diff --git a/src/gui/PluginsSettingsDialog.py b/src/gui/PluginsSettingsDialog.py index aba65d19..55e82ec3 100644 --- a/src/gui/PluginsSettingsDialog.py +++ b/src/gui/PluginsSettingsDialog.py @@ -54,43 +54,12 @@ class PluginsSettingsDialog: column.set_resizable(True) self.pluginlist.append_column(column) -# "Enable" toggle column is disabled for now. Grep for PLUGIN_DYNAMIC_LOAD_UNLOAD -# column = gtk.TreeViewColumn(_("Enabled")) -# # column "enabled" has one kind of cells: -# cell_toggle_enable = gtk.CellRendererToggle() -# cell_toggle_enable.set_property("activatable", True) -# cell_toggle_enable.connect("toggled", self.on_enabled_toggled, self.pluginsListStore) -# column.pack_start(cell_toggle_enable, True) -# column.add_attribute(cell_toggle_enable, "active", 1) -# column.add_attribute(cell_toggle_enable, "visible", 2) -# self.pluginlist.append_column(column) - #connect signals self.pluginlist.connect("cursor-changed", self.on_tvDumps_cursor_changed) self.builder.get_object("bConfigurePlugin").connect("clicked", self.on_bConfigurePlugin_clicked, self.pluginlist) self.builder.get_object("bClose").connect("clicked", self.on_bClose_clicked) self.builder.get_object("bConfigurePlugin").set_sensitive(False) -# "Enable" toggle column is disabled for now. Grep for PLUGIN_DYNAMIC_LOAD_UNLOAD -# def on_enabled_toggled(self,cell, path, model): -# plugin = model[path][model.get_n_columns()-1] -# if plugin: -# if model[path][1]: -# #print "self.ccdaemon.UnRegisterPlugin(%s)" % (plugin.getName()) -# self.ccdaemon.unRegisterPlugin(plugin.getName()) -# # FIXME: create class plugin and move this into method Plugin.Enable() -# plugin.Enabled = "no" -# plugin.Settings = None -# else: -# #print "self.ccdaemon.RegisterPlugin(%s)" % (model[path][model.get_n_columns()-1]) -# self.ccdaemon.registerPlugin(plugin.getName()) -# # FIXME: create class plugin and move this into method Plugin.Enable() -# plugin.Enabled = "yes" -# default_settings = self.ccdaemon.getPluginSettings(plugin.getName()) -# plugin.Settings = PluginSettings() -# plugin.Settings.load(plugin.getName(), default_settings) -# model[path][1] = not model[path][1] - def filter_plugins(self, model, miter, data): return True |