Bug 1058397 - Part 2: USSDSession interface. r=hsinyi

This commit is contained in:
Szu-Yu Chen [:aknow] 2014-10-08 20:01:00 +02:00
Родитель b9ca03a04a
Коммит f974940b23
3 изменённых файлов: 23 добавлений и 2 удалений

Просмотреть файл

@ -4,16 +4,22 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.mobileconnection.enabled",
[Pref="dom.telephony.enabled",
CheckPermissions="telephony mobileconnection",
AvailableIn="CertifiedApps",
Constructor(DOMString type, optional USSDReceivedEventInit eventInitDict)]
interface USSDReceivedEvent : Event
{
readonly attribute unsigned long serviceId;
readonly attribute DOMString? message;
readonly attribute boolean sessionEnded;
readonly attribute USSDSession? session; // null if session is ended.
readonly attribute boolean sessionEnded; // deprecated. Bug 1070831
};
dictionary USSDReceivedEventInit : EventInit
{
unsigned long serviceId = 0;
DOMString? message = null;
USSDSession? session = null;
boolean sessionEnded = false;
};

Просмотреть файл

@ -0,0 +1,14 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.telephony.enabled",
CheckPermissions="telephony",
AvailableIn="CertifiedApps",
Constructor(unsigned long serviceId)]
interface USSDSession {
[Throws]
Promise<void> send(DOMString ussd);
};

Просмотреть файл

@ -501,6 +501,7 @@ WEBIDL_FILES = [
'URLSearchParams.webidl',
'URLUtils.webidl',
'URLUtilsReadOnly.webidl',
'USSDSession.webidl',
'ValidityState.webidl',
'VideoPlaybackQuality.webidl',
'VideoStreamTrack.webidl',