The libusb wrapper of usb4java is now considered to be the central
main part of usb4java and the usb4java project itself only contains
the Java code of this library. The javax.usb stuff is moved into
the usb4java-javax project and the native JNI code is moved into the
libusb4java project. Binary files are no longer present as Java
resources. Instead they are (hopefully) automatically generated and
published as separate JAR files (And Maven Dependencies) so they can
be easily and selectively included into a project.
Create more split JARs: libusb (org.libusb4java + C libs), libusb-no-natives (only org.libusb4java),
libusb-natives (only C libs), usb4java (only org.usb4java) and the main JAR with everything.
The content is correct for all of them, but the dependencies etc. listed in META-INF/ need some work as they
are simply equal for everybody.
This results in them not being an implementor of the javax.usb interface, which is easily remedied in the
usb4java part by just having a new constructor that takes the LibUsb descriptor instead of the javax.usb
compatible ones. Also, to remove the dependency from DescriptorUtils, the code for a simple toString() of the
descriptors had to be duplicated in the usb4java.descriptors.Simple*Descriptors.
A new method, DescriptorUtils.getDirectionName() was added to translate the right endpoint address bit to IN
or OUT direction strings respectively.
Tests were updated accordingly.
The memory for the device descriptor is now allocated in an appropriately sized direct ByteBuffer.
The size is calculated directly in native code, to avoid any possible issues with alignment, padding or
compilers calculating something different from the expected 18 bytes.
This way users don't have to care about freeing the device descriptor, and can easily reuse the same while
looping over different devices.