michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: */ michael@0: michael@0: [Pref="dom.telephony.enabled"] michael@0: interface TelephonyCall : EventTarget { michael@0: // Indicate which service the call comes from. michael@0: readonly attribute unsigned long serviceId; michael@0: michael@0: readonly attribute DOMString number; michael@0: michael@0: // In CDMA networks, the 2nd waiting call shares the connection with the 1st michael@0: // call. We need an additional attribute for the 2nd number. michael@0: readonly attribute DOMString? secondNumber; michael@0: michael@0: readonly attribute DOMString state; michael@0: michael@0: // The property "emergency" indicates whether the call number is an emergency michael@0: // number. Only the outgoing call could have a value with true and it is michael@0: // available after dialing state. michael@0: readonly attribute boolean emergency; michael@0: michael@0: // Indicate whether the call state can be switched between "connected" and michael@0: // "held". michael@0: readonly attribute boolean switchable; michael@0: michael@0: // Indicate whether the call can be added into TelephonyCallGroup. michael@0: readonly attribute boolean mergeable; michael@0: michael@0: readonly attribute DOMError? error; michael@0: michael@0: readonly attribute TelephonyCallGroup? group; michael@0: michael@0: [Throws] michael@0: void answer(); michael@0: [Throws] michael@0: void hangUp(); michael@0: [Throws] michael@0: void hold(); michael@0: [Throws] michael@0: void resume(); michael@0: michael@0: attribute EventHandler onstatechange; michael@0: attribute EventHandler ondialing; michael@0: attribute EventHandler onalerting; michael@0: attribute EventHandler onconnecting; michael@0: attribute EventHandler onconnected; michael@0: attribute EventHandler ondisconnecting; michael@0: attribute EventHandler ondisconnected; michael@0: attribute EventHandler onholding; michael@0: attribute EventHandler onheld; michael@0: attribute EventHandler onresuming; michael@0: attribute EventHandler onerror; michael@0: michael@0: // Fired whenever the group attribute changes. michael@0: attribute EventHandler ongroupchange; michael@0: };