Proposed draft for the thumbnail D-Bus specification

Philip Van Hoof spam at pvanhoof.be
Sun Sep 7 05:14:17 PDT 2008


On Sun, 2008-09-07 at 13:47 +0200, Mikkel Kamstrup Erlandsen wrote:
> Just did a quick review of the Thumbnailer spec on
> http://live.gnome.org/ThumbnailerSpec as of today. Overall it seems
> good, but I have a few comments+questions.
> 
>  * It took me two reads to grok the interplay between Queue and
> Unqueue. It is elegant I give you that, but it could be explained
> better.

I agree, I will try to improve the inline documentation about this in
the specification.

>  * Why do each specialized thumbnailer has its own interface name? Ie
> com.mikkel.Thumbnailer? Since the interface is defined by the
> thumbnailer spec anyway, why is the name not? Calling it
> org.freedesktop.ThumbnailFactory or something would be more consistent
> imho.

Somewhat agree. 

What about

org.freedesktop.Thumbnailer.Specialized ?

>  * Under which circumstances does the methods throw errors and when do
> they silently fail?
>   - What happens if I Queue the file "$£@2345234.$£"?
>   - Unqueuing a non-exisitng handle is probably not worth throwing
> errors for, but should be noted

So you do want more specification for error handling? I kept is loosely
defined because error reporting is a specification by itself.

Would you be interested in investigating the possible error situations,
and specifying them individually?

I imagine it's by itself quite a task.

>  * Which URI schemes are supported? Can I thumbnail web pages? Perhaps
> there should be some introspection for this (both in the generic
> thumbnailer and the specialized ones).


This is an extremely good question and I am so happy that you raised it!
This way and now I know I don't have to explain what I was about to
change myself!

For example  (if I get your question right) ...

What if you want to register a specialized thumbnailer for all your
Email attachments, for example? -- people who know me know that I
sometimes happen to care about E-mail ;) --

That's an URI like this:

imap://user@server/INBOX/993/2.2 

That's (usually) for the second attachment if you have a multipart
text/plain plus text/html with two attachments.

This URI doesn't give-away the MIME type and more, the MIME type is not
what you want to correlate your specialized thumbnailer with in this
case. That specialized thumbnailer might want to extract the base64
encoded information and pass that information to yet another specialized
thumbnailer. 

I conclude that you want either the URI-scheme OR the MIME type to
correlate the specialized thumbnailer with.

And that's what your question at its core is about, right?

So I will have to rethink the correlation between specialized
thumbnailer and generic thumbnailer: 

- based on a variety of things which means a hard specification and an
  even harder implementation

- based on MIME type only which doesn't solve this problem

- or based on URI scheme and MIME type.. which I currently think is
  ideal.



-- 
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