Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 5 | */ |
michael@0 | 6 | |
michael@0 | 7 | [Pref="dom.telephony.enabled"] |
michael@0 | 8 | interface TelephonyCall : EventTarget { |
michael@0 | 9 | // Indicate which service the call comes from. |
michael@0 | 10 | readonly attribute unsigned long serviceId; |
michael@0 | 11 | |
michael@0 | 12 | readonly attribute DOMString number; |
michael@0 | 13 | |
michael@0 | 14 | // In CDMA networks, the 2nd waiting call shares the connection with the 1st |
michael@0 | 15 | // call. We need an additional attribute for the 2nd number. |
michael@0 | 16 | readonly attribute DOMString? secondNumber; |
michael@0 | 17 | |
michael@0 | 18 | readonly attribute DOMString state; |
michael@0 | 19 | |
michael@0 | 20 | // The property "emergency" indicates whether the call number is an emergency |
michael@0 | 21 | // number. Only the outgoing call could have a value with true and it is |
michael@0 | 22 | // available after dialing state. |
michael@0 | 23 | readonly attribute boolean emergency; |
michael@0 | 24 | |
michael@0 | 25 | // Indicate whether the call state can be switched between "connected" and |
michael@0 | 26 | // "held". |
michael@0 | 27 | readonly attribute boolean switchable; |
michael@0 | 28 | |
michael@0 | 29 | // Indicate whether the call can be added into TelephonyCallGroup. |
michael@0 | 30 | readonly attribute boolean mergeable; |
michael@0 | 31 | |
michael@0 | 32 | readonly attribute DOMError? error; |
michael@0 | 33 | |
michael@0 | 34 | readonly attribute TelephonyCallGroup? group; |
michael@0 | 35 | |
michael@0 | 36 | [Throws] |
michael@0 | 37 | void answer(); |
michael@0 | 38 | [Throws] |
michael@0 | 39 | void hangUp(); |
michael@0 | 40 | [Throws] |
michael@0 | 41 | void hold(); |
michael@0 | 42 | [Throws] |
michael@0 | 43 | void resume(); |
michael@0 | 44 | |
michael@0 | 45 | attribute EventHandler onstatechange; |
michael@0 | 46 | attribute EventHandler ondialing; |
michael@0 | 47 | attribute EventHandler onalerting; |
michael@0 | 48 | attribute EventHandler onconnecting; |
michael@0 | 49 | attribute EventHandler onconnected; |
michael@0 | 50 | attribute EventHandler ondisconnecting; |
michael@0 | 51 | attribute EventHandler ondisconnected; |
michael@0 | 52 | attribute EventHandler onholding; |
michael@0 | 53 | attribute EventHandler onheld; |
michael@0 | 54 | attribute EventHandler onresuming; |
michael@0 | 55 | attribute EventHandler onerror; |
michael@0 | 56 | |
michael@0 | 57 | // Fired whenever the group attribute changes. |
michael@0 | 58 | attribute EventHandler ongroupchange; |
michael@0 | 59 | }; |