Commit Graph

3500 Commits

Author SHA1 Message Date
Aleksander Morgado
325ece6fe3 huawei: implement unlock retries loading 2012-08-06 20:07:23 +02:00
Aleksander Morgado
8c5f13a657 huawei: implement unsolicited messages enabling/disabling 2012-08-06 20:07:22 +02:00
Aleksander Morgado
6f2fe89ef2 huawei: implement unsolicited 3GPP signal change report handling 2012-08-06 20:07:22 +02:00
Aleksander Morgado
02cf87b149 huawei: implement access technology loading and update handling 2012-08-06 20:07:22 +02:00
Aleksander Morgado
433c8fa85b huawei: report connection status statistics 2012-08-06 20:07:22 +02:00
Aleksander Morgado
b25b7f91cb huawei: setup/cleanup unsolicited message handlers in the 3GPP interface 2012-08-06 20:07:22 +02:00
Aleksander Morgado
98f28db6e3 huawei: setup handlers for unsolicited messages
Initially all disabled.
2012-08-06 20:07:22 +02:00
Aleksander Morgado
008beeedcc huawei: new `MMBroadbandModemHuawei' object 2012-08-06 20:07:22 +02:00
Aleksander Morgado
efe2228515 huawei: try to gather port layout while probing
We will try to use usbif0 to gather the port layout with AT^GETPORTMODE.
2012-08-06 20:07:22 +02:00
Aleksander Morgado
f9a0aba08c huawei: start porting the Huawei plugin 2012-08-06 20:07:22 +02:00
Aleksander Morgado
b8cc7c66ec device: don't create devices with 0 ports
If for any reason we're requested to create a device with 0 ports, just return
error.
2012-08-06 20:07:22 +02:00
Aleksander Morgado
da0226708a plugin: abort probing when the port has been released from the device 2012-08-06 20:07:22 +02:00
Aleksander Morgado
68c276efc1 broadband-modem: new generic steps in initialization/enabling/disabling
Instead of hardcoding the logic to decide which ports are open or closed in the
different steps, we now let the subclasses of MMBroadbandModem to do that
themselves.

We now provide:

  * initialization_started() and initialization_stopped(): the generic
    implementation does the serial port open/close in these steps.

  * enabling_started(): the generic implementation does the serial port opening
    here. The serial ports are kept open as long the modem is in enabled state.

  * disabling_stopped(): the generic implementation does the serial port closing
    here.
2012-08-06 20:07:20 +02:00
Aleksander Morgado
3b1d3063ba manager: remove the MMDevice object when the last port of the device is released 2012-08-06 20:06:47 +02:00
Aleksander Morgado
8ae87f5c38 manager: fix removal of device from our HT of devices 2012-08-06 20:06:47 +02:00
Aleksander Morgado
ff8a962d99 port-probe: let us peek the `MMDevice' owning the probe from the probe itself 2012-08-06 20:06:47 +02:00
Aleksander Morgado
1ca46cc0ec plugins: use default port grabbing on those plugins without special requirements 2012-08-06 20:06:46 +02:00
Aleksander Morgado
b64f52cddc plugin: if no grab_port() method given, use the default one 2012-08-06 20:06:46 +02:00
Aleksander Morgado
bfc3cb27e1 device,plugin: let the MMPlugin' API know about MMDevice' 2012-08-06 20:06:46 +02:00
Aleksander Morgado
884aa7f2eb plugin-manager: simplify by iterating the list ourselves 2012-08-06 20:06:46 +02:00
Aleksander Morgado
9be646f274 plugin-manager: use a double-linked list for the plugin list 2012-08-06 20:06:46 +02:00
Aleksander Morgado
86f4923d7f plugin: new method to compare plugins
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-06 20:06:46 +02:00
Aleksander Morgado
624a1e9087 plugin: remove obsolete comment 2012-08-06 20:06:46 +02:00
Aleksander Morgado
6e3d90e2a4 plugin: new `MM_PLUGIN_CUSTOM_INIT' property
We let plugins execute some custom initialization in the ports, specified by
a `MMAsyncMethod'.
2012-08-06 20:06:46 +02:00
Aleksander Morgado
d63570838b port-probe: fix typo in class definition 2012-08-06 20:06:46 +02:00
Aleksander Morgado
79abe00221 core: new `MMAsyncMethod' boxed type
Helps to bundle the async method implementation in a property.
2012-08-06 20:06:46 +02:00
Aleksander Morgado
f5fdf946c9 plugin: new `MM_PLUGIN_FORBIDDEN_DRIVERS' property
It allows plugins to specify whether they cannot support ports handled by
specific drivers.
2012-08-06 20:06:46 +02:00
Aleksander Morgado
1078b246b0 plugin: remove no longer used `MM_PLUGIN_SORT_LAST' property
The behaviour previously handled by this property is now automatically handled.
2012-08-06 20:06:46 +02:00
Aleksander Morgado
9b0f6c83f2 plugin: renamed custom-init' property to custom-at-probe'
The `custom-at-probe' property is just to modify the way we check for AT port
support.
2012-08-06 20:06:46 +02:00
Aleksander Morgado
89b3c01328 port-probe: setup the port object as a property 2012-08-06 20:06:46 +02:00
Aleksander Morgado
055b56306a port-probe: no need to keep our internal copies of subsys/name 2012-08-06 20:06:46 +02:00
Aleksander Morgado
4a85707b09 port-probe: no need to keep neither physdev path nor driver 2012-08-06 20:06:46 +02:00
Aleksander Morgado
a5560bef3d port-probe: don't warn if requesting info which wasn't probed 2012-08-06 20:06:46 +02:00
Aleksander Morgado
a8bc1909e4 plugin: setup a `priv' opaque pointer for the internal data
G_TYPE_INSTANCE_GET_PRIVATE() is really slow, so try to call it as less as
possible.
2012-08-06 20:06:46 +02:00
Aleksander Morgado
a315602166 plugin: no need to have our own `GUdevClient' 2012-08-06 20:06:46 +02:00
Aleksander Morgado
1e9c6772ce plugin: no need to take care of probing tasks ourselves 2012-08-06 20:06:45 +02:00
Aleksander Morgado
cf48d3daa7 plugin: don't provide an additional method to cancel the probing
We'll do it with a GCancellable.
2012-08-06 20:06:45 +02:00
Aleksander Morgado
d84cecac99 plugin: don't use internal task list to cancel AT probing in other probes 2012-08-06 20:06:45 +02:00
Aleksander Morgado
61e285497c port-probe-cache: removed, no longer needed
The `MMDevice' acts as port probe cache for us now, directly storing all port
probes of the same device.
2012-08-06 20:06:45 +02:00
Aleksander Morgado
9d14e4e8e9 device: get vendor/product IDs
And don't do it in MMPlugin.
2012-08-06 20:06:45 +02:00
Aleksander Morgado
74dd724669 plugin: simplify interface by passing around the device and/or port objects 2012-08-06 20:06:45 +02:00
Aleksander Morgado
b816887cac port-probe: use dispose() to cleanup internal object references 2012-08-06 20:06:45 +02:00
Aleksander Morgado
87c2c8632e port-probe: new method to check if there is an AT port in a list of probes 2012-08-06 20:06:45 +02:00
Aleksander Morgado
b791e87b23 device: keep a list of port probes instead of just ports 2012-08-06 20:06:45 +02:00
Aleksander Morgado
a9075b0c09 port-probe: rename _get_port() to _peek_port() as there is no ownership transfer 2012-08-06 20:06:45 +02:00
Aleksander Morgado
e5e46f489e core: merge MMPluginBase' and MMPlugin'
There's no real point in maintaining a separate `MMPlugin' interface, as all the
plugins will inherit from `MMPluginBase', so just merge them and simplify
everything.
2012-08-06 20:06:45 +02:00
Aleksander Morgado
7e9d3e4b68 plugin-base: method to get device IDs doesn't need to be public
Given the new pre-probing filters, the IDs are no longer retrieved by the
plugins.
2012-08-06 20:06:45 +02:00
Aleksander Morgado
aaa487094e plugin-manager: simplify device/port probing logic
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-06 20:06:45 +02:00
Aleksander Morgado
a1ffbdf1c8 plugin-manager: find port support is now only an internal operation 2012-08-06 20:06:45 +02:00
Aleksander Morgado
c1c3702f53 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.
2012-08-06 20:06:45 +02:00