Bumping manifests a=b2g-bump
[gecko.git] / dom / webidl / Telephony.webidl
blob310143b6171bd6d6339a8d8ad5c988965d109941
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5  */
7 /**
8  * The possible values of TTY mode.
9  *
10  * "off"  - indicating TTY mode is disabled.
11  * "full" - indicating both hearing carryover and voice carryover are enabled.
12  * "hco"  - indicating hearing carryover is enabled.
13  * "vco"  - indicating voice carryover is enabled.
14  */
15 enum TtyMode { "off", "full", "hco", "vco" };
17 [Pref="dom.telephony.enabled"]
18 interface Telephony : EventTarget {
19   /**
20    * There are multiple telephony services in multi-sim architecture. We use
21    * |serviceId| to indicate the target telephony service. If not specified,
22    * the implementation MUST use the default service.
23    *
24    * Possible values of |serviceId| are 0 ~ (number of services - 1), which is
25    * simply the index of a service. Get number of services by acquiring
26    * |navigator.mozMobileConnections.length|.
27    */
29   /**
30    * Make a phone call or send the mmi code depending on the number provided.
31    *
32    * TelephonyCall - for call setup
33    * MMICall - for MMI code
34    */
35   [Throws]
36   Promise<(TelephonyCall or MMICall)> dial(DOMString number, optional unsigned long serviceId);
38   [Throws]
39   Promise<TelephonyCall> dialEmergency(DOMString number, optional unsigned long serviceId);
41 /**
42   * Send a series of DTMF tones.
43   *
44   * @param tones
45   *    DTMF chars.
46   * @param pauseDuraton (ms) [optional]
47   *    Time to wait before sending tones. Default value is 3000 ms.
48   * @param toneDuration (ms) [optional]
49   *    Duration of each tone. Default value is 70 ms.
50   * @param serviceId [optional]
51   *    Default value is as user setting dom.telephony.defaultServiceId.
52   */
53   [Throws]
54   Promise<void> sendTones(DOMString tones, optional unsigned long pauseDuration = 3000, optional unsigned long toneDuration = 70, optional unsigned long serviceId);
56   [Throws]
57   void startTone(DOMString tone, optional unsigned long serviceId);
59   [Throws]
60   void stopTone(optional unsigned long serviceId);
62   [Throws]
63   attribute boolean muted;
65   [Throws]
66   attribute boolean speakerEnabled;
68   [Throws]
69   attribute TtyMode ttyMode;
71   readonly attribute (TelephonyCall or TelephonyCallGroup)? active;
73   // A call is contained either in Telephony or in TelephonyCallGroup.
74   readonly attribute CallsList calls;
75   readonly attribute TelephonyCallGroup conferenceGroup;
77   // Async notification that object initialization is done.
78   [Throws]
79   readonly attribute Promise<void> ready;
81   attribute EventHandler onincoming;
82   attribute EventHandler oncallschanged;
83   attribute EventHandler onremoteheld;
84   attribute EventHandler onremoteresumed;