The dbus-binding-tool treats annotations in signals as errors. Leading to the following: $ dbus-binding-tool --mode=glib-client --output=test-glue.h ../../../tracker/data/dbus/tracker-resources.xml Unable to load "../../../tracker/data/dbus/tracker-resources.xml": Can't put <annotation> element here The problematic annotation is something like this: <signal name="Writeback"> <arg type="a{sas}" name="subjects" /> <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QMap<QString,QStringList>"/> </signal> The D-Bus specification [1] however says this is allowed: "Method, interface, property, and signal elements may have "annotations", which are generic key/value pairs of metadata." http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format
Created attachment 34910 [details] [review] Allow signal annotations in dbus-binding-tool Attached a possible fix which seems to solve the problem.
Branch with that commit and some more (including tests) at <http://git.collabora.co.uk/?p=user/smcv/dbus-glib-smcv.git;a=shortlog;h=refs/heads/27598>. Patches to follow.
Created attachment 41625 [details] [review] Allow <annotation> inside <property> too
Created attachment 41626 [details] [review] Don't .gitignore everything in test/interfaces, and remove some duplication
Created attachment 41627 [details] [review] Test that interfaces, methods, properties, signals can be annotated
Created attachment 41628 [details] [review] test/interfaces: check that some invalid annotations aren't allowed
Created attachment 41629 [details] [review] test/interfaces: test annotated arguments The D-Bus Specification doesn't actually allow this, but dbus-glib has always supported it, and indeed understands a couple of <arg> annotations itself - org.freedesktop.DBus.GLib.ReturnVal and ….DBus.GLib.Const. (That's all the patches for now; review would be appreciated.)
Patches look good to me, we are now using these in Ubuntu 11.04 (Natty).
Fixed in git for 0.94, based on review from Robert and no objections from the reviewer group.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.