Exposing some type details in the introspection XML?

Marc-André Lureau marcandre.lureau at gmail.com
Fri May 15 00:08:57 UTC 2020


Hi,

Has there been some attempt at exposing higher-level types, or type
description, other than just type signatures in the introspection XML?

Taking polkit API[1] as an example, we could have a <structure/>:

<structure name="Subject">
  <field name="subject_kind">
  <field name="subject_details">
</structure>

And an additional "typename":

   <method name="UnregisterAuthenticationAgent">
      <arg type="(sa{sv})" name="subject" +typename="Subject"+ .../>
    </method>

For arrays & dict, we would probably need some kind of generic notation,
such as done in the polkit doc, "typename=Array<Subject>" for example.

Similarly, having flags & enums (either as int or string values?):

<flags name="CheckAuthorizationFlags">
  <item name="AllowUserInteraction" value=1/>
</flags>

<enum name="ImplicitAuthorization">
  <item name="AuthenticationRequired" value=0/>
  ...
</enum>

And errors too.

thanks

[1]
https://www.freedesktop.org/software/polkit/docs/latest/eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html

-- 
Marc-André Lureau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20200515/254b36ca/attachment.htm>


More information about the dbus mailing list