On 12/21/19 1:53 PM, Daniel Wagner wrote:
The missing concept in the Property API for changing multiple
at once leads to a bit strange things. Obvioulsy, it would be more
naturual to have single value set/get/clear/changed and the same thing
for multiple properties at once. Well, since this doesn't exist
neither for ConnMan nor for the freedesktop API let's go with this.
Maybe we should bring this up at freedesktop and see what the
maintainers of the Property API think about it.
Having the methods for multiple properties would offer more flexibility,
for the use of the method and in the underlying implementation. So yes,
I'd agree that could be proposed in freedesktop as well.
Specification  does, however, state, that there is a
PropertiesChanged signal already in the D-Bus Properties interface
(since version 0.14 in 2010) that can be used to indicate which
properties were changed and which properties were invalidated (array of
strings). So, the error reporting for the need of setting multiple
properties at once (and clearing etc.) is already speficied. This may be
good to implement in connman as well, when service.c would support
setting multiple properties in one call.
From the looks of it, PropertiesChanged is used only by the network
manager compatiblity plugin (plugins/nmcompat.c) and gsupplicant.
PropertiesChanged would not fit to all situations but to the ones where
multiple properties are changed in any way.