Re: [patch] one-to-many HAL integration



Hi,

On Thu, 2004-08-12 at 13:17 -0700, Sriram Ramkrishna wrote:
> On Thu, Aug 12, 2004 at 09:08:36AM +0200, Alexander Larsson wrote:
> > Also, the gnome-vfs-volume-ops.c parts means we have to link gnome-vfs
> > to libhal. I had hoped we could keep that dependency to the vfs daemon,
> > to decrease the number of libraries every app links to. (especially the
> > number of unstable libs.)
> 
> I agree that reducing dependicies is a godo thing, but wouldn't
> that require some code movement to do that?  If so, I have something
> related.
> 
> I'm trying to write my iriver driver which is not based on the
> usb mass storage driver but I have to communicate with the iriver
> mp3 player using USB commands.  But I want to be able to have the
> gnome-vfs daemon detect that the iriver is plugged in through HAL.
> 
> Currently davidz's patch does not address this corner case as it
> only receives from the HAL dbus channel events where the capability
> of the device is something the kernel sees as a 'disk'.  But the
> capability would have to go into gnome-vfs proper but thats not
> really optimal as you would have to support a lot of usb devices that
> uses libusb instead of usb mass storage.  
> 
> So what do we do in this case?  I believe it goes into 
> gnome-vfs-volume-ops.c but we can't support every device in that
> section of code IMHO.
> 

I haven't looked at the code for your module, but I would presume that
if your iriver module accept an URI that uniquely identifies the address
of the USB device, e.g. iriver:///<usb-bus-number>/<usb-device-number>
then the GNOME VFS daemon, specifically gnome-vfs-hal-mounts.c, can
receive the event from HAL [1] and create the icon in computer:/// and
on the desktop. 

This would have the advantage that it could also be used on systems that
doesnt't use HAL by manually entering the path, iriver:///3/42, in
Nautilus or something.

Cheers,
David

[1] : You would need to tag your device with a device information file
that merges something as specified here

 http://davidz.fubar.dk/projects/hal/spec/hal-spec.html#device-properties-portable_audio_player

specifically you will want to have portable_audio_player.access_method
set to iriver or something. See also

 http://davidz.fubar.dk/projects/hal/spec/hal-spec.html#fdi-example-mp3player







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