Re: Latest Discovery API

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