[sdbusplus] To generate a common header for public information of interfaces
wak at google.com
Fri Feb 14 05:11:22 AEDT 2020
We should have common headers for this because I'd like to see us have a
typesafe client interface that is autogenerated with the server interface.
I wrote the code a while back to implement a typesafe sdbusplus client
interface but never finished the generator code that automatically defines
the types and DBus strings.
On Thu, Feb 13, 2020 at 6:39 AM Lei YU <mine260309 at gmail.com> wrote:
> Currently, sdbus++ generates the server code separately, and in
> phosphor-dbus-interfaces, the separated headers are installed, and the
> separated cpp files are combined together, and compiled as a library.
> The public information of the interfaces (e.g, the interface strings,
> the enum strings) are either in the separated header or in the cpp
> The result is, when a phosphor service needs to use an interface, or
> an enum, it has to define the interface string or the enum string
> manually, and it happens everywhere.
> How about
> 1. Making sdbusplus to generate a "common" header for each interface
> including the public information;
> 2. Then phosphor-dbus-interfaces could generate a single header file
> that includes all the public information of the interfaces;
> 3. Then the phosphor service could include a single header file, and
> use the interface/enum strings it needs, without manually defining
> There is an initial concept implementation:
> With the above changes, a service could directly use the generated
> interface string, e.g.
> In the future, the enum strings could be put there and thus we do not
> have to manually write the long full qualified string.
> Ideas and suggestions are welcome.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openbmc