michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIDOMEventTarget.idl" michael@0: michael@0: interface nsIDOMEventListener; michael@0: interface nsIDOMDOMRequest; michael@0: interface nsIDOMMozMobileConnectionInfo; michael@0: interface nsIDOMMozMobileNetworkInfo; michael@0: interface nsIDOMMozMobileCellInfo; michael@0: interface nsIDOMMozMobileCFInfo; michael@0: interface nsIVariant; michael@0: michael@0: [scriptable, builtinclass, uuid(389ad352-4e43-4c1a-85e9-bae745554326)] michael@0: interface nsIDOMMozMobileConnection : nsIDOMEventTarget michael@0: { michael@0: const long ICC_SERVICE_CLASS_VOICE = (1 << 0); michael@0: const long ICC_SERVICE_CLASS_DATA = (1 << 1); michael@0: const long ICC_SERVICE_CLASS_FAX = (1 << 2); michael@0: const long ICC_SERVICE_CLASS_SMS = (1 << 3); michael@0: const long ICC_SERVICE_CLASS_DATA_SYNC = (1 << 4); michael@0: const long ICC_SERVICE_CLASS_DATA_ASYNC = (1 << 5); michael@0: const long ICC_SERVICE_CLASS_PACKET = (1 << 6); michael@0: const long ICC_SERVICE_CLASS_PAD = (1 << 7); michael@0: const long ICC_SERVICE_CLASS_MAX = (1 << 7); michael@0: michael@0: /** michael@0: * Call barring program. michael@0: * michael@0: * (0) all outgoing. michael@0: * (1) outgoing international. michael@0: * (2) outgoing international except to home country. michael@0: * (3) all incoming. michael@0: * (4) incoming when roaming outside the home country. michael@0: */ michael@0: const long CALL_BARRING_PROGRAM_ALL_OUTGOING = 0; michael@0: const long CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL = 1; michael@0: const long CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL_EXCEPT_HOME = 2; michael@0: const long CALL_BARRING_PROGRAM_ALL_INCOMING = 3; michael@0: const long CALL_BARRING_PROGRAM_INCOMING_ROAMING = 4; michael@0: michael@0: /** michael@0: * Calling line identification restriction constants. michael@0: * michael@0: * @see 3GPP TS 27.007 7.7 Defined values michael@0: * michael@0: * (0) Uses subscription default value. michael@0: * (1) Restricts CLI presentation. michael@0: * (2) Allows CLI presentation. michael@0: */ michael@0: const long CLIR_DEFAULT = 0; michael@0: const long CLIR_INVOCATION = 1; michael@0: const long CLIR_SUPPRESSION = 2; michael@0: michael@0: /** michael@0: * These two fields can be accessed by privileged applications with the michael@0: * 'mobilenetwork' permission. michael@0: */ michael@0: readonly attribute DOMString lastKnownNetwork; michael@0: readonly attribute DOMString lastKnownHomeNetwork; michael@0: michael@0: /** michael@0: * Information about the voice connection. michael@0: */ michael@0: readonly attribute nsIDOMMozMobileConnectionInfo voice; michael@0: michael@0: /** michael@0: * Information about the data connection. michael@0: */ michael@0: readonly attribute nsIDOMMozMobileConnectionInfo data; michael@0: michael@0: /** michael@0: * Integrated Circuit Card Identifier of the SIM this michael@0: * mobile connection corresponds to. michael@0: */ michael@0: readonly attribute DOMString iccId; michael@0: michael@0: /** michael@0: * The selection mode of the voice and data networks. michael@0: * michael@0: * Possible values: null (unknown), 'automatic', 'manual' michael@0: */ michael@0: readonly attribute DOMString networkSelectionMode; michael@0: michael@0: /** michael@0: * The current radio state. michael@0: * michael@0: * Possible values: null (unknown), 'enabling', 'enabled', 'disabling', michael@0: * 'disabled' michael@0: */ michael@0: readonly attribute DOMString radioState; michael@0: michael@0: /** michael@0: * Array of network types that are supported by this radio. michael@0: * michael@0: * Possible values: 'gsm', 'wcdma', 'cdma', 'evdo', 'lte' michael@0: */ michael@0: readonly attribute nsIVariant supportedNetworkTypes; michael@0: michael@0: /** michael@0: * Search for available networks. michael@0: * michael@0: * If successful, the request's onsuccess will be called, and the request's michael@0: * result will be an array of nsIDOMMozMobileNetworkInfo. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * or 'GenericFailure'. michael@0: */ michael@0: nsIDOMDOMRequest getNetworks(); michael@0: michael@0: /** michael@0: * Manually selects the passed in network, overriding the radio's current michael@0: * selection. michael@0: * michael@0: * If successful, the request's onsuccess will be called. michael@0: * Note: If the network was actually changed by this request, michael@0: * the 'voicechange' and 'datachange' events will also be fired. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * 'IllegalSIMorME', or 'GenericFailure' michael@0: */ michael@0: nsIDOMDOMRequest selectNetwork(in nsIDOMMozMobileNetworkInfo network); michael@0: michael@0: /** michael@0: * Tell the radio to automatically select a network. michael@0: * michael@0: * If successful, the request's onsuccess will be called. michael@0: * Note: If the network was actually changed by this request, the michael@0: * 'voicechange' and 'datachange' events will also be fired. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * 'IllegalSIMorME', or 'GenericFailure' michael@0: */ michael@0: nsIDOMDOMRequest selectNetworkAutomatically(); michael@0: michael@0: /** michael@0: * Set preferred network type michael@0: * michael@0: * @param type michael@0: * DOMString indicates the desired preferred network type. michael@0: * Possible values: 'wcdma/gsm', 'gsm', 'wcdma', 'wcdma/gsm-auto', michael@0: * 'cdma/evdo', 'cdma', 'evdo', 'wcdma/gsm/cdma/evdo', michael@0: * 'lte/cdma/evdo', 'lte/wcdma/gsm', michael@0: * 'lte/wcdma/gsm/cdma/evdo' or 'lte'. michael@0: * michael@0: * If successful, the request's onsuccess will be called. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * 'InvalidParameter', 'ModeNotSupported' or 'GenericFailure' michael@0: * michael@0: * TODO: param "type" should be a WebIDL enum when this interface is converted michael@0: * to WebIDL michael@0: */ michael@0: nsIDOMDOMRequest setPreferredNetworkType(in DOMString type); michael@0: michael@0: /** michael@0: * Query current preferred network type michael@0: * michael@0: * If successful, the request's onsuccess will be called. And the request's michael@0: * result will be a string indicating the current preferred network type. michael@0: * The value will be either 'wcdma/gsm', 'gsm', 'wcdma', 'wcdma/gsm-auto', michael@0: * 'cdma/evdo', 'cdma', 'evdo', 'wcdma/gsm/cdma/evdo', 'lte/cdma/evdo', michael@0: * 'lte/wcdma/gsm', 'lte/wcdma/gsm/cdma/evdo' or 'lte'. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * or 'GenericFailure' michael@0: */ michael@0: nsIDOMDOMRequest getPreferredNetworkType(); michael@0: michael@0: /** michael@0: * Set roaming preference michael@0: * michael@0: * @param mode michael@0: * DOMString indicates the desired roaming preference. michael@0: * Possible values: 'home', 'affiliated', or 'any'. michael@0: * michael@0: * If successful, the request's onsuccess will be called. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * 'IllegalSIMorME', 'InvalidParameter', or 'GenericFailure' michael@0: * michael@0: * TODO: param "mode" should be a WebIDL enum when this interface is converted michael@0: * to WebIDL michael@0: */ michael@0: nsIDOMDOMRequest setRoamingPreference(in DOMString mode); michael@0: michael@0: /** michael@0: * Query current roaming preference michael@0: * michael@0: * If successful, the request's onsuccess will be called. And the request's michael@0: * result will be a string indicating the current roaming preference. michael@0: * The value will be either 'home', 'affiliated', or 'any'. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * 'IllegalSIMorME', or 'GenericFailure' michael@0: */ michael@0: nsIDOMDOMRequest getRoamingPreference(); michael@0: michael@0: /** michael@0: * Set voice privacy preference. michael@0: * michael@0: * @param enabled michael@0: * Boolean indicates the preferred voice privacy mode used in voice michael@0: * scrambling in CDMA networks. 'True' means the enhanced voice security michael@0: * is required. michael@0: * michael@0: * If successful, the request's onsuccess will be called. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * 'IllegalSIMorME', 'InvalidParameter', or 'GenericFailure' michael@0: */ michael@0: nsIDOMDOMRequest setVoicePrivacyMode(in bool enabled); michael@0: michael@0: /** michael@0: * Query current voice privacy mode. michael@0: * michael@0: * If successful, the request's onsuccess will be called. And the request's michael@0: * result will be a boolean indicating the current voice privacy mode. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * 'IllegalSIMorME', or 'GenericFailure' michael@0: */ michael@0: nsIDOMDOMRequest getVoicePrivacyMode(); michael@0: michael@0: /** michael@0: * Send a MMI message. michael@0: * michael@0: * @param mmi michael@0: * DOMString containing an MMI string that can be associated to a michael@0: * USSD request or other RIL functionality. michael@0: * michael@0: * @return a nsIDOMDOMRequest michael@0: * The request's result will be an object containing information michael@0: * about the operation. michael@0: * michael@0: * In case that the MMI code requires sending an USSD request, the DOMrequest michael@0: * 'success' event means that the RIL has successfully processed and sent the michael@0: * USSD request to the network. The network reply will be reported via michael@0: * 'onussdreceived' event. If the MMI code is not associated to a USSD but to michael@0: * other RIL request its result, if one is needed, will be notified via the michael@0: * returned DOMRequest 'success' or 'error' event. michael@0: */ michael@0: nsIDOMDOMRequest sendMMI(in DOMString mmi); michael@0: michael@0: /** michael@0: * Cancel the current MMI request if one exists. michael@0: */ michael@0: nsIDOMDOMRequest cancelMMI(); michael@0: michael@0: /** michael@0: * Configures call forward options. michael@0: * michael@0: * @param CFInfo michael@0: * An object containing the call forward rule to set. michael@0: * michael@0: * If successful, the request's onsuccess will be called. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * 'IllegalSIMorME', 'InvalidParameter', or 'GenericFailure' michael@0: */ michael@0: nsIDOMDOMRequest setCallForwardingOption(in nsIDOMMozMobileCFInfo CFInfo); michael@0: michael@0: /** michael@0: * Queries current call forward options. michael@0: * michael@0: * @param reason michael@0: * Indicates the reason the call is being forwarded. It will be either michael@0: * unconditional (0), mobile busy (1), no reply (2), not reachable (3), michael@0: * all call forwarding (4), or all conditional call forwarding (5). michael@0: * michael@0: * If successful, the request's onsuccess will be called, and the request's michael@0: * result will be an array of nsIDOMMozMobileCFInfo. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * 'InvalidParameter', or 'GenericFailure'. michael@0: */ michael@0: nsIDOMDOMRequest getCallForwardingOption(in unsigned short reason); michael@0: michael@0: /** michael@0: * Configures call barring option. michael@0: * michael@0: * @param option michael@0: * An object containing the call barring rule to set. michael@0: * @see MozCallBarringOption for the detail of info. michael@0: * michael@0: * If successful, the request's onsuccess will be called. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * 'IllegalSIMorME', 'InvalidParameter', or 'GenericFailure' michael@0: */ michael@0: nsIDOMDOMRequest setCallBarringOption(in jsval option); michael@0: michael@0: /** michael@0: * Queries current call barring status. michael@0: * michael@0: * @param info michael@0: * An object containing the call barring rule to query. No need to michael@0: * specify 'enabled' property. michael@0: * @see MozCallBarringOption for the detail of info. michael@0: * michael@0: * If successful, the request's onsuccess will be called, and the request's michael@0: * result will be an object of MozCallBarringOption with correct 'enabled' michael@0: * property indicating the status of this rule. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * 'InvalidParameter', or 'GenericFailure'. michael@0: */ michael@0: nsIDOMDOMRequest getCallBarringOption(in jsval option); michael@0: michael@0: /** michael@0: * Change call barring facility password. michael@0: * michael@0: * @param info michael@0: * An object containing information about pin and newPin, and, michael@0: * this object must have both "pin" and "newPin" attributes michael@0: * to change the call barring facility password. michael@0: * michael@0: * Example: michael@0: * michael@0: * changeCallBarringPassword({pin: "...", michael@0: * newPin: "..."}); michael@0: */ michael@0: nsIDOMDOMRequest changeCallBarringPassword(in jsval info); michael@0: michael@0: /** michael@0: * Configures call waiting options. michael@0: * michael@0: * @param enabled michael@0: * Value containing the desired call waiting status. michael@0: * michael@0: * If successful, the request's onsuccess will be called. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * 'IllegalSIMorME', or 'GenericFailure' michael@0: */ michael@0: nsIDOMDOMRequest setCallWaitingOption(in bool enabled); michael@0: michael@0: /** michael@0: * Queries current call waiting options. michael@0: * michael@0: * If successful, the request's onsuccess will be called, and the request's michael@0: * result will be a boolean indicating the call waiting status. michael@0: * michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * or 'GenericFailure'. michael@0: */ michael@0: nsIDOMDOMRequest getCallWaitingOption(); michael@0: michael@0: /** michael@0: * Enables or disables the presentation of the calling line identity (CLI) to michael@0: * the called party when originating a call. michael@0: * michael@0: * @param clirMode michael@0: * Is one of the CLIR_* constants. michael@0: * michael@0: * If successful, the request's onsuccess will be called. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: */ michael@0: nsIDOMDOMRequest setCallingLineIdRestriction(in unsigned short clirMode); michael@0: michael@0: /** michael@0: * Queries current CLIR status. michael@0: * michael@0: * If successful, the request's onsuccess will be called, and the request's michael@0: * result will be a DOMCLIRStatus dictionary containing CLIR 'n' and 'm' michael@0: * parameter. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RadioNotAvailable', 'RequestNotSupported', michael@0: * or 'GenericFailure'. michael@0: */ michael@0: nsIDOMDOMRequest getCallingLineIdRestriction(); michael@0: michael@0: /** michael@0: * Exit emergency callback mode. michael@0: * michael@0: * If successful, the request's onsuccess will be called. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'RequestNotSupported' or 'GenericFailure'. michael@0: */ michael@0: nsIDOMDOMRequest exitEmergencyCbMode(); michael@0: michael@0: /** michael@0: * Set radio enabled/disabled. michael@0: * michael@0: * @param enabled michael@0: * True to enable the radio. michael@0: * michael@0: * If successful, the request's onsuccess will be called. michael@0: * michael@0: * Otherwise, the request's onerror will be called, and the request's error michael@0: * will be either 'InvalidStateError', 'RadioNotAvailable', or michael@0: * 'GenericFailure'. michael@0: * michael@0: * Note: Request is not available when radioState is null, 'enabling', or michael@0: * 'disabling'. Calling the function in above conditions will receive michael@0: * 'InvalidStateError' error. michael@0: */ michael@0: nsIDOMDOMRequest setRadioEnabled(in boolean enabled); michael@0: michael@0: /** michael@0: * The 'voicechange' event is notified whenever the voice connection object michael@0: * changes. michael@0: */ michael@0: [implicit_jscontext] attribute jsval onvoicechange; michael@0: michael@0: /** michael@0: * The 'datachange' event is notified whenever the data connection object michael@0: * changes values. michael@0: */ michael@0: [implicit_jscontext] attribute jsval ondatachange; michael@0: michael@0: /** michael@0: * The 'ussdreceived' event is notified whenever a new USSD message is michael@0: * received. michael@0: */ michael@0: [implicit_jscontext] attribute jsval onussdreceived; michael@0: michael@0: /** michael@0: * The 'dataerror' event is notified whenever the data connection object michael@0: * receives an error from the RIL michael@0: */ michael@0: [implicit_jscontext] attribute jsval ondataerror; michael@0: michael@0: /** michael@0: * The 'oncfstatechange' event is notified whenever the call forwarding michael@0: * state changes. michael@0: */ michael@0: [implicit_jscontext] attribute jsval oncfstatechange; michael@0: michael@0: /** michael@0: * The 'emergencycbmodechange' event is notified whenever the emergency michael@0: * callback mode changes. michael@0: */ michael@0: [implicit_jscontext] attribute jsval onemergencycbmodechange; michael@0: michael@0: /** michael@0: * The 'onotastatuschange' event is notified whenever the ota provision status michael@0: * changes. michael@0: */ michael@0: [implicit_jscontext] attribute jsval onotastatuschange; michael@0: michael@0: /** michael@0: * The 'oniccchange' event is notified whenever the iccid value michael@0: * changes. michael@0: */ michael@0: [implicit_jscontext] attribute jsval oniccchange; michael@0: michael@0: /** michael@0: * The 'onradiostatechange' event is notified whenever the radio state michael@0: * changes. michael@0: */ michael@0: [implicit_jscontext] attribute jsval onradiostatechange; michael@0: }; michael@0: michael@0: [scriptable, uuid(49706beb-a160-40b7-b745-50f62e389a2c)] michael@0: interface nsIDOMMozMobileConnectionInfo : nsISupports michael@0: { michael@0: /** michael@0: * State of the connection. michael@0: * michael@0: * Possible values: 'notSearching', 'searching', 'denied', 'registered'. michael@0: * null if the state is unknown. michael@0: */ michael@0: readonly attribute DOMString state; michael@0: michael@0: /** michael@0: * Indicates whether the connection is ready. This may be different michael@0: */ michael@0: readonly attribute bool connected; michael@0: michael@0: /** michael@0: * Indicates whether only emergency calls are possible. michael@0: * michael@0: * This flag is only relevant to voice connections and when 'connected' is michael@0: * false. michael@0: */ michael@0: readonly attribute bool emergencyCallsOnly; michael@0: michael@0: /** michael@0: * Indicates whether the connection is going through a foreign operator michael@0: * (roaming) or not. michael@0: */ michael@0: readonly attribute bool roaming; michael@0: michael@0: /** michael@0: * Network operator michael@0: */ michael@0: readonly attribute nsIDOMMozMobileNetworkInfo network; michael@0: michael@0: /** michael@0: * Type of connection. michael@0: * michael@0: * Possible values: 'gsm', 'cdma', gprs', 'edge', 'umts', 'hsdpa', 'evdo0', michael@0: * 'evdoa', 'evdob', etc. michael@0: */ michael@0: readonly attribute DOMString type; michael@0: michael@0: /** michael@0: * Signal strength in dBm, or null if no service is available. michael@0: */ michael@0: readonly attribute jsval signalStrength; michael@0: michael@0: /** michael@0: * Signal strength, represented linearly as a number between 0 (weakest michael@0: * signal) and 100 (full signal). michael@0: */ michael@0: readonly attribute jsval relSignalStrength; michael@0: michael@0: /** michael@0: * Cell location. michael@0: */ michael@0: readonly attribute nsIDOMMozMobileCellInfo cell; michael@0: michael@0: }; michael@0: michael@0: [scriptable, uuid(40018fc7-4c42-47b6-8de6-3591a9c622bc)] michael@0: interface nsIDOMMozMobileNetworkInfo: nsISupports michael@0: { michael@0: /** michael@0: * Short name of the network operator michael@0: */ michael@0: readonly attribute DOMString shortName; michael@0: michael@0: /** michael@0: * Long name of the network operator michael@0: */ michael@0: readonly attribute DOMString longName; michael@0: michael@0: /** michael@0: * Mobile Country Code (MCC) of the network operator michael@0: */ michael@0: readonly attribute DOMString mcc; michael@0: michael@0: /** michael@0: * Mobile Network Code (MNC) of the network operator michael@0: */ michael@0: readonly attribute DOMString mnc; michael@0: michael@0: /** michael@0: * State of this network operator. michael@0: * michael@0: * Possible values: 'available', 'connected', 'forbidden', or null (unknown) michael@0: */ michael@0: readonly attribute DOMString state; michael@0: }; michael@0: michael@0: [scriptable, uuid(9750b3a7-d913-436e-95d4-7ef2973ec6a1)] michael@0: interface nsIDOMMozMobileCellInfo: nsISupports michael@0: { michael@0: /** michael@0: * Mobile Location Area Code (LAC) for GSM/WCDMA networks. michael@0: * michael@0: * Possible ranges from 0x0000 to 0xffff. michael@0: * -1 if the LAC is unknown. michael@0: */ michael@0: readonly attribute long gsmLocationAreaCode; michael@0: michael@0: /** michael@0: * Mobile Cell ID for GSM/WCDMA networks. michael@0: * michael@0: * Possible ranges from 0x00000000 to 0xffffffff. michael@0: * -1 if the cell id is unknown. michael@0: */ michael@0: readonly attribute long long gsmCellId; michael@0: michael@0: /** michael@0: * Base Station ID for CDMA networks. michael@0: * michael@0: * Possible ranges from 0 to 65535 michael@0: * -1 if the base station id is unknown. michael@0: */ michael@0: readonly attribute long cdmaBaseStationId; michael@0: michael@0: /** michael@0: * Base Station Latitude for CDMA networks. michael@0: * michael@0: * Possible ranges from -1296000 to 1296000. michael@0: * -2147483648 if the latitude is unknown. michael@0: * michael@0: * @see 3GPP2 C.S0005-A v6.0. michael@0: */ michael@0: readonly attribute long cdmaBaseStationLatitude; michael@0: michael@0: /** michael@0: * Base Station Longitude for CDMA networks. michael@0: * michael@0: * Possible ranges from -2592000 to 2592000. michael@0: * -2147483648 if the longitude is unknown. michael@0: * michael@0: * @see 3GPP2 C.S0005-A v6.0. michael@0: */ michael@0: readonly attribute long cdmaBaseStationLongitude; michael@0: michael@0: /** michael@0: * System ID for CDMA networks. michael@0: * michael@0: * Possible ranges from 0 to 32767. michael@0: * -1 if the system id is unknown. michael@0: */ michael@0: readonly attribute long cdmaSystemId; michael@0: michael@0: /** michael@0: * Network ID for CDMA networks. michael@0: * michael@0: * Possible ranges from 0 to 65535. michael@0: * -1 if the network id is unknown. michael@0: */ michael@0: readonly attribute long cdmaNetworkId; michael@0: }; michael@0: michael@0: [scriptable, uuid(d1b35ad8-99aa-47cc-ab49-2e72b00e39df)] michael@0: interface nsIDOMMozMobileCFInfo : nsISupports michael@0: { michael@0: /** michael@0: * Call forwarding rule status. michael@0: * michael@0: * It will be either not active (false), or active (true). michael@0: * michael@0: * Note: Unused for setting call forwarding options. It reports michael@0: * the status of the rule when getting how the rule is michael@0: * configured. michael@0: * michael@0: * @see 3GPP TS 27.007 7.11 "status". michael@0: */ michael@0: readonly attribute bool active; michael@0: michael@0: const long CALL_FORWARD_ACTION_DISABLE = 0; michael@0: const long CALL_FORWARD_ACTION_ENABLE = 1; michael@0: const long CALL_FORWARD_ACTION_QUERY_STATUS = 2; michael@0: const long CALL_FORWARD_ACTION_REGISTRATION = 3; michael@0: const long CALL_FORWARD_ACTION_ERASURE = 4; michael@0: michael@0: /** michael@0: * Indicates what to do with the rule. michael@0: * michael@0: * One of the CALL_FORWARD_ACTION_* constants. It will be either disable (0), michael@0: * enable (1), query status (2), registration (3), or erasure (4). michael@0: * michael@0: * @see 3GPP TS 27.007 7.11 "mode". michael@0: */ michael@0: readonly attribute unsigned short action; michael@0: michael@0: const long CALL_FORWARD_REASON_UNCONDITIONAL = 0; michael@0: const long CALL_FORWARD_REASON_MOBILE_BUSY = 1; michael@0: const long CALL_FORWARD_REASON_NO_REPLY = 2; michael@0: const long CALL_FORWARD_REASON_NOT_REACHABLE = 3; michael@0: const long CALL_FORWARD_REASON_ALL_CALL_FORWARDING = 4; michael@0: const long CALL_FORWARD_REASON_ALL_CONDITIONAL_CALL_FORWARDING = 5; michael@0: michael@0: /** michael@0: * Indicates the reason the call is being forwarded. michael@0: * michael@0: * One of the CALL_FORWARD_REASON_* constants. It will be either michael@0: * unconditional (0), mobile busy (1), no reply (2), not reachable (3), michael@0: * all call forwarding (4), or all conditional call forwarding (5). michael@0: * michael@0: * @see 3GPP TS 27.007 7.11 "reason". michael@0: */ michael@0: readonly attribute unsigned short reason; michael@0: michael@0: /** michael@0: * Phone number of forwarding address. michael@0: */ michael@0: readonly attribute DOMString number; michael@0: michael@0: /** michael@0: * When "no reply" is enabled or queried, this gives the time in michael@0: * seconds to wait before call is forwarded. michael@0: */ michael@0: readonly attribute unsigned short timeSeconds; michael@0: michael@0: /** michael@0: * Service for which the call forward is set up. It should be one of the michael@0: * nsIDOMMozMobileConnection.ICC_SERVICE_CLASS_* values. michael@0: */ michael@0: readonly attribute unsigned short serviceClass; michael@0: };