Re: Fixing gvfs-backend-afc for iPhone/iPod Touch access
- From: Bastien Nocera <hadess hadess net>
- To: "Martin S." <info sukimashita com>
- Cc: gvfs-list <gvfs-list gnome org>
- Subject: Re: Fixing gvfs-backend-afc for iPhone/iPod Touch access
- Date: Fri, 31 Jul 2009 11:43:39 +0100
On Fri, 2009-07-31 at 12:26 +0200, Martin S. wrote:
> On Fri, 2009-07-31 at 01:02 +0100, Bastien Nocera wrote:
<snip>
> > Last problem I would have is with parenting the mount to its volume.
> >
> > David, any ideas?
> >
>
> Thanks for the help so far!
>
> This seems to be an issue for my GTK file chooser which appears to list
> only the volumes or enclosed mounts, the backend mount does not appear
> for selection in the sidebar. So we need "parenting".
It's also needed for Rhythmbox to look at the device.
> If we introduce shadowing again and it is the right way (despite I don't
> get why the backend mount can't simply parent itself to the volume which
> issued the mount event), perhaps the GProxyShadowMount should inherit
> everything from the mount it shadows automatically?
Shadowing is only to be used when a device has multiple roots. The use
case was for an MTP devices which shows multiple heads - the internal
memory and the add-on memory card - on one root, but needs to have 2
mounts for things like image directory detection to work properly.
There's no use for shadow mounts in the AFC code.
> Alongside that, there would be code duplication for setting the
> display_name/icon in both a volume monitor's volume implementation and
> in the backend's mount() callback.
The volume monitor is supposed to try and do its best. If the code isn't
really that much different, then maybe putting the code in a separate
file that both could share would be best.
> The gphoto2 stuff appears to partly circumvent the issue by letting the
> monitor volume simply grab the name/icon from HAL if previously set.
>
> However in some cases it additionally still determines the name with
> "similar" code in both monitor volume creation and the backend mount().
>
> This will be an issue once more complex code is added to properly handle
> all device variants (e.g.: set correct icon fallback names like
> phone-apple-iphone-3gs-white).
(Note that my comment about using libgudev instead of HAL still stands,
we won't add HAL-based stuff in gvfs, but it can be lower priority)
You'll be able to do that when the udev callout is added. See:
http://cgit.freedesktop.org/~teuf/libgpod/log/?h=devicekit
> So either
> a) two mounts, backend mount is shadowed, monitor mount inherits
> shadowed mount name/icon and whatever else
> b) one volume, backend mount is parented to volume when monitor issues
> the mount
It will be b) when we figure out how to do it.
> Additionally, I tested that the gvfsd-afc backend now exits if the right
> device was unplugged with the great "exit(1)" call variant. ;)
>
> This fixes left over icons on unplug. Things appear to work nicely with
> multiple devices attached aswell (it's nice to see copying files from
> phone to phone).
Great.
> Still there appears to be some read/write issues when testing sqlite3 db
> creation needed for music sync (probably some seek issue).
> Investigating...
I had problems writing files with the original gvfs code from Patrick,
but never had a chance to debug the problem...
Cheers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]