Age | Commit message (Collapse) | Author |
|
Instead of the `_in_port()' variants, we'll provide more generic
`_full()' methods. These should be used either if we want to send commands
to a specific port, or if we want to use a specific user-provided GCancellable.
In addition to this user-provided GCancellable, we keep the internal modem-wide
one.
|
|
|
|
* mm_base_modem_peek_port_* () will return either a port object (no new
reference), or NULL if none available.
You would usually peek() a port if you're going to use it just in the current
method, as there is no way to that reference to get invalid (we're single
threaded).
* mm_base_modem_get_port_* () will return either NEW references to valid
port objects, or NULL if none available.
And, you would usually get() a port, whenever you want the port object to be
valid even out of the current method, for example when keeping it in the
context of an async operation.
Also, we need to consider that the primary AT port MAY BE NULL when you
peek() or get() it. This is due to the fact that we may be releasing ports
(due to device disconnection) in the middle of async operations.
|
|
|
|
We shouldn't depend on any header file from the previous implementation.
|
|
They will all get it themselves.
|
|
Make port roles more flexible. We have modems that do PPP
on interfaces other than the primary interface, and that
wasn't possible with the old code. So clean up all that
logic and move the port organization code into the core
so we can reduce code in the plugins.
In the new world order, the plugins say whether the port
is a QCDM port, an AT port, or ignored. If it's an AT
port the plugins get to tag it as primary, secondary, or
PPP, or any combination of the 3. This allows for modems
where PPP should really be done on the secondary port
(Huawei E220, Sierra devices) so that the primary port
stays open for command and status.
After all ports are grabbed by the generic classes, they get
"organized", which assigns various ports to the roles of
PRIMARY, SECONDARY, DATA, and QCDM based on specific rules
and hints that the plugin provided (which are expressed as
MMAtPortFlags).
The plugin code is responsible for determining the port
hints (ie MMAtPortFlags) at probe time, instead of having
a combination of the plugin and the modem class do the
job. This simplifies things greatly for the plugins at
the expense of more complicated logic in the core.
This is the port of commit 96505d42ed62327101dcee7c2bf31177b0bb1c9f
to the 06-api branch.
|
|
Sometimes, we want to check whether a given port is available to send commands,
and fallback to some other method if so (e.g. using a QCDM port).
|
|
Bearers will ask for data ports that can be used for connections. Right now,
only one data port is expected to be handled, but we don't impose any
restriction in the API.
|
|
When the first AT port is grabbed, modem initialization is launched, using that
specific port. This port is also passed to all interface initialization methods.
|
|
Users will be able to enable or disable modems using the DBus interface. We will
chain up the `Enable(boolean)' call from the DBus interface to these new methods
in the base modem class.
|
|
Whenever the first AT port is grabbed, we launch the initialize() method, which
must have been implemented by the corresponding modem subclass.
|
|
|
|
These will be set during modem object creation.
|
|
|
|
They will be set when constructing the object.
|
|
|
|
|
|
Basically, a replacement of the MMModemBase type, being prepared to handle
multimode devices.
This object derives from a MmGdbusObjectSkeleton, which makes it suitable to be
controlled within the GDBusObjectManagerServer.
|