Updates to Service Discovery & Messaging according to feedback @ http://lists.w3.org/Archives/Public/public-device-apis/2012Aug/0095.html
authorRich Tibbett <richt@opera.com>
Tue, 25 Sep 2012 13:33:45 +0200
changeset 231 a0e6b501258d
parent 230 3c13dc93cfb1
child 232 32487cf058c5
Updates to Service Discovery & Messaging according to feedback @ http://lists.w3.org/Archives/Public/public-device-apis/2012Aug/0095.html
discovery-api/Overview.html
discovery-api/Overview.src.html
--- a/discovery-api/Overview.html	Tue Sep 25 12:48:42 2012 +0200
+++ b/discovery-api/Overview.html	Tue Sep 25 13:33:45 2012 +0200
@@ -673,7 +673,7 @@
             </li>
 
             <li>
-               Set <var>services manager</var>'s <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute to the length of <var>services</var>.
+               Set <var>services manager</var>'s <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute to the number of services currently found in the <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a> whose <code>type</code> property matches any of the tokens requested in <var>requested control types</var>.
             </li>
 
             <li>
@@ -805,7 +805,8 @@
           </dt>
           <dd>
             <p>
-              Returns the current number of services matching one of the app-requested <a href="#dfn-valid-service-type" class="internalDFN">valid service type</a> tokens that are actively available within the user's current network.
+              Returns the current number of services matching one of the app-requested <a href="#dfn-valid-service-type" class="internalDFN">valid service type</a> tokens in the
+              <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a>.
             </p>
           </dd>
         </dl>
@@ -816,25 +817,9 @@
            </p>
 
            <p>
-              The <dfn id="dom-networkservices-servicesavailable"><code>servicesAvailable</code></dfn> attribute <em class="rfc2119" title="must">must</em> return the number of services available in the
-              user's network that match the <a href="#dfn-valid-service-type" class="internalDFN">valid service type</a> that was initially used to create the current <a href="#networkservices"><code>NetworkServices</code></a> object.
+              The <dfn id="dom-networkservices-servicesavailable"><code>servicesAvailable</code></dfn> attribute <em class="rfc2119" title="must">must</em> return the number of services in the <a href="#dfn-list-of-available-service-records" class="internalDFN">list of available service records</a> whose <code>type</code> attribute matches any of the <a href="#dfn-valid-service-type" class="internalDFN">valid service type</a> tokens that was initially used to create the current <a href="#networkservices"><code>NetworkServices</code></a> object.
            </p>
 
-           <p>
-             When a previously unknown instance of a networked service matching one of the requested <a href="#dfn-valid-service-type">valid service types</a> becomes available on the user's current network, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> increment the <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute by <code>1</code> and then
-             <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a>
-             to dispatch a newly created event with the name <code>serviceavailable</code> that uses the <code>Event</code> interface, which does
-             not bubble, is not cancellable, and has no default action, at the current <a href="#networkservices"><code>NetworkServices</code></a>
-             object.
-           </p>
-
-           <p>
-             When a previously known instance of a networked service matching one of the requested <a href="#dfn-valid-service-type">valid service types</a> becomes unavailable on the user's current network, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> decrement the <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute by <code>1</code> and then
-             <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a>
-              to dispatch a newly created event with the name <code>serviceunavailable</code> that uses the <code>Event</code> interface, which does
-              not bubble, is not cancellable, and has no default action, at the current <a href="#networkservices"><code>NetworkServices</code></a>
-              object.
-           </p>
         </div>
 
       </section>
--- a/discovery-api/Overview.src.html	Tue Sep 25 12:48:42 2012 +0200
+++ b/discovery-api/Overview.src.html	Tue Sep 25 13:33:45 2012 +0200
@@ -426,7 +426,7 @@
             </li>
 
             <li>
-               Set <var>services manager</var>'s <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute to the length of <var>services</var>.
+               Set <var>services manager</var>'s <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute to the number of services currently found in the <a>list of available service records</a> whose <code>type</code> property matches any of the tokens requested in <var>requested control types</var>.
             </li>
 
             <li>
@@ -559,7 +559,8 @@
           </dt>
           <dd>
             <p>
-              Returns the current number of services matching one of the app-requested <a>valid service type</a> tokens that are actively available within the user's current network.
+              Returns the current number of services matching one of the app-requested <a>valid service type</a> tokens in the
+              <a>list of available service records</a>.
             </p>
           </dd>
         </dl>
@@ -570,25 +571,9 @@
            </p>
 
            <p>
-              The <dfn id="dom-networkservices-servicesavailable"><code>servicesAvailable</code></dfn> attribute MUST return the number of services available in the
-              user's network that match the <a>valid service type</a> that was initially used to create the current <a href="#networkservices"><code>NetworkServices</code></a> object.
+              The <dfn id="dom-networkservices-servicesavailable"><code>servicesAvailable</code></dfn> attribute MUST return the number of services in the <a>list of available service records</a> whose <code>type</code> attribute matches any of the <a>valid service type</a> tokens that was initially used to create the current <a href="#networkservices"><code>NetworkServices</code></a> object.
            </p>
 
-           <p>
-             When a previously unknown instance of a networked service matching one of the requested <a href="#dfn-valid-service-type">valid service types</a> becomes available on the user's current network, the <a>user agent</a> MUST increment the <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute by <code>1</code> and then
-             <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a>
-             to dispatch a newly created event with the name <code>serviceavailable</code> that uses the <code>Event</code> interface, which does
-             not bubble, is not cancellable, and has no default action, at the current <a href="#networkservices"><code>NetworkServices</code></a>
-             object.
-           </p>
-
-           <p>
-             When a previously known instance of a networked service matching one of the requested <a href="#dfn-valid-service-type">valid service types</a> becomes unavailable on the user's current network, the <a>user agent</a> MUST decrement the <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute by <code>1</code> and then
-             <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a>
-              to dispatch a newly created event with the name <code>serviceunavailable</code> that uses the <code>Event</code> interface, which does
-              not bubble, is not cancellable, and has no default action, at the current <a href="#networkservices"><code>NetworkServices</code></a>
-              object.
-           </p>
         </div>
 
       </section>