aboutsummaryrefslogtreecommitdiff
path: root/src/mm-plugin-manager.c
AgeCommit message (Collapse)Author
2012-09-19plugin-manager: never suggest the Generic plugin to othersAleksander Morgado
Some modems, e.g. Huawei E367, will probe first the QMI port and for some reason it doesn't report a proper VID/PID so the Generic plugin is the one finally accepting that port. When we probe the AT ports afterwards we already got the Generic plugin as suggestion, and we end up not grabbing the proper primary and secondary ports as we skipped the AT^GETPORTMODE reply. So, from now on the Generic plugin is never suggested to other probes; except for the case where we need the suggestion to finish a probing task which was 'deferred until suggested'. Also, the device-level plugin can now be overwritten, if and only if, the previously set plugin was the Generic one.
2012-08-30plugin-manager: never suggest result to the probe which generated the suggestionAleksander Morgado
2012-08-06device: keep all unsupported ports in a separate listAleksander Morgado
Ports being marked as unsupported should not be passed to the plugin specific create_modem() or grab_port() methods.
2012-08-06plugin-manager: relaunch probing when suggestion comes to deferred tasksAleksander Morgado
If a port support task was deferred until suggested, do not assume that the suggested plugin actually supports the port, instead re-launch support check. This covers the cases where a net port appears in a modem which only supports AT ports (e.g. Nokia case).
2012-08-06device,plugin: let the `MMPlugin' API know about `MMDevice'Aleksander Morgado
2012-08-06plugin-manager: simplify by iterating the list ourselvesAleksander Morgado
2012-08-06plugin-manager: use a double-linked list for the plugin listAleksander Morgado
2012-08-06plugin: new method to compare pluginsAleksander Morgado
Instead of providing a method to get if a plugin is requesting to get sorted last, we provide a way to comparing two plugins, compatible with the GCompareFunc required in g_list_sort().
2012-08-06plugin: simplify interface by passing around the device and/or port objectsAleksander Morgado
2012-08-06plugin-manager: simplify device/port probing logicAleksander Morgado
The plugin manager no longer needs to take care of keeping track of which probes are being run and to which physical device they correspond, as the upper layer's `MMDevice' already does this. This simplifies the internal logic quite a lot, as we can now easily suggest plugins to the remaining port probes of the same device directly.
2012-08-06plugin-manager: find port support is now only an internal operationAleksander Morgado
2012-08-06plugin-manager: remove unneeded methodsAleksander Morgado
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.
2012-08-06plugin-manager: define a minimum probing time of 2sAleksander Morgado
Effectively, we're now letting the kernel up to 2s to show all the ports of the device, starting from the time where the first port is exposed.
2012-08-06plugin-manager: new method to check support for a given device and all its portsAleksander Morgado
The new `mm_plugin_manager_find_device_support()' will be an async method which waits for ports to be added in the given `MMDevice'. As soon as all added ports are probed, the device support check is considered finished.
2012-03-16plugin-manager: avoid race when port deferred until suggested and suggestion ↵Aleksander Morgado
already there It may happen that we launch the supports task in the port AFTER having received the suggestion.
2012-03-15plugin-manager: fix loop of deferred tasks when no best plugin foundAleksander Morgado
If deferring tasks until result suggested, and we never got a suggestion, the tasks may have been left deferred in loop forever. We now remove the defer timeout in the case of waiting for suggestion, and ensure that we cancel tasks if the last valid probing ended without best plugin found.
2012-03-15plugin-manager: new defer-until-suggested support check result handlingAleksander Morgado
'net' ports will be supported as soon as there is another port reporting successful support.
2012-03-15core: start using our newly defined errorsAleksander Morgado
2012-03-15core: start using MMBroadbandModem objectsAleksander Morgado
We chain up the Generic plugin created MMBroadbandModem objects within the GDBusObjectManagerServer in MMManager, so that they get properly exported in DBus.
2012-03-15plugin-base: remove `MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS' statusAleksander Morgado
Support checks are fully asynchronous and result is always reported when the check is considered ready, so in-progress replies to `mm_plugin_supports_port_finish()' don't make any sense.
2012-03-15plugin-base: don't report numeric support level in the [0-100] rangeAleksander Morgado
There is no single case where more than one plugin may end up wanting to support a given port, and therefore there is no need to report the numeric support level when reporting SUPPORTED.
2012-03-15plugin-manager: new methods to check for ongoing port support operationsAleksander Morgado
The new mm_plugin_manager_is_finding_port_support() allows to check whether the Plugin Manager is looking for support in a specific port. The new mm_plugin_manager_is_checking_device_support() allows to check whether the Plugin Manager is looking for support in any port of a given device.
2012-03-15plugin-manager: allow suggesting a plugin when launching support checksAleksander Morgado
The newly launched support check will start probing with the suggested plugin right away.
2012-03-15plugin-manager: propagate support check results to tasks in the same deviceAleksander Morgado
As soon as the first support check of a port in a given device finishes with a valid best plugin and level > 0, propagate the result to other support tasks corresponding to ports in the same physical device. Previously, this propagation of support check results was only done once the port was grabbed by a plugin, not just when the plugin reported that it supported it. This change in behaviour isn't probably a big deal, as there should not be any case where a plugin says it supports a port and then cannot grab it.
2012-03-15plugin-manager: keep track of all launched support checksAleksander Morgado
We will keep a reference to each of the support checks currently in progress, grouped by physical device path. The stored SupportsInfo structs as well as the support check operations, are guaranteed to be kept valid as long as the Plugin Manager exists. Or in other words, the Plugin Manager cannot be disposed if there is still an ongoing supports check operation.
2012-03-15plugin-manager: new method to look for best plugin supporting a given portAleksander Morgado
The new `mm_plugin_manager_find_port_support()' method requests the Plugin Manager to iterate over the list of plugins internally handled, launching supports task for the given port in each of them. The method is fully asynchronous, and the result can be retrieved with `mm_plugin_manager_find_port_support_finish()' once the operation is ready.
2012-03-15plugin-manager: ensure we always print paths in UTF-8Aleksander Morgado
There is little chance of having a PLUGINDIR which is not UTF-8, but it may happen, and g_log() won't like it.
2012-03-15plugin-manager: find and load plugins when the manager object is createdAleksander Morgado
Ported the plugin finding and loading code from the MMManager object.
2012-03-15plugin-manager: let it be initableAleksander Morgado
Looking for plugins and loading them will be done during the object creation, so the operation may fail and we need to report it.
2012-03-15plugin-manager: new MMPluginManager objectAleksander Morgado