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.
This commit is contained in:
Aleksander Morgado
2012-07-10 08:35:47 +02:00
parent b35d6a65fa
commit c1c3702f53
2 changed files with 0 additions and 63 deletions

View File

@@ -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 */

View File

@@ -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 */