### Method

# SpiceClientGLib UsbDeviceManager connect_device_async

#### Declaration [src]

    void
    spice_usb_device_manager_connect_device_async (
      SpiceUsbDeviceManager* manager,
      SpiceUsbDevice* device,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

Asynchronously connects the `device`. When completed, `callback` will be called. Then it is possible to call `spice_usb_device_manager_connect_device_finish()` to get the result of the operation.

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

#### Parameters

`device`

  Type: `SpiceUsbDevice`

  A `SpiceUsbDevice` to redirect.

  The data is owned by the caller of the method.

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable` object, `NULL` to ignore.

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

`callback`

  Type: `GAsyncReadyCallback`

  A `GAsyncReadyCallback` to call when the request is satisfied.

  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.