Exposing some type details in the introspection XML?

Marc-André Lureau <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <CAJ+F1CLryKhKdb4FLrYof=gtdCyTrifZyOJQmVZGQC8Gt1A8gw@mail.gmail.com>
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

_______________________________________________
dbus mailing list
[email protected]
https://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.