Bug 1023695 - Part 1: Define .idl/.ipdl for notifying Deleted Info. r=vyang.
authorBevis Tseng <btseng@mozilla.com>
Fri, 27 Jun 2014 13:11:14 +0800
changeset 193306 29da1b86af3a7b90f382a6bf940853ed22be89d6
parent 193305 741369f5399c0f0b28fb7ebe8fc3de45999053ff
child 193307 ef9dbb2245c8b1da53e47f6a48892a9df0b63aab
push id27116
push userryanvm@gmail.com
push dateThu, 10 Jul 2014 22:09:47 +0000
treeherdermozilla-central@0a0348d3f0c8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvyang
bugs1023695
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1023695 - Part 1: Define .idl/.ipdl for notifying Deleted Info. r=vyang.
dom/mobilemessage/interfaces/moz.build
dom/mobilemessage/interfaces/nsIDeletedMessageInfo.idl
dom/mobilemessage/interfaces/nsIMobileMessageService.idl
dom/mobilemessage/src/ipc/PSms.ipdl
dom/mobilemessage/src/ipc/SmsTypes.ipdlh
--- a/dom/mobilemessage/interfaces/moz.build
+++ b/dom/mobilemessage/interfaces/moz.build
@@ -1,15 +1,16 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
 XPIDL_SOURCES += [
+    'nsIDeletedMessageInfo.idl',
     'nsIDOMMozMmsMessage.idl',
     'nsIDOMMozMobileMessageThread.idl',
     'nsIDOMMozSmsMessage.idl',
     'nsIDOMSmsFilter.idl',
     'nsIDOMSmsSegmentInfo.idl',
     'nsIMmsService.idl',
     'nsIMobileMessageCallback.idl',
     'nsIMobileMessageCursorCallback.idl',
new file mode 100644
--- /dev/null
+++ b/dom/mobilemessage/interfaces/nsIDeletedMessageInfo.idl
@@ -0,0 +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"
+
+interface nsIVariant;
+
+[scriptable, builtinclass, uuid(174139d8-00e1-11e4-818a-f38357d90920)]
+interface nsIDeletedMessageInfo : nsISupports
+{
+   /* Array of messages ids in long if available. */
+   readonly attribute nsIVariant deletedMessageIds;
+
+   /* Array of thread ids in unsigned long long. if available */
+   readonly attribute nsIVariant deletedThreadIds;
+};
--- a/dom/mobilemessage/interfaces/nsIMobileMessageService.idl
+++ b/dom/mobilemessage/interfaces/nsIMobileMessageService.idl
@@ -1,25 +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"
 
+interface nsIDeletedMessageInfo;
 interface nsIDOMMozSmsMessage;
 interface nsIDOMMozMmsMessage;
 interface nsIDOMMozMobileMessageThread;
 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(17fce9e4-af56-11e3-83d9-b71055e95493)]
+[scriptable, builtinclass, uuid(afb83948-003a-11e4-899b-bb8a8d45e7f0)]
 interface nsIMobileMessageService : nsISupports
 {
   [implicit_jscontext]
   nsIDOMMozSmsMessage createSmsMessage(in long               id,
                                        in unsigned long long threadId,
                                        in DOMString          iccId,
                                        in DOMString          delivery,
                                        in DOMString          deliveryStatus,
@@ -56,9 +57,15 @@ interface nsIMobileMessageService : nsIS
   [implicit_jscontext]
   nsIDOMMozMobileMessageThread createThread(in unsigned long long id,
                                             in jsval              participants,
                                             in unsigned long long timestamp,
                                             in DOMString          lastMessageSubject,
                                             in DOMString          body,
                                             in unsigned long long unreadCount,
                                             in DOMString          aLastMessageType);
+
+  nsIDeletedMessageInfo createDeletedMessageInfo(
+    [array, size_is(msgCount)] in long messageIds,
+    in uint32_t msgCount,
+    [array, size_is(threadCount)] in unsigned long long threadIds,
+    in uint32_t threadCount);
 };
--- a/dom/mobilemessage/src/ipc/PSms.ipdl
+++ b/dom/mobilemessage/src/ipc/PSms.ipdl
@@ -117,16 +117,18 @@ child:
   NotifyDeliveryErrorMessage(MobileMessageData aMessageData);
 
   NotifyReceivedSilentMessage(MobileMessageData aMessageData);
 
   NotifyReadSuccessMessage(MobileMessageData aMessageData);
 
   NotifyReadErrorMessage(MobileMessageData aMessageData);
 
+  NotifyDeletedMessageInfo(DeletedMessageInfoData aDeletedInfo);
+
 parent:
   /**
    * Sent when the child no longer needs to use sms.
    */
   __delete__();
 
   /**
    * Sent when the child makes an asynchronous request to the parent.
--- a/dom/mobilemessage/src/ipc/SmsTypes.ipdlh
+++ b/dom/mobilemessage/src/ipc/SmsTypes.ipdlh
@@ -105,11 +105,17 @@ struct ThreadData
 
 union MobileMessageCursorData
 {
   MmsMessageData;
   SmsMessageData;
   ThreadData;
 };
 
+struct DeletedMessageInfoData
+{
+  int32_t[] deletedMessageIds;
+  uint64_t[] deletedThreadIds;
+};
+
 }
 }
 }