Re: Adding an asynchronous getter (Promise) for screen availability status (issue #11)

Hi Anton, Anssi,

On Fri, 2014-09-05 at 07:47 +0000, Kostiainen, Anssi wrote:
> > Why can't we just have an "available" property to match the event?
> This seems to be the consistent thing with other APIs.

The reason why we might not want to have an available boolean is because
it might be associated with a cost to find out whether screens are
available. If you do a network discovery for screens, or reconfigure the
wireless radio to browse for screens, for power saving reasons it is
probably better to only do that on request. Also, because of network
latencies - the property's value is something that is not synchronously
available. In a way, the implementation behind the "available" is like
implementing a synchronous function.

I would prefer an asynchronous getter for that reason - and would prefer
avoiding and "unknown" state - for which we would have to define
additional state transitions.

Dominik

Received on Friday, 5 September 2014 10:18:10 UTC