Bug 952043 - Part 1: IDL changes for providing the network types supported by platform. r=smaug,hsinyi
authorEdgar Chen <echen@mozilla.com>
Thu, 02 Jan 2014 15:52:35 +0800
changeset 163499 238b3d2bf757744093a1b5aaa9d799adfdef9e4e
parent 163498 b12c965f505ef50cf70d8df38633abde5d564c3b
child 163500 6af90b41226f8a9fcc49f23c8afe7ce8fa59307a
push idunknown
push userunknown
push dateunknown
reviewerssmaug, hsinyi
bugs952043
milestone29.0a1
Bug 952043 - Part 1: IDL changes for providing the network types supported by platform. r=smaug,hsinyi
dom/network/interfaces/nsIDOMMobileConnection.idl
dom/network/interfaces/nsIMobileConnectionProvider.idl
--- a/dom/network/interfaces/nsIDOMMobileConnection.idl
+++ b/dom/network/interfaces/nsIDOMMobileConnection.idl
@@ -5,18 +5,19 @@
 #include "nsIDOMEventTarget.idl"
 
 interface nsIDOMEventListener;
 interface nsIDOMDOMRequest;
 interface nsIDOMMozMobileConnectionInfo;
 interface nsIDOMMozMobileNetworkInfo;
 interface nsIDOMMozMobileCellInfo;
 interface nsIDOMMozMobileCFInfo;
+interface nsIVariant;
 
-[scriptable, builtinclass, uuid(f55510a9-8dfc-44f5-90ab-355d1e721808)]
+[scriptable, builtinclass, uuid(389ad352-4e43-4c1a-85e9-bae745554326)]
 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);
@@ -86,16 +87,23 @@ interface nsIDOMMozMobileConnection : ns
    * The current radio state.
    *
    * Possible values: null (unknown), 'enabling', 'enabled', 'disabling',
    * 'disabled'
    */
   readonly attribute DOMString radioState;
 
   /**
+   * Array of network types that are supported by this radio.
+   *
+   * Possible values: 'gsm', 'wcdma', 'cdma', 'evdo', 'lte'
+   */
+  readonly attribute nsIVariant supportedNetworkTypes;
+
+  /**
    * Search for available networks.
    *
    * If successful, the request's onsuccess will be called, and the request's
    * result will be an array of nsIDOMMozMobileNetworkInfo.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * or 'GenericFailure'.
@@ -130,18 +138,18 @@ interface nsIDOMMozMobileConnection : ns
   nsIDOMDOMRequest selectNetworkAutomatically();
 
   /**
    * Set preferred network type
    *
    * @param type
    *        DOMString indicates the desired preferred network type.
    *        Possible values: 'wcdma/gsm', 'gsm', 'wcdma', 'wcdma/gsm-auto',
-                             'cdma/evdo', 'cdma', 'evdo', or
-                             'wcdma/gsm/cdma/evdo'.
+   *                         'cdma/evdo', 'cdma', 'evdo', or
+   *                         'wcdma/gsm/cdma/evdo'.
    *
    * If successful, the request's onsuccess will be called.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'InvalidParameter', 'ModeNotSupported' or 'GenericFailure'
    *
    * TODO: param "type" should be a WebIDL enum when this interface is converted
--- a/dom/network/interfaces/nsIMobileConnectionProvider.idl
+++ b/dom/network/interfaces/nsIMobileConnectionProvider.idl
@@ -4,16 +4,17 @@
 
 #include "nsISupports.idl"
 
 interface nsIDOMDOMRequest;
 interface nsIDOMMozMobileCFInfo;
 interface nsIDOMMozMobileConnectionInfo;
 interface nsIDOMMozMobileNetworkInfo;
 interface nsIDOMWindow;
+interface nsIVariant;
 
 [scriptable, uuid(5013f5cc-24f9-45dc-ba03-f5dc031a3a6b)]
 interface nsIMobileConnectionListener : nsISupports
 {
   void notifyVoiceChanged();
   void notifyDataChanged();
   void notifyUssdReceived(in DOMString message,
                           in boolean sessionEnded);
@@ -30,17 +31,17 @@ interface nsIMobileConnectionListener : 
   void notifyIccChanged();
   void notifyRadioStateChanged();
 };
 
 /**
  * XPCOM component (in the content process) that provides the mobile
  * network information.
  */
-[scriptable, uuid(55b8d918-8631-4d72-a9d7-f8c9536d6e6f)]
+[scriptable, uuid(987fc93a-e538-4fd3-9e4d-0e0f0934f019)]
 interface nsIMobileConnectionProvider : nsISupports
 {
   /**
    * Called when a content process registers receiving unsolicited messages from
    * RadioInterfaceLayer in the chrome process. Only a content process that has
    * the 'mobileconnection' permission is allowed to register.
    */
   void registerMobileConnectionMsg(in unsigned long clientId,
@@ -57,16 +58,17 @@ interface nsIMobileConnectionProvider : 
   /**
    * All fields below require the 'mobileconnection' permission.
    */
   nsIDOMMozMobileConnectionInfo getVoiceConnectionInfo(in unsigned long clientId);
   nsIDOMMozMobileConnectionInfo getDataConnectionInfo(in unsigned long clientId);
   DOMString getIccId(in unsigned long clientId);
   DOMString getNetworkSelectionMode(in unsigned long clientId);
   DOMString getRadioState(in unsigned long clientId);
+  nsIVariant getSupportedNetworkTypes(in unsigned long clientId);
 
   nsIDOMDOMRequest getNetworks(in unsigned long clientId,
                                in nsIDOMWindow window);
   nsIDOMDOMRequest selectNetwork(in unsigned long clientId,
                                  in nsIDOMWindow window,
                                  in nsIDOMMozMobileNetworkInfo network);
   nsIDOMDOMRequest selectNetworkAutomatically(in unsigned long clientId,
                                               in nsIDOMWindow window);