2009/dap/messaging Overview.html,1.9,1.10

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

Modified Files:
	Overview.html 
Log Message:
ACTION-133 change message.create(TYPE) to message.createTYPE()


Index: Overview.html
===================================================================
RCS file: /sources/public/2009/dap/messaging/Overview.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Overview.html	25 Mar 2010 16:11:18 -0000	1.9
+++ Overview.html	25 Mar 2010 16:29:33 -0000	1.10
@@ -77,10 +77,10 @@
 	// ...
 }
 
-if (navigator.device.messaging.supportsType(MESSAGE_TYPE_SMS))
-   navigator.device.messaging.create({to: [{'+460000000001'}], body:
+if (navigator.device.messaging.createSMS)
+   navigator.device.messaging.createSMS({to: [{'+460000000001'}], body:
 "Welcome to Atlantis"}).send(successCB, errorCB);
-
+</pre>
   	</div>
   	<div>
   	<p>
@@ -90,7 +90,8 @@
   	// 
   	
 // Register listener for new SMS events
-mySMSListener=navigator.device.messaging.subscribe(SMS_TYPE, onEvent);  	</div>
+mySMSListener=navigator.device.messaging.subscribe(SMS_TYPE, onEvent);  	
+</pre></div>
     </section>
       
     <section>
@@ -106,7 +107,7 @@
     
     <section>
     	<h1>Security Considerations</h1>
-    	<p class=note>
+    	<p class='note'>
     	Obviously more work is needed here. Presumably a security model similar to Geolocation may be used. Due to slightly different nature of SMS/MMS and email minor differences may need to be spelt out explicitly. 	
     	</p>
     	<p>
@@ -216,29 +217,22 @@
 				This interface general functionality that relates to messaging. 
 			</p>
 			<dl title='interface MessagingManager' class='idl'>
-				<dt>const unsigned short SMS_TYPE = 1</dt>
-					<dd>
-						Constant to indicate messages of type SMS. 
-					</dd>
-				<dt>const unsigned short MMS_TYPE = 2</dt>
-					<dd>
-						Constant to indicate messages of type MMS. 
-					</dd>
-				<dt>const unsigned short EMAIL_TYPE = 3</dt>
-					<dd>
-						Constant to indicate messages of type email. 
-					</dd>
-				
-				<dt>Message create (unsigned short messagingType, in MessageProperties messageProperties)</dt>
+				<dt>Message createSMS (in MessageProperties messageProperties)</dt>
 					<dd>
-						Creates a new  <code>Message</code> object, with type set to <code>messagingType</code>. 
+						Creates a new <code>Message</code> object, with type set to <code>SMS_TYPE</code>. 
 						<dl class='parameters'>
 							<dt>
-								unsigned short messagingType
+								MessageProperties messageProperties
 							</dt>
 							<dd>
-								Type of message (SMS, MMS or email).
+								The fields in the message, may include list of recipients, text body etc. 
 							</dd>
+						</dl>
+					</dd>
+				<dt>Message createMMS (in MessageProperties messageProperties)</dt>
+					<dd>
+						Creates a new <code>Message</code> object, with type set to <code>MMS_TYPE</code>. 
+						<dl class='parameters'>
 							<dt>
 								MessageProperties messageProperties
 							</dt>
@@ -247,25 +241,25 @@
 							</dd>
 						</dl>
 					</dd>
-					
-				<dt>Boolean supports (unsigned short messagingType)</dt>
+				<dt>Message createEmail (in MessageProperties messageProperties)</dt>
 					<dd>
-						Checks if messaging using <code>messagingType</code> is currently supported
+						Creates a new <code>Message</code> object, with type set to <code>EMAIL_TYPE</code>. 
 						<dl class='parameters'>
 							<dt>
-								unsigned short messagingType
+								MessageProperties messageProperties
 							</dt>
 							<dd>
-								Requested messaging type. 
+								The fields in the message, may include list of recipients, text body etc. 
 							</dd>
 						</dl>
 					</dd>
+					
 				
 					
 				<dt>int subscribe (in unsigned short messagingType, in OnIncomingSMS smsEventCB)</dt>
 					<dd>
 						Registers the page to be notified on incoming new messages. The function call returns a handle to the  subscription
-						<dl class=parameters>
+						<dl class='parameters'>
 							<dt>
 								unsigned short messagingType
 							</dt>
@@ -284,7 +278,7 @@
 				<dt>void unsubscribe (in int subscriptionHandle)</dt>
 					<dd>
 						Removes subscription for new SMS events.
-						<dl class=parameters>
+						<dl class='parameters'>
 							<dt>
 								int subscriptionHandle
 							</dt>
@@ -297,7 +291,7 @@
 				
 				
 				
-			</dl>
+
 		</section>
 		
 		<section>
@@ -306,7 +300,23 @@
 				This interface describes generic functionality of message. 
 			</p>
 			<dl title='[NoInterfaceObject] interface Message implements MessageProperties' class='idl'>
-
+				<dt>const unsigned short SMS_TYPE = 1</dt>
+					<dd>
+						Constant to indicate messages of type SMS. 
+					</dd>
+				<dt>const unsigned short MMS_TYPE = 2</dt>
+					<dd>
+						Constant to indicate messages of type MMS. 
+					</dd>
+				<dt>const unsigned short EMAIL_TYPE = 3</dt>
+					<dd>
+						Constant to indicate messages of type email. 
+					</dd>
+        <dt>readonly attribute unsigned short type</dt>
+          <dd>
+            The type of message. This attribute must take a value
+            among the constants defined in this interface.
+          </dd>
 				<dt> readonly attribute DOMString id </dt>
 				<dd> 
 					System set read-only unique identifier to assigned to the message by the platform. 
@@ -415,7 +425,7 @@
 				<dd>
 					This method is invoked when an message arrives. 
 				</dd>				
-				<dl class=parameters>
+				<dl class='parameters'>
 					<dt>
 						Message message
 					</dt>
@@ -488,11 +498,10 @@
       	<li>Account management</li>
         <li>Notion of default accounts</li>
         <li>References to mailto and SMS RFCs</li>
-        <li>Need to o verification of fields in messages (check that addresses are appropriate for type, check that attachment file have correct urls etc)
+        <li>Need to o verification of fields in messages (check that addresses are appropriate for type, check that attachment file have correct urls etc)</li>
       </ul>
     </section>
       
-    </section>
 
     <section class='appendix'>
       <h2>Acknowledgements</h2>

Received on Thursday, 25 March 2010 16:29:36 UTC