Re: GIO/GVFS questions



On Mon, 2008-01-28 at 10:44 +0000, Bastien Nocera wrote:
> - Is there a way to get the device name for a GVolume, or get the
> GVolume for a particular device name? This is used in Totem when people
> (or the media insertion bits in Nautilus) call Totem with a device path.

You probably mean GMount (which is similar to GnomeVFSVolume) but
perhaps we also want this on GVolume and GDrive as well. And, no, it
isn't there yet but I've talked to alexl about adding it. Not sure about
the API but it probably needs to include the device type as well; e.g. 

 G_MOUNT_DEVICE_TYPE_WIN32_DRIVE_LETTER
 G_MOUNT_DEVICE_TYPE_UNIX_BLOCK_DEVICE
 G_MOUNT_DEVICE_TYPE_UNIX_CHARACTER_DEVICE
 G_MOUNT_DEVICE_TYPE_UNIX_HAL_UDI
 G_MOUNT_DEVICE_TYPE_LINUX_2_6_USB_DEVICE [1]
 ...

so it would become something like

 const char *g_mount_get_device_reference (GMount *mount,
                                           GMountDeviceType type);

or similar. Once the API is nailed down (I think the above might need
more work, dunno) this should be pretty easy to add to both the UNIX and
HAL volume monitoring backends as well as the gvfs backends.

       David

[1] : Dunno about this one, but the gphoto2 gvfs backend I'm working on

http://people.freedesktop.org/~david/gvfs-ptp-1.png
http://people.freedesktop.org/~david/gvfs-gphoto2-1.png

needs to return a reference to a USB device. Maybe it's worth
brainstorming about what to return for future potential vfs backends
(e.g. bluetooth). I don't know.



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