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 216076 2fdfde0fb31a8acd9805bb5e56391d1f7305d29f
parent 216075 f85da6932189b7278c1c1688364954b8203dea64
child 216077 e04c1126aeb45c6535247638aa8d3a055d443fb9
push id12217
push userjjong@mozilla.com
push dateTue, 18 Nov 2014 02:07:29 +0000
treeherderb2g-inbound@6c0d0fed9ad4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsinyi
bugs1052846
milestone36.0a1
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.
    *