Bug 1023695 - Part 1: Define .idl/.ipdl for notifying Deleted Info. r=vyang, a=2.0+
authorBevis Tseng <btseng@mozilla.com>
Fri, 27 Jun 2014 13:11:14 +0800
changeset 201074 787768129673899ffe3fa2d87ed530b376a1c370
parent 201073 2ace7164be11ada5ed827a0f11ade581c19e0f2d
child 201075 ce27e012d817140985887010d9593c9d538ac6a3
push id6442
push userryanvm@gmail.com
push dateFri, 11 Jul 2014 16:30:04 +0000
treeherdermozilla-aurora@66788ae23537 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvyang, 2.0
bugs1023695
milestone32.0a2
Bug 1023695 - Part 1: Define .idl/.ipdl for notifying Deleted Info. r=vyang, a=2.0+
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',
     'nsIDOMMobileMessageManager.idl',
     'nsIDOMMozMmsEvent.idl',
     'nsIDOMMozMmsMessage.idl',
     'nsIDOMMozMobileMessageThread.idl',
     'nsIDOMMozSmsEvent.idl',
     'nsIDOMMozSmsMessage.idl',
     'nsIDOMSmsFilter.idl',
     'nsIDOMSmsSegmentInfo.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;
+};
+
 }
 }
 }