From c1c3702f5336b7e759afc7d8b51a7422b18098ed Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 10 Jul 2012 08:35:47 +0200 Subject: plugin-manager: remove unneeded methods We no longer need to query the plugin manager whether we're checking support for a specific port, as the ports are now grabbed only once in the MMDevice, and therefore we ensure that supports check is launched only once in the PluginManager for that specific port. Also, we no longer need to query the plugin manager whether we're checking support for a given device, as the logic to check when all ports of the device are probed is now maintained internally. --- src/mm-plugin-manager.c | 50 ------------------------------------------------- src/mm-plugin-manager.h | 13 ------------- 2 files changed, 63 deletions(-) (limited to 'src') diff --git a/src/mm-plugin-manager.c b/src/mm-plugin-manager.c index c15a1d9b..c3f94ab4 100644 --- a/src/mm-plugin-manager.c +++ b/src/mm-plugin-manager.c @@ -471,56 +471,6 @@ mm_plugin_manager_find_port_support (MMPluginManager *self, info); } -gboolean -mm_plugin_manager_is_finding_device_support (MMPluginManager *self, - const gchar *physdev_path, - const gchar **subsys, - const gchar **name) -{ - SupportsInfoList *list; - - list = g_hash_table_lookup (self->priv->supports, - physdev_path); - if (list) { - if (subsys) - *subsys = ((SupportsInfo *)list->info_list->data)->subsys; - if (name) - *name = ((SupportsInfo *)list->info_list->data)->name; - - return TRUE; - } - return FALSE; -} - -gboolean -mm_plugin_manager_is_finding_port_support (MMPluginManager *self, - const gchar *subsys, - const gchar *name, - const gchar *physdev_path) -{ - SupportsInfoList *list; - - list = g_hash_table_lookup (self->priv->supports, - physdev_path); - if (list) { - GSList *l; - - for (l = list->info_list; - l; - l = g_slist_next (l)) { - SupportsInfo *info = l->data; - - if (g_str_equal (subsys, info->subsys) && - g_str_equal (name, info->name)) { - /* Support check task already exists */ - return TRUE; - } - } - } - - return FALSE; -} - /*****************************************************************************/ /* Find device support */ diff --git a/src/mm-plugin-manager.h b/src/mm-plugin-manager.h index e8acfedd..fd96086a 100644 --- a/src/mm-plugin-manager.h +++ b/src/mm-plugin-manager.h @@ -72,17 +72,4 @@ MMPlugin *mm_plugin_manager_find_port_support_finish (MMPluginManager *self, GAsyncResult *result, GError **error); -/* Returns TRUE if there is an ongoing find operation on the given port */ -gboolean mm_plugin_manager_is_finding_port_support (MMPluginManager *self, - const gchar *subsys, - const gchar *name, - const gchar *physdev_path); - -/* Returns TRUE if there is an ongoing find operation in a port of the given - * device (and if so, returns subsystem and name of the port) */ -gboolean mm_plugin_manager_is_finding_device_support (MMPluginManager *self, - const gchar *physdev_path, - const gchar **subsys, - const gchar **name); - #endif /* MM_PLUGIN_MANAGER_H */ -- cgit v1.2.3-70-g09d2