- use getter methods to access Usb_xxx instance variables

git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@220 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
schlaepfer
2006-11-29 11:44:06 +00:00
parent 9ec7c3c53c
commit af40b52734
12 changed files with 670 additions and 297 deletions

View File

@@ -12,26 +12,26 @@ public class Utils {
Usb_Bus usb_Bus = bus;
while (usb_Bus != null) {
System.out.println(usb_Bus.toString());
Usb_Device dev = usb_Bus.devices;
Usb_Device dev = usb_Bus.getDevices();
while (dev != null) {
System.out.println("\t" + dev.toString());
// Usb_Device_Descriptor
Usb_Device_Descriptor defDesc = dev.descriptor;
Usb_Device_Descriptor defDesc = dev.getDescriptor();
System.out.println("\t\t" + defDesc.toString());
// Usb_Config_Descriptor
Usb_Config_Descriptor[] confDesc = dev.config;
Usb_Config_Descriptor[] confDesc = dev.getConfig();
for (int i = 0; i < confDesc.length; i++) {
System.out.println("\t\t" + confDesc[i].toString());
Usb_Interface[] int_ = confDesc[i].interface_;
Usb_Interface[] int_ = confDesc[i].getInterface();
if (int_ != null) {
for (int j = 0; j < int_.length; j++) {
System.out.println("\t\t\t" + int_[j].toString());
Usb_Interface_Descriptor[] intDesc = int_[j].altsetting;
Usb_Interface_Descriptor[] intDesc = int_[j].getAltsetting();
if (intDesc != null) {
for (int k = 0; k < intDesc.length; k++) {
System.out.println("\t\t\t\t"
+ intDesc[k].toString());
Usb_Endpoint_Descriptor[] epDesc = intDesc[k].endpoint;
Usb_Endpoint_Descriptor[] epDesc = intDesc[k].getEndpoint();
if (epDesc != null) {
for (int e = 0; e < epDesc.length; e++) {
System.out.println("\t\t\t\t\t"
@@ -43,9 +43,9 @@ public class Utils {
}
}
}
dev = dev.next;
dev = dev.getNext();
}
usb_Bus = usb_Bus.next;
usb_Bus = usb_Bus.getNext();
}
}
}