asynchronous and deferred port detection

Allow plugins to perform asynchronous port detection, and to defer port detection
until later.  This moves the prober bits into MMPluginBase so that all plugins
can take adavantage of it only when needed; the probing is not done at udev time.
Furthermore, plugins like Novatel can flip the secondary ports over the AT mode
through	deferred detection, by deferring the secondary ports until the main port
has been detected and AT$NWDMAT	has been sent.

This commit also finishes the port of the rest of the plugins (except mbm) over
to the new port detection methods and plugin API.
This commit is contained in:
Dan Williams
2009-06-28 14:05:05 -04:00
parent 112f2da19d
commit 6077763d90
47 changed files with 2972 additions and 2597 deletions

View File

@@ -10,16 +10,31 @@ mm_plugin_get_name (MMPlugin *plugin)
return MM_PLUGIN_GET_INTERFACE (plugin)->get_name (plugin);
}
guint32
MMPluginSupportsResult
mm_plugin_supports_port (MMPlugin *plugin,
const char *subsys,
const char *name)
const char *name,
MMSupportsPortResultFunc callback,
gpointer user_data)
{
g_return_val_if_fail (MM_IS_PLUGIN (plugin), FALSE);
g_return_val_if_fail (subsys != NULL, FALSE);
g_return_val_if_fail (name != NULL, FALSE);
g_return_val_if_fail (callback != NULL, FALSE);
return MM_PLUGIN_GET_INTERFACE (plugin)->supports_port (plugin, subsys, name);
return MM_PLUGIN_GET_INTERFACE (plugin)->supports_port (plugin, subsys, name, callback, user_data);
}
void
mm_plugin_cancel_supports_port (MMPlugin *plugin,
const char *subsys,
const char *name)
{
g_return_if_fail (MM_IS_PLUGIN (plugin));
g_return_if_fail (subsys != NULL);
g_return_if_fail (name != NULL);
MM_PLUGIN_GET_INTERFACE (plugin)->cancel_supports_port (plugin, subsys, name);
}
MMModem *