dom/mobileconnection/interfaces/nsIMobileConnectionProvider.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #include "nsISupports.idl"
     7 interface nsIDOMDOMRequest;
     8 interface nsIDOMMozMobileCFInfo;
     9 interface nsIDOMMozMobileConnectionInfo;
    10 interface nsIDOMMozMobileNetworkInfo;
    11 interface nsIDOMWindow;
    12 interface nsIVariant;
    14 [scriptable, uuid(5013f5cc-24f9-45dc-ba03-f5dc031a3a6b)]
    15 interface nsIMobileConnectionListener : nsISupports
    16 {
    17   void notifyVoiceChanged();
    18   void notifyDataChanged();
    19   void notifyUssdReceived(in DOMString message,
    20                           in boolean sessionEnded);
    21   void notifyDataError(in DOMString message);
    22   void notifyCFStateChange(in boolean success,
    23                            in unsigned short action,
    24                            in unsigned short reason,
    25                            in DOMString number,
    26                            in unsigned short timeSeconds,
    27                            in unsigned short serviceClass);
    28   void notifyEmergencyCbModeChanged(in boolean active,
    29                                     in unsigned long timeoutMs);
    30   void notifyOtaStatusChanged(in DOMString status);
    31   void notifyIccChanged();
    32   void notifyRadioStateChanged();
    33 };
    35 /**
    36  * XPCOM component (in the content process) that provides the mobile
    37  * network information.
    38  */
    39 [scriptable, uuid(987fc93a-e538-4fd3-9e4d-0e0f0934f019)]
    40 interface nsIMobileConnectionProvider : nsISupports
    41 {
    42   /**
    43    * Called when a content process registers receiving unsolicited messages from
    44    * RadioInterfaceLayer in the chrome process. Only a content process that has
    45    * the 'mobileconnection' permission is allowed to register.
    46    */
    47   void registerMobileConnectionMsg(in unsigned long clientId,
    48                                    in nsIMobileConnectionListener listener);
    49   void unregisterMobileConnectionMsg(in unsigned long clientId,
    50                                      in nsIMobileConnectionListener listener);
    52   /**
    53    * These two fields require the 'mobilenetwork' permission.
    54    */
    55   DOMString getLastKnownNetwork(in unsigned long clientId);
    56   DOMString getLastKnownHomeNetwork(in unsigned long clientId);
    58   /**
    59    * All fields below require the 'mobileconnection' permission.
    60    */
    61   nsIDOMMozMobileConnectionInfo getVoiceConnectionInfo(in unsigned long clientId);
    62   nsIDOMMozMobileConnectionInfo getDataConnectionInfo(in unsigned long clientId);
    63   DOMString getIccId(in unsigned long clientId);
    64   DOMString getNetworkSelectionMode(in unsigned long clientId);
    65   DOMString getRadioState(in unsigned long clientId);
    66   nsIVariant getSupportedNetworkTypes(in unsigned long clientId);
    68   nsIDOMDOMRequest getNetworks(in unsigned long clientId,
    69                                in nsIDOMWindow window);
    70   nsIDOMDOMRequest selectNetwork(in unsigned long clientId,
    71                                  in nsIDOMWindow window,
    72                                  in nsIDOMMozMobileNetworkInfo network);
    73   nsIDOMDOMRequest selectNetworkAutomatically(in unsigned long clientId,
    74                                               in nsIDOMWindow window);
    76   nsIDOMDOMRequest setPreferredNetworkType(in unsigned long clientId,
    77                                            in nsIDOMWindow window,
    78                                            in DOMString type);
    79   nsIDOMDOMRequest getPreferredNetworkType(in unsigned long clientId,
    80                                            in nsIDOMWindow window);
    82   nsIDOMDOMRequest setRoamingPreference(in unsigned long clientId,
    83                                         in nsIDOMWindow window,
    84                                         in DOMString mode);
    85   nsIDOMDOMRequest getRoamingPreference(in unsigned long clientId,
    86                                         in nsIDOMWindow window);
    88   nsIDOMDOMRequest setVoicePrivacyMode(in unsigned long clientId,
    89                                        in nsIDOMWindow window,
    90                                        in bool enabled);
    91   nsIDOMDOMRequest getVoicePrivacyMode(in unsigned long clientId,
    92                                        in nsIDOMWindow window);
    94   nsIDOMDOMRequest sendMMI(in unsigned long clientId,
    95                            in nsIDOMWindow window,
    96                            in DOMString mmi);
    97   nsIDOMDOMRequest cancelMMI(in unsigned long clientId,
    98                              in nsIDOMWindow window);
   100   nsIDOMDOMRequest getCallForwardingOption(in unsigned long clientId,
   101                                            in nsIDOMWindow window,
   102                                            in unsigned short reason);
   103   nsIDOMDOMRequest setCallForwardingOption(in unsigned long clientId,
   104                                            in nsIDOMWindow window,
   105                                            in nsIDOMMozMobileCFInfo CFInfo);
   107   nsIDOMDOMRequest getCallBarringOption(in unsigned long clientId,
   108                                         in nsIDOMWindow window,
   109                                         in jsval option);
   110   nsIDOMDOMRequest setCallBarringOption(in unsigned long clientId,
   111                                         in nsIDOMWindow window,
   112                                         in jsval option);
   113   nsIDOMDOMRequest changeCallBarringPassword(in unsigned long clientId,
   114                                              in nsIDOMWindow window,
   115                                              in jsval info);
   117   nsIDOMDOMRequest setCallWaitingOption(in unsigned long clientId,
   118                                         in nsIDOMWindow window,
   119                                         in bool enabled);
   120   nsIDOMDOMRequest getCallWaitingOption(in unsigned long clientId,
   121                                         in nsIDOMWindow window);
   123   nsIDOMDOMRequest setCallingLineIdRestriction(in unsigned long clientId,
   124                                                in nsIDOMWindow window,
   125                                                in unsigned short clirMode);
   126   nsIDOMDOMRequest getCallingLineIdRestriction(in unsigned long clientId,
   127                                                in nsIDOMWindow window);
   129   nsIDOMDOMRequest exitEmergencyCbMode(in unsigned long clientId,
   130                                        in nsIDOMWindow window);
   132   nsIDOMDOMRequest setRadioEnabled(in unsigned long clientId, in nsIDOMWindow window, in bool enabled);
   133 };

mercurial