nsIRadioInterfaceLayer

Used to implement the interface between the Telephony API and the radio hardware in a telephone.
1.0
66
Introduced
Gecko 12.0
Inherits from: nsISupports Last changed in Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11)

Implemented by: @mozilla.org/telephony/system-worker-manager;1. To create an instance, use:

var radioInterfaceLayer = Components.classes["@mozilla.org/telephony/system-worker-manager;1"]
                          .getService(Components.interfaces.nsIInterfaceRequestor)
                          .createInstance(Components.interfaces.nsIRadioInterfaceLayer);

Method overview

void answerCall(in unsigned long callIndex);
void deactivateDataCall(in DOMString cid, in DOMString reason);
void dial(in DOMString number);
void enumerateCalls(in nsIRILTelephonyCallback callback);
void getDataCallList();
unsigned short getNumberOfMessagesForText(in DOMString text);
void hangUp(in unsigned long callIndex);
void registerCallback(in nsIRILTelephonyCallback callback);
void registerDataCallCallback(in nsIRILDataCallback callback);
void rejectCall(in unsigned long callIndex);
void sendSMS(in DOMString number, in DOMString message, in long requestId, in unsigned long long processId);
void setupDataCall(in long radioTech, in DOMString apn, in DOMString user, in DOMString passwd, in long chappap, in DOMString pdptype);
void startTone(in DOMString dtmfChar);
void stopTone();
void unregisterCallback(in nsIRILTelephonyCallback callback);
void unregisterDataCallCallback(in nsIRILDataCallback callback);

Attributes

Attribute Type Description
currentState jsval Read only. Obsolete since Gecko 13.0
microphoneMuted bool
radioState jsval Read only.
speakerEnabled bool

Constants

Call state constants

Constant Value Description
CALL_STATE_UNKNOWN 0
CALL_STATE_DIALING 1
CALL_STATE_ALERTING 2
CALL_STATE_BUSY 3
CALL_STATE_CONNECTING 4
CALL_STATE_CONNECTED 5
CALL_STATE_HOLDING 6
CALL_STATE_HELD 7
CALL_STATE_RESUMING 8
CALL_STATE_DISCONNECTING 9
CALL_STATE_DISCONNECTED 10
CALL_STATE_INCOMING 11
DATACALL_STATE_UNKNOWN 0
DATACALL_STATE_CONNECTING 1
DATACALL_STATE_CONNECTED 2
DATACALL_STATE_DISCONNECTING 3
DATACALL_STATE_DISCONNECTED 4
CALL_STATE_RINGING 2 Obsolete since Gecko 14.0

Methods

answerCall()

void answerCall(
  in unsigned long callIndex
);
Parameters
callIndex
Missing Description
Exceptions thrown
Missing Exception
Missing Description

deactivateDataCall()

void deactivateDataCall(
  in DOMString cid,
  in DOMString reason
);
Parameters
cid
Missing Description
reason
Missing Description
Exceptions thrown
Missing Exception
Missing Description

dial()

Functionality for making and managing phone calls.

void dial(
  in DOMString number
);
Parameters
number
Missing Description
Exceptions thrown
Missing Exception
Missing Description

enumerateCalls()

Will continue calling callback.enumerateCallState until the callback returns false.

void enumerateCalls(
  in nsIRILTelephonyCallback callback
);
Parameters
callback
Missing Description
Exceptions thrown
Missing Exception
Missing Description

getDataCallList()

void getDataCallList();
Parameters

None.

Exceptions thrown
Missing Exception
Missing Description

getNumberOfMessagesForText()

Returns the number of multi-part SMS needed for a given text (160 characters for one SMS).

unsigned short getNumberOfMessagesForText(
  in DOMString text
);
Parameters
text
The body text of an SMS.
Return value

Unsigned short. Number of SMS needed.

hangUp()

void hangUp(
  in unsigned long callIndex
);
Parameters
callIndex
Missing Description
Exceptions thrown
Missing Exception
Missing Description

registerCallback()

void registerCallback(
  in nsIRILTelephonyCallback callback
);
Parameters
callback
Missing Description
Exceptions thrown
Missing Exception
Missing Description

registerDataCallCallback()

void registerDataCallCallback(
  in nsIRILDataCallback callback
);
Parameters
callback
Missing Description
Exceptions thrown
Missing Exception
Missing Description

rejectCall()

void rejectCall(
  in unsigned long callIndex
);
Parameters
callIndex
Missing Description
Exceptions thrown
Missing Exception
Missing Description

sendSMS()

Sends a message to a specified number.

void sendSMS(
  in DOMString number,
  in DOMString message,
  in long requestId,
  in unsigned long long processId
);
Parameters
number
A DOMString with a telephone number to send to.
message
The text message as a DOMString.
requestId
Missing Description
processId
Missing Description

setupDataCall()

PDP APIs.

void setupDataCall(
  in long radioTech,
  in DOMString apn,
  in DOMString user,
  in DOMString passwd,
  in long chappap,
  in DOMString pdptype
);
Parameters
radioTech
Missing Description
apn
Missing Description
user
Missing Description
passwd
Missing Description
chappap
Missing Description
pdptype
Missing Description
Exceptions thrown
Missing Exception
Missing Description

startTone()

void startTone(
  in DOMString dtmfChar
);
Parameters
dtmfChar
Missing Description
Exceptions thrown
Missing Exception
Missing Description

stopTone()

void stopTone();
Parameters

None.

Exceptions thrown
Missing Exception
Missing Description

unregisterCallback()

void unregisterCallback(
  in nsIRILTelephonyCallback callback
);
Parameters
callback
Missing Description
Exceptions thrown
Missing Exception
Missing Description

unregisterDataCallCallback()

void unregisterDataCallCallback(
  in nsIRILDataCallback callback
);
Parameters
callback
Missing Description
Exceptions thrown
Missing Exception
Missing Description

Remarks

See also