gecko/dom/system/gonk/nsIRadioInterfaceLayer.idl
Gene Lian af36186707 Bug 844431 - B2G MMS: provide nsIDOMMobileMessageManager interface (with sendMMS() first) (part 3-1, s/nsISmsRequest/nsIMobileMessageCallback). r=vicamo a=leo+
--HG--
rename : dom/mobilemessage/interfaces/nsISmsRequest.idl => dom/mobilemessage/interfaces/nsIMobileMessageCallback.idl
2013-03-09 15:22:02 +08:00

190 lines
5.7 KiB
Plaintext

/* 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/. */
#include "nsISupports.idl"
interface nsIDOMMozMobileConnectionInfo;
interface nsIDOMMozMobileICCInfo;
interface nsIMobileMessageCallback;
interface nsIDOMMozSmsSegmentInfo;
[scriptable, uuid(1e602d20-d066-4399-8997-daf36b3158ef)]
interface nsIRILDataCallInfo : nsISupports
{
/**
* Current data call state, one of the
* nsINetworkInterface::NETWORK_STATE_* constants.
*/
readonly attribute unsigned long state;
readonly attribute AString cid;
readonly attribute AString apn;
readonly attribute AString ifname;
readonly attribute AString ip;
readonly attribute AString netmask;
readonly attribute AString broadcast;
readonly attribute AString gw;
readonly attribute jsval dns;
};
[scriptable, uuid(5bcac053-c245-46f0-bb45-d0039bfb89f5)]
interface nsIRILDataCallback : nsISupports
{
/**
* Notified when a data call changes state.
*
* @param dataCall
* A nsIRILDataCallInfo object.
*/
void dataCallStateChanged(in nsIRILDataCallInfo dataCall);
/**
* 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);
};
[scriptable, function, uuid(a94282b6-da60-4daf-95c1-82ee6889d0df)]
interface nsIRILContactCallback : nsISupports
{
/**
* Called when nsIRadioInterfaceLayer is asked to provide ICC contacts.
*
* @param errorMsg
* error message from RIL.
* @param contactType
* Type of the dialling number, i.e. ADN, FDN.
* @param contacts
* Array of the ICC contacts of the specified type.
*/
void receiveContactsList(in DOMString errorMsg,
in DOMString contactType,
in jsval contacts);
};
[scriptable, function, uuid(ab954d56-12a1-4c6b-8753-14ad5664111d)]
interface nsIRILContactUpdateCallback : nsISupports
{
/**
* Called when an ICC contact is updated.
*
* @param errorMsg
* Error message from RIL.
* @param contactType
* Type of the contact, i.e. ADN, FDN.
*/
void onUpdated(in DOMString errorMsg,
in DOMString contactType);
};
[scriptable, uuid(c0c5cb9f-6372-4b5a-b74c-baacc2da5e4f)]
interface nsIVoicemailInfo : nsISupports
{
readonly attribute DOMString number;
readonly attribute DOMString displayName;
};
[scriptable, uuid(a09c42c3-1063-42f6-8022-268c6a0fe5e8)]
interface nsIRilContext : nsISupports
{
readonly attribute DOMString radioState;
readonly attribute DOMString cardState;
readonly attribute DOMString imsi;
readonly attribute nsIDOMMozMobileICCInfo iccInfo;
readonly attribute nsIDOMMozMobileConnectionInfo voice;
readonly attribute nsIDOMMozMobileConnectionInfo data;
};
[scriptable, uuid(8b3a1bc8-86d2-11e2-ace0-33f0ed290b90)]
interface nsIRadioInterfaceLayer : nsISupports
{
/**
* Activates or deactivates radio power.
*/
void setRadioEnabled(in bool value);
readonly attribute nsIRilContext rilContext;
readonly attribute nsIVoicemailInfo voicemailInfo;
/**
* PDP APIs
*/
void setupDataCallByType(in DOMString apntype);
void deactivateDataCallByType(in DOMString apntype);
long getDataCallStateByType(in DOMString apntype);
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();
void registerDataCallCallback(in nsIRILDataCallback callback);
void unregisterDataCallCallback(in nsIRILDataCallback callback);
void updateRILNetworkInterface();
/**
* SMS-related functionality.
*/
nsIDOMMozSmsSegmentInfo getSegmentInfoForText(in DOMString text);
void sendSMS(in DOMString number,
in DOMString message,
in nsIMobileMessageCallback request);
/**
* ICC-related functionality.
*/
/**
* Get ICC Contact List.
*
* @param contactType One of the values below.
* "ADN" (Abbreviated Dialling Numbers)
* "FDN" (Fixed Dialling Numbers)
* @param callback A nsIRILContactCallback object.
*/
void getICCContacts(in DOMString contactType,
in nsIRILContactCallback callback);
/**
* Update ICC Contact.
*
* This function allows two operations: update the existing contact or
* insert a new contact.
* If the contact has 'recordId' property, the corresponding record will be
* updated. If not, the contact will be inserted.
*
* @param contactType One of the values below.
* "ADN" (Abbreviated Dialling Numbers)
* "FDN" (Fixed Dialling Numbers)
* @param contact The contact will be updated.
* If has 'recordId' property, updates corresponding record.
* If not, finds a free record and updates it.
* @param pin2 PIN2 is required for updating FDN, otherwise should be "".
* @param callback A nsIRILContactUpdateCallback object.
*/
void updateICCContact(in DOMString contactType,
in jsval contact,
in DOMString pin2,
in nsIRILContactUpdateCallback callback);
};