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 Telephony : EventTarget { michael@0: /** michael@0: * There are multiple telephony services in multi-sim architecture. We use michael@0: * |serviceId| to indicate the target telephony service. If not specified, michael@0: * the implementation MUST use the default service. michael@0: * michael@0: * Possible values of |serviceId| are 0 ~ (number of services - 1), which is michael@0: * simply the index of a service. Get number of services by acquiring michael@0: * |navigator.mozMobileConnections.length|. michael@0: */ michael@0: michael@0: // Promise michael@0: Promise dial(DOMString number, optional unsigned long serviceId); michael@0: michael@0: // Promise michael@0: Promise dialEmergency(DOMString number, optional unsigned long serviceId); michael@0: michael@0: [Throws] michael@0: void startTone(DOMString tone, optional unsigned long serviceId); michael@0: michael@0: [Throws] michael@0: void stopTone(optional unsigned long serviceId); michael@0: michael@0: [Throws] michael@0: attribute boolean muted; michael@0: michael@0: [Throws] michael@0: attribute boolean speakerEnabled; michael@0: michael@0: readonly attribute (TelephonyCall or TelephonyCallGroup)? active; michael@0: michael@0: // A call is contained either in Telephony or in TelephonyCallGroup. michael@0: readonly attribute CallsList calls; michael@0: readonly attribute TelephonyCallGroup conferenceGroup; michael@0: michael@0: attribute EventHandler onincoming; michael@0: attribute EventHandler oncallschanged; michael@0: attribute EventHandler onremoteheld; michael@0: attribute EventHandler onremoteresumed; michael@0: };