2014-08-14 22:13:05 -07:00
|
|
|
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
|
|
|
/* vim: set ts=2 et sw=2 tw=40: */
|
2012-12-03 18:38:21 -08:00
|
|
|
/* 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/. */
|
|
|
|
|
2014-08-14 22:13:05 -07:00
|
|
|
enum CellBroadcastGsmGeographicalScope {"cell-immediate", "plmn",
|
|
|
|
"location-area", "cell"};
|
2014-09-23 03:27:03 -07:00
|
|
|
enum CellBroadcastMessageClass {"class-0", "class-1", "class-2",
|
|
|
|
"class-3", "user-1", "user-2", "normal"};
|
2014-08-14 22:13:05 -07:00
|
|
|
enum CellBroadcastEtwsWarningType {"earthquake", "tsunami",
|
|
|
|
"earthquake-tsunami", "test", "other"};
|
2012-12-03 18:38:21 -08:00
|
|
|
|
2014-08-14 22:13:05 -07:00
|
|
|
[Pref="dom.cellbroadcast.enabled"]
|
|
|
|
interface MozCellBroadcastMessage
|
2012-12-03 18:38:21 -08:00
|
|
|
{
|
2014-06-11 21:04:48 -07:00
|
|
|
/**
|
|
|
|
* The Service Id in the device where the message is received from.
|
|
|
|
*/
|
|
|
|
readonly attribute unsigned long serviceId;
|
|
|
|
|
2012-12-03 18:38:21 -08:00
|
|
|
/**
|
|
|
|
* 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".
|
|
|
|
*/
|
2014-08-14 22:13:05 -07:00
|
|
|
readonly attribute CellBroadcastGsmGeographicalScope? gsmGeographicalScope;
|
2012-12-03 18:38:21 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2014-08-14 22:13:05 -07:00
|
|
|
readonly attribute DOMString? language;
|
2012-12-03 18:38:21 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Text message carried by the message.
|
|
|
|
*/
|
2014-08-14 22:13:05 -07:00
|
|
|
readonly attribute DOMString? body;
|
2012-12-03 18:38:21 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Possible values are "normal", "class-0", "class-1", "class-2", "class-3",
|
|
|
|
* "user-1", and "user-2".
|
|
|
|
*/
|
2014-08-14 22:13:05 -07:00
|
|
|
readonly attribute CellBroadcastMessageClass? messageClass;
|
2012-12-03 18:38:21 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* System time stamp at receival.
|
|
|
|
*/
|
2014-06-04 19:06:28 -07:00
|
|
|
readonly attribute DOMTimeStamp timestamp;
|
2012-12-03 18:38:21 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Additional ETWS-specific info.
|
|
|
|
*/
|
2014-08-14 22:13:05 -07:00
|
|
|
readonly attribute MozCellBroadcastEtwsInfo? etws;
|
2013-10-27 23:06:48 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Service Category.
|
|
|
|
*/
|
2014-08-14 22:13:05 -07:00
|
|
|
readonly attribute unsigned short? cdmaServiceCategory;
|
2012-12-03 18:38:21 -08:00
|
|
|
};
|
|
|
|
|
2014-08-14 22:13:05 -07:00
|
|
|
[Pref="dom.cellbroadcast.enabled"]
|
|
|
|
interface MozCellBroadcastEtwsInfo
|
2012-12-03 18:38:21 -08:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Warning type. Possible values are "earthquake", "tsunami",
|
|
|
|
* "earthquake-tsunami", "test" and "other".
|
|
|
|
*/
|
2014-08-14 22:13:05 -07:00
|
|
|
readonly attribute CellBroadcastEtwsWarningType? warningType;
|
2012-12-03 18:38:21 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
};
|