W3C home > Mailing lists > Public > public-device-apis@w3.org > February 2013

Re: [discovery-api] how does serviceavailable function in practice

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 07 Feb 2013 14:39:39 +0100
To: Jean-Claude Dufourd <jean-claude.dufourd@telecom-paristech.fr>
Cc: public-device-apis@w3.org
Message-ID: <sja7h8p24kmeuu48aou2tmi12mner9g1jd@hive.bjoern.hoehrmann.de>
* Jean-Claude Dufourd wrote:
>Let us imagine that after a first call to getNetworkServices, I get a 
>NetworkServices object with 0 entries.
>So I have to listen to the serviceavailable event on that 
>NetworkServices object to get any new matching service.
>Probably, the event handler is going to provide me with a new obect of 
>type NetworkService. Is that correct ?

Based on the current Working Draft that would not be possible because
the `serviceavailable` event object implements only the Event interface
which lacks support for such information. That would also seem to be odd
design. I would rather think the object the listener is registered on is
mutated prior to the dispatch of the event.

>I did not find in the spec where this is specified.
>What did I miss ?

In <http://www.w3.org/TR/2012/WD-discovery-api-20121004/> section 7 in
the first list in the sublist in the fourth list the third item mentions
`serviceavailable`. You can then step back through the code to see what
effect the individual assembly instructions, like "increment service
manager's servicesAvailable attribute by 1" have (reverse-engineering).
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Thursday, 7 February 2013 13:40:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:53:58 UTC