Bug 850127 - 1/3: Expose threadId in SmsMessage and SmsThreadListItem. IDL/IPDL changes. sr=mounir
authorVicamo Yang <vyang@mozilla.com>
Fri, 05 Apr 2013 20:15:44 +0800
changeset 138739 4a62344fc87b9732c578828b2992e310a9b3f0d4
parent 138738 84d0583cc8cb9259041fa07c28a1c937250a818a
child 138740 f7b7600dd8fa938da9d380d2b0d1eb8ffd81a7f9
push idunknown
push userunknown
push dateunknown
reviewersmounir
bugs850127
milestone23.0a1
Bug 850127 - 1/3: Expose threadId in SmsMessage and SmsThreadListItem. IDL/IPDL changes. sr=mounir
dom/mobilemessage/interfaces/nsIDOMMozMmsMessage.idl
dom/mobilemessage/interfaces/nsIDOMMozSmsMessage.idl
dom/mobilemessage/interfaces/nsIMobileMessageCallback.idl
dom/mobilemessage/interfaces/nsIMobileMessageService.idl
dom/mobilemessage/src/ipc/PSmsRequest.ipdl
dom/mobilemessage/src/ipc/SmsTypes.ipdlh
--- a/dom/mobilemessage/interfaces/nsIDOMMozMmsMessage.idl
+++ b/dom/mobilemessage/interfaces/nsIDOMMozMmsMessage.idl
@@ -8,26 +8,28 @@ interface nsIDOMBlob;
 
 dictionary MmsAttachment
 {
   DOMString? id;
   DOMString? location;
   nsIDOMBlob content;
 };
 
-[scriptable, builtinclass, uuid(c9683d00-88a6-11e2-85cc-57a33dfbea3b)]
+[scriptable, builtinclass, uuid(210654af-4cc8-42e5-81b2-051f0f393c3a)]
 interface nsIDOMMozMmsMessage : nsISupports
 {
   /**
    * |type| is always "mms".
    */
   readonly attribute DOMString type;
 
   readonly attribute long      id;
 
+  readonly attribute unsigned long long threadId;
+
   /**
    * Should be "not-downloaded", "received", "sending", "sent" or "error".
    */
   readonly attribute DOMString delivery;
 
   [implicit_jscontext]
   readonly attribute jsval     deliveryStatus; // DOMString[]
 
@@ -40,9 +42,9 @@ interface nsIDOMMozMmsMessage : nsISuppo
   readonly attribute jsval     timestamp;      // Date
 
   readonly attribute boolean   read;
   readonly attribute DOMString subject;
   readonly attribute DOMString smil;
 
   [implicit_jscontext]
   readonly attribute jsval     attachments;    // MmsAttachment[]
-};
\ No newline at end of file
+};
--- a/dom/mobilemessage/interfaces/nsIDOMMozSmsMessage.idl
+++ b/dom/mobilemessage/interfaces/nsIDOMMozSmsMessage.idl
@@ -1,24 +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(d4d848c4-88a6-11e2-b6da-6f252cbfa716)]
+[scriptable, builtinclass, uuid(b755a401-d5cb-4d35-a93e-47c89d2e15ca)]
 interface nsIDOMMozSmsMessage : nsISupports
 {
   /**
    * |type| is always "sms".
    */
   readonly attribute DOMString type;
 
   readonly attribute long      id;
 
+  readonly attribute unsigned long long threadId;
+
   /**
    * Should be "received", "sending", "sent" or "error".
    */
   readonly attribute DOMString delivery;
 
   /**
    * Possible delivery status values for above delivery states are:
    *
--- a/dom/mobilemessage/interfaces/nsIMobileMessageCallback.idl
+++ b/dom/mobilemessage/interfaces/nsIMobileMessageCallback.idl
@@ -1,16 +1,17 @@
 /* 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"
 
 dictionary SmsThreadListItem
 {
+  unsigned long long id;
   DOMString senderOrReceiver;
   unsigned long long timestamp;
   DOMString body;
   unsigned long long unreadCount;
 };
 
 [scriptable, builtinclass, uuid(edb1de12-8d58-11e2-b382-7bf132b20cb2)]
 interface nsIMobileMessageCallback : nsISupports
--- a/dom/mobilemessage/interfaces/nsIMobileMessageService.idl
+++ b/dom/mobilemessage/interfaces/nsIMobileMessageService.idl
@@ -8,32 +8,34 @@ interface nsIDOMMozSmsMessage;
 interface nsIDOMMozMmsMessage;
 interface nsIDOMMozSmsSegmentInfo;
 
 %{C++
 #define MOBILE_MESSAGE_SERVICE_CID { 0x829c1dd6, 0x0466, 0x4591, { 0x83, 0x6f, 0xb8, 0xf6, 0xfd, 0x1f, 0x7b, 0xa5 } }
 #define MOBILE_MESSAGE_SERVICE_CONTRACTID "@mozilla.org/mobilemessage/mobilemessageservice;1"
 %}
 
-[scriptable, builtinclass, uuid(4cbc9594-84c3-11e2-a274-ebada93fa6cd)]
+[scriptable, builtinclass, uuid(944297ed-0dc7-4dee-89a6-c962ea0218d3)]
 interface nsIMobileMessageService : nsISupports
 {
   [implicit_jscontext]
   nsIDOMMozSmsMessage createSmsMessage(in long      id,
+                                       in unsigned long long threadId,
                                        in DOMString delivery,
                                        in DOMString deliveryStatus,
                                        in DOMString sender,
                                        in DOMString receiver,
                                        in DOMString body,
                                        in DOMString messageClass,
                                        in jsval     timestamp,
                                        in bool      read);
 
   [implicit_jscontext]
   nsIDOMMozMmsMessage createMmsMessage(in long      id,
+                                       in unsigned long long threadId,
                                        in DOMString delivery,
                                        in jsval     deliveryStatus,
                                        in DOMString sender,
                                        in jsval     receivers,
                                        in jsval     timestamp,
                                        in boolean   read,
                                        in DOMString subject,
                                        in DOMString smil,
--- a/dom/mobilemessage/src/ipc/PSmsRequest.ipdl
+++ b/dom/mobilemessage/src/ipc/PSmsRequest.ipdl
@@ -82,16 +82,17 @@ struct ReplyMarkeMessageReadFail
 };
 
 struct ReplyNoMessageInList
 {
 };
 
 struct ThreadListItem
 {
+  uint64_t id;
   nsString senderOrReceiver;
   uint64_t timestamp;
   nsString body;
   uint64_t unreadCount;
 };
 
 struct ReplyThreadList
 {
--- a/dom/mobilemessage/src/ipc/SmsTypes.ipdlh
+++ b/dom/mobilemessage/src/ipc/SmsTypes.ipdlh
@@ -20,16 +20,17 @@ struct SmsSegmentInfoData
   int32_t segments;
   int32_t charsPerSegment;
   int32_t charsAvailableInLastSegment;
 };
 
 struct SmsMessageData
 {
   int32_t        id;
+  uint64_t       threadId;
   DeliveryState  delivery;
   DeliveryStatus deliveryStatus;
   nsString       sender;
   nsString       receiver;
   nsString       body;
   MessageClass   messageClass;
   uint64_t       timestamp; // ms since epoch.
   bool           read;