iwd.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: Jesse Lentz <jesse@twosheds.org>, iwd@lists.linux.dev
Subject: Re: [PATCH 2/2] doc: Add State and Role properties to DPP API
Date: Thu, 23 Jun 2022 14:58:36 -0500	[thread overview]
Message-ID: <1783ffbe-ca43-f3d1-12ac-5ef0aa96048c@gmail.com> (raw)
In-Reply-To: <CKXQZJ5G2LJO.1IJRN5WMBF3DY@laptop>

Hi Jesse,

On 6/23/22 14:07, Jesse Lentz wrote:
> Hi Denis,
> 
>> Inferring the state is fine if you can do this reliably.  One problem with
>> optional properties is that once they transition from 'defined' -> 'undefined'
>> there is no PropertiesChanged signal that is sent (or rather you have to look
>> into the invalidated_properties array of that signal).
>>
>> We have been designing our APIs with the assumption that many bindings wouldn't
>> be using this invalidated_properties reliably and added another point of reference.
>>
>> For example, Station.ConnectedNetwork is invalidated when Station.State goes
>> into the 'disconnected' state and thus not explicitly 'changed'.  But the DBus
>> client can infer that Station.ConnectedNetwork is 'undefined' at that point.
>>
>> But maybe bindings have improved over the years and we should just rely on
>> invalidated_properties being taken into account properly?  If so, that would be
>> a good argument to make 'State' optional.
> 
> Hmm, I wasn't aware of that. I can only comment on the GLib binding,
> which works reliably as far as I can tell - it supplies both changed and
> invalidated properties to the user-registered callback, which gets
> called in response to both changed and to invalidated properties.
> 

Ok, good to know that this works well.

> But if other bindings handle it incorrectly, then I suppose there's no
> compelling reason to make it an optional property.

Maybe I shouldn't blame the bindings as much as the documentation.  This wasn't 
a widely explained feature at the time we started, and this project is getting 
pretty old.

But yes, maybe it is easier to just make this property mandatory while all 
others can be made optional.

Regards,
-Denis

      reply	other threads:[~2022-06-23 20:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22 19:41 [PATCH 1/2] dpp: Add State and Role properties to dbus API Jesse Lentz
2022-06-22 19:41 ` [PATCH 2/2] doc: Add State and Role properties to DPP API Jesse Lentz
2022-06-22 20:35   ` James Prestwood
2022-06-23 16:30     ` Jesse Lentz
2022-06-23 16:47       ` James Prestwood
2022-06-23 17:24         ` Jesse Lentz
2022-06-23 18:00       ` Denis Kenzior
2022-06-23 19:07         ` Jesse Lentz
2022-06-23 19:58           ` Denis Kenzior [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1783ffbe-ca43-f3d1-12ac-5ef0aa96048c@gmail.com \
    --to=denkenz@gmail.com \
    --cc=iwd@lists.linux.dev \
    --cc=jesse@twosheds.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).