Bug 863281 - Part 1: Add emergency property in TelephonyCall. r=htsai. sr=mounir.

---
 dom/telephony/nsIDOMTelephonyCall.idl  |    7 ++++++-
 dom/telephony/nsITelephonyProvider.idl |   10 +++++++---
 2 files changed, 13 insertions(+), 4 deletions(-)
This commit is contained in:
Szu-Yu Chen [:aknow] 2013-05-14 14:02:58 +08:00
parent a4edef6b84
commit a82d64c60a
2 changed files with 13 additions and 4 deletions

View File

@ -9,13 +9,18 @@
interface nsIDOMEventListener; interface nsIDOMEventListener;
[scriptable, builtinclass, uuid(a6ac6941-866c-4e25-b616-045c817e04c8)] [scriptable, builtinclass, uuid(f0a25998-b0a9-11e2-82d2-60a44c237d2b)]
interface nsIDOMTelephonyCall : nsIDOMEventTarget interface nsIDOMTelephonyCall : nsIDOMEventTarget
{ {
readonly attribute DOMString number; readonly attribute DOMString number;
readonly attribute DOMString state; readonly attribute DOMString state;
// The property "emergency" indicate whether the call number is an emergency
// number. Only the outgoing call could have a value with true and it is
// available after dialing state.
readonly attribute boolean emergency;
readonly attribute nsIDOMDOMError error; readonly attribute nsIDOMDOMError error;
void answer(); void answer();

View File

@ -4,7 +4,7 @@
#include "nsISupports.idl" #include "nsISupports.idl"
[scriptable, uuid(45c5a67b-3780-4c41-a670-8abacffb4851)] [scriptable, uuid(bde19ba2-83c8-4df7-a014-28fe71535527)]
interface nsITelephonyListener : nsISupports interface nsITelephonyListener : nsISupports
{ {
/** /**
@ -20,12 +20,15 @@ interface nsITelephonyListener : nsISupports
* Indicates whether this call is the currently active one. * Indicates whether this call is the currently active one.
* @param isOutgoing * @param isOutgoing
* Indicates whether this call is outgoing or incoming. * Indicates whether this call is outgoing or incoming.
* @param isEmergency
* Indicates whether this call is an emergency call.
*/ */
void callStateChanged(in unsigned long callIndex, void callStateChanged(in unsigned long callIndex,
in unsigned short callState, in unsigned short callState,
in AString number, in AString number,
in boolean isActive, in boolean isActive,
in boolean isOutgoing); in boolean isOutgoing,
in boolean isEmergency);
/** /**
* Called when nsITelephonyProvider is asked to enumerate the current * Called when nsITelephonyProvider is asked to enumerate the current
@ -49,7 +52,8 @@ interface nsITelephonyListener : nsISupports
in unsigned short callState, in unsigned short callState,
in AString number, in AString number,
in boolean isActive, in boolean isActive,
in boolean isOutgoing); in boolean isOutgoing,
in boolean isEmergency);
/** /**
* Called when RIL error occurs. * Called when RIL error occurs.