Method

GUsbDeviceget_bos_descriptor

since: 0.4.0

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

Type: guint8

A BOS capability type.

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 be 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: GUsbBosDescriptor

A GUsbBosDescriptor or NULL for not found.

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