Bug 1010356 - Part 1: interface changes to support neighboring cell info. r=hsinyi
authorJessica Jong <jjong@mozilla.com>
Tue, 24 Jun 2014 23:13:00 +0200
changeset 190866 844b150a37e68eba7afe0e469b2e0cab7e1ae406
parent 190865 4dc4793f8f71d5611ba5890589c6561655e53ef6
child 190867 fa5bb1d382d07877f40737dc84d07db19739f181
push id8397
push usercbook@mozilla.com
push dateThu, 26 Jun 2014 10:05:58 +0000
treeherderb2g-inbound@7bd3451fd0bc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsinyi
bugs1010356
milestone33.0a1
Bug 1010356 - Part 1: interface changes to support neighboring cell info. r=hsinyi
dom/mobileconnection/interfaces/moz.build
dom/mobileconnection/interfaces/nsINeighboringCellInfo.idl
dom/system/gonk/nsIRadioInterfaceLayer.idl
--- a/dom/mobileconnection/interfaces/moz.build
+++ b/dom/mobileconnection/interfaces/moz.build
@@ -4,11 +4,12 @@
 # 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 += [
     'nsIMobileCellInfo.idl',
     'nsIMobileConnectionInfo.idl',
     'nsIMobileConnectionProvider.idl',
     'nsIMobileNetworkInfo.idl',
+    'nsINeighboringCellInfo.idl',
 ]
 
 XPIDL_MODULE = 'dom_mobileconnection'
new file mode 100644
--- /dev/null
+++ b/dom/mobileconnection/interfaces/nsINeighboringCellInfo.idl
@@ -0,0 +1,64 @@
+/* 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, uuid(909f5972-c74e-44dd-b72a-7ddb62aae617)]
+interface nsINeighboringCellIdsCallback : nsISupports
+{
+  /**
+   * result is an array of nsINeighboringCellInfo.
+   */
+  void notifyGetNeighboringCellIds(in jsval result);
+
+  /**
+   * Callback function with error message.
+   */
+  void notifyGetNeighboringCellIdsFailed(in DOMString error);
+};
+
+[scriptable, uuid(87dc222e-abb3-4342-95bf-626aa19fa20e)]
+interface nsINeighboringCellInfo: nsISupports
+{
+  /**
+   * Type of radio technology.
+   *
+   * Possible values: 'gsm', 'gprs', 'edge', 'umts', 'hsdpa', 'hsupa', 'hspa',
+   *                  'hspa+' or null (unknown).
+   */
+  readonly attribute DOMString networkType;
+
+  /**
+   * Mobile Location Area Code (LAC) for GSM networks.
+   *
+   * Possible ranges from 0x0000 to 0xffff.
+   * -1 if the LAC is unknown.
+   */
+  readonly attribute long gsmLocationAreaCode;
+
+  /**
+   * Mobile Cell ID for GSM networks.
+   *
+   * Possible ranges from 0x00000000 to 0xffffffff.
+   * -1 if the cell id is unknown.
+   */
+  readonly attribute long long gsmCellId;
+
+  /**
+   * Primary Scrambling Code (PSC) for WCDMA networks.
+   *
+   * Possible ranges from 0x0000 to 0x01ff.
+   * -1 if the psc is unknown.
+   */
+  readonly attribute long wcdmaPsc;
+
+  /**
+   * For GSM networks, signalStrength is the received rssi, ranging from 0 to 31.
+   * For WCDMA networks, signalStrength is the CPICH Received Signal Code Power,
+   * ranging from -120 to -25.
+   *
+   * 99 if signalStrength is unknown.
+   */
+  readonly attribute long signalStrength;
+};
\ No newline at end of file
--- a/dom/system/gonk/nsIRadioInterfaceLayer.idl
+++ b/dom/system/gonk/nsIRadioInterfaceLayer.idl
@@ -3,16 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 #include "nsINetworkManager.idl"
 
 interface nsIDOMMozIccInfo;
 interface nsIMobileConnectionInfo;
 interface nsIMobileMessageCallback;
+interface nsINeighboringCellIdsCallback;
 
 [scriptable, uuid(6e0f45b8-410e-11e3-8c8e-b715b2cd0128)]
 interface nsIRilNetworkInterface : nsINetworkInterface
 {
   readonly attribute unsigned long serviceId;
   readonly attribute DOMString iccId;
 
   /* The following attributes are for MMS proxy settings. */
@@ -50,17 +51,17 @@ interface nsIRilContext : nsISupports
 };
 
 [scriptable, function, uuid(3bc96351-53b0-47a1-a888-c74c64b60f25)]
 interface nsIRilSendWorkerMessageCallback : nsISupports
 {
   boolean handleResponse(in jsval response);
 };
 
-[scriptable, uuid(181d460e-220e-4274-8ba4-43f122eb518d)]
+[scriptable, uuid(31ba65b6-05c7-4bc8-abdc-f1a219811fb4)]
 interface nsIRadioInterface : nsISupports
 {
   readonly attribute nsIRilContext rilContext;
 
   /**
    * PDP APIs
    */
   void setupDataCallByType(in DOMString apntype);
@@ -80,16 +81,21 @@ interface nsIRadioInterface : nsISupport
                in boolean silent,
                in nsIMobileMessageCallback request);
 
   void sendWorkerMessage(in DOMString type,
               [optional] in jsval message,
               [optional] in nsIRilSendWorkerMessageCallback callback);
 
   void getSmscAddress(in nsIMobileMessageCallback request);
+
+  /**
+   * Cell Info functionality.
+   */
+  void getNeighboringCellIds(in nsINeighboringCellIdsCallback callback);
 };
 
 [scriptable, uuid(d035c32e-b491-11e3-9f9d-c716fab88bd6)]
 interface nsIRadioInterfaceLayer : nsISupports
 {
   readonly attribute unsigned long numRadioInterfaces;
 
   nsIRadioInterface getRadioInterface(in unsigned long clientId);