dom/webidl/TelephonyCall.webidl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/webidl/TelephonyCall.webidl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,59 @@
     1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 + */
     1.9 +
    1.10 +[Pref="dom.telephony.enabled"]
    1.11 +interface TelephonyCall : EventTarget {
    1.12 +  // Indicate which service the call comes from.
    1.13 +  readonly attribute unsigned long serviceId;
    1.14 +
    1.15 +  readonly attribute DOMString number;
    1.16 +
    1.17 +  // In CDMA networks, the 2nd waiting call shares the connection with the 1st
    1.18 +  // call. We need an additional attribute for the 2nd number.
    1.19 +  readonly attribute DOMString? secondNumber;
    1.20 +
    1.21 +  readonly attribute DOMString state;
    1.22 +
    1.23 +  // The property "emergency" indicates whether the call number is an emergency
    1.24 +  // number. Only the outgoing call could have a value with true and it is
    1.25 +  // available after dialing state.
    1.26 +  readonly attribute boolean emergency;
    1.27 +
    1.28 +  // Indicate whether the call state can be switched between "connected" and
    1.29 +  // "held".
    1.30 +  readonly attribute boolean switchable;
    1.31 +
    1.32 +  // Indicate whether the call can be added into TelephonyCallGroup.
    1.33 +  readonly attribute boolean mergeable;
    1.34 +
    1.35 +  readonly attribute DOMError? error;
    1.36 +
    1.37 +  readonly attribute TelephonyCallGroup? group;
    1.38 +
    1.39 +  [Throws]
    1.40 +  void answer();
    1.41 +  [Throws]
    1.42 +  void hangUp();
    1.43 +  [Throws]
    1.44 +  void hold();
    1.45 +  [Throws]
    1.46 +  void resume();
    1.47 +
    1.48 +  attribute EventHandler onstatechange;
    1.49 +  attribute EventHandler ondialing;
    1.50 +  attribute EventHandler onalerting;
    1.51 +  attribute EventHandler onconnecting;
    1.52 +  attribute EventHandler onconnected;
    1.53 +  attribute EventHandler ondisconnecting;
    1.54 +  attribute EventHandler ondisconnected;
    1.55 +  attribute EventHandler onholding;
    1.56 +  attribute EventHandler onheld;
    1.57 +  attribute EventHandler onresuming;
    1.58 +  attribute EventHandler onerror;
    1.59 +
    1.60 +  // Fired whenever the group attribute changes.
    1.61 +  attribute EventHandler ongroupchange;
    1.62 +};

mercurial