1 package org.minetti.astrodevice.server.usb.jni; 2 3 /** 4 * Builder of device tree. 5 * @author Jean-Philippe MINETTI 6 */ 7 public interface UsbDeviceTreeBuilder { 8 9 /** 10 * Downs from the device tree. 11 */ 12 void down (); 13 14 /** 15 * Ups from the device tree. 16 */ 17 void up (); 18 19 /** 20 * Adds a new USB host controller. 21 * @param description Description of USB host controller. 22 */ 23 void addHostController (String description); 24 25 /** 26 * Adds a new root hub in the tree. 27 */ 28 void addRootHub (); 29 30 /** 31 * Adds a new hub in the tree. 32 * @param vendorId Vendor ID of USB hub (must be between 0 and 65535). This corresponds to 33 * <code>idVendor</code> field of USB specification (assigned by the USB-IF). 34 * @param productId Product ID of USB hub (must be between 0 and 65535). This corresponds to 35 * <code>idProduct</code> field of USB specification (assigned by the manufacturer). 36 * @param manufacturerName Manufacturer name of USB hub (must be less or equal than 127 37 * characters). This corresponds to string indexed by the <code>iManufacturer</code> 38 * field of USB specification. 39 * @param productDescription Product description of USB hub (must be less or equal than 127 40 * characters). This corresponds to string indexed by the <code>iProduct</code> field 41 * of USB specification. 42 * @param productVersion Product version of USB hub (must be between 0 and 65535). This 43 * corresponds to <code>bcdDevice</code> field of USB specification (assigned by the 44 * manufacturer). 45 * @param serialNumber Serial number of USB hub (must be less or equal than 127 characters). 46 * This corresponds to string indexed by the <code>iSerialNumber</code> field of USB 47 * specification. 48 * @param deviceClass Class code of USB hub (must be between 0 and 255). This corresponds to 49 * <code>bDeviceClass</code> field of USB specification (assigned by the USB-IF). 50 * @param deviceSubClass Subclass code of USB hub (must be between 0 and 255). This corresponds 51 * to <code>bDeviceSubClass</code> field of USB specification (assigned by the 52 * USB-IF). 53 * @param deviceProtocol Protocol code of USB hub (must be between 0 and 255). This corresponds 54 * to <code>bDeviceProtocol</code> field of USB specification (assigned by the 55 * USB-IF). 56 */ 57 void addHub (int vendorId, int productId, String manufacturerName, String productDescription, int productVersion, String serialNumber, short deviceClass, 58 short deviceSubClass, short deviceProtocol); 59 60 /** 61 * Adds a new device in the tree. 62 * @param vendorId Vendor ID of USB device (must be between 0 and 65535). This corresponds to 63 * <code>idVendor</code> field of USB specification (assigned by the USB-IF). 64 * @param productId Product ID of USB device (must be between 0 and 65535). This corresponds to 65 * <code>idProduct</code> field of USB specification (assigned by the manufacturer). 66 * @param manufacturerName Manufacturer name of USB device (must be less or equal than 127 67 * characters). This corresponds to string indexed by the <code>iManufacturer</code> 68 * field of USB specification. 69 * @param productDescription Product description of USB device (must be less or equal than 127 70 * characters). This corresponds to string indexed by the <code>iProduct</code> field 71 * of USB specification. 72 * @param productVersion Product version of USB device (must be between 0 and 65535). This 73 * corresponds to <code>bcdDevice</code> field of USB specification (assigned by the 74 * manufacturer). 75 * @param serialNumber Serial number of USB device (must be less or equal than 127 characters). 76 * This corresponds to string indexed by the <code>iSerialNumber</code> field of USB 77 * specification. 78 * @param deviceClass Class code of USB device (must be between 0 and 255). This corresponds to 79 * <code>bDeviceClass</code> field of USB specification (assigned by the USB-IF). 80 * @param deviceSubClass Subclass code of USB device (must be between 0 and 255). This 81 * corresponds to <code>bDeviceSubClass</code> field of USB specification (assigned 82 * by the USB-IF). 83 * @param deviceProtocol Protocol code of USB device (must be between 0 and 255). This 84 * corresponds to <code>bDeviceProtocol</code> field of USB specification (assigned 85 * by the USB-IF). 86 */ 87 void add (int vendorId, int productId, String manufacturerName, String productDescription, int productVersion, String serialNumber, short deviceClass, 88 short deviceSubClass, short deviceProtocol); 89 90 }