Annotation in introspection XML <arg> elements?

Lennart Poettering <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <20141110180815.GA1536@gardel-login>
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
_______________________________________________
dbus mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.