The volume manager modules consists mainly of two interfaces - ThunarVfsVolume and ThunarVfsVolumeManager - which will be implemented differently, depending on the target operating system. The current requirements list is available at: http://xfce.org/~benny/tmp/ThunarVFS-volume-manager-requirements-20050613.png If no other requirements arise, the interface will be based on this diagram.
Created attachment 253 Volume manager interface header file The header file for a volume manager interface corresponding to the requirements shown above.
Created attachment 254 Volume manager interface source file The source of the volume manager interface defined by the requirements shown above.
I know it's impossible to come up with a list of every possible device that currently exists, or will exist in the future, but might it make sense to provide a few more VOLUME_KIND types? I'm thinking specifically of _USB_DRIVE here, and maybe make some attempt to identify some special-purpose devices, like _MUSIC_PLAYER, _CAMERA, etc. Though that last bit may be difficult to do for different platforms. I think _USB_DRIVE should be included, at the very least. For the ThunarVfsVolumeManager interface, is there a need for a volumes_changed signal? I suppose it's possible that the display name of the volume might change (though I guess that depends on what's used as the display name). For a remount in a new location, I guess a _removed followed by an _added makes the most sense. The ThunarVfsVolumeStatus could also change, (unmounted->mounted for example), and the UI would probably want to know about that to possibly change the icon, or maybe go from greyed-out/italics to normal text (or something).
Of course we need more volume types, and it's no problem to add all kinds of devices now. If an implementation doesn't support certain devices, it will simply not report any volumes of the given type, no problem here. I just needed something to start with. About the changed signal: It's better to have this with the ThunarVfsVolume, rather than with the ThunarVfsVolumeManager. It's already done that way with the current code, just the attached files are a bit outdated. ;-)
More or less final interface committed with revision 19712. 2006-02-02 Benedikt Meurer <benny@xfce.org> * thunar-vfs/thunar-vfs-volume.{c,h}, thunar-vfs/thunar-vfs.symbols: Add eject(), mount() and unmount() methods to the ThunarVfsVolume interface. The interface is therefore mostly done now, maybe some small additions required for certain backends in the future. Bug #995.