Bug 778093 - Part 1/9: IDL change, sr=mounir

This commit is contained in:
Vicamo Yang 2012-12-04 10:38:21 +08:00
parent 61800c75c4
commit 430c5a72dc
4 changed files with 145 additions and 0 deletions

View File

@ -0,0 +1,17 @@
/* 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/. */
#include "nsIDOMEventTarget.idl"
/**
* Cell Broadcast short message service (CBS) permits a number of
* unacknowledged general CBS messages to be broadcast to all receivers within
* a particular region.
*/
[scriptable, builtinclass, uuid(06bf2607-cd01-4307-9063-b6eac13b4613)]
interface nsIDOMMozCellBroadcast : nsIDOMEventTarget
{
[implicit_jscontext] attribute jsval onreceived;
};

View File

@ -0,0 +1,25 @@
/* 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/. */
#include "nsIDOMEvent.idl"
interface nsIDOMMozCellBroadcastMessage;
[scriptable, builtinclass, uuid(0be33bb9-930f-410b-8d61-a0fc5f4dcf7d)]
interface nsIDOMMozCellBroadcastEvent : nsIDOMEvent
{
//[binaryname(MessageMoz)]
readonly attribute nsIDOMMozCellBroadcastMessage message;
[noscript] void initMozCellBroadcastEvent(in DOMString aType,
in boolean aCanBubble,
in boolean aCancelable,
in nsIDOMMozCellBroadcastMessage aMessage);
};
dictionary MozCellBroadcastEventInit : EventInit
{
//[binaryname(MessageMoz)]
nsIDOMMozCellBroadcastMessage message;
};

View File

@ -0,0 +1,90 @@
/* 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/. */
#include "nsISupports.idl"
interface nsIDOMMozCellBroadcastEtwsInfo;
/**
* MozCellBroadcastMessage encapsulates Cell Broadcast short message service
* (CBS) messages.
*/
[scriptable, uuid(cb210e8b-ad9c-4052-b70c-02ec0c25d669)]
interface nsIDOMMozCellBroadcastMessage : nsISupports
{
/**
* Indication of the geographical area over which the Message Code is unique,
* and the display mode.
*
* Possible values are: "cell-immediate", "plmn", "location-area" and "cell".
*/
readonly attribute DOMString geographicalScope;
/**
* The Message Code differentiates between messages from the same source and
* type (e.g., with the same Message Identifier).
*/
readonly attribute unsigned short messageCode;
/**
* Source and type of the message. For example, "Automotive Association"
* (= source), "Traffic Reports" (= type) could correspond to one value. The
* Message Identifier is coded in binary.
*/
readonly attribute unsigned short messageId;
/**
* ISO-639-1 language code for this message. Null if unspecified.
*/
readonly attribute DOMString language;
/**
* Text message carried by the message.
*/
readonly attribute DOMString body;
/**
* Possible values are "normal", "class-0", "class-1", "class-2", "class-3",
* "user-1", and "user-2".
*/
readonly attribute DOMString messageClass;
/**
* System time stamp at receival.
*/
readonly attribute jsval timestamp; // jsval is for Date.
/**
* Additional ETWS-specific info.
*/
readonly attribute nsIDOMMozCellBroadcastEtwsInfo etws;
};
/**
* ETWS (Earthquake and Tsunami Warning service) Primary Notification message
* specific information.
*/
[scriptable, uuid(af009d9a-f5e8-4573-a6ee-a85118465bed)]
interface nsIDOMMozCellBroadcastEtwsInfo : nsISupports
{
/**
* Warning type. Possible values are "earthquake", "tsunami",
* "earthquake-tsunami", "test" and "other".
*/
readonly attribute ACString warningType;
/**
* Emergency user alert indication. It is used to command mobile terminals to
* activate emergency user alert upon the reception of ETWS primary
* notification.
*/
readonly attribute boolean emergencyUserAlert;
/**
* Message popup indication. It is used to command mobile terminals to
* activate message popup upon the reception of ETWS primary notification.
*/
readonly attribute boolean popup;
};

View File

@ -0,0 +1,13 @@
/* 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/. */
#include "nsISupports.idl"
interface nsIDOMMozCellBroadcast;
[scriptable, uuid(010af082-22c5-471a-be21-0d738c50df67)]
interface nsIMozNavigatorCellBroadcast : nsISupports
{
readonly attribute nsIDOMMozCellBroadcast mozCellBroadcast;
};