Hey Alex, On Wed, 2009-01-28 at 21:48 +0200, Alex Kanavin wrote: > 2009/1/28 Bastien Nocera <had...@hadess.net>: > > We're trying to add USB device support to gvfs[1], and realised that > > openobex' current API isn't good enough to uniquely identify USB > > devices. > > > > The patch attached add support for a "path" struct member that will be > > exported, and can be used by infrastructure to figure out which openobex > > interface number belongs to which physical device. > > From the openobex patch: > current = check_intf(dev, c, i, a, bus->dirname, dev->filename, current); > > Both bus->dirname and dev->filename properties are undocumented (you > won't find them anywhere in libusb 0.x documentation) and non-portable > (only work on Linux).
They don't only work on Linux. They also work on BSDs, and MacOS X (at least). It's what libgphoto2 uses, and I believe it works on much more than just Linux. > I know they're used elsewhere (gphoto), but this > is just not the right thing to add to OpenOBEX. > > HOWEVER, > libusb 1.0 has just been released. It has a much nicer looking API, > and part of that API allows getting bus and device numbers: > http://libusb.sourceforge.net/api-1.0/group__dev.html > I will write a patch that ports OpenOBEX to libusb 1.0, and adds those > properties (and the usb interface number) to the OpenOBEX USB API > structure. libusb 1.0 only works on Linux :) I've had to use it quite a bit for libfprint work. > Then we can revisit the gvfs usb obex support. Is that ok? I'd rather fix the discovery properly so we can avoid all the kind of problems we'd get from using only what's currently exported from openobex. The only problem I'd see with the patch is that it probably breaks ABI... Cheers ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Openobex-users mailing list Openobex-users@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/openobex-users