Re: Automounting GVFS systems when devices are added?



Hey Patrick,

On Sun, 2008-10-12 at 17:02 -0700, Patrick Walton wrote:
> Hi,
> 
> I've been working on a GVFS backend for devices that use Apple File 
> Control (iPhone, iPod Touch, etc.). These devices use a proprietary SSL 
> connection, including certificate exchange, over a custom TCP-like 
> protocol over USB, meaning that a userspace daemon is the only feasible 
> way to communicate with them. I chose GVFS over the existing FUSE 
> implementation because FUSE is not very well integrated with the desktop 
> and is Linux-specific. (The code is at 
> http://github.com/pcwalton/gvfs-nw/tree/iphone for the curious.)

Glad to see you've made progress on that, I should be receiving hardware
soon to be able to help you out with the implementation, and hopefully,
get this integrated into gvfs 2.26.

> It is essentially working, but I'm not sure what to do about 
> automounting. When the user plugs in a supported device, I want to 
> automatically gvfs-mount afc://com.apple.afc/.

A quick comment on the URI. This doesn't allow for 2 phones/ipod touches
to be plugged in at the same time. Is this on purpose? What happens when
2 are plugged in?

I think it would be best to use the same scheme as gphoto, and have
afc://[usb:bus_num:device:num]/ as the URI scheme.

>  Given that as I 
> understand it policy is not supposed to be implemented in HAL (which is 
> possibly being deprecated in favor of DeviceKit in the future anyway?) 
> what is the recommended way to do this?

You can certainly use HAL for now. You should modify the code under
monitor/hal to add detection of those devices (which should be marked in
HAL as devices using the AFC protocol via a libiphone provided fdi
file).

Cheers



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]