Proposed draft for the thumbnail D-Bus specification
Philip Van Hoof
spam at pvanhoof.be
Fri Sep 5 07:47:07 PDT 2008
On Fri, 2008-09-05 at 11:28 +0200, Philip Van Hoof wrote:
> Hi Tommi, Rob and Havoc!
This is now also working in the prototype.
This is documentation about how you can turn a internal plugin of this
generic thumbnailer implementation into a standalone specialized
thumbnailer (as specified in the spec).
What will happen if you request the creation of a thumbnail after you
installed everything like in README.plugin-runner:
The generic thumbnailer will do manager_check(), which will load the
files in the `thumbnailers` directory (as specified in the spec). In
those files it will find the BusNames that are activatable correlated
with the MIME-types that they can thumbnail.
It will do a conflict resolution, if necessary, according to the
specification, in case there are multiple specialized thumbnailers
installed that can solve the same MIME-types.
Then it will simply dbus_g_proxy_call the `Create` method on that
object. This activates the specialized thumbnailer, which in our case is
the plugin-runner running a plugin (using above documentation the
gdbpixbuf plugin will be ran inside the plugin-runner)
The plugin-runner will load the GModule to implement being a specialized
This last level of indirection is unnecessary as the generic thumbnailer
could just have loaded the plugin internally too.
But it's useful for the purpose of testing the specification.
It should be possible to just do:
svn co https://stage.maemo.org/svn/maemo/projects/haf/branches/hildon-thumbnail
make && sudo make install
And then follow daemon/README.plugin-runner
If there are any strange dependencies, then let me know.
I'm planning to replace the code in the thumbs, tests, doc
Don't worry about that (it's not being used by the daemon).
> The three of you had comments about the Manager interface. This is now
> removed and replaced.
> A first draft of a better proposal for registration of specialized
> thumbnailers have been written.
> I have not yet adapted the prototype to use this, but this will
> happen either today or next week.
>  http://live.gnome.org/ThumbnailerSpec
> bis: http://live.gnome.org/ThumbnailerSpec#head-83f1d6d2084e75742104681ad94c29b8d0dd2052
>  https://stage.maemo.org/svn/maemo/projects/haf/branches/hildon-thumbnail/daemonize/daemon/
> Pleas let me know what you think about it.
> Note about the protoype: now you can run a GModule made for the
> prototype as a standalone specialized thumbnailer. This means that the
> specialized thumbnailer specification can be tested with the prototype
> this way.
> This is the code that does this:
> On Thu, 2008-09-04 at 12:25 +0100, Tommi Komulainen wrote:
> > On Wed, Sep 3, 2008 at 3:15 PM, Philip Van Hoof <spam at pvanhoof.be> wrote:
> > >
> > > * Possibility for third party vendors to provide a closed source, closed
> > > or patented format thumbnailer by registering support for a MIME type
> > > to a manager interface that is required to be implemented by the
> > > thumbnailer service.
> > >
> > > Generic thumbnailer: org.freedesktop.manager.Register
> > > Specialized thumbnailers: org.freedesktop.Create
> > > Register a specialized thumbnailer for mime-type. The daemon will store the unique name of the sender of the Register method to proxy Create requests to if the mime-type of the source file (the file that must be thumbnailed) matches the now registered mime-type.
> > Doesn't this imply the specialized thumbnailer must keep running in
> > order for the registration to be persistent?
> > Also I'm not entirely convinced using DBus messages for managing such
> > register plays too well with package management (packages installed as
> > root, thumbnailer running as user?) I think you'll need to provide a
> > directory where third parties can drop in configuration files similar
> > to .desktop and dbus .services etc.
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
More information about the xdg