Proposed draft for the thumbnail D-Bus specification

Philip Van Hoof spam at pvanhoof.be
Fri Oct 17 07:32:48 PDT 2008


The specification[1] and the prototype[2] have been adapted to this
proposal

[2] https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-thumbnail/ 
[1] http://live.gnome.org/ThumbnailerSpec

To see the dbus-glib XML being used by the prototype:

https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-thumbnail/daemon/thumbnailer.xml


To see a thumbnailer library using the prototype daemon:

https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-thumbnail/thumbs/hildon-thumbnail-factory.c


To register a specialized thumbnailer, you now simply specify which VFS
is supported:

[D-BUS Thumbnailer]
Name=com.Y.Thumbnailer
MimeTypes=image/jpeg
SupportedVFS=GIO
Comment=free comment

> I will, however, consider adding bits and pieces to the spec that will
> make it less painful.
> 
> I could for example let the caller pass a string like this:
> 
> Handle = org.freedesktop.thumbnailer.Generic.Queue (
> 	["smb://server/file.jpeg", "ftp://server/thing.jpeg"],
> 	["image/jpeg", ["image/jpeg"],
> 	"GIO/GVFS",
> 	0)
> 
> <node name="/org/freedesktop/Thumbnailer">
>   <interface name="org.freedesktop.thumbnailer.Generic">
> 
>    <method name="Queue">
>       <arg type="as" name="uris" direction="in" />
>       <arg type="as" name="mime_hints" direction="in" />

>       <arg type="s" name="VFS_layer_id" direction="in" />

This field is what will be matched against the SupportedVFS registration
of the specialized thumbnailer.

>       <arg type="u" name="handle_to_unqueue" direction="in" />
>       <arg type="u" name="handle" direction="out" />
>     </method>
> 
>    ...
> 
>    </interface>
> </node>
> 
> And we could have an interface for specialized thumbnailers like this:
> 
> <node name="/com/company/Thumbnailer">
>   <interface name="org.freedesktop.thumbnailer.Thumbnailer">  
>     <method name="Create">
>       <arg type="as" name="uris" direction="in" />
>     </method>
> 
>     <method name="GetSupportedVfsLayers">
>       <arg type="as" name="VFS_layer_ids" direction="out" />
>     </method>
> 
>   </interface>
> </node> 
> 
> Or have a string-list key in the registration of the specialized thumbnailer.
> 
> And if the VFS_layer_id of Queue doesn't match any of the ones being
> returned by the specialized thumbnailer, then the specialized
> thumbnailer ain't elected to handle the request coming from Queue.
> 
> This would not create interopability, but it would make it possible to
> have thumbnailers for KDE and thumbnailers for GNOME being installed at
> the same time and being elected depending on the "VFS_layer_id" being
> passed.
> 
> I think that's about the best you can do in the spec for this
> problem ...
> 
> > > (That said, I do think it would be good to start work like this. But to
> > > base new specs on this huge problem being solved already, is counter
> > > productive and will not lead to anything usable.)
> > 
> > The thumbnail spec does not assume that the problem is solved already,
> > it is just prepared for the glorious day when it finally is solved.
> 
> Indeed.
> 
> (and I know it sucks)
> 
> > To make this clear, we can add a sentence like "URIs are interpreted in
> > a implementation specific way.  The file:// scheme is the only one you
> > can rely on.", require specific thumbnailers to implement file://, and
> > allow them to implement more.
> 
> *nods*
> 
> 
> -- 
> 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
> 
> _______________________________________________
> xdg mailing list
> xdg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xdg
> 
-- 
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