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"
|
2013-10-22 02:30:35 -07:00
|
|
|
#include "nsINetworkManager.idl"
|
2012-04-19 14:33:25 -07:00
|
|
|
|
2013-05-30 03:04:48 -07:00
|
|
|
interface nsIDOMMozIccInfo;
|
2012-04-19 14:33:25 -07:00
|
|
|
interface nsIDOMMozMobileConnectionInfo;
|
2013-09-07 04:09:54 -07:00
|
|
|
interface nsIMobileMessageCallback;
|
2012-07-18 20:26:49 -07:00
|
|
|
|
2013-11-02 03:17:58 -07:00
|
|
|
[scriptable, uuid(6e0f45b8-410e-11e3-8c8e-b715b2cd0128)]
|
2013-10-22 02:30:35 -07:00
|
|
|
interface nsIRilNetworkInterface : nsINetworkInterface
|
|
|
|
{
|
|
|
|
readonly attribute unsigned long serviceId;
|
|
|
|
readonly attribute DOMString iccId;
|
2013-11-02 03:17:58 -07:00
|
|
|
|
|
|
|
/* The following attributes are for MMS proxy settings. */
|
|
|
|
readonly attribute DOMString mmsc; // Empty string if not set.
|
|
|
|
readonly attribute DOMString mmsProxy; // Empty string if not set.
|
|
|
|
readonly attribute long mmsPort; // -1 if not set.
|
2013-10-22 02:30:35 -07:00
|
|
|
};
|
|
|
|
|
2014-02-26 02:08:46 -08:00
|
|
|
[scriptable, uuid(83dd3394-5de0-4485-a0b9-c1ed537507a3)]
|
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-08-13 18:54:42 -07:00
|
|
|
readonly attribute AString ip;
|
2014-02-26 02:08:46 -08:00
|
|
|
readonly attribute unsigned long prefixLength;
|
2012-08-13 18:54:42 -07:00
|
|
|
readonly attribute AString broadcast;
|
|
|
|
readonly attribute AString gw;
|
|
|
|
readonly attribute jsval dns;
|
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-12-24 22:56:30 -08:00
|
|
|
[scriptable, uuid(c0c5cb9f-6372-4b5a-b74c-baacc2da5e4f)]
|
|
|
|
interface nsIVoicemailInfo : nsISupports
|
|
|
|
{
|
|
|
|
readonly attribute DOMString number;
|
|
|
|
|
|
|
|
readonly attribute DOMString displayName;
|
|
|
|
};
|
|
|
|
|
2013-05-30 03:04:48 -07:00
|
|
|
[scriptable, uuid(95e1be50-c912-11e2-8b8b-0800200c9a66)]
|
2012-06-10 23:50:13 -07:00
|
|
|
interface nsIRilContext : nsISupports
|
|
|
|
{
|
|
|
|
readonly attribute DOMString radioState;
|
|
|
|
|
|
|
|
readonly attribute DOMString cardState;
|
|
|
|
|
2013-05-06 14:03:00 -07:00
|
|
|
readonly attribute long retryCount;
|
|
|
|
|
2013-01-10 05:20:37 -08:00
|
|
|
readonly attribute DOMString imsi;
|
|
|
|
|
2013-03-28 19:56:07 -07:00
|
|
|
readonly attribute DOMString networkSelectionMode;
|
|
|
|
|
2013-05-30 03:04:48 -07:00
|
|
|
readonly attribute nsIDOMMozIccInfo iccInfo;
|
2012-06-10 23:50:13 -07:00
|
|
|
|
|
|
|
readonly attribute nsIDOMMozMobileConnectionInfo voice;
|
|
|
|
|
|
|
|
readonly attribute nsIDOMMozMobileConnectionInfo data;
|
|
|
|
};
|
|
|
|
|
2013-09-06 23:19:57 -07:00
|
|
|
[scriptable, function, uuid(3bc96351-53b0-47a1-a888-c74c64b60f25)]
|
|
|
|
interface nsIRilSendWorkerMessageCallback : nsISupports
|
|
|
|
{
|
|
|
|
boolean handleResponse(in jsval response);
|
|
|
|
};
|
|
|
|
|
2013-09-15 19:12:35 -07:00
|
|
|
[scriptable, uuid(5b14cf79-2846-4226-b07f-9b9977b525fe)]
|
2013-07-02 02:36:33 -07:00
|
|
|
interface nsIRadioInterface : nsISupports
|
2011-12-23 21:02:52 -08:00
|
|
|
{
|
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-09-26 05:57:37 -07:00
|
|
|
void setupDataCallByType(in DOMString apntype);
|
|
|
|
void deactivateDataCallByType(in DOMString apntype);
|
|
|
|
long getDataCallStateByType(in DOMString apntype);
|
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
|
|
|
|
2013-01-22 20:05:34 -08:00
|
|
|
void updateRILNetworkInterface();
|
|
|
|
|
2013-09-07 04:09:54 -07:00
|
|
|
/**
|
|
|
|
* SMS-related functionality.
|
|
|
|
*/
|
|
|
|
void getSegmentInfoForText(in DOMString text,
|
|
|
|
in nsIMobileMessageCallback request);
|
|
|
|
|
|
|
|
void sendSMS(in DOMString number,
|
|
|
|
in DOMString message,
|
|
|
|
in boolean silent,
|
|
|
|
in nsIMobileMessageCallback request);
|
|
|
|
|
2013-09-06 23:19:57 -07:00
|
|
|
void sendWorkerMessage(in DOMString type,
|
|
|
|
[optional] in jsval message,
|
|
|
|
[optional] in nsIRilSendWorkerMessageCallback callback);
|
2013-09-15 19:12:35 -07:00
|
|
|
|
|
|
|
void getSmscAddress(in nsIMobileMessageCallback request);
|
2011-12-04 23:58:27 -08:00
|
|
|
};
|
2013-07-02 02:36:33 -07:00
|
|
|
|
2013-11-26 23:45:31 -08:00
|
|
|
[scriptable, uuid(86a5c280-5641-11e3-949a-0800200c9a66)]
|
2013-07-02 02:36:33 -07:00
|
|
|
interface nsIRadioInterfaceLayer : nsISupports
|
|
|
|
{
|
|
|
|
readonly attribute unsigned long numRadioInterfaces;
|
|
|
|
|
2013-11-02 03:17:35 -07:00
|
|
|
nsIRadioInterface getRadioInterface(in unsigned long clientId);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If not available, throws exception; otherwise, a valid number.
|
|
|
|
*/
|
|
|
|
unsigned long getClientIdByIccId(in DOMString iccId);
|
2013-11-26 23:45:31 -08:00
|
|
|
|
|
|
|
void setMicrophoneMuted(in boolean muted);
|
2013-07-02 02:36:33 -07:00
|
|
|
};
|