Utils for using deferreds with D-Bus.
Export the decorated method on the D-Bus and handle a maybe returned Deferred.
This decorator can be applied to methods in the same way as the @dbus.service.method method, but it correctly handles the case where the method returns a Deferred.
This decorator was kindly taken from James Henstridge blog post and adopted: http://blogs.gnome.org/jamesh/2009/07/06/watching-iview-with-rygel/
Add a defer attribute to the decorated function and return a Deferred object. The callback of the Deferred will be passed as reply_handler argument and the errback as the error_handler argument to the decorated function.
This decorator allows to easily make use of Deferreds in a DBus client.