Bug 1052843 - Part 1: Use enums for MobileRadioState in nsIMobileConnectionService.idl (idl). r=hsinyi
authorJessica Jong <jjong@mozilla.com>
Fri, 24 Oct 2014 17:12:31 +0800
changeset 212070 ae49c3d47718b17c29b552796e85c8e86f76a0be
parent 212069 d09af495bc92f7d6685d7ed0753b1e4c8b0915cc
child 212071 70b014471e1b55e3add90485aca1fbd42a775b8b
push id11625
push userjjong@mozilla.com
push dateFri, 24 Oct 2014 09:13:30 +0000
treeherderb2g-inbound@6bfe180d72e9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsinyi
bugs1052843
milestone36.0a1
Bug 1052843 - Part 1: Use enums for MobileRadioState in nsIMobileConnectionService.idl (idl). r=hsinyi
dom/mobileconnection/gonk/nsIGonkMobileConnectionService.idl
dom/mobileconnection/interfaces/nsIMobileConnectionService.idl
--- a/dom/mobileconnection/gonk/nsIGonkMobileConnectionService.idl
+++ b/dom/mobileconnection/gonk/nsIGonkMobileConnectionService.idl
@@ -4,17 +4,17 @@
 
 #include "nsIMobileConnectionService.idl"
 
 %{C++
 #define GONK_MOBILECONNECTION_SERVICE_CONTRACTID \
         "@mozilla.org/mobileconnection/gonkmobileconnectionservice;1"
 %}
 
-[scriptable, uuid(2d574f0e-4a02-11e4-b1b3-cbc14b7608ce)]
+[scriptable, uuid(7322619d-9abd-4410-99ce-207da80f9879)]
 interface nsIGonkMobileConnectionService : nsIMobileConnectionService
 {
   void notifyNetworkInfoChanged(in unsigned long clientId, in jsval networkInfo);
 
   void notifyVoiceInfoChanged(in unsigned long clientId, in jsval voiceInfo);
 
   void notifyDataInfoChanged(in unsigned long clientId, in jsval dataInfo);
 
@@ -22,17 +22,17 @@ interface nsIGonkMobileConnectionService
 
   void notifySignalStrengthChanged(in unsigned long clientId, in jsval signal);
 
   void notifyOperatorChanged(in unsigned long clientId, in jsval info);
 
   void notifyOtaStatusChanged(in unsigned long clientId, in DOMString status);
 
   void notifyRadioStateChanged(in unsigned long clientId,
-                               in DOMString radioState);
+                               in long radioState);
 
   void notifyUssdReceived(in unsigned long clientId,
                           in DOMString message,
                           in boolean sessionEnded);
 
   void notifyEmergencyCallbackModeChanged(in unsigned long clientId,
                                           in boolean active,
                                           in unsigned long timeoutMs);
--- a/dom/mobileconnection/interfaces/nsIMobileConnectionService.idl
+++ b/dom/mobileconnection/interfaces/nsIMobileConnectionService.idl
@@ -231,17 +231,17 @@ interface nsIMobileConnectionService : n
 
 %{C++
 template<typename T> struct already_AddRefed;
 
 already_AddRefed<nsIMobileConnectionService>
 NS_CreateMobileConnectionService();
 %}
 
-[scriptable, uuid(cfc7d15b-d2c2-4f28-ad9f-b250030c3073)]
+[scriptable, uuid(99818dc7-e770-4249-87e2-2de0a928ed08)]
 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);
@@ -299,16 +299,25 @@ interface nsIMobileConnection : nsISuppo
 
   /**
    * Network selection mode.
    */
   const long NETWORK_SELECTION_MODE_UNKNOWN   = -1; // not available
   const long NETWORK_SELECTION_MODE_AUTOMATIC = 0;
   const long NETWORK_SELECTION_MODE_MANUAL    = 1;
 
+  /**
+   * Mobile Radio State.
+   */
+  const long MOBILE_RADIO_STATE_UNKNOWN   = -1;
+  const long MOBILE_RADIO_STATE_ENABLING  = 0;
+  const long MOBILE_RADIO_STATE_ENABLED   = 1;
+  const long MOBILE_RADIO_STATE_DISABLING = 2;
+  const long MOBILE_RADIO_STATE_DISABLED  = 3;
+
   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);
@@ -342,20 +351,20 @@ interface nsIMobileConnection : nsISuppo
 
   /**
    * The selection mode of the voice and data networks. One of the
    * nsIMobileConnection.NETWORK_SELECTION_MODE_* values.
    */
   readonly attribute long networkSelectionMode;
 
   /**
-   * Current radio state. Possible values are 'enabling', 'enabled',
-   * 'disabling', 'disabled', null (unknown).
+   * Current radio state. One of the nsIMobileConnection.MOBILE_RADIO_STATE_*
+   * values.
    */
-  readonly attribute DOMString radioState;
+  readonly attribute long radioState;
 
   /**
    * The network types supported by this radio.
    *
    * @return an array of DOMString
    *         Possible values: 'gsm', 'wcdma', 'cdma', 'evdo', 'lte'.
    */
   void getSupportedNetworkTypes([array, size_is(length)] out wstring types,