diff options
author | Aleksander Morgado <aleksander@gnu.org> | 2011-09-06 19:45:54 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-15 14:14:20 +0100 |
commit | 5f2d0d474cf9b4308715f4ef811127410e874240 (patch) | |
tree | ab9d0624d5315b3ad6756bbbed61cef6dab7bf59 /src | |
parent | 8fed241767b65ca4a651057109324a81e7c20e0b (diff) |
plugin-manager: allow suggesting a plugin when launching support checks
The newly launched support check will start probing with the suggested plugin
right away.
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-plugin-manager.c | 8 | ||||
-rw-r--r-- | src/mm-plugin-manager.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mm-plugin-manager.c b/src/mm-plugin-manager.c index 0b43aa46..5d3f30fc 100644 --- a/src/mm-plugin-manager.c +++ b/src/mm-plugin-manager.c @@ -368,6 +368,7 @@ mm_plugin_manager_find_port_support (MMPluginManager *self, const gchar *subsys, const gchar *name, const gchar *physdev_path, + MMPlugin *suggested_plugin, MMModem *existing, GAsyncReadyCallback callback, gpointer user_data) @@ -382,6 +383,7 @@ mm_plugin_manager_find_port_support (MMPluginManager *self, info->subsys = g_strdup (subsys); info->name = g_strdup (name); info->physdev_path = g_strdup (physdev_path); + info->suggested_plugin = suggested_plugin; if (existing) info->existing = g_object_ref (existing); info->result = g_simple_async_result_new (G_OBJECT (self), @@ -392,6 +394,12 @@ mm_plugin_manager_find_port_support (MMPluginManager *self, /* Set first plugin to check */ info->current = self->priv->plugins; + /* If we got one suggested, it will be the first one */ + if (info->suggested_plugin) { + info->current = g_slist_find (info->current, + info->suggested_plugin); + } + /* We will keep track of the supports info internally. * Ownership of the supports info will belong to the manager now. */ add_supports_info (self, info); diff --git a/src/mm-plugin-manager.h b/src/mm-plugin-manager.h index 673ec932..825e69c6 100644 --- a/src/mm-plugin-manager.h +++ b/src/mm-plugin-manager.h @@ -51,6 +51,7 @@ void mm_plugin_manager_find_port_support (MMPluginManager *self, const gchar *subsys, const gchar *name, const gchar *physdev_path, + MMPlugin *suggested_plugin, MMModem *existing, GAsyncReadyCallback callback, gpointer user_data); |