2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2011-12-04 23:58:27 -08:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
2012-04-19 14:33:25 -07:00
|
|
|
#include "nsIMobileConnectionProvider.idl"
|
|
|
|
|
|
|
|
interface nsIDOMMozMobileConnectionInfo;
|
|
|
|
interface nsIDOMDOMRequest;
|
|
|
|
interface nsIDOMWindow;
|
2012-07-18 20:26:49 -07:00
|
|
|
interface nsIDOMMozVoicemailStatus;
|
2011-12-04 23:58:27 -08:00
|
|
|
|
2012-05-14 21:13:06 -07:00
|
|
|
[scriptable, uuid(c14c71b8-afba-403b-8320-94593de9380f)]
|
2012-01-19 12:53:32 -08:00
|
|
|
interface nsIRILTelephonyCallback : nsISupports
|
2011-12-23 21:02:52 -08:00
|
|
|
{
|
2012-01-19 12:53:32 -08:00
|
|
|
/**
|
|
|
|
* Notified when a telephony call changes state.
|
|
|
|
*
|
|
|
|
* @param callIndex
|
|
|
|
* Call identifier assigned by the RIL.
|
|
|
|
* @param callState
|
|
|
|
* One of the nsIRadioInterfaceLayer::CALL_STATE_* values.
|
|
|
|
* @param number
|
|
|
|
* Number of the other party.
|
2012-05-14 21:13:06 -07:00
|
|
|
* @param isActive
|
|
|
|
* Indicates whether this call is the currently active one.
|
2012-01-19 12:53:32 -08:00
|
|
|
*/
|
2012-01-09 14:28:47 -08:00
|
|
|
void callStateChanged(in unsigned long callIndex,
|
|
|
|
in unsigned short callState,
|
2012-05-14 21:13:06 -07:00
|
|
|
in AString number,
|
|
|
|
in boolean isActive);
|
2011-12-04 23:58:27 -08:00
|
|
|
|
2012-01-19 12:53:32 -08:00
|
|
|
/**
|
2012-04-24 08:44:42 -07:00
|
|
|
* Called when nsIRILContentHelper is asked to enumerate the current
|
|
|
|
* telephony call state (nsIRILContentHelper::enumerateCalls). This is
|
2012-01-19 12:53:32 -08:00
|
|
|
* called once per call that is currently managed by the RIL.
|
|
|
|
*
|
|
|
|
* @param callIndex
|
|
|
|
* Call identifier assigned by the RIL.
|
|
|
|
* @param callState
|
|
|
|
* One of the nsIRadioInterfaceLayer::CALL_STATE_* values.
|
|
|
|
* @param number
|
|
|
|
* Number of the other party.
|
|
|
|
* @param isActive
|
|
|
|
* Indicates whether this call is the active one.
|
|
|
|
*
|
|
|
|
* @return true to continue enumeration or false to cancel.
|
|
|
|
*/
|
2012-01-09 14:28:47 -08:00
|
|
|
boolean enumerateCallState(in unsigned long callIndex,
|
|
|
|
in unsigned short callState,
|
|
|
|
in AString number,
|
|
|
|
in boolean isActive);
|
2012-05-14 21:13:06 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Called when RIL error occurs.
|
|
|
|
*
|
|
|
|
* @param callIndex
|
|
|
|
* Call identifier assigned by the RIL. -1 if no connection
|
|
|
|
* @param error
|
|
|
|
* Error from RIL.
|
|
|
|
*/
|
|
|
|
void notifyError(in long callIndex,
|
|
|
|
in AString error);
|
2011-12-04 23:58:27 -08:00
|
|
|
};
|
|
|
|
|
2012-07-20 17:19:38 -07:00
|
|
|
[scriptable, uuid(521cfe4a-bf79-4134-a9fc-e2242164d657)]
|
2012-07-18 20:26:49 -07:00
|
|
|
interface nsIRILVoicemailCallback : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Called when a voicemail notification has been received by the network.
|
|
|
|
*
|
|
|
|
* @param status
|
|
|
|
* The new voicemail status
|
|
|
|
*/
|
|
|
|
void voicemailNotification(in nsIDOMMozVoicemailStatus status);
|
|
|
|
};
|
|
|
|
|
2012-06-21 22:53:12 -07:00
|
|
|
[scriptable, uuid(8a711703-1ee5-4675-9d9a-0b188e944cfe)]
|
2012-01-19 12:53:32 -08:00
|
|
|
interface nsIRILDataCallInfo : nsISupports
|
2012-01-17 17:34:09 -08:00
|
|
|
{
|
2012-06-25 23:43:22 -07:00
|
|
|
/**
|
|
|
|
* Current data call state, one of the
|
|
|
|
* nsINetworkInterface::NETWORK_STATE_* constants.
|
|
|
|
*/
|
2012-06-21 22:53:12 -07:00
|
|
|
readonly attribute unsigned long state;
|
2012-01-17 17:34:09 -08:00
|
|
|
readonly attribute AString cid;
|
|
|
|
readonly attribute AString apn;
|
2012-06-21 22:53:12 -07:00
|
|
|
readonly attribute AString ifname;
|
2012-01-17 17:34:09 -08:00
|
|
|
};
|
|
|
|
|
2012-06-21 22:53:12 -07:00
|
|
|
[scriptable, uuid(5bcac053-c245-46f0-bb45-d0039bfb89f5)]
|
2012-01-19 12:53:32 -08:00
|
|
|
interface nsIRILDataCallback : nsISupports
|
2012-01-17 17:34:09 -08:00
|
|
|
{
|
|
|
|
/**
|
2012-01-19 12:53:32 -08:00
|
|
|
* Notified when a data call changes state.
|
2012-01-17 17:34:09 -08:00
|
|
|
*
|
2012-06-21 22:53:12 -07:00
|
|
|
* @param dataCall
|
|
|
|
* A nsIRILDataCallInfo object.
|
2012-01-17 17:34:09 -08:00
|
|
|
*/
|
2012-06-21 22:53:12 -07:00
|
|
|
void dataCallStateChanged(in nsIRILDataCallInfo dataCall);
|
2012-01-17 17:34:09 -08:00
|
|
|
|
2012-01-19 12:53:32 -08:00
|
|
|
/**
|
|
|
|
* Called when nsIRadioInterfaceLayer is asked to enumerate the current
|
|
|
|
* data call state.
|
|
|
|
*
|
|
|
|
* @param datacalls
|
|
|
|
* Array of nsIRILDataCallInfo objects.
|
|
|
|
* @param length
|
|
|
|
* Lenght of the aforementioned array.
|
|
|
|
*/
|
|
|
|
void receiveDataCallList([array,size_is(length)] in nsIRILDataCallInfo dataCalls,
|
|
|
|
in unsigned long length);
|
2012-01-17 17:34:09 -08:00
|
|
|
};
|
|
|
|
|
2012-05-07 11:53:42 -07:00
|
|
|
[scriptable, function, uuid(2bc2f51a-78be-4c0e-95dd-55a3ce2ded40)]
|
|
|
|
interface nsIRILContactCallback : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Called when nsIRadioInterfaceLayer is asked to provide ICC contacts.
|
|
|
|
*
|
|
|
|
* @param type
|
|
|
|
* Type of the dialling number, i.e. ADN, FDN.
|
|
|
|
* @param contacts
|
|
|
|
* Array of the ICC contacts of the specified type.
|
|
|
|
*/
|
|
|
|
void receiveContactsList(in DOMString type, in jsval contacts);
|
|
|
|
};
|
|
|
|
|
2012-04-19 14:33:25 -07:00
|
|
|
/**
|
|
|
|
* Helper that runs in the content process and exposes information
|
|
|
|
* to the DOM.
|
|
|
|
*/
|
2012-07-18 20:26:49 -07:00
|
|
|
[scriptable, uuid(d2ec602f-9746-4ada-b0c6-f1c1a3cf3578)]
|
2012-04-19 14:33:25 -07:00
|
|
|
interface nsIRILContentHelper : nsIMobileConnectionProvider
|
|
|
|
{
|
2012-04-24 08:44:42 -07:00
|
|
|
void registerTelephonyCallback(in nsIRILTelephonyCallback callback);
|
|
|
|
void unregisterTelephonyCallback(in nsIRILTelephonyCallback callback);
|
|
|
|
|
2012-07-18 20:26:49 -07:00
|
|
|
void registerVoicemailCallback(in nsIRILVoicemailCallback callback);
|
|
|
|
void unregisterVoicemailCallback(in nsIRILVoicemailCallback callback);
|
|
|
|
|
2012-04-24 08:44:42 -07:00
|
|
|
/**
|
|
|
|
* Will continue calling callback.enumerateCallState until the callback
|
|
|
|
* returns false.
|
|
|
|
*/
|
|
|
|
void enumerateCalls(in nsIRILTelephonyCallback callback);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Functionality for making and managing phone calls.
|
|
|
|
*/
|
|
|
|
void dial(in DOMString number);
|
|
|
|
void hangUp(in unsigned long callIndex);
|
|
|
|
|
|
|
|
void startTone(in DOMString dtmfChar);
|
|
|
|
void stopTone();
|
|
|
|
|
|
|
|
void answerCall(in unsigned long callIndex);
|
|
|
|
void rejectCall(in unsigned long callIndex);
|
|
|
|
void holdCall(in unsigned long callIndex);
|
|
|
|
void resumeCall(in unsigned long callIndex);
|
|
|
|
|
|
|
|
attribute bool microphoneMuted;
|
|
|
|
attribute bool speakerEnabled;
|
2012-07-18 20:26:49 -07:00
|
|
|
|
|
|
|
readonly attribute nsIDOMMozVoicemailStatus voicemailStatus;
|
2012-07-20 17:19:38 -07:00
|
|
|
readonly attribute DOMString voicemailNumber;
|
|
|
|
readonly attribute DOMString voicemailDisplayName;
|
2012-04-19 14:33:25 -07:00
|
|
|
};
|
|
|
|
|
2012-06-10 23:50:13 -07:00
|
|
|
[scriptable, uuid(fd9e8b38-b839-4d56-8482-3bf1f5c8f2ee)]
|
|
|
|
interface nsIICCRecords : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Mobile Subscriber ISDN Number
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString msisdn;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Administrative Data
|
|
|
|
*/
|
|
|
|
readonly attribute jsval ad;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* International Mobile Subscriber Identity
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString imsi;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Mobile Country Code
|
|
|
|
*/
|
|
|
|
readonly attribute unsigned short mcc;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Mobile Network Code
|
|
|
|
*/
|
|
|
|
readonly attribute unsigned short mnc;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* USIM Service Table
|
|
|
|
*/
|
|
|
|
readonly attribute jsval ust;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Abbreviated dialling numbers
|
|
|
|
*/
|
|
|
|
readonly attribute jsval adn;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Fixed Dialling Numbers
|
|
|
|
*/
|
|
|
|
readonly attribute jsval fdn;
|
|
|
|
};
|
|
|
|
|
|
|
|
[scriptable, uuid(1b47459d-d0bc-4e91-8509-cc106054b9ee)]
|
|
|
|
interface nsICellLocation : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Location Area Code
|
|
|
|
*/
|
|
|
|
readonly attribute unsigned short lac;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Cell Identity
|
|
|
|
*/
|
|
|
|
readonly attribute unsigned long cid;
|
|
|
|
};
|
|
|
|
|
|
|
|
[scriptable, uuid(a6f6977e-f4ee-42b4-ae79-798c8c47c360)]
|
|
|
|
interface nsIRilContext : nsISupports
|
|
|
|
{
|
|
|
|
readonly attribute DOMString radioState;
|
|
|
|
|
|
|
|
readonly attribute DOMString cardState;
|
|
|
|
|
|
|
|
readonly attribute nsIICCRecords icc;
|
|
|
|
|
|
|
|
readonly attribute nsICellLocation cell;
|
|
|
|
|
|
|
|
readonly attribute nsIDOMMozMobileConnectionInfo voice;
|
|
|
|
|
|
|
|
readonly attribute nsIDOMMozMobileConnectionInfo data;
|
|
|
|
};
|
|
|
|
|
2012-06-25 23:43:22 -07:00
|
|
|
[scriptable, uuid(8b649965-6687-46a8-88fa-a5495ce90735)]
|
2012-01-19 12:53:32 -08:00
|
|
|
interface nsIRadioInterfaceLayer : nsISupports
|
2011-12-23 21:02:52 -08:00
|
|
|
{
|
2012-01-09 14:28:47 -08:00
|
|
|
const unsigned short CALL_STATE_UNKNOWN = 0;
|
|
|
|
const unsigned short CALL_STATE_DIALING = 1;
|
2012-03-14 04:03:33 -07:00
|
|
|
const unsigned short CALL_STATE_ALERTING = 2;
|
2012-01-09 14:28:47 -08:00
|
|
|
const unsigned short CALL_STATE_BUSY = 3;
|
|
|
|
const unsigned short CALL_STATE_CONNECTING = 4;
|
|
|
|
const unsigned short CALL_STATE_CONNECTED = 5;
|
|
|
|
const unsigned short CALL_STATE_HOLDING = 6;
|
|
|
|
const unsigned short CALL_STATE_HELD = 7;
|
|
|
|
const unsigned short CALL_STATE_RESUMING = 8;
|
|
|
|
const unsigned short CALL_STATE_DISCONNECTING = 9;
|
|
|
|
const unsigned short CALL_STATE_DISCONNECTED = 10;
|
|
|
|
const unsigned short CALL_STATE_INCOMING = 11;
|
|
|
|
|
2012-05-23 22:12:07 -07:00
|
|
|
/**
|
|
|
|
* Activates or deactivates radio power.
|
|
|
|
*/
|
|
|
|
void setRadioEnabled(in bool value);
|
|
|
|
|
2012-06-10 23:50:13 -07:00
|
|
|
readonly attribute nsIRilContext rilContext;
|
2012-01-09 14:28:47 -08:00
|
|
|
|
2012-01-19 12:53:32 -08:00
|
|
|
/**
|
|
|
|
* PDP APIs
|
|
|
|
*/
|
2012-01-17 17:34:09 -08:00
|
|
|
void setupDataCall(in long radioTech,
|
|
|
|
in DOMString apn,
|
|
|
|
in DOMString user,
|
|
|
|
in DOMString passwd,
|
|
|
|
in long chappap,
|
|
|
|
in DOMString pdptype);
|
|
|
|
void deactivateDataCall(in DOMString cid,
|
|
|
|
in DOMString reason);
|
|
|
|
void getDataCallList();
|
2012-02-19 15:44:29 -08:00
|
|
|
|
2012-01-19 12:53:32 -08:00
|
|
|
void registerDataCallCallback(in nsIRILDataCallback callback);
|
|
|
|
void unregisterDataCallCallback(in nsIRILDataCallback callback);
|
2012-01-17 17:34:09 -08:00
|
|
|
|
2011-12-23 21:02:52 -08:00
|
|
|
/**
|
|
|
|
* SMS-related functionality.
|
|
|
|
*/
|
|
|
|
unsigned short getNumberOfMessagesForText(in DOMString text);
|
2012-02-19 15:44:29 -08:00
|
|
|
void sendSMS(in DOMString number,
|
|
|
|
in DOMString message,
|
|
|
|
in long requestId,
|
|
|
|
in unsigned long long processId);
|
2012-05-07 11:53:42 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ICC-related functionality.
|
|
|
|
*/
|
|
|
|
void getICCContacts(in DOMString type, in nsIRILContactCallback callback);
|
2011-12-04 23:58:27 -08:00
|
|
|
};
|