GUsb.Context.wait_for_replug

### Method

# GUsb Contextwait_for_replug

#### 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` | `GUsbDevice`
| A `GUsbDevice`.
| The data is owned by the caller of the function.
`timeout_ms` | `guint`
| Timeout to wait.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.

#### Return value

Returns: | `GUsbDevice`
| A new `GUsbDevice`, or `NULL` for invalid.
| The caller of the method takes ownership of the data, and is responsible for freeing it.