2009/dap/messaging Overview.html,1.34,1.35

Update of /sources/public/2009/dap/messaging
In directory hutz:/tmp/cvs-serv18444

Modified Files:
	Overview.html 
Log Message:
towards simplified messaging api


Index: Overview.html
===================================================================
RCS file: /sources/public/2009/dap/messaging/Overview.html,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- Overview.html	19 Jan 2011 17:10:34 -0000	1.34
+++ Overview.html	6 Apr 2011 13:49:03 -0000	1.35
@@ -7,15 +7,15 @@
 	
     <script class='remove'>
       var respecConfig = {
-          specStatus:           "WD",
+          specStatus:           "ED",
           shortName:            "messaging-api",
-          publishDate:  "2011-01-20",
+          //publishDate:  "2011-01-20",
           previousPublishDate:  "2010-08-10",
-          previousMaturity:       "FPWD",
+          previousMaturity:       "WD",
           edDraftURI:           "http://dev.w3.org/2009/dap/messaging/",
           editors: [
-				  { name: "Suresh Chitturi", company: "Research in Motion (RIM)" },
-          {name: "Daniel Coloma", company: "Telefonica"},
+          {name: "Dominique Hazaël-Massieux", company: "W3C"},
+          { name: "Suresh Chitturi", company: "Research in Motion (RIM)" },
           {name: "Max Froumentin", company: "Opera"},
           {name: "Maria Angeles Oteo", company: "Telefonica"},
           {name: "Niklas Widell", company: "Ericsson AB"},
@@ -63,7 +63,7 @@
     </ul>
     <p>The following code extracts illustrate how to create and send messages. </p>
   	<div> <p>
-  	Sending an SMS, if device supports it. 
+  	Sending an MMS with an attached picture, if device supports it. 
   	</p> </div>
 <pre 
  class='example sh_javascript_dom'>
@@ -75,9 +75,11 @@
    alert("The Message could not be sent " + error.code);
 }
 
-if (navigator.device.messaging.createSMS)
-   navigator.device.messaging.createSMS({to: [{'+460000000001'}], body:
-"Welcome to Atlantis"}).send(successCB, errorCB);
+if (navigator.device.sendMessage) {
+   picture = document.getElementById('attachment').files[0];
+   navigator.device.sendMessage("mms:+460000000001?body=Welcome%20%to%Atlantis", [picture], successCB, errorCB);
+}
+
     </pre>
   	
    </section>     
@@ -88,16 +90,12 @@
         
         The API defined in this specification can be used to create and send messages through different technologies.
         
-        Sending messages usually has an associated cost (especially SMSs and MMSs), hence a conforming implementation of this specification 
-        should provide a mechanism that ensures that no message is sent without the user's consent.
+        Sending messages usually has an associated cost (especially SMSs and MMSs), hence a conforming implementation of this specification should provide a mechanism that ensures that no message is sent without the user's consent.
                  </p>
          
-         <p>
-         The methods for sending messages that require user's express permission to be accessed are: <code>SMSMessage.send()</code>, <code>MMSMessage.send()</code> and <code>EmailMessage.send()</code>.
-         </p>
          <p>Since the implications of sending a given message may depend on the message attributes (e.g. destination address) and content, the approach used to ensure user’s consent should include the relevant information, typically the type of message and its destination address.</p>
-	 <p>A typical (but not required) way of ensuring user’s consent would be to use the same mechanism as the one used when the user click on a link using one the relevant URI schemes, for instance, bringing up the platform messaging application with pre-filled fields.</p>
-         <p>In general, user’s consent is expected to be confirmed for each invocation of the <code>send</code> methods.</p>
+	 <p>A typical (but not required) way of ensuring user’s consent would be to use the same mechanism as the one used when the user click on a link using one the relevant URI schemes, for instance, bringing up the platform messaging application with pre-filled fields and pre-defined attachments.</p>
+         <p>In general, user’s consent is expected to be confirmed for each invocation of the <code>sendMessage</code> methods.</p>
       </section>
  
 
@@ -105,71 +103,8 @@
     
     <section>
     	<h1>Supported messaging types</h1>
-    	
-		
-		<p>
-			The specification supports three kinds of messages: SMS, MMS and e-mail. For each of them specific interfaces and data types have been defined and they will be detailed in the following section. The table below summarizes the attributes that are supported for each given message type. 
+		<p>The specification supports sending messages on top of protocols for which a URI scheme has been defined, including SMS, MMS and emails.</p>
 		</p>
-		<table class="simple">
-		  <thead>
-		<tr>
-			<th>Attribute</th>
-			<th>SMS</th>
-			<th>MMS</th>
-			<th>e-mail</th>
-		</tr>
-		</thead>
-		  <tbody>
-		<tr>
-			<th><code>sentTime</code></th>
-			<td title="supported">✓</td>
-			<td title="supported">✓</td>
-			<td title="supported">✓</td>
-		</tr>
-		<tr>
-			<th><code>to</code></th>
-			<td title="supported">✓</td>
-			<td title="supported">✓</td>
-			<td title="supported">✓</td>
-		</tr>
-		<tr>
-			<th><code>cc</code></th>
-			<td title="not available">N/A</td>
-			<td title="not available">N/A</td>
-			<td title="supported">✓</td>
-		</tr>
-		<tr>
-			<th><code>bcc</code></th>
-			<td title="not available">N/A</td>
-			<td title="not available">N/A</td>
-			<td title="supported">✓</td>
-		</tr>
-		<tr>
-			<th><code>subject</code></th>
-			<td title="not available">N/A</td>
-			<td title="supported">✓</td>
-			<td title="supported">✓</td>
-		</tr>
-		<tr>
-			<th><code>body</code></th>
-			<td title="supported">✓</td>
-			<td title="supported">✓</td>
-			<td title="supported">✓</td>
-		</tr>
-		<tr>
-			<th><code>attachments</code></th>
-			<td title="not available">N/A</td>
-			<td title="supported">✓</td>
-			<td title="supported">✓</td>
-		</tr>
-		<tr>
-			<th><code>priority</code></th>
-			<td title="not available">N/A</td>
-			<td title="not available">N/A</td>
-			<td title="supported">✓</td>
-		</tr>
-		</table>
-		
 		<section>
 		<h2>SMS specific concerns</h2>
 		<p>
@@ -189,342 +124,29 @@
 			<div class='idl' title='Device implements DeviceMessaging'></div>
 					
 				<dl title='[NoInterfaceObject] interface DeviceMessaging' class='idl'>
-					<dt>
-						readonly attribute MessagingManager messaging
-					</dt>
-					<dd>
-						The object from which the messaging functionality can be accessed.
-					</dd>
-				</dl>
-		</section>
-		
-		<section>
-			<h2><a>MessagingManager</a></h2>
-			<p>
-				This interface provides the general functionality that relates to messaging as well as the entry point for message creation and sending. 
-			</p>
-			<p class="issue">The Working Group plans in reworking this interface to rely more directly on URI schemes rather than having a per messaging protocol method.</p>
-			<dl title='interface MessagingManager' class='idl'>
-				<dt>SMSMessage createSMS (in SMSProperties smsProperties)</dt>
-					<dd>
-						Creates a new <code>SMSMessage</code> object. 
-						<dl class='parameters'>
-							<dt>
-								SMSProperties smsProperties
-							</dt>
-							<dd>
-								The SMS properties may include the "to" and "body" attributes. 
-							</dd>
-						</dl>
-					</dd>
-				<dt>MMSMessage createMMS (in MMSProperties mmsProperties)</dt>
-					<dd>
-						Creates a new <code>MMSMessage</code> object. 
-						<dl class='parameters'>
-							<dt>
-								MMSProperties mmsProperties
-							</dt>
-							<dd>
-								The MMS properties may include the "to", "subject", "body" and "attachments" attributes. 
-							</dd>
-						</dl>
-					</dd>
-				<dt>EmailMessage createEmail (in EmailProperties EmailProperties)</dt>
-					<dd>
-						Creates a new <code>EmailMessage</code> object. 
-						<dl class='parameters'>
-							<dt>
-								EmailProperties emailProperties
-							</dt>
-							<dd>
-								The e-mail properties may include the "to", "cc", "bcc", "subject", "body", "priority" and "attachments" attributes. 
-							</dd>
-						</dl>
-					</dd>
-     
-		
-			</dl>
-				
-				
-				
-
-		</section>
-		
-		<section>
-			<h2><a>SMSMessage</a></h2>
-			<p>
-				This interface describes generic functionality of SMS message. 
-			</p>
-			<dl title='[NoInterfaceObject] interface SMSMessage : SMSProperties' class='idl'>
-				
-				<dt>
-					readonly attribute Date sentTime
-				</dt>
-				<dd>
-					A readonly time stamp that detemines the time the SMS was sent. By default it is undefined and will be initialized when the message is successfully sent.
-				</dd>
-				
-
-
-				
-				<dt>PendingOp send ()</dt>
+				<dt>void sendMessage (in DOMString to, sequence&lt;Blob> attachments, messagingErrorCB? errorCB)</dt>
 					<dd>
-						Asynchronous method to request sending an SMS. The <code>pendingOp</code> return object allows canceling the sending of the message. 
+					Sends a message with attachments to the specified address.
 						<dl class='parameters'>
 							<dt>
-								MessagingSuccessCB successCB
-							</dt>
-							<dd>
-								Function to call when the asynchronous operation completes.
-							</dd>
-							
-							<dt>
-								optional MessagingErrorCB errorCB
+								DOMString to
 							</dt>
 							<dd>
-								Function to call when the asynchronous operation fails.
+								a URI that specificies the address to which the message is to be sent; that URI may contain query string parameters that specify additional headers and the body of the said message
 							</dd>
+							<dt>sequence&lt;Blob> attachments</dt>
+							<dd>A list of Blob objects that represent attachments to be sent with the message; only applicable to protocols that support the notion of attachments. Using this parameter on protocols that don't support attachments triggers an error.</dd>
+							<dt>messagingErrorCB? errorCB</dt>
+							<dd>A callback function called when there was an error with sending the message.</dd>
 						</dl>
 					</dd>
-
-                               
-		</dl>
-	</section>
-
-	<section>
-		<h2><a>MMSMessage</a></h2>
-		<p>
-			This interface describes generic functionality of MMS message. 
-		</p>
-		<dl title='[NoInterfaceObject] interface MMSMessage : MMSProperties' class='idl'>
-			
-			<dt>
-				readonly attribute Date sentTime
-			</dt>
-			<dd>
-				A readonly time stamp that detemines the time the MMS was sent. By default it is undefined and will be initialized when the message is successfully sent.
-			</dd>
-			
-
-	
-			
-			<dt>PendingOp send ()</dt>
-				<dd>
-						Asynchronous method to request sending an MMS. The <code>pendingOp</code> return object allows canceling the sending of the message. 
-					<dl class='parameters'>
-						<dt>
-							MessagingSuccessCB successCB
-						</dt>
-						<dd>
-							Function to call when the asynchronous operation completes.
-						</dd>
-						
-						<dt>
-							optional MessagingErrorCB errorCB
-						</dt>
-						<dd>
-							Function to call when the asynchronous operation fails.
-						</dd>
-					</dl>
-				</dd>
-			
-		</dl>
-	</section>
-
-
-	<section>
-		<h2><a>EmailMessage</a></h2>
-		<p>
-			This interface describes generic functionality of e-mail message. 
-		</p>
-		<dl title='[NoInterfaceObject] interface EmailMessage : EmailProperties' class='idl'>
-			
-
-			<dt>
-				readonly attribute Date sentTime
-			</dt>
-			<dd>
-				A readonly time stamp that determines the time the e-mail was sent. By default it is undefined and will be initialized when the message is successfully sent.
-			</dd>
-
-
-			
-			<dt>PendingOp send ()</dt>
-				<dd>
-						Asynchronous method to request sending an e-mail. 
-						The <code>pendingOp</code> return object allows cancelling the sending of the message. 
-					<dl class='parameters'>
-						<dt>
-							MessagingSuccessCB successCB
-						</dt>
-						<dd>
-							Function to call when the asynchronous operation completes.
-						</dd>
-						
-						<dt>
-							optional MessagingErrorCB errorCB
-						</dt>
-						<dd>
-							Function to call when the asynchronous operation fails.
-						</dd>
-					</dl>
-				</dd>
-			
 			</dl>
-		</section>
-
-
-
-
-		<section>
-			<h2><a>SMSProperties</a></h2>
-			<p>
-				This interface captures the data fields in an SMS message. See <a  href='#supported-messaging-types'>Supported Messaging Types</a> for the list of attributes that must be supported for SMS type.  
-			</p>
-			<dl title='[NoInterfaceObject] interface SMSProperties' class='idl'>
-				<dt> attribute DOMString[] to
-				</dt>
-				<dd>
-					The set of addresses of the recipients. For SMS these are phone numbers. 
-				</dd>				
-				<dt>
-					attribute DOMString body
-				</dt>
-				<dd>
-					The message text body
-				</dd>				
-			</dl>	
-		</section>
-
-                <section>
-			<h2><a>MMSProperties</a></h2>
-			<p>
-				This interface captures the data fields in an MMS message. See <a  href='#supported-messaging-types'>Supported Messaging Types</a> for the list of attributes that must be supported for MMS type.  
-			</p>
-			<dl title='[NoInterfaceObject] interface MMSProperties' class='idl'>
-				<dt> attribute DOMString[] to
-				</dt>
-				<dd>
-					The set of addresses of the recipients. For MMS these may be phone numbers or e-mail addresses. 
-				</dd>	
-                                <dt>
-					attribute DOMString subject
-				</dt>
-				<dd>
-					The MMS subject
-				</dd>			
 				
-				<dt>
-					attribute DOMString body
-				</dt>
-				<dd>
-					The MMS text body
-				</dd>
-
-				<dt>
-					attribute Blob[] attachments 
-				</dt>
-				<dd>
-					The list of files [[!FILE-API]] that will be sent together with the MMS as attachments.
-				</dd>
-
 				
-			</dl>	
-		</section>
-
-		
-		<section>
-			<h2><a>EmailProperties</a></h2>
-			<p>
-				This interface captures the data fields in an e-mail message. See <a  href='#supported-messaging-types'>Supported Messaging Types</a> for the list of attributes that must be supported for e-mail type.  
-			</p>
-			<dl title='[NoInterfaceObject] interface EmailProperties' class='idl'>
-				<dt> attribute EmailAddress[] to
-				</dt>
-				<dd>
-					The set of e-mail addresses and names of the recipients.
-				        </dd>	
-			
-				<dt> attribute EmailAddress[] cc
-				</dt>
-				<dd>
-					The set of cc (carbon copy) addresses and names of the recipients. 
-					</dd>
 				
-				<dt> attribute EmailAddress[] bcc 
-				</dt>
-				<dd>
-					The set of bcc (blind carbon copy) addresses and names of the recipients.
-				</dd>				
-				<dt>
-					attribute DOMString subject
-				</dt>
-				<dd>
-					The message subject
-				</dd>
-				
-				<dt>
-					attribute DOMString body
-				</dt>
-				<dd>
-					The message text body
-				</dd>
 
-				<dt>
-					attribute DOMString priority
-				</dt>
-				<dd>
-					Delivery priority, the possible values are 'low', 'normal' (default) or 'high'.
-				</dd>
-				
-				<dt>
-					attribute Blob[] attachments 
-				</dt>
-				<dd>
-					The list of files [[!FILE-API]] that will be sent together with the e-mail as attachments.
-				</dd>	
-				
-			</dl>	
 		</section>
 		
-        <section>
-			<h2><a>EmailAddress</a></h2>
-			<p>
-				This interface captures the data fields in an e-mail address.   
-			</p>
-			<dl title='[NoInterfaceObject] interface EmailAddress' class='idl'>
-				<dt> attribute DOMString address
-				</dt>
-				<dd>
-					The e-mail address. It MUST be a <b>valid e-mail address</b> as defined in [[!HTML5]].
-				</dd>				
-				<dt>
-					attribute DOMString name
-				</dt>
-				<dd>
-					The name associated to the "address". It is an optional attribute and by default it is undefined.
-				</dd>				
-			</dl>	
-		</section>
-
-        
-		<section>
-			<h2><a>MessagingSuccessCB</a></h2>
-			<p>
-			
-			</p>
-			<dl title='[Callback=FunctionOnly, NoInterfaceObject] interface MessagingSuccessCB' class='idl'>
-				<dt>
-					void onSuccess ( )
-				</dt>
-				<dd>
-					Invoked method when a successful messaging asynchronous call is received in the device. 
-				</dd>				
-				
-			</dl>	
-			
-			</section>
-
 
                     <section>
 			<h2><a>MessagingErrorCB</a></h2>
@@ -620,19 +242,7 @@
 
 
     </section>
-    
-    <section class='appendix'>
-      <h2>Features for Future Consideration</h2>
-      <p>The following messaging functionalities have been delayed to a future version of the API.</p>
-      <ul>
-		<li>Message subscription and reading.</li>
- 
-		<li>Message and folder management.</li>
-      	<li>E-mail account management.</li>
-        <li>Notion of default accounts.</li>
-      </ul>
-    </section>
-      
+       
 
     <section class='appendix'>
       <h2>Acknowledgements</h2>

Received on Wednesday, 6 April 2011 13:49:07 UTC