Commit Graph

13 Commits

Author SHA1 Message Date
Aleksander Morgado
86aa9df849 core: start using MMBroadbandModem objects
We chain up the Generic plugin created MMBroadbandModem objects within the
GDBusObjectManagerServer in MMManager, so that they get properly exported in
DBus.
2012-03-15 14:14:24 +01:00
Aleksander Morgado
95ade9c617 plugin-base: remove `MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS' status
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-15 14:14:21 +01:00
Aleksander Morgado
2b20955489 plugin-base: don't report numeric support level in the [0-100] range
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-15 14:14:21 +01:00
Aleksander Morgado
62030debf2 plugin-base: rename 'cancel_supports_port' to 'supports_port_cancel'
We now have 'supports_port' (async method) and 'supports_port_finish' (to get
the result of the async method), so it makes sense to rename the method to
'supports_port_cancel'.
2012-03-15 14:14:19 +01:00
Aleksander Morgado
dc30536456 plugin-base: rewrite port supports check as fully asynchronous
Before this change, supports check was either synchronous (e.g. in some
UNSUPPORTED cases) or asynchronous (when IN_PROGRESS was returned).

With this fix, the supports check requested to the plugin will always be
completed asynchronously; either directly in an idle before launching any real
probing operation, or once the probing operation is finished.

Therefore, it is not expected to get a IN_PROGRESS reply in
mm_plugin_supports_port_finish(), only UNSUPPORTED|SUPPORTED|DEFERRED.
2012-03-15 14:14:19 +01:00
Aleksander Morgado
df0d9b480c plugin base: let plugins decide if they should be sorted last
Note that even if a plugin says it wants to be sorted last, the generic plugin
will always be the last one. Also, there is no order guaranteed between two
plugins that request to be sorted last.
2011-06-06 17:20:17 +02:00
Dan Williams
df08f6a43f core: find the existing modem for a port in the manager 2010-03-30 15:03:35 -07:00
Dan Williams
720e38aec0 core: move physical device checking into the manager
It turns out that the manager needs to know about the physical
device so we can prevent multiple plugins from claiming ports on
the same modem.
2010-03-30 14:50:40 -07:00
Alexander Sack
12ac98e9f6 license: add license header to all files and set copyright based on git log 2009-08-06 12:43:51 +02:00
Dan Williams
6077763d90 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.
2009-06-28 14:05:05 -04:00
Dan Williams
4eb2e75ca3 plugin: bump required plugin major version for udev changes 2009-06-18 14:39:40 -04:00
Dan Williams
924814c101 udev: move device probing and detection to udev
Get rid of dependency on HAL, using libgudev instead.  Fix up the plugin API
to no longer use either HAL or udev defines, but let plugins use whatever
mechanism they want for getting more information out of the device given the
subsystem and device node name.

Modems are now defined as "master" devices which "own" a one or more ports.
A port could be a serial tty device or a network device or whatever.  The
plugin figures out whether it supports a given port or not and then assigns
it to a new or existing modem.  Modems now have a 'valid' property that
should be set to TRUE when the modem has enough ports to operate correctly.
For devices (ex. 'hso') that use a network device for data transfer, the
modem would need to grab at least one TTY and the network device associated
with that physical device to be 'valid'.

Also move the generic modem support code to a plugin like other modem plugins,
and change the I-support-this-device mechanism to return a number indicating
the level of support.  For example, the generic plugin would return a quite
low number if the device indicates via probing that it can do GSM or CDMA, but
a more specific plugin can indicate better support for the device, and thus
the more specific plugin would win control.
2009-06-18 14:25:30 -04:00
Tambet Ingo
cc31458b18 Initial commit. 2008-07-31 09:43:00 +03:00