// Path: javalibusb1/src/main/java/javalibusb1/Libusb1UsbControlIrp.java
// public static Libusb1UsbControlIrp createControlIrp(UsbControlIrp irp) {
//     if(irp instanceof Libusb1UsbControlIrp) {
//         return (Libusb1UsbControlIrp) irp;
//     }
// 
//     checkIrp(irp);
//     checkControlIrp(irp);
// 
//     return new Libusb1UsbControlIrp(irp);
// }


import static javalibusb1.Libusb1UsbControlIrp.createControlIrp;
import javax.usb.*;
import javax.usb.event.*;
import javax.usb.util.*;
import java.io.*;
import java.util.*;

    public boolean isUsbHub() {
        return false;
    }

    public void addUsbDeviceListener(UsbDeviceListener listener) {
        deviceListeners.add(listener);
    }

    public void removeUsbDeviceListener(UsbDeviceListener listener) {
        deviceListeners.remove(listener);
    }

    public UsbControlIrp createUsbControlIrp(byte bmRequestType, byte bRequest, short wValue, short wIndex) {
        return new DefaultUsbControlIrp(bmRequestType, bRequest, wValue, wIndex);
    }

    public void asyncSubmit(List<UsbControlIrp> list) {
        throw new RuntimeException("Not implemented");
    }

    public void asyncSubmit(UsbControlIrp irp) {
        throw new RuntimeException("Not implemented");
    }

    public void syncSubmit(List<UsbControlIrp> list) {
        throw new RuntimeException("Not implemented");
    }

    public void syncSubmit(UsbControlIrp irp) throws UsbException {
// Path: javalibusb1/src/main/java/javalibusb1/Libusb1UsbControlIrp.java
// public static Libusb1UsbControlIrp createControlIrp(UsbControlIrp irp) {
//     if(irp instanceof Libusb1UsbControlIrp) {
//         return (Libusb1UsbControlIrp) irp;
//     }
// 
//     checkIrp(irp);
//     checkControlIrp(irp);
// 
//     return new Libusb1UsbControlIrp(irp);
// }


// Path: javalibusb1/src/main/java/javalibusb1/Libusb1UsbDevice.java
import static javalibusb1.Libusb1UsbControlIrp.createControlIrp;
import javax.usb.*;
import javax.usb.event.*;
import javax.usb.util.*;
import java.io.*;
import java.util.*;


    public boolean isUsbHub() {
        return false;
    }

    public void addUsbDeviceListener(UsbDeviceListener listener) {
        deviceListeners.add(listener);
    }

    public void removeUsbDeviceListener(UsbDeviceListener listener) {
        deviceListeners.remove(listener);
    }

    public UsbControlIrp createUsbControlIrp(byte bmRequestType, byte bRequest, short wValue, short wIndex) {
        return new DefaultUsbControlIrp(bmRequestType, bRequest, wValue, wIndex);
    }

    public void asyncSubmit(List<UsbControlIrp> list) {
        throw new RuntimeException("Not implemented");
    }

    public void asyncSubmit(UsbControlIrp irp) {
        throw new RuntimeException("Not implemented");
    }

    public void syncSubmit(List<UsbControlIrp> list) {
        throw new RuntimeException("Not implemented");
    }

    public void syncSubmit(UsbControlIrp irp) throws UsbException {
        internalSyncSubmitControl(libusb_device_ptr, createControlIrp(irp));