### Class

# GUsb Device

unstable since: 1.0

#### Description

    class GUsb.Device : GObject.Object
      implements Gio.Initable {
      /* No available fields */
    }

No description available.

Available since: 1.0

#### Hierarchy

#### Ancestors

- GObject

#### Implements

- GInitable

#### Functions

###### g_usb_device_error_quark

No description available.

since: 0.1.0

#### Instance methods

###### g_usb_device_add_tag

Adds a tag, which is included in the JSON log to identify the specific device.

since: 0.4.1

###### g_usb_device_bulk_transfer

Perform a USB bulk transfer.

since: 0.1.0

###### g_usb_device_bulk_transfer_async

Do an async bulk transfer.

since: 0.1.0

###### g_usb_device_bulk_transfer_finish

Gets the result from the asynchronous function.

since: 0.1.0

###### g_usb_device_claim_interface

Claim an interface of the device.

since: 0.1.0

###### g_usb_device_clear_events

Clear all the events saved by the device.

since: 0.4.4

###### g_usb_device_close

Closes the device when it is no longer required.

since: 0.1.0

###### g_usb_device_control_transfer

Perform a USB control transfer.

since: 0.1.0

###### g_usb_device_control_transfer_async

Do an async control transfer.

since: 0.1.0

###### g_usb_device_control_transfer_finish

Gets the result from the asynchronous function.

since: 0.1.0

###### g_usb_device_get_address

Gets the USB address for the device.

since: 0.1.0

###### g_usb_device_get_bos_descriptor

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.

since: 0.4.0

###### g_usb_device_get_bos_descriptors

Gets all the BOS descriptors exported by the device.

since: 0.4.0

###### g_usb_device_get_bus

Gets the USB bus number for the device.

since: 0.1.0

###### g_usb_device_get_children

Gets the device children if any exist.

since: 0.2.4

###### g_usb_device_get_configuration

Get the bConfigurationValue for the active configuration of the device.

since: 0.1.0

###### g_usb_device_get_configuration_index

Get the index for the active Configuration string descriptor ie, iConfiguration.

since: 0.3.5

###### g_usb_device_get_created

Gets the date and time that the `GUsbDevice` was created.

since: 0.4.5

###### g_usb_device_get_custom_index

Gets the string index from the vendor class interface descriptor.

since: 0.2.5

###### g_usb_device_get_device_class

Gets the device class, typically a `GUsbDeviceClassCode`.

since: 0.1.7

###### g_usb_device_get_device_protocol

Gets the device protocol qualified by the class and subclass numbers. See `g_usb_device_get_device_class()` and g_usb_device_get_device_subclass().

since: 0.2.4

###### g_usb_device_get_device_subclass

Gets the device subclass qualified by the class number. See g_usb_device_get_device_class().

since: 0.2.4

###### g_usb_device_get_events

Gets all the events saved by the device.

since: 0.4.0

###### g_usb_device_get_hid_descriptor_default

Gets the default HID descriptors exported by the device.

since: 0.4.7

###### g_usb_device_get_hid_descriptors

Gets all the HID descriptors exported by the device.

since: 0.4.7

###### g_usb_device_get_interface

Gets the first interface that matches the vendor class interface descriptor. If you want to find all the interfaces that match (there may be other ‘alternate’ interfaces you have to use `g_usb_device_get_interfaces()` and check each one manally.

since: 0.2.8

###### g_usb_device_get_interfaces

Gets all the interfaces exported by the device.

since: 0.2.8

###### g_usb_device_get_manufacturer_index

Gets the index for the Manufacturer string descriptor.

since: 0.1.0

###### g_usb_device_get_parent

Gets the device parent if one exists.

since: 0.2.4

###### g_usb_device_get_pid

Gets the product ID for the device.

since: 0.1.0

###### g_usb_device_get_pid_as_str

Gets the product ID for the device as a string.

since: 0.2.4

###### g_usb_device_get_platform_id

Gets the platform identifier for the device.

since: 0.1.1

###### g_usb_device_get_port_number

Gets the USB port number for the device.

since: 0.2.4

###### g_usb_device_get_product_index

Gets the index for the Product string descriptor.

since: 0.1.0

###### g_usb_device_get_release

Gets the BCD firmware version number for the device.

since: 0.2.8

###### g_usb_device_get_serial_number_index

Gets the index for the Serial Number string descriptor.

since: 0.1.0

###### g_usb_device_get_spec

Gets the BCD specification revision for the device. For example, `0x0110` indicates USB 1.1 and 0x0320 indicates USB 3.2

since: 0.3.1

###### g_usb_device_get_string_descriptor

Get a string descriptor from the device. The returned string should be freed with `g_free()` when no longer needed.

since: 0.1.0

###### g_usb_device_get_string_descriptor_bytes

Get a raw string descriptor from the device. The returned string should be freed with `g_bytes_unref()` when no longer needed. The descriptor will be at most 128 btes in length, if you need to issue a request with either a smaller or larger descriptor, you can use g_usb_device_get_string_descriptor_bytes_full instead.

since: 0.3.6

###### g_usb_device_get_string_descriptor_bytes_full

Get a raw string descriptor from the device. The returned string should be freed with `g_bytes_unref()` when no longer needed.

since: 0.3.8

###### g_usb_device_get_tags

Gets all the tags.

since: 0.4.4

###### g_usb_device_get_vid

Gets the vendor ID for the device.

since: 0.1.0

###### g_usb_device_get_vid_as_str

Gets the vendor ID for the device as a string.

since: 0.2.4

###### g_usb_device_has_tag

Checks if a tag has been used to identify the specific device.

since: 0.4.3

###### g_usb_device_interrupt_transfer

Perform a USB interrupt transfer.

since: 0.1.0

###### g_usb_device_interrupt_transfer_async

Do an async interrupt transfer.

since: 0.1.0

###### g_usb_device_interrupt_transfer_finish

Gets the result from the asynchronous function.

since: 0.1.0

###### g_usb_device_invalidate

Invalidates the caches used in g_usb_device_get_interfaces().

since: 0.4.0

###### g_usb_device_is_emulated

Gets if the device is emulated.

since: 0.4.4

###### g_usb_device_open

Opens the device for use.

since: 0.1.0

###### g_usb_device_release_interface

Release an interface of the device.

since: 0.1.0

###### g_usb_device_remove_tag

Removes a tag, which is included in the JSON log to identify the specific device.

since: 0.4.4

###### g_usb_device_reset

Perform a USB port reset to reinitialize a device.

since: 0.1.0

###### g_usb_device_set_configuration

Set the active bConfigurationValue for the device.

since: 0.1.0

###### g_usb_device_set_interface_alt

Sets an alternate setting on an interface.

since: 0.2.8

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GInitable (1)

###### g_initable_init

Initializes the object implementing the interface.

unstable since: 2.22

#### Properties

###### GUsb.Device:context

No description available.

unstable since: 1.0

###### GUsb.Device:libusb-device

No description available.

unstable since: 1.0

###### GUsb.Device:platform-id

No description available.

unstable since: 1.0

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

unstable since: 2.0

#### Class structure

    struct GUsbDeviceClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`
  No description available.