Bug 742790 - Part 1/5: support SMS delivery failure event. Interface changes, sr=sicking,mounir
authorVicamo Yang <vyang@mozilla.com>
Tue, 30 Oct 2012 18:53:20 +0800
changeset 111888 853062e5abc5742edb6df14f8ee98164a357b0b8
parent 111883 00c8ee61e262578493e0b21a9019014d63002f61
child 111889 289f2d39289c776e711d45ec6292a1c412e16237
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewerssicking, mounir
bugs742790
milestone19.0a1
Bug 742790 - Part 1/5: support SMS delivery failure event. Interface changes, sr=sicking,mounir
dom/sms/interfaces/nsIDOMSmsManager.idl
dom/sms/interfaces/nsIDOMSmsMessage.idl
--- a/dom/sms/interfaces/nsIDOMSmsManager.idl
+++ b/dom/sms/interfaces/nsIDOMSmsManager.idl
@@ -3,17 +3,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEventTarget.idl"
 
 interface nsIDOMEventListener;
 interface nsIDOMMozSmsRequest;
 interface nsIDOMMozSmsFilter;
 
-[scriptable, builtinclass, uuid(be78baf4-20ba-4ceb-be40-d9774a9388c4)]
+[scriptable, builtinclass, uuid(1bee1224-56a2-4935-af7b-0011746306cb)]
 interface nsIDOMMozSmsManager : nsIDOMEventTarget
 {
   unsigned short      getNumberOfMessagesForText(in DOMString text);
 
   // The first parameter can be either a DOMString (only one number) or an array
   // of DOMStrings.
   // The method returns a SmsRequest object if one number has been passed.
   // An array of SmsRequest objects otherwise.
@@ -25,10 +25,11 @@ interface nsIDOMMozSmsManager : nsIDOMEv
   nsIDOMMozSmsRequest delete(in jsval param);
 
   nsIDOMMozSmsRequest getMessages(in nsIDOMMozSmsFilter filter, in boolean reverse);
 
   nsIDOMMozSmsRequest markMessageRead(in long id, in boolean aValue);
 
   [implicit_jscontext] attribute jsval onreceived;
   [implicit_jscontext] attribute jsval onsent;
-  [implicit_jscontext] attribute jsval ondelivered;
+  [implicit_jscontext] attribute jsval ondeliverysuccess;
+  [implicit_jscontext] attribute jsval ondeliveryerror;
 };
--- a/dom/sms/interfaces/nsIDOMSmsMessage.idl
+++ b/dom/sms/interfaces/nsIDOMSmsMessage.idl
@@ -1,20 +1,26 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
-[scriptable, builtinclass, uuid(fc58ba6e-70de-4550-aa1e-790ecc19cf98)]
+[scriptable, builtinclass, uuid(5e3224dd-1ca3-43e6-861e-b7734656fd2f)]
 interface nsIDOMMozSmsMessage : nsISupports
 {
   // TODO: we should add SENT and RECEIVED DOMString constants, see bug 443316.
 
   readonly attribute long      id;
   readonly attribute DOMString delivery;  // Should be "sent" or "received".
+  /**
+   * For received messages, it is "success"; for sent messages, it can be
+   * "pending", "success", "error", or "not-applicable" if the message was sent
+   * without status report requisition.
+   */
+  readonly attribute DOMString deliveryStatus;
   readonly attribute DOMString sender;
   readonly attribute DOMString receiver;
   readonly attribute DOMString body;
   [implicit_jscontext]
   readonly attribute jsval     timestamp; // jsval is for Date.
   readonly attribute boolean   read;
 };