On Wednesday 04 December 2019 20:18:56 Nicolas Cavallari wrote:
> On 04/12/2019 13:24, Victorien Molle wrote:
> > For our usage, we need to have more informations sent over D-Bus such as 
> > the interface
> > name, the vendor class identifier and the lease expiration time.
> > 
> > Note: in order to get leases extradata be populated, we enabled this 
> > feature if D-Bus
> > is enabled in configuration file (this was enabled in the past only if a 
> > script was
> > ran on leases updates).
> D-Bus has this disadvantage that the change you are proposing completely
> breaks the existing D-Bus API that one may be relying on, and many D-Bus
> handling libraries would be incapable of understanding both API at the time.

Victorien, just for explanation: You cannot change order, number or
types of DBus method / signal arguments. It is like function call in any
C-like language. It is part of public API which is used by many
applications. Number and types of DBus methods / signals is encoded in
signature which is passed between DBus clients.

> One solution would be to keep the old signal and also send a new signal
> with the original info plus the extra, possibly in a way that allows to
> add more over time (a dict ?).

If you want to create a backward compatible DBus API, you should use
array or dictionary (ordered hash map) argument and then pass new values
into this array/dictionary.

> (Also, this API should be documented in the file dbus/DBus-interface...)

Pali Rohár

Attachment: signature.asc
Description: PGP signature

Dnsmasq-discuss mailing list

Reply via email to