Fwd: guidance for org.freedesktop.DBus interfaces

Nyirő Gergő gergo at nyiro.name
Wed Jan 6 09:13:05 UTC 2021


Thanks for quick the reply.

On Tue, Jan 5, 2021, 10:51 PM Lawrence D'Oliveiro
<ldo at geek-central.gen.nz> wrote:
>
> On Tue, 5 Jan 2021 20:39:06 +0100, Nyirő Gergő wrote:
>
> > Why threre isn't a SetAll method? Would it be a bad idea to update
> > all the properties with one call?
>
> Maybe you really mean a “SetMany” method. This could take a dict of
> property name-value mappings, and set them all at once. (Any defined
> properties that are not set keep their existing value.)
>
> If you really want to, this can probably be implemented via the
> existing “Set” method. Remember that the property name can be any
> string. You could, say, use “*” or the empty string to represent the
> object itself, and the value would be such a dict.

I like the "*" naming concept, but the existing bindings might not
agree with me.
The "SetMany" method could be implemented more easily.

Is it allowed to extend the existing "org.freedesktop.DBus.Properties" interface
for my object or should I introduce the "SetMany" method in my custom interface?

--
Gergo


More information about the dbus mailing list