Annotation in introspection XML <arg> elements?
Lennart Poettering
mzqohf at 0pointer.de
Mon Nov 10 10:08:15 PST 2014
Heya,
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>
<arg type="s" name="scope" direction="in">
</arg>
<arg type="h" name="handle" direction="in">
</arg>
<arg type="a{ss}" name="properties" direction="in">
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="CdStringMap">
</annotation>
</arg>
<arg type="o" name="object_path" direction="out">
</arg>
</method>
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.
Opinions?
Lennart
--
Lennart Poettering, Red Hat
More information about the dbus
mailing list