Specifying thumbnailers as a service

Philip Van Hoof spam at pvanhoof.be
Fri Aug 29 05:34:21 PDT 2008

On Fri, 2008-08-29 at 13:59 +0200, Philip Van Hoof wrote:
> On Fri, 2008-08-29 at 11:03 +0100, Bastien Nocera wrote:
> > On Fri, 2008-08-29 at 11:25 +0200, Philip Van Hoof wrote:
> > > 
> > >       <arg type="i" name="size_x" direction="in" />
> > >       <arg type="i" name="size_y" direction="in" />
> > 
> > In the libgnomeui API, you only set one of those, and aspect ratio is
> > preserved. The size passed is the maximum width and height.
> Or we make it even more simply and have "normal", "big", "small" only.

Or we make it even more simple, and we don't deal with sizes at all.

The thumbnailer must make all sizes it supports. It's actually an
implementation detail of the thumbnailer vs. the library for accessing

This DBus specification is only about "requesting the creation of a
thumbnail". It's the responsibility of a library to do the final
resizing operation and pass it as a toolkit specific pixbuf instance to
the application developer (in gtk+ that's for example GdkPixBuf).

We don't pass pixbufs over DBus, that makes no sense.

Which also means that we don't return any uri. That client library
calculate that path by following the thumbnail-spec [1].

Therefore isn't the uri of the thumbnail itself relevant for DBus.

That, combined with Rob Taylor's proposal, brings me to this DBus API:

<node name="/">

foreach ([mime-part] in supported_mime_parts) {

  <interface name="org.freedesktop.Thumbnailer.[mime-part]">  
    <method name="Create">
      <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
      <arg type="as" name="uris" direction="in" />
    <method name="Move">
      <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
      <arg type="as" name="from_uris" direction="in" />
      <arg type="as" name="to_uris" direction="in" />
    <method name="Delete">
      <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
      <arg type="as" name="uris" direction="in" />



--- footnotes
[1] http://jens.triq.net/thumbnail-spec/index.html

Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 

More information about the xdg mailing list