Media/Device Type Spec???

Jerry Haltom jhaltom at feedbackplusinc.com
Wed Aug 18 19:38:48 EEST 2004


...(reposted from Gnome Utopia list)...


I am just posting this to clear up my idea in the "we need a spec for
handling mediums" thread. What do people think?

We add new mime types to the shared mime package, for example (and just
an
example):

device/cd-reader
device/dvd-reader
device/cd-writer
device/dvd-writer
device/audio-cd
device/data-cd
device/dvd
device/blank-cd
device/blank-dvd
device/svcd
device/camera
device/flash-card
...etc (these names could be better)

A application's .desktop file declares that application as handling one
or
more of these mime types.

The .desktop file has a DeviceExec= line, accepting various substitution
values. %d = Unix device file, %u = HAL udi. Or other stuff.

Associations between a device/media type and it's application is handled
EXACTLY as an association between a normal mime type and it's
applications.

Some program (GVM) sets these.

GVM launches the correct program when it needs to.

Maybe these types could be retrieved from the device by HAL, for
instance
using volume.fstype, volume.is_disc, volume.is_rewritable... etc. Or
maybe
we add info.types as a list of supported mime types.

Of course, a device could be more than one mime type at the same time.
Like, a CD drive could be both a cd-reader and a cd-writer. Whatever. ;)

... added this ...

This doesn't seem to be hacking mime to me. It just alters the general
definition of MIME from "type of data stream" to "type of resource".
Isn't this appropriate?


Also. DeviceExec is not needed, as somebody on Utopia pointed out:

... quote .. .Sean Middleditch
If a single application is intended to handle two totally different
types of devices using two totally different device identification
methods, then use two .desktop files, just like we have multiple non-
menu-entry .desktop files now for the new MIME system.
... end quote ...


Sorry for the general disorder of this post. Busy day. ;)




More information about the xdg mailing list