Bug 963516 - Part 1: Interface changes to support matchMvno(). r=hsinyi, a=1.3+
authorJessica Jong <jjong@mozilla.com>
Wed, 29 Jan 2014 07:15:00 +0800
changeset 176123 13901a449162569f704c643bb67692688b12da99
parent 176122 95af3eb131750cb82ed18896c573dfd75bb8ffcb
child 176124 cb146459de2d4f6a81e41779ff7adeb2d5285eaa
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsinyi, 1
bugs963516
milestone28.0a2
Bug 963516 - Part 1: Interface changes to support matchMvno(). r=hsinyi, a=1.3+
dom/icc/interfaces/nsIIccProvider.idl
dom/webidl/MozIcc.webidl
--- a/dom/icc/interfaces/nsIIccProvider.idl
+++ b/dom/icc/interfaces/nsIIccProvider.idl
@@ -3,17 +3,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 interface nsIDOMDOMRequest;
 interface nsIDOMMozIccInfo;
 interface nsIDOMWindow;
 
-[scriptable, uuid(87e9ad03-e8e2-40d1-bf28-a6d287c31b93)]
+[scriptable, uuid(7c0ada3d-d8d4-493e-9243-fa3df39855e4)]
 interface nsIIccListener : nsISupports
 {
   void notifyStkCommand(in DOMString aMessage);
   void notifyStkSessionEnd();
   void notifyCardStateChanged();
   void notifyIccInfoChanged();
 };
 
@@ -98,9 +98,17 @@ interface nsIIccProvider : nsISupports
   nsIDOMDOMRequest iccExchangeAPDU(in unsigned long clientId,
                                    in nsIDOMWindow window,
                                    in long channel,
                                    in jsval apdu);
 
   nsIDOMDOMRequest iccCloseChannel(in unsigned long clientId,
                                    in nsIDOMWindow window,
                                    in long channel);
+
+  /**
+   * Helpers
+   */
+  nsIDOMDOMRequest matchMvno(in unsigned long clientId,
+                             in nsIDOMWindow window,
+                             in DOMString mvnoType,
+                             in DOMString mvnoData);
 };
--- a/dom/webidl/MozIcc.webidl
+++ b/dom/webidl/MozIcc.webidl
@@ -360,9 +360,31 @@ interface MozIcc : EventTarget
    *
    * @param aid
    *        The application identifier of the applet, to be closed.
    *
    * @return a DOMRequest.
    */
   [Throws]
   nsISupports iccCloseChannel(long channel);
+
+  // Integrated Circuit Card Helpers.
+
+  /**
+   * Verify whether the passed data (matchData) matches with some ICC's field
+   * according to the mvno type (mvnoType).
+   *
+   * @param mvnoType
+   *        Mvno type to use to compare the match data.
+   *        Currently, we only support 'imsi'.
+   * @param matchData
+   *        Data to be compared with ICC's field.
+   *
+   * @return a DOMRequest.
+   *         The request's result will be a boolean indicating the matching
+   *         result.
+   *
+   * TODO: change param mvnoType to WebIDL enum after Bug 864489 -
+   *       B2G RIL: use ipdl as IPC in MozIccManager
+   */
+  [Throws]
+  nsISupports matchMvno(DOMString mvnoType, DOMString matchData);
 };