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

Re: Latest Discovery API

From: Clarke Stevens <C.Stevens@CableLabs.com>
Date: Wed, 27 Feb 2013 17:38:17 +0000
To: Rich Tibbett <richt@opera.com>, "public-device-apis@w3.org" <public-device-apis@w3.org>
Message-ID: <C29CA37385F0C04593328F0C49935B0917F4217A@EXCHANGE.cablelabs.com>
Rich,

In the process of writing unit tests for our implementation, we ran across the following issue:

Discovery has no way of informing JavaScript that the network has gone down or has never come up. It this case, our Discovery unit tests just hang waiting for a device that will never come up. We propose adding the following:

---
4.1 Methods
Add:
1.a. If there is no network connectivity, invoke errorCallback with a NavigatorNetworkServiceError parameter that has its code set to NETWORK_NOT_CONNECTED.

4.2 Error Handling
Add: NETWORK_NOT_CONNECTED value(3)

(Note: The NetworkService object has connectivity callbacks, but if we loose connectivity before add device, JavaScript will not get any events.)

5. Obtaining networked services
IDL: Add:
    readonly attribute boolean  online;
    attribute EventHandler     onnetworkonline;
    attribute EventHandler     onnetworkoffline;
(See 5.3 Events and 6. NetworkService)
---

Also, we expect to pass a string of the body of the event as a parameter on the notify event. This doesn't seem to be defined. Is this the expected usage?

---

Finally, we want to make sure we're interpreting some terms correctly. Some of this is defined on the top of page 4. This is how I'm parsing it:

  *   An existing service is a service that has been discovered, but may or may not have been authorized.
  *   An available service is an existing service that matches one of the requested type tokens.
  *   A current service is an available service that is currently authorized.
Is this correct?

Thanks,
-Clarke
Received on Wednesday, 27 February 2013 17:39:30 UTC

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