Skip to content

Fix generated interfaces visibility + add macro for PropertiesChanged

Alexandre Trendel requested to merge xou816/zbus:fix/132 into main

As discussed previously, it is not convenient at the moment to emit signals such as PropertiesChanged since some of the generated interfaces are not public (#132 (closed))

Changes:

  • Introspectable, Peer and Properties are all public
  • dbus_interface supports an additional attribute, property_changed, which generates a PropertiesChanged signal based on the method name, which must either match $property_changed (to distinguish from getter/setter) or be overridden using the "name" attribute as usual

What's missing:

  • doc (I'd prefer to wait for your opinion before diving in too deep :p)

To discuss:

  • whether you're OK or not with the macro changes
  • the macro code is getting somewhat convoluted, I was thinking a few bits could be extracted? (the logic to create a getter/setter/signal, to map the method name, etc)
  • naming? specifically, maybe a mod for Introspectable/Peer/Properties (zbus::generated? zbus::freedesktop?)
  • tests (I don't know if there is a more minimal way to test the generated code, couldn't think of a way to do it)
Edited by Alexandre Trendel

Merge request reports

Loading