From 14ad5c30872b70ff7ba4fc1833ad9d3062e9669b Mon Sep 17 00:00:00 2001 From: "Szu-Yu Chen [:aknow]" Date: Wed, 30 Oct 2013 15:06:41 -0400 Subject: [PATCH] Bug 814625 - Part 2: WebIDL: Add multisim support. r=hsinyi, r=khuey --- dom/webidl/Telephony.webidl | 20 +++++++++++++++----- dom/webidl/TelephonyCall.webidl | 3 +++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/dom/webidl/Telephony.webidl b/dom/webidl/Telephony.webidl index d5189558b250..2d4ae7b7d951 100644 --- a/dom/webidl/Telephony.webidl +++ b/dom/webidl/Telephony.webidl @@ -6,17 +6,27 @@ [Pref="dom.telephony.enabled"] interface Telephony : EventTarget { - [Throws] - TelephonyCall dial(DOMString number); + /** + * There are multiple telephony services in multi-sim architecture. We use + * |serviceId| to indicate the target telephony service. If not specified, + * the implementation MUST use the default service. + * + * Possible values of |serviceId| are 0 ~ (number of services - 1), which is + * simply the index of a service. Get number of services by acquiring + * |navigator.mozMobileConnections.length|. + */ [Throws] - TelephonyCall dialEmergency(DOMString number); + TelephonyCall dial(DOMString number, optional unsigned long serviceId); [Throws] - void startTone(DOMString tone); + TelephonyCall dialEmergency(DOMString number, optional unsigned long serviceId); [Throws] - void stopTone(); + void startTone(DOMString tone, optional unsigned long serviceId); + + [Throws] + void stopTone(optional unsigned long serviceId); [Throws] attribute boolean muted; diff --git a/dom/webidl/TelephonyCall.webidl b/dom/webidl/TelephonyCall.webidl index f96c734b4adc..3a83404d6c3c 100644 --- a/dom/webidl/TelephonyCall.webidl +++ b/dom/webidl/TelephonyCall.webidl @@ -6,6 +6,9 @@ [Pref="dom.telephony.enabled"] interface TelephonyCall : EventTarget { + // Indicate which service the call comes from. + readonly attribute unsigned long serviceId; + readonly attribute DOMString number; // In CDMA networks, the 2nd waiting call shares the connection with the 1st