Bug 1052846 - Part 1: Use enums for MobileNetworkType in nsIMobileConnectionService.idl (idl). r=hsinyi
authorJessica Jong <jjong@mozilla.com>
Tue, 18 Nov 2014 10:06:52 +0800
changeset 240401 2fdfde0fb31a8acd9805bb5e56391d1f7305d29f
parent 240400 f85da6932189b7278c1c1688364954b8203dea64
child 240402 e04c1126aeb45c6535247638aa8d3a055d443fb9
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsinyi
bugs1052846
milestone36.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 1052846 - Part 1: Use enums for MobileNetworkType in nsIMobileConnectionService.idl (idl). r=hsinyi
dom/mobileconnection/interfaces/nsIMobileConnectionService.idl
--- a/dom/mobileconnection/interfaces/nsIMobileConnectionService.idl
+++ b/dom/mobileconnection/interfaces/nsIMobileConnectionService.idl
@@ -230,17 +230,17 @@ interface nsIMobileConnectionService : n
 
 %{C++
 template<typename T> struct already_AddRefed;
 
 already_AddRefed<nsIMobileConnectionService>
 NS_CreateMobileConnectionService();
 %}
 
-[scriptable, uuid(5250a0ba-19a2-4e5b-a5ee-1e69ba2897a9)]
+[scriptable, uuid(99e43353-5fc4-497e-88a2-5fa6862ee64c)]
 interface nsIMobileConnection : nsISupports
 {
   /*
    * ICC service class.
    */
   const long ICC_SERVICE_CLASS_NONE       = 0; // not available
   const long ICC_SERVICE_CLASS_VOICE      = (1 << 0);
   const long ICC_SERVICE_CLASS_DATA       = (1 << 1);
@@ -330,16 +330,25 @@ interface nsIMobileConnection : nsISuppo
 
   /**
    * CDMA roaming preference.
    */
   const long CDMA_ROAMING_PREFERENCE_HOME       = 0;
   const long CDMA_ROAMING_PREFERENCE_AFFILIATED = 1;
   const long CDMA_ROAMING_PREFERENCE_ANY        = 2;
 
+  /**
+   * Supported network type.
+   */
+  const long MOBILE_NETWORK_TYPE_GSM   = 0;
+  const long MOBILE_NETWORK_TYPE_WCDMA = 1;
+  const long MOBILE_NETWORK_TYPE_CDMA  = 2;
+  const long MOBILE_NETWORK_TYPE_EVDO  = 3;
+  const long MOBILE_NETWORK_TYPE_LTE   = 4;
+
   readonly attribute unsigned long serviceId;
 
   /**
    * Called when any one who is interested in receiving unsolicited messages
    * from this nsIMobileConnection instance.
    */
   void registerListener(in nsIMobileConnectionListener listener);
   void unregisterListener(in nsIMobileConnectionListener listener);
@@ -381,20 +390,19 @@ interface nsIMobileConnection : nsISuppo
    * Current radio state. One of the nsIMobileConnection.MOBILE_RADIO_STATE_*
    * values.
    */
   readonly attribute long radioState;
 
   /**
    * The network types supported by this radio.
    *
-   * @return an array of DOMString
-   *         Possible values: 'gsm', 'wcdma', 'cdma', 'evdo', 'lte'.
+   * @return an array of nsIMobileConnection.MOBILE_NETWORK_TYPE_* values.
    */
-  void getSupportedNetworkTypes([array, size_is(length)] out wstring types,
+  void getSupportedNetworkTypes([array, size_is(length)] out long types,
                                 [retval] out unsigned long length);
 
   /**
    * Search for available networks.
    *
    * @param requestCallback
    *        Called when request is finished.
    *