Annotation in introspection XML <arg> elements?

Lennart Poettering mzqohf at
Mon Nov 10 10:08:15 PST 2014


I noticed that colord exposes <annotation> elements in the XML
introspection data, inside <arg> elements. Example:

    <method name="CreateProfileWithFd">
      <arg type="s" name="profile_id" direction="in">
      <arg type="s" name="scope" direction="in">
      <arg type="h" name="handle" direction="in">
      <arg type="a{ss}" name="properties" direction="in">
        <annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="CdStringMap">
      <arg type="o" name="object_path" direction="out">

The current specification says:

        Method, interface, property, and signal elements may have
        "annotations", which are generic key/value pairs of metadata.

It doesn't list <arg> elements in that paragraph...

The DTD we ship also doesn't allow annotations within <arg>.

Now, I am not sure I want to know qhat the qtdbus annotations are
supposed to do (it looks very questionnable as it appears to encode
the parameter index to base 0 in the annotation which seems pretty
redundant), but I am pretty sure they are not in accordance with the
D-Bus spec right now.

Two options:

a) file a bug against colord/qt to remove the annotations and generate
   valid XML data according to the spec and DTD.

b) amend the dbus spec/DTD to allow what colord/qt are doing there.



Lennart Poettering, Red Hat

More information about the dbus mailing list