diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2017-02-08 23:44:58 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-02-09 10:19:53 +0100 |
commit | d29bfb5a22339d883e5f7448371c3bbb71610945 (patch) | |
tree | 0e1e6de94b196f2f7d08a62dfae6b078f5d7f955 /src/libqmi-glib/qmi-device.h | |
parent | 2801fb42fd585bb82a54c053d5a27f62e8df9dfe (diff) | |
download | external_libqmi-d29bfb5a22339d883e5f7448371c3bbb71610945.zip external_libqmi-d29bfb5a22339d883e5f7448371c3bbb71610945.tar.gz external_libqmi-d29bfb5a22339d883e5f7448371c3bbb71610945.tar.bz2 |
libqmi-glib,device: new qmi_device_close_async() operation
The sync close operation that was implemented was partially useless
because the source responsible for I/O was scheduled in the main
context, so we were really relying on that main context to be still
running to properly finish the operation. i.e. a qmi_device_close()
after the default main loop was stopped would always end up with a
timeout error, as the response was never read.
So, we now modify the sync operation so that it doesn't do any explicit
wait for the response, we just issue the MBIM close command.
And we provide a new async operation that may be used to wait for the
MBIM close response.
Diffstat (limited to 'src/libqmi-glib/qmi-device.h')
-rw-r--r-- | src/libqmi-glib/qmi-device.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libqmi-glib/qmi-device.h b/src/libqmi-glib/qmi-device.h index 22f32c6..6ed832a 100644 --- a/src/libqmi-glib/qmi-device.h +++ b/src/libqmi-glib/qmi-device.h @@ -126,9 +126,19 @@ gboolean qmi_device_open_finish (QmiDevice *self, GAsyncResult *res, GError **error); +G_DEPRECATED gboolean qmi_device_close (QmiDevice *self, GError **error); +void qmi_device_close_async (QmiDevice *self, + guint timeout, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean qmi_device_close_finish (QmiDevice *self, + GAsyncResult *res, + GError **error); + void qmi_device_allocate_client (QmiDevice *self, QmiService service, guint8 cid, |