--- apps/obex_test.c | 7 ++++++- include/openobex/obex_const.h | 10 ++++++++++ lib/usb1obex.c | 5 +++++ lib/usbobex.c | 5 +++++ 4 files changed, 26 insertions(+), 1 deletions(-)
diff --git a/apps/obex_test.c b/apps/obex_test.c index 8ce089f..3a2747c 100644 --- a/apps/obex_test.c +++ b/apps/obex_test.c @@ -274,7 +274,12 @@ int main (int argc, char *argv[]) interfaces_number = OBEX_EnumerateInterfaces(handle); for (i=0; i < interfaces_number; i++) { obex_intf = OBEX_GetInterfaceByIndex(handle, i); - printf("Interface %d: %s %s %s\n", i, + printf("Interface %d: idVendor: %#x, idProduct: %#x, bus %d, dev %d, intf %d, %s %s %s\n", i, + obex_intf->usb.idVendor, + obex_intf->usb.idProduct, + obex_intf->usb.bus_number, + obex_intf->usb.device_address, + obex_intf->usb.interface_number, obex_intf->usb.manufacturer, obex_intf->usb.product, obex_intf->usb.control_interface); diff --git a/include/openobex/obex_const.h b/include/openobex/obex_const.h index df03a98..a8f216e 100644 --- a/include/openobex/obex_const.h +++ b/include/openobex/obex_const.h @@ -85,6 +85,16 @@ typedef struct { char *data_interface_active; /** Service information descriptor, may be NULL if absent */ obex_usb_intf_service_t *service; + /** USB-IF vendor ID */ + unsigned int idVendor; + /** USB-IF product ID */ + unsigned int idProduct; + /** Bus number that a USB device is connected to */ + unsigned int bus_number; + /** Device address on the bus */ + unsigned int device_address; + /** USB device interface number */ + unsigned int interface_number; /** Internal information for the transport layer in the library */ struct obex_usb_intf_transport_t *intf; } obex_usb_intf_t; diff --git a/lib/usb1obex.c b/lib/usb1obex.c index 1dffa27..d819ec8 100644 --- a/lib/usb1obex.c +++ b/lib/usb1obex.c @@ -280,6 +280,11 @@ int usbobex_find_interfaces(obex_interface_t **interfaces) current->data_interface_idle_description); get_intf_string(usb_handle, &intf_array[num].usb.data_interface_active, current->data_interface_active_description); + intf_array[num].usb.idVendor = dev_desc.idVendor; + intf_array[num].usb.idProduct = dev_desc.idProduct; + intf_array[num].usb.bus_number = libusb_get_bus_number(current->device); + intf_array[num].usb.device_address = libusb_get_device_address(current->device); + intf_array[num].usb.interface_number = current->control_interface; } find_obex_service_descriptor(current->extra_descriptors, current->extra_descriptors_len, diff --git a/lib/usbobex.c b/lib/usbobex.c index 2ad91a0..f103137 100644 --- a/lib/usbobex.c +++ b/lib/usbobex.c @@ -291,6 +291,11 @@ int usbobex_find_interfaces(obex_interface_t **interfaces) current->data_interface_idle_description); get_intf_string(usb_handle, &intf_array[num].usb.data_interface_active, current->data_interface_active_description); + intf_array[num].usb.idVendor = current->device->descriptor.idVendor; + intf_array[num].usb.idProduct = current->device->descriptor.idProduct; + intf_array[num].usb.bus_number = atoi(current->device->bus->dirname); + intf_array[num].usb.device_address = atoi(current->device->filename); + intf_array[num].usb.interface_number = current->control_interface; find_obex_service_descriptor(current->extra_descriptors, current->extra_descriptors_len, &intf_array[num].usb.service); -- 1.6.0.6 ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Openobex-users mailing list Openobex-users@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/openobex-users