### Method

# Qmi Device close_async

since: 1.18

#### Declaration [src]

    void
    qmi_device_close_async (
      QmiDevice* self,
      guint timeout,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

Asynchronously closes a `QmiDevice`, preventing any further I/O.

If this device was opened with `QMI_DEVICE_OPEN_FLAGS_MBIM`, this operation will wait for the response of the underlying MBIM close sequence.

Closing a `QmiDevice` multiple times will not return an error.

When the operation is finished `callback` will be called. You can then call `qmi_device_close_finish()` to get the result of the operation.

Available since: 1.18

This method completes asynchronously. Use `qmi_device_close_finish()` inside the `GAsyncReadyCallback` to obtain the result of the operation.

#### Parameters

`timeout`

  Type: `guint`

  Maximum time, in seconds, to wait for the device to be closed.

`cancellable`

  Type: `GCancellable`

  A `GCancellable`, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`callback`

  Type: `GAsyncReadyCallback`

  A `GAsyncReadyCallback` to call when the operation is finished.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  The data to pass to callback function.

  The argument can be `NULL`.
  The data is owned by the caller of the method.