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

Shared MIME-Info: Common Assess Implmentation

Regarding: http://www.freedesktop.org/standards/shared-mime-info.html

I've been developing a widget library port for X11 that has functions for retreiving the MIME type of a file and looking up the default program associated with a MIME type.

So currently because I use KDE I found the config files that KDE uses and wrote my own code to do the MIME Type -> App lookup, and used file(1) for file -> MIME type.

Anyway I eventually stumbled on the Shared MIME-Info project page and I'm glad someone is "fixing" this whole situation.

Now to the point, I'd like to see a common library or tool for developers to access the MIME database. Now correct me if I'm wrong (I did read the spec...), there isn't a standard implementation of the functions I've described above for all applications to link to?

I see there is the command "update-mime-database" for helping developers update the DB... but there isn't any similar command for the read-only tasks of accessing the database for specific information. Namely MIME->App and File->MIME lookups.

Now I don't mind writing said code, but maybe I'm missing something and it's already there somewhere, or there is a good reason to make every developer/project re-write this over and over again?

Also how much of the Linux install base has Shared MIME-Info installed? Is it shipped with major distributions yet? I need to make a decision to support one or more of these MIME databases and in what order. Personally I'd like to support just freedesktop's "Shared MIME-Info" and forget all the other desktop specific ones, but I fear I may alienate users. Current my apps don't ask for much in terms of dependencies, so I'm loath to add another dependency...

FYI: My library is http://www.memecode.com/lgi.php

Matthew Allen (matthew cisra canon com au)
Clippy is an example of an intelligent agent:
"It looks like you're writing a letter, Mr. Anderson. Tell me, what
good is a letter when you're unable to type?" - Jonathan the Nerd

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