Review of the thumbnailer spec

Philip Van Hoof spam at pvanhoof.be
Tue May 19 01:15:07 PDT 2009


On Tue, 2009-05-19 at 01:30 +0200, Jannis Pohlmann wrote:
> On Mon, 18 May 2009 16:01:27 +0200
> Jannis Pohlmann <jannis at xfce.org> wrote:
> 
> > On Mon, 18 May 2009 13:48:08 +0200

[CUT]

 
> > As a consequence of the above I'm wondering about a new method called
> > Failed(). But even that doesn't really solve the problem of where the
> > failed thumbnails are stored of course.
> > 
> > > org.freedesktop.thumbnails.Manager
> > > 	- Register
> > > 	- GetSupported
> > 
> > I'm thinking about the situation where manager and generic thumbnailer
> > are implemented as separate daemons. In that case we'd probably want
> > additional methods like this one:
> > 
> >   - GetThumbnailers (returning the D-Bus names of all registered
> >     specialized thumbnailers).
> > 
> > And maybe a signal 
> > 
> >   - Registered() (including the D-Bus name of a newly registered
> >     specialized thumbnailer).
> 
> Ideas for an additional method:
> 
>   - Unregister (to explicitely unregister the D-Bus name of a
>     thumbnailer).
> 
> At the moment implementations of the manager interface have to listen
> to the "destroy" signal of proxies created for dynamically registered
> thumbnailers. This is more of an implicit unregister which I don't
> think is nice.
> 
> That would also lead to another signal:
> 
>   - Unregistered (sent when the D-Bus name of a thumbnailer is
>     unregistered using Manager.Unregister()).
> 
> Based on that, clients of the generic thumbnailer/manager services
> could cache the supported MIME types and listen for Registered and
> Unregistered signals to update this cache.

If the only use-case we can find for "Unregistered" is updating the 
list of supported MIME parts, then we should have a signal for 
"SupportChanged" or something like that instead.

However, do note that GetSupported itself isn't complete:

A supported MIME part must always fall under a UriScheme too.

It's for example possible that image/jpeg for file:// is supported by a
specific specialized thumbnailer, but not for http://, a good example
would be the EPeg library which can't work with VFS URIs at this moment.

So if you want to take GetSupported more serious than what the spec
offers now, then you should involve the UriScheme information too.


-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be



More information about the xdg mailing list