michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIDOMMozCellBroadcastEtwsInfo; michael@0: michael@0: /** michael@0: * MozCellBroadcastMessage encapsulates Cell Broadcast short message service michael@0: * (CBS) messages. michael@0: */ michael@0: [scriptable, uuid(6abe65de-6729-41f7-906a-3f3a2dbe30ae)] michael@0: interface nsIDOMMozCellBroadcastMessage : nsISupports michael@0: { michael@0: /** michael@0: * Indication of the geographical area over which the Message Code is unique, michael@0: * and the display mode. michael@0: * michael@0: * Possible values are: "cell-immediate", "plmn", "location-area" and "cell". michael@0: */ michael@0: readonly attribute DOMString gsmGeographicalScope; michael@0: michael@0: /** michael@0: * The Message Code differentiates between messages from the same source and michael@0: * type (e.g., with the same Message Identifier). michael@0: */ michael@0: readonly attribute unsigned short messageCode; michael@0: michael@0: /** michael@0: * Source and type of the message. For example, "Automotive Association" michael@0: * (= source), "Traffic Reports" (= type) could correspond to one value. The michael@0: * Message Identifier is coded in binary. michael@0: */ michael@0: readonly attribute unsigned short messageId; michael@0: michael@0: /** michael@0: * ISO-639-1 language code for this message. Null if unspecified. michael@0: */ michael@0: readonly attribute DOMString language; michael@0: michael@0: /** michael@0: * Text message carried by the message. michael@0: */ michael@0: readonly attribute DOMString body; michael@0: michael@0: /** michael@0: * Possible values are "normal", "class-0", "class-1", "class-2", "class-3", michael@0: * "user-1", and "user-2". michael@0: */ michael@0: readonly attribute DOMString messageClass; michael@0: michael@0: /** michael@0: * System time stamp at receival. michael@0: */ michael@0: readonly attribute jsval timestamp; // jsval is for Date. michael@0: michael@0: /** michael@0: * Additional ETWS-specific info. michael@0: */ michael@0: readonly attribute nsIDOMMozCellBroadcastEtwsInfo etws; michael@0: michael@0: /** michael@0: * Service Category. michael@0: */ michael@0: readonly attribute long cdmaServiceCategory; michael@0: }; michael@0: michael@0: /** michael@0: * ETWS (Earthquake and Tsunami Warning service) Primary Notification message michael@0: * specific information. michael@0: */ michael@0: [scriptable, uuid(af009d9a-f5e8-4573-a6ee-a85118465bed)] michael@0: interface nsIDOMMozCellBroadcastEtwsInfo : nsISupports michael@0: { michael@0: /** michael@0: * Warning type. Possible values are "earthquake", "tsunami", michael@0: * "earthquake-tsunami", "test" and "other". michael@0: */ michael@0: readonly attribute ACString warningType; michael@0: michael@0: /** michael@0: * Emergency user alert indication. It is used to command mobile terminals to michael@0: * activate emergency user alert upon the reception of ETWS primary michael@0: * notification. michael@0: */ michael@0: readonly attribute boolean emergencyUserAlert; michael@0: michael@0: /** michael@0: * Message popup indication. It is used to command mobile terminals to michael@0: * activate message popup upon the reception of ETWS primary notification. michael@0: */ michael@0: readonly attribute boolean popup; michael@0: }; michael@0: