Bug 1000670 - Part 1: [B2G] [RIL] Expose clirstatuschange event to gaia. r=gene, r=smaug, a=lmandel
authorHsin-Yi Tsai <htsai@mozilla.com>
Thu, 24 Apr 2014 14:13:14 +0800
changeset 188189 bcb7940400c7dabe52694d419a47f848cb08776e
parent 188188 c771eb11c80dc9f61a1f8a69f9eb53dad79c06a8
child 188190 0dccd788dfd30aab818ad191f4407eb0fced46d9
push id452
push userryanvm@gmail.com
push dateMon, 30 Jun 2014 21:10:14 +0000
treeherdermozilla-b2g30_v1_4@7b4798563882 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgene, smaug, lmandel
bugs1000670
milestone30.0
Bug 1000670 - Part 1: [B2G] [RIL] Expose clirstatuschange event to gaia. r=gene, r=smaug, a=lmandel
dom/mobileconnection/interfaces/nsIDOMMobileConnection.idl
dom/webidl/MozClirModeEvent.webidl
dom/webidl/moz.build
--- a/dom/mobileconnection/interfaces/nsIDOMMobileConnection.idl
+++ b/dom/mobileconnection/interfaces/nsIDOMMobileConnection.idl
@@ -7,17 +7,17 @@
 interface nsIDOMEventListener;
 interface nsIDOMDOMRequest;
 interface nsIDOMMozMobileConnectionInfo;
 interface nsIDOMMozMobileNetworkInfo;
 interface nsIDOMMozMobileCellInfo;
 interface nsIDOMMozMobileCFInfo;
 interface nsIVariant;
 
-[scriptable, builtinclass, uuid(389ad352-4e43-4c1a-85e9-bae745554326)]
+[scriptable, builtinclass, uuid(e891c732-216b-40b2-bda5-5a9d62e08779)]
 interface nsIDOMMozMobileConnection : nsIDOMEventTarget
 {
   const long ICC_SERVICE_CLASS_VOICE = (1 << 0);
   const long ICC_SERVICE_CLASS_DATA = (1 << 1);
   const long ICC_SERVICE_CLASS_FAX = (1 << 2);
   const long ICC_SERVICE_CLASS_SMS = (1 << 3);
   const long ICC_SERVICE_CLASS_DATA_SYNC = (1 << 4);
   const long ICC_SERVICE_CLASS_DATA_ASYNC = (1 << 5);
@@ -466,16 +466,22 @@ interface nsIDOMMozMobileConnection : ns
    */
   [implicit_jscontext] attribute jsval oniccchange;
 
   /**
    * The 'onradiostatechange' event is notified whenever the radio state
    * changes.
    */
   [implicit_jscontext] attribute jsval onradiostatechange;
+
+  /**
+   * The 'onclirmodechange' event is notified whenever the mode of the calling
+   * line id restriction (CLIR) changes.
+   */
+  [implicit_jscontext] attribute jsval onclirmodechange;
 };
 
 [scriptable, uuid(49706beb-a160-40b7-b745-50f62e389a2c)]
 interface nsIDOMMozMobileConnectionInfo : nsISupports
 {
   /**
    * State of the connection.
    *
new file mode 100644
--- /dev/null
+++ b/dom/webidl/MozClirModeEvent.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Pref="dom.mobileconnection.enabled",
+ Constructor(DOMString type, optional MozClirModeEventInit eventInitDict)]
+interface MozClirModeEvent : Event
+{
+  /**
+   * Indicates the mode of the calling line id restriction (CLIR).
+   *
+   * @see nsIDOMMozMobileConnection.CLIR_* values.
+   */
+  readonly attribute unsigned long mode;
+};
+
+dictionary MozClirModeEventInit : EventInit
+{
+  unsigned long mode = 0;
+};
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -581,16 +581,17 @@ GENERATED_EVENTS_WEBIDL_FILES = [
     'DataErrorEvent.webidl',
     'DataStoreChangeEvent.webidl',
     'DeviceLightEvent.webidl',
     'DeviceProximityEvent.webidl',
     'DownloadEvent.webidl',
     'ErrorEvent.webidl',
     'IccChangeEvent.webidl',
     'MediaStreamEvent.webidl',
+    'MozClirModeEvent.webidl',
     'MozContactChangeEvent.webidl',
     'MozEmergencyCbModeEvent.webidl',
     'MozInterAppMessageEvent.webidl',
     'MozOtaStatusEvent.webidl',
     'MozStkCommandEvent.webidl',
     'RTCDataChannelEvent.webidl',
     'RTCPeerConnectionIceEvent.webidl',
     'RTCPeerConnectionIdentityEvent.webidl',