Allow choosing specific device
Reported by Martin S. | April 12th, 2009 @ 07:54 PM | in 1.0 Release
- 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.
Comments and changes to this ticket
-
Jonathan Beck April 13th, 2009 @ 07:59 AM
- Milestone set to 1.0 Release
-
Matt Colyer April 13th, 2009 @ 03:40 PM
- State changed from new to resolved
(from [bd31783d7fde0b5bd101f4a3f97ca1aca2aa6fab]) Expose iphone_get_specific_device() in API [#24 state:resolved]
Signed-off-by: Matt Colyer matt@colyer.name http://github.com/MattColyer/lib...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A project around supporting the iPhone in Linux.
See http://libimobiledevice.org
People watching this ticket
Attachments
Referenced by
- 24 Allow choosing specific device (from [bd31783d7fde0b5bd101f4a3f97ca1aca2aa6fab]) Expose ...