GUsb.Device.get_bos_descriptor

### Method

# GUsb Deviceget_bos_descriptor

#### Declaration

    GUsbBosDescriptor*
    g_usb_device_get_bos_descriptor (
      GUsbDevice* self,
      guint8 capability,
      GError** error
    )

#### Description

Gets the first bos_descriptor that matches the descriptor capability. If you want to find all the BOS descriptors that match (there may be other matching BOS descriptors you have to use `g_usb_device_get_bos_descriptors()` and check each one manually.

Available since: | 0.4.0

#### Parameters

`capability` | `guint8`
| A BOS capability type.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.

#### Return value

Returns: | `GUsbBosDescriptor`
| A `GUsbBosDescriptor` or `NULL` for not found.
| The caller of the method takes ownership of the data, and is responsible for freeing it.