gusb-interface: GUsb Reference Manual

## gusb-interface gusb-interface — GLib wrapper around a USB interface. |

## Functions

guint8 | g_usb_interface_get_length ()
guint8 | g_usb_interface_get_kind ()
guint8 | g_usb_interface_get_number ()
guint8 | g_usb_interface_get_alternate ()
guint8 | g_usb_interface_get_class ()
guint8 | g_usb_interface_get_subclass ()
guint8 | g_usb_interface_get_protocol ()
guint8 | g_usb_interface_get_index ()
GBytes * | g_usb_interface_get_extra ()

## Types and Values

#define | G_USB_TYPE_INTERFACE
| GUsbInterface

## Object Hierarchy

        GObject
        ╰── GUsbInterface

## Description

This object is a thin glib wrapper around a libusb_interface_descriptor.

All the data is copied when the object is created and the original descriptor can be destoyed any at point.

## Functions

### g_usb_interface_get_length ()

    guint8
    g_usb_interface_get_length (GUsbInterface *interface);

Gets the USB bus number for the interface.

#### Parameters

interface | a GUsbInterface |

#### Returns

The 8-bit bus number

Since: 0.2.8

### g_usb_interface_get_kind ()

    guint8
    g_usb_interface_get_kind (GUsbInterface *interface);

Gets the type of interface.

#### Parameters

interface | a GUsbInterface |

#### Returns

The 8-bit address

Since: 0.2.8

### g_usb_interface_get_number ()

    guint8
    g_usb_interface_get_number (GUsbInterface *interface);

Gets the interface number.

#### Parameters

interface | a GUsbInterface |

#### Returns

The interface ID

Since: 0.2.8

### g_usb_interface_get_alternate ()

    guint8
    g_usb_interface_get_alternate (GUsbInterface *interface);

Gets the alternate setting for the interface.

#### Parameters

interface | a GUsbInterface |

#### Returns

alt setting, typically zero.

Since: 0.2.8

### g_usb_interface_get_class ()

    guint8
    g_usb_interface_get_class (GUsbInterface *interface);

Gets the interface class, typically a GUsbInterfaceClassCode.

#### Parameters

interface | a GUsbInterface |

#### Returns

a interface class number, e.g. 0x09 is a USB hub.

Since: 0.2.8

### g_usb_interface_get_subclass ()

    guint8
    g_usb_interface_get_subclass (GUsbInterface *interface);

Gets the interface subclass qualified by the class number. See `g_usb_interface_get_class()`.

#### Parameters

interface | a GUsbInterface |

#### Returns

a interface subclass number.

Since: 0.2.8

### g_usb_interface_get_protocol ()

    guint8
    g_usb_interface_get_protocol (GUsbInterface *interface);

Gets the interface protocol qualified by the class and subclass numbers. See `g_usb_interface_get_class()` and `g_usb_interface_get_subclass()`.

#### Parameters

interface | a GUsbInterface |

#### Returns

a interface protocol number.

Since: 0.2.8

### g_usb_interface_get_index ()

    guint8
    g_usb_interface_get_index (GUsbInterface *interface);

Gets the index for the string descriptor.

#### Parameters

interface | a GUsbInterface |

#### Returns

a string descriptor index.

Since: 0.2.8

### g_usb_interface_get_extra ()

    GBytes *
    g_usb_interface_get_extra (GUsbInterface *interface);

Gets any extra data from the interface.

#### Parameters

interface | a GUsbInterface |

#### Returns

a GBytes, or `NULL` for failure.

[transfer none]

Since: 0.2.8

## Types and Values

### G_USB_TYPE_INTERFACE

    #define G_USB_TYPE_INTERFACE (g_usb_interface_get_type ())

### GUsbInterface

    typedef struct _GUsbInterface GUsbInterface;