Great! See responses below, but I will also mention that you do _not_ have to re-use the Linux platform implementation. It may actually be easier for you to create a new platform implementation. The Linux implementation has a lot of baggage that is needed to work with the constraints of the Linux USB interface (usbfs). I would start with copying the "LinuxUsbServices" class into a new class "LibUsbServices" (or something like that) in your own package name (instead of "com.ibm.jusb.os.linux"). Strip out all the code, and start building the platform implementation around that class.
If you really want to re-use the Linux implementation, I would at least highly recommend not re-using the JNI code, as I seriously doubt there will be much in common between the JNI from the Linux implementation and the JNI from the libusb implementation. Finally I will mention that if you are only doing this so javax.usb will work on Windows, I think an easier approach may be to simply use the libusb-windows Kernel-mode driver instead of the whole libusb package. I looked into that a while ago, and it seemed very possible to write a javax.usb Windows implemenation using just the libusb Kernel module (that is really the only missing piece of javax.usb on Windows). In fact I did a basic javax.usb on windows implemenation a long time ago, which is still in CVS if you want to look at it. It really only needs a cleanup (and better build system - I hate developing on Winbloze) and a kernel module. If you're not just trying to get javax.usb on Windows, ignore all that. ;-) But, do whatever you think is best and easiest. I'm excited to see it happen! Let me know if I can help with anything. thanks. On 8/2/07, Islam Beltagy <[EMAIL PROTECTED]> wrote: > Hi, > > I am working in the Libusb implementation for Windows. > I found that the implementation requires these changes: > 1-In Libusb: > Build the correct hierarchy of hubs and devices This is the main reason I didn't pursue a libusb implementation for javax.usb. > Return number of ports of hubs and speed of devices This information really should be provided by libusb but isn't critical. The number of ports is certainly not very important to an application (although the javax.usb libusb implementation won't pass TCK without it). The speed of devices is even less important. I would not worry about trying to add these unless it's easy. In fact I think that both of these pieces of info is available by querying the hub? I would have to check to be sure. If that is the case, the libusb implementation can (in java) simply query each hub during enumeration or hub hotplug to get this info instead of needing a special libusb interface to the info. > Support asynchronous control submission It doesn't support async IO on the control pipe? But it does on other pipes? Very weird. If you can't get this into libusb (seems a design bug in libusb if not) then you can implement this by using a proxy Thread in the javax.usb libusb implementation. But native async support is best of course. I can help with this part, it should actually be rather easy to use a proxy thread to manage control submissions. > Support short packets This is very infrequently used by apps. Same as before, not critical to getting javax.usb to work but needed to pass TCK. > Support the Topology listener Specifically you only need to be able to update the topology map when devices are connected or disconnected. you don't have to use the same topology listener that the Linux implementation uses. Does libusb not support hotplugging? That would really be crazy... > 2-In the Java implementation: > Necessary changes after changing Libusb > Get use of already implemented asynchronous IO What is this? > Get use of already implemented Isochronous pipe. What is this? > I hope I can do these changes soon. If you have any comments or help or > advices, they are really appreciated. > I hope I can pass the TCK. > > Thank you for your help > > bye > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > javax-usb-devel mailing list > javax-usb-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/javax-usb-devel > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ javax-usb-devel mailing list javax-usb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/javax-usb-devel