1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/cellbroadcast/interfaces/nsIDOMMozCellBroadcastMessage.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,95 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#include "nsISupports.idl" 1.9 + 1.10 +interface nsIDOMMozCellBroadcastEtwsInfo; 1.11 + 1.12 +/** 1.13 + * MozCellBroadcastMessage encapsulates Cell Broadcast short message service 1.14 + * (CBS) messages. 1.15 + */ 1.16 +[scriptable, uuid(6abe65de-6729-41f7-906a-3f3a2dbe30ae)] 1.17 +interface nsIDOMMozCellBroadcastMessage : nsISupports 1.18 +{ 1.19 + /** 1.20 + * Indication of the geographical area over which the Message Code is unique, 1.21 + * and the display mode. 1.22 + * 1.23 + * Possible values are: "cell-immediate", "plmn", "location-area" and "cell". 1.24 + */ 1.25 + readonly attribute DOMString gsmGeographicalScope; 1.26 + 1.27 + /** 1.28 + * The Message Code differentiates between messages from the same source and 1.29 + * type (e.g., with the same Message Identifier). 1.30 + */ 1.31 + readonly attribute unsigned short messageCode; 1.32 + 1.33 + /** 1.34 + * Source and type of the message. For example, "Automotive Association" 1.35 + * (= source), "Traffic Reports" (= type) could correspond to one value. The 1.36 + * Message Identifier is coded in binary. 1.37 + */ 1.38 + readonly attribute unsigned short messageId; 1.39 + 1.40 + /** 1.41 + * ISO-639-1 language code for this message. Null if unspecified. 1.42 + */ 1.43 + readonly attribute DOMString language; 1.44 + 1.45 + /** 1.46 + * Text message carried by the message. 1.47 + */ 1.48 + readonly attribute DOMString body; 1.49 + 1.50 + /** 1.51 + * Possible values are "normal", "class-0", "class-1", "class-2", "class-3", 1.52 + * "user-1", and "user-2". 1.53 + */ 1.54 + readonly attribute DOMString messageClass; 1.55 + 1.56 + /** 1.57 + * System time stamp at receival. 1.58 + */ 1.59 + readonly attribute jsval timestamp; // jsval is for Date. 1.60 + 1.61 + /** 1.62 + * Additional ETWS-specific info. 1.63 + */ 1.64 + readonly attribute nsIDOMMozCellBroadcastEtwsInfo etws; 1.65 + 1.66 + /** 1.67 + * Service Category. 1.68 + */ 1.69 + readonly attribute long cdmaServiceCategory; 1.70 +}; 1.71 + 1.72 +/** 1.73 + * ETWS (Earthquake and Tsunami Warning service) Primary Notification message 1.74 + * specific information. 1.75 + */ 1.76 +[scriptable, uuid(af009d9a-f5e8-4573-a6ee-a85118465bed)] 1.77 +interface nsIDOMMozCellBroadcastEtwsInfo : nsISupports 1.78 +{ 1.79 + /** 1.80 + * Warning type. Possible values are "earthquake", "tsunami", 1.81 + * "earthquake-tsunami", "test" and "other". 1.82 + */ 1.83 + readonly attribute ACString warningType; 1.84 + 1.85 + /** 1.86 + * Emergency user alert indication. It is used to command mobile terminals to 1.87 + * activate emergency user alert upon the reception of ETWS primary 1.88 + * notification. 1.89 + */ 1.90 + readonly attribute boolean emergencyUserAlert; 1.91 + 1.92 + /** 1.93 + * Message popup indication. It is used to command mobile terminals to 1.94 + * activate message popup upon the reception of ETWS primary notification. 1.95 + */ 1.96 + readonly attribute boolean popup; 1.97 +}; 1.98 +