intent description, deleted some useless interfaces
authorRobin Berjon <robin@berjon.com>
Fri, 22 Jun 2012 17:05:43 +0200
changeset 122 49eeb69d402e
parent 121 4bdb9d0885f3
child 123 519c13e6df24
intent description, deleted some useless interfaces
contacts/Overview.html
--- a/contacts/Overview.html	Fri Jun 22 16:55:58 2012 +0200
+++ b/contacts/Overview.html	Fri Jun 22 17:05:43 2012 +0200
@@ -206,105 +206,36 @@
     </section>
 
     <section>
-      <h2>API Description</h2>
-
-      <section>
-        <h2><a>ServiceContacts</a> interface</h2>
-        <p id="ta-aa" class="product-ua">
-          The <a>ServiceContacts</a> interface is exposed on the <a class="externalDFN">Navigator</a> 
-          object [[NAVIGATOR]]. Its goal is to provide an access point to the functionality in this
-          specification.
-        </p>
-        <dl title='[NoInterfaceObject] interface ServiceContacts' class='idl'>
-          <dt>readonly attribute Contacts contacts</dt>
-          <dd>The object through which the contacts functionality can be accessed.</dd>
-        </dl>
-        <div class='idl' title='Navigator implements ServiceContacts'></div>
-      </section>
-
+      <h2>Intent Description</h2>
+      <p>
+        The action for this Intent is <code>http://webintents.org/pick</code>.
+      </p>
+      <p>
+        The type for this Intent is <code>http://w3.org/type/contact</code>.
+      </p>
+      <p>
+        When a <a>contact service</a> is matched for delivery using these action and type, it
+        MUST respond in one of two ways:
+      </p>
+      <ul>
+        <li>
+          If contacts have been successfully selected for delivery, then a successful payload is returned
+          to the client (using <code>postResult()</code>) matching the data format defined below.
+        </li>
+        <li>
+          If an error of any kind takes place in the service, then an error payload is returned (using
+          <code>postFailure()</code>) matching the error data format defined below. This includes the
+          case in which the user has selected zero contacts.
+        </li>
+      </ul>
+    </section>
+    <section>
+      <h2>Data Format</h2>
+      <p>
+        Upon successful invocation, the <a>contact service</a> MUST return an array of <a>Contact</a> objects.
+      </p>
       <section>
-        <h2><a>Contacts</a> interface</h2>
-        <p>
-          The <a>Contacts</a> interface exposes a database of contact information that may be retrieved.
-        </p>
-        <p>
-          Multiple contact groups can be represented within this unified address book by specifying consistent
-          <a href='#widl-Contact-categories'><code>categories</code></a> values as part of individual 
-          <a>Contact</a> objects. Multiple contact groups can be displayed by filtering on the required 
-          <a href='#widl-Contact-categories'><code>categories</code></a> values via
-          the <a>Contacts</a> <a href='#widl-Contacts-find-void-DOMStringArray-fields-ContactFindCB-successCB-ContactErrorCB-errorCB-ContactFindOptions-options'>find()</a> operation.
-        </p>
-
-        <dl title='[NoInterfaceObject] interface Contacts' class='idl'>
-          <dt>void find ()</dt>
-          <dd>
-            <p>
-              Find contacts in the address book according to the <a>find contacts process</a> detailed
-              below.
-            </p>
-            <p>
-              This method takes two, three or four arguments. When called, it  starts the following 
-              <dfn>find contacts process</dfn>:
-            </p>
-            <ol class="rule">
-              <li>
-                Let <var>successCallback</var> be the callback indicated by the method's second argument.
-              </li>
-              <li>
-                Let <var>errorCallback</var> be the callback indicated by the method's third argument, if any, or null otherwise.
-              </li>
-              <li id="ta-ai" class="product-ua">If <var>successCallback</var> is null, then throw a TypeError (as defined in [[WEBIDL]]).</li>
-              <li  class="product-ua" id="ta-ag">
-                If there is a <a>task</a> from the <a>device task source</a> in one of the <a>task
-                queues</a> (e.g. an existing <code>find()</code> operation is still pending a response), run these
-                substeps:
-                <ol>
-                  <li>
-                    If <var>errorCallback</var> is not null, let <var>error</var> be a <a>ContactError</a>
-                    object whose code attribute has the value <code>PENDING_OPERATION_ERROR</code> and
-                    queue a task to invoke <var>errorCallback</var> with <var>error</var> as its argument.
-                  </li>
-                  <li>Abort this operation.</li>
-                </ol>
-              </li>
-              <li>
-                Return, and run the remaining steps asynchronously.
-              </li>
-              <li>
-                Let <var>results</var> be the array of <a>Contact</a> objects obtained by searching contacts in the address book
-                according to the rules defined in  <a href='#contact-search-processing'>Contact Search Processing</a>,
-                or null if the search has failed.
-              </li>
-              <li>
-                If <var>results</var> is null, run these substeps:
-                <ol>
-                  <li>
-                    If <var>errorCallback</var> is not null, let <var>error</var> be a <a>ContactError</a>
-                    object whose code attribute has its value set according to the type of failure that occurred and
-                    queue a task to invoke <var>errorCallback</var> with <var>error</var> as its argument.
-                  </li>
-                  <li>Abort this operation.</li>
-                </ol>
-              </li>
-              <li>Queue a task to invoke <var>successCallback</var> with <var>results</var> as its argument.</li>
-            </ol>
-
-            <dl class='parameters'>
-              <dt>DOMString[] fields</dt>
-              <dd>The <a>search qualifier</a>.</dd>
-              <dt>ContactFindCB successCB</dt>
-              <dd>Function to call when the asynchronous operation completes successfully.</dd>
-              <dt>optional ContactErrorCB errorCB</dt>
-              <dd>Function to call when the asynchronous operation fails.</dd>
-              <dt>optional ContactFindOptions options</dt>
-              <dd>The options to apply to the output of this method.</dd>
-            </dl>
-          </dd>
-        </dl>
-      </section>
-
-      <section>
-        <h2><a>Contact</a> interface</h2>
+        <h2><a>Contact</a> </h2>
         <p>
           The <a>Contact</a> interface captures the properties of a contact object. All properties included in this 
           interface have a corresponding definition in [[POCO-SCHEMA]], [[RFC2426]] (aka vCard), and [[OMA-CAB]], thereby
@@ -324,6 +255,7 @@
           <a>Contact</a> object and MUST have a value of <code>null</code>.
         </p>
 
+        <!-- XXX make this a dictionary -->
         <dl title='[NoInterfaceObject] interface Contact' class='idl'>
           <dt>readonly attribute DOMString id</dt>
           <dd>