dom/mobileconnection/interfaces/nsIMobileConnectionProvider.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/mobileconnection/interfaces/nsIMobileConnectionProvider.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,133 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nsISupports.idl"
     1.9 +
    1.10 +interface nsIDOMDOMRequest;
    1.11 +interface nsIDOMMozMobileCFInfo;
    1.12 +interface nsIDOMMozMobileConnectionInfo;
    1.13 +interface nsIDOMMozMobileNetworkInfo;
    1.14 +interface nsIDOMWindow;
    1.15 +interface nsIVariant;
    1.16 +
    1.17 +[scriptable, uuid(5013f5cc-24f9-45dc-ba03-f5dc031a3a6b)]
    1.18 +interface nsIMobileConnectionListener : nsISupports
    1.19 +{
    1.20 +  void notifyVoiceChanged();
    1.21 +  void notifyDataChanged();
    1.22 +  void notifyUssdReceived(in DOMString message,
    1.23 +                          in boolean sessionEnded);
    1.24 +  void notifyDataError(in DOMString message);
    1.25 +  void notifyCFStateChange(in boolean success,
    1.26 +                           in unsigned short action,
    1.27 +                           in unsigned short reason,
    1.28 +                           in DOMString number,
    1.29 +                           in unsigned short timeSeconds,
    1.30 +                           in unsigned short serviceClass);
    1.31 +  void notifyEmergencyCbModeChanged(in boolean active,
    1.32 +                                    in unsigned long timeoutMs);
    1.33 +  void notifyOtaStatusChanged(in DOMString status);
    1.34 +  void notifyIccChanged();
    1.35 +  void notifyRadioStateChanged();
    1.36 +};
    1.37 +
    1.38 +/**
    1.39 + * XPCOM component (in the content process) that provides the mobile
    1.40 + * network information.
    1.41 + */
    1.42 +[scriptable, uuid(987fc93a-e538-4fd3-9e4d-0e0f0934f019)]
    1.43 +interface nsIMobileConnectionProvider : nsISupports
    1.44 +{
    1.45 +  /**
    1.46 +   * Called when a content process registers receiving unsolicited messages from
    1.47 +   * RadioInterfaceLayer in the chrome process. Only a content process that has
    1.48 +   * the 'mobileconnection' permission is allowed to register.
    1.49 +   */
    1.50 +  void registerMobileConnectionMsg(in unsigned long clientId,
    1.51 +                                   in nsIMobileConnectionListener listener);
    1.52 +  void unregisterMobileConnectionMsg(in unsigned long clientId,
    1.53 +                                     in nsIMobileConnectionListener listener);
    1.54 +
    1.55 +  /**
    1.56 +   * These two fields require the 'mobilenetwork' permission.
    1.57 +   */
    1.58 +  DOMString getLastKnownNetwork(in unsigned long clientId);
    1.59 +  DOMString getLastKnownHomeNetwork(in unsigned long clientId);
    1.60 +
    1.61 +  /**
    1.62 +   * All fields below require the 'mobileconnection' permission.
    1.63 +   */
    1.64 +  nsIDOMMozMobileConnectionInfo getVoiceConnectionInfo(in unsigned long clientId);
    1.65 +  nsIDOMMozMobileConnectionInfo getDataConnectionInfo(in unsigned long clientId);
    1.66 +  DOMString getIccId(in unsigned long clientId);
    1.67 +  DOMString getNetworkSelectionMode(in unsigned long clientId);
    1.68 +  DOMString getRadioState(in unsigned long clientId);
    1.69 +  nsIVariant getSupportedNetworkTypes(in unsigned long clientId);
    1.70 +
    1.71 +  nsIDOMDOMRequest getNetworks(in unsigned long clientId,
    1.72 +                               in nsIDOMWindow window);
    1.73 +  nsIDOMDOMRequest selectNetwork(in unsigned long clientId,
    1.74 +                                 in nsIDOMWindow window,
    1.75 +                                 in nsIDOMMozMobileNetworkInfo network);
    1.76 +  nsIDOMDOMRequest selectNetworkAutomatically(in unsigned long clientId,
    1.77 +                                              in nsIDOMWindow window);
    1.78 +
    1.79 +  nsIDOMDOMRequest setPreferredNetworkType(in unsigned long clientId,
    1.80 +                                           in nsIDOMWindow window,
    1.81 +                                           in DOMString type);
    1.82 +  nsIDOMDOMRequest getPreferredNetworkType(in unsigned long clientId,
    1.83 +                                           in nsIDOMWindow window);
    1.84 +
    1.85 +  nsIDOMDOMRequest setRoamingPreference(in unsigned long clientId,
    1.86 +                                        in nsIDOMWindow window,
    1.87 +                                        in DOMString mode);
    1.88 +  nsIDOMDOMRequest getRoamingPreference(in unsigned long clientId,
    1.89 +                                        in nsIDOMWindow window);
    1.90 +
    1.91 +  nsIDOMDOMRequest setVoicePrivacyMode(in unsigned long clientId,
    1.92 +                                       in nsIDOMWindow window,
    1.93 +                                       in bool enabled);
    1.94 +  nsIDOMDOMRequest getVoicePrivacyMode(in unsigned long clientId,
    1.95 +                                       in nsIDOMWindow window);
    1.96 +
    1.97 +  nsIDOMDOMRequest sendMMI(in unsigned long clientId,
    1.98 +                           in nsIDOMWindow window,
    1.99 +                           in DOMString mmi);
   1.100 +  nsIDOMDOMRequest cancelMMI(in unsigned long clientId,
   1.101 +                             in nsIDOMWindow window);
   1.102 +
   1.103 +  nsIDOMDOMRequest getCallForwardingOption(in unsigned long clientId,
   1.104 +                                           in nsIDOMWindow window,
   1.105 +                                           in unsigned short reason);
   1.106 +  nsIDOMDOMRequest setCallForwardingOption(in unsigned long clientId,
   1.107 +                                           in nsIDOMWindow window,
   1.108 +                                           in nsIDOMMozMobileCFInfo CFInfo);
   1.109 +
   1.110 +  nsIDOMDOMRequest getCallBarringOption(in unsigned long clientId,
   1.111 +                                        in nsIDOMWindow window,
   1.112 +                                        in jsval option);
   1.113 +  nsIDOMDOMRequest setCallBarringOption(in unsigned long clientId,
   1.114 +                                        in nsIDOMWindow window,
   1.115 +                                        in jsval option);
   1.116 +  nsIDOMDOMRequest changeCallBarringPassword(in unsigned long clientId,
   1.117 +                                             in nsIDOMWindow window,
   1.118 +                                             in jsval info);
   1.119 +
   1.120 +  nsIDOMDOMRequest setCallWaitingOption(in unsigned long clientId,
   1.121 +                                        in nsIDOMWindow window,
   1.122 +                                        in bool enabled);
   1.123 +  nsIDOMDOMRequest getCallWaitingOption(in unsigned long clientId,
   1.124 +                                        in nsIDOMWindow window);
   1.125 +
   1.126 +  nsIDOMDOMRequest setCallingLineIdRestriction(in unsigned long clientId,
   1.127 +                                               in nsIDOMWindow window,
   1.128 +                                               in unsigned short clirMode);
   1.129 +  nsIDOMDOMRequest getCallingLineIdRestriction(in unsigned long clientId,
   1.130 +                                               in nsIDOMWindow window);
   1.131 +
   1.132 +  nsIDOMDOMRequest exitEmergencyCbMode(in unsigned long clientId,
   1.133 +                                       in nsIDOMWindow window);
   1.134 +
   1.135 +  nsIDOMDOMRequest setRadioEnabled(in unsigned long clientId, in nsIDOMWindow window, in bool enabled);
   1.136 +};

mercurial