Re: Specifying thumbnailers as a service



On Friday 29 August 2008, Brian J. Tarricone wrote:
> Philip Van Hoof wrote:
> > On Fri, 2008-08-29 at 11:22 +0100, Rob Taylor wrote:
> > 
> >> I wonder if it'd make sense to allow multiple services to provide 
> >> thumbnailing for different mime types. This could be done by having the 
> >> thumbnailing service(s) register bus names of the form 
> >> org.freedesktop.thumbnailer.<mime type>, and the application could look 
> >> up the bus name for the mime type of the file it wishes to thumbnail, 
> >> and dbus-activation would take care of running the appropriate service.
> > 
> > This makes sense to me. 
> 
> This sounds overly complicated to me.  Now you're assuming that any app 
> that wants to load thumbnails is also capable of figuring out the 
> mime-type of the file it wants to load.  For a file manager, sure, but I 
> don't think any app that could potentially want thumbnails should have 
> to be mime-type-aware.

I agree, it's the job of that "service" to figure out the mimetype (and therefore the actual backend)
to use.  Also, I would hate seeing the output of `qdbus` be cluttered with 30 (*) thumbnail "services",
when all of this is in fact implemented by one process... It sounds to me like we want a
frontend and a backend API, i.e. a single entry point for requesting a thumbnail,
but the possibility for that thumbnail service to delegate the work to other implementations
for specific mimetypes. Hmm, maybe that's as simple as saying that:

org.freedesktop.thumbnailer.generic is used by default, and that one can
find out and call a org.freedesktop.thumbnailer.<specific mime type> service
if it doesn't know how to handle that mimetype itself.

This way we have mimetype determination in the main service (the .generic),
as well as all the "builtin" thumbnailers (*), while still allowing others to extend
the system with support for 3rd-party formats.
Obviously the .generic service would be the one provided by the desktop environment.

(*) KDE's kio_thumbnail supports 32 mimetypes out of the box -- and you get 36 more mimetypes
if you install koffice on top, so 68 in total. I don't want 68 dbus names on the session bus.

-- 
David Faure, faure kde org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


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