GUsb.Context.wait_for_replug

### Method

# GUsb Contextwait_for_replug

since: 0.2.9

#### Declaration

    GUsbDevice*
    g_usb_context_wait_for_replug (
      GUsbContext* self,
      GUsbDevice* device,
      guint timeout_ms,
      GError** error
    )

#### Description

Waits for the device to be replugged. It may come back with a different VID:PID.

Warning: This is synchronous and blocks until the device comes back or the timeout triggers.

Available since: 0.2.9

#### Parameters

`device`

  Type: `GUsbDevice`

  A `GUsbDevice`.

  The data is owned by the caller of the function.

`timeout_ms`

  Type: `guint`

  Timeout to wait.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will left initialized to `NULL` by the method if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `GUsbDevice`

A new `GUsbDevice`, or `NULL` for invalid.

The caller of the method takes ownership of the data, and is responsible for freeing it.