base-modem: implement new modem-wide cancellable, and rework AT commands

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.
This commit is contained in:
Aleksander Morgado
2012-03-08 23:19:19 +01:00
parent 215c278082
commit cdd339f802
16 changed files with 334 additions and 390 deletions

View File

@@ -387,6 +387,22 @@ mm_base_modem_get_valid (MMBaseModem *self)
return self->priv->valid;
}
GCancellable *
mm_base_modem_peek_cancellable (MMBaseModem *self)
{
g_return_val_if_fail (MM_IS_BASE_MODEM (self), NULL);
return self->priv->cancellable;
}
GCancellable *
mm_base_modem_get_cancellable (MMBaseModem *self)
{
g_return_val_if_fail (MM_IS_BASE_MODEM (self), NULL);
return g_object_ref (self->priv->cancellable);
}
MMAtSerialPort *
mm_base_modem_get_port_primary (MMBaseModem *self)
{