From a82d64c60a193058fa223748ce5b453e06d62c05 Mon Sep 17 00:00:00 2001 From: "Szu-Yu Chen [:aknow]" Date: Tue, 14 May 2013 14:02:58 +0800 Subject: [PATCH] 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(-) --- dom/telephony/nsIDOMTelephonyCall.idl | 7 ++++++- dom/telephony/nsITelephonyProvider.idl | 10 +++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/dom/telephony/nsIDOMTelephonyCall.idl b/dom/telephony/nsIDOMTelephonyCall.idl index 38870f96f21..6663dfa4d7c 100644 --- a/dom/telephony/nsIDOMTelephonyCall.idl +++ b/dom/telephony/nsIDOMTelephonyCall.idl @@ -9,13 +9,18 @@ interface nsIDOMEventListener; -[scriptable, builtinclass, uuid(a6ac6941-866c-4e25-b616-045c817e04c8)] +[scriptable, builtinclass, uuid(f0a25998-b0a9-11e2-82d2-60a44c237d2b)] interface nsIDOMTelephonyCall : nsIDOMEventTarget { readonly attribute DOMString number; 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; void answer(); diff --git a/dom/telephony/nsITelephonyProvider.idl b/dom/telephony/nsITelephonyProvider.idl index e0e6189fbea..55a62271590 100644 --- a/dom/telephony/nsITelephonyProvider.idl +++ b/dom/telephony/nsITelephonyProvider.idl @@ -4,7 +4,7 @@ #include "nsISupports.idl" -[scriptable, uuid(45c5a67b-3780-4c41-a670-8abacffb4851)] +[scriptable, uuid(bde19ba2-83c8-4df7-a014-28fe71535527)] interface nsITelephonyListener : nsISupports { /** @@ -20,12 +20,15 @@ interface nsITelephonyListener : nsISupports * Indicates whether this call is the currently active one. * @param isOutgoing * Indicates whether this call is outgoing or incoming. + * @param isEmergency + * Indicates whether this call is an emergency call. */ void callStateChanged(in unsigned long callIndex, in unsigned short callState, in AString number, in boolean isActive, - in boolean isOutgoing); + in boolean isOutgoing, + in boolean isEmergency); /** * Called when nsITelephonyProvider is asked to enumerate the current @@ -49,7 +52,8 @@ interface nsITelephonyListener : nsISupports in unsigned short callState, in AString number, in boolean isActive, - in boolean isOutgoing); + in boolean isOutgoing, + in boolean isEmergency); /** * Called when RIL error occurs.