- We have a iphone_get_specific_device() function to connect by
usb bus/device however it is not exposed in the public API.
Attached patch changes it.
This function is mainly useful for libiphone consumers (such as
iFuse or gvfs-backend-afc) to be able to pick out one device since
iphone_get_device only returns the first one found.
This also makes the gvfs-backend-afc thing work with an uri like
"afc://[usb:003,015]/".
- My attempts to update Patrick Walton started for the AFC
backend for GVFS have also shown that iphone_get_specific_device()
actually fails.
As it happens, libusb seems not to be able to provide the devnum
and location members consistently over calls (or I do something
wrong). Also digging into the lsusb sources and other simple
"loop-over-bus-devices" reveals that the bus->dirname and
dev->filename members are used instead (and are consistant).
I'll attach a patch to address this issue aswell as it is
required to make iphone_get_specific_device() work at all for
me.
This might also be the reason why libiphone might fail for some
people, since even iphone_get_device() passes bus->location +
dev->devnum members to iphone_get_specific_device() which can
turn up not being matched.