port-probe: allow cancellation

This commit is contained in:
Aleksander Morgado
2016-01-16 01:41:51 +01:00
parent d3bf07e7a8
commit c605b0bc46
3 changed files with 536 additions and 479 deletions

View File

@@ -811,6 +811,7 @@ mm_plugin_supports_port (MMPlugin *self,
self->priv->send_lf, self->priv->send_lf,
self->priv->custom_at_probe, self->priv->custom_at_probe,
self->priv->custom_init, self->priv->custom_init,
cancellable,
(GAsyncReadyCallback) port_probe_run_ready, (GAsyncReadyCallback) port_probe_run_ready,
task); task);
} }

File diff suppressed because it is too large Load Diff

View File

@@ -113,12 +113,12 @@ void mm_port_probe_run (MMPortProbe *self,
gboolean at_send_lf, gboolean at_send_lf,
const MMPortProbeAtCommand *at_custom_probe, const MMPortProbeAtCommand *at_custom_probe,
const MMAsyncMethod *at_custom_init, const MMAsyncMethod *at_custom_init,
GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
gboolean mm_port_probe_run_finish (MMPortProbe *self, gboolean mm_port_probe_run_finish (MMPortProbe *self,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
gboolean mm_port_probe_run_cancel (MMPortProbe *self);
gboolean mm_port_probe_run_cancel_at_probing (MMPortProbe *self); gboolean mm_port_probe_run_cancel_at_probing (MMPortProbe *self);