michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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: michael@0: [Pref="dom.icc.enabled", michael@0: Constructor(DOMString type, optional MozStkCommandEventInit eventInitDict)] michael@0: interface MozStkCommandEvent : Event michael@0: { michael@0: readonly attribute any command; michael@0: }; michael@0: michael@0: dictionary MozStkCommandEventInit : EventInit michael@0: { michael@0: any command = null; michael@0: }; michael@0: michael@0: dictionary MozStkTextMessage michael@0: { michael@0: /** michael@0: * Text String. michael@0: * michael@0: * @see TS 11.14, clause 12.15, Text String. michael@0: */ michael@0: DOMString text; michael@0: michael@0: /** michael@0: * The length of time for which the ME shall display the dialog. michael@0: */ michael@0: MozStkDuration duration; michael@0: michael@0: /** michael@0: * Indicate this text message is high priority or normal priority. michael@0: * michael@0: * @see TS 11.14, clause 12.6, Command Qualifier, Display Text, bit 1. michael@0: * michael@0: * High priority text shall be displayed on the screen immediately, except if michael@0: * there is a conflict of priority level of alerting such as incoming calls michael@0: * or a low battery warning. In that situation, the resolution is left to michael@0: * the terminal. If the command is rejected in spite of the high priority, michael@0: * the terminal shall inform the ICC with resultCode is michael@0: * TERMINAL_CRNTLY_UNABLE_TO_PROCESS in MozStkResponse. michael@0: * michael@0: * true: high priority michael@0: * false: normal priority michael@0: */ michael@0: boolean isHighPriority; michael@0: michael@0: /** michael@0: * Need to wait for user to clear message or not. michael@0: * michael@0: * @see TS 11.14, clause 12.6, Command Qualifier, Display Text, bit 8. michael@0: * michael@0: * If this attribute is true, but user doesn't give any input within a period michael@0: * of time(said 30 secs), the terminal shall inform the ICC with resultCode michael@0: * is NO_RESPONSE_FROM_USER in MozStkResponse. michael@0: * michael@0: * true: Wait for user to clear message. michael@0: * false: clear message after a delay. michael@0: */ michael@0: boolean userClear; michael@0: michael@0: /** michael@0: * Need to response immediately or not. michael@0: * michael@0: * @see TS 11.14, clause 12.43, Immediate response. michael@0: * michael@0: * When this attribute is true, the terminal shall immediately send michael@0: * MozStkResponse with resultCode is OK. michael@0: * michael@0: * true: The terminal shall send response immediately. michael@0: * false: otherwise. michael@0: */ michael@0: boolean responseNeeded; michael@0: }; michael@0: michael@0: dictionary MozStkItem michael@0: { michael@0: /** michael@0: * Identifier of item. michael@0: * michael@0: * The identifier is a single byte between '01' and 'FF'. Each item shall michael@0: * have a unique identifier within an Item list. michael@0: */ michael@0: unsigned short identifier; michael@0: michael@0: /** michael@0: * Text string of item. michael@0: */ michael@0: DOMString text; michael@0: }; michael@0: michael@0: dictionary MozStkMenu michael@0: { michael@0: /** michael@0: * Array of MozStkItem. michael@0: * michael@0: * @see TS 11.14, clause 12.9 michael@0: */ michael@0: sequence items; michael@0: michael@0: /** michael@0: * Presentation type, one of TYPE_*. michael@0: */ michael@0: unsigned short presentationType; michael@0: michael@0: /** michael@0: * Title of the menu. michael@0: */ michael@0: DOMString title; michael@0: michael@0: /** michael@0: * Default item identifier of the menu. michael@0: */ michael@0: unsigned short defaultItem; michael@0: michael@0: /** michael@0: * Help information available or not. michael@0: * michael@0: * @see TS 11.14, clause 12.6, Command Qualifier, SET UP MENU, bit 8. michael@0: * michael@0: * true: help information available. michael@0: * false: no help information available. michael@0: */ michael@0: boolean isHelpAvailable; michael@0: michael@0: /** michael@0: * List of Next Action Indicators. michael@0: * Each element should be one of nsIDOMMozIccManager.STK_CMD_* michael@0: * or nsIDOMMozIccManager.STK_NEXT_ACTION_* michael@0: * If it's STK_NEXT_ACTION_NULL, the terminal should ignore this action michael@0: * in corresponding item. michael@0: * michael@0: * @see TS 11.14, clause 12.24, Items Next Action Indicator. michael@0: */ michael@0: sequence nextActionList; michael@0: }; michael@0: michael@0: dictionary MozStkInput michael@0: { michael@0: /** michael@0: * Text for the ME to display in conjunction with asking the user to respond. michael@0: */ michael@0: DOMString text; michael@0: michael@0: /** michael@0: * The length of time for which the ME shall display the dialog. This field michael@0: * is used only for GET INKEY. michael@0: * michael@0: * @see TS 11.14, clause 11.8, duration, GET INKEY T.C 27.22.4.2.8.4.2 michael@0: */ michael@0: MozStkDuration duration; michael@0: michael@0: /** michael@0: * Minimum length of response. michael@0: */ michael@0: unsigned short minLength; michael@0: michael@0: /** michael@0: * Maximum length of response. michael@0: */ michael@0: unsigned short maxLength; michael@0: michael@0: /** michael@0: * Text for the ME to display, corresponds to a default text string offered michael@0: * by the ICC. michael@0: */ michael@0: DOMString defaultText; michael@0: michael@0: /** michael@0: * Input format. michael@0: * michael@0: * @see TS 11.14, clause 12.6, Command Qualifier, GET INPUT, bit 1. michael@0: * michael@0: * true: Alphabet set. michael@0: * false: Digits only. michael@0: */ michael@0: boolean isAlphabet; michael@0: michael@0: /** michael@0: * Alphabet encoding. michael@0: * michael@0: * @see TS 11.14, clause 12.6, Command Qualifier, GET INPUT, bit 2. michael@0: * michael@0: * true: UCS2 alphabet. michael@0: * false: default SMS alphabet. michael@0: */ michael@0: boolean isUCS2; michael@0: michael@0: /** michael@0: * Visibility of input. michael@0: * michael@0: * @see TS 11.14, clause 12.6, Command Qualifier, GET INPUT, bit 3. michael@0: * michael@0: * true: User input shall not be revealed in any way. michael@0: * false: ME may echo user input on the display. michael@0: */ michael@0: boolean hideInput; michael@0: michael@0: /** michael@0: * Yes/No response is requested. michael@0: * michael@0: * @see TS 11.14, clause 12.6, Command Qualifier, GET INKEY, bit 3. michael@0: * michael@0: * true: Yes/No response is requested, and character sets michael@0: * (Alphabet set and UCS2) are disabled. michael@0: * false: Character sets (Alphabet set and UCS2) are enabled. michael@0: */ michael@0: boolean isYesNoRequested; michael@0: michael@0: /** michael@0: * User input in packed or unpacked format. michael@0: * michael@0: * @see TS 11.14, clause 12.6, Command Qualifier, GET INPUT, bit 4. michael@0: * michael@0: * true: User input to be in SMS packed format. michael@0: * false: User input to be in unpacked format. michael@0: */ michael@0: boolean isPacked; michael@0: michael@0: /** michael@0: * Help information available or not. michael@0: * michael@0: * @see TS 11.14, clause 12.6, Command Qualifier, GET INPUT/GET INKEY, bit 8. michael@0: * michael@0: * true: help information available. michael@0: * false: no help information available. michael@0: */ michael@0: boolean isHelpAvailable; michael@0: }; michael@0: michael@0: dictionary MozStkBrowserSetting michael@0: { michael@0: /** michael@0: * Confirm message to launch browser. michael@0: */ michael@0: MozStkTextMessage confirmMessage; michael@0: michael@0: /** michael@0: * The URL to be opened by browser. michael@0: */ michael@0: DOMString url; michael@0: michael@0: /** michael@0: * One of STK_BROWSER_MODE_*. michael@0: * michael@0: * @see nsIDOMMozIccManager.STK_BROWSER_MODE_* michael@0: */ michael@0: unsigned short mode; michael@0: }; michael@0: michael@0: dictionary MozStkSetUpCall michael@0: { michael@0: /** michael@0: * The Dialling number. michael@0: */ michael@0: DOMString address; michael@0: michael@0: /** michael@0: * The text message used in user confirmation phase. michael@0: */ michael@0: MozStkTextMessage confirmMessage; michael@0: michael@0: /** michael@0: * The text message used in call set up phase. michael@0: */ michael@0: MozStkTextMessage callMessage; michael@0: michael@0: /** michael@0: * The Optional maximum duration for the redial mechanism. michael@0: * The time elapsed since the first call set-up attempt has exceeded the duration michael@0: * requested by the UICC, the redial mechanism is terminated. michael@0: */ michael@0: MozStkDuration duration; michael@0: }; michael@0: michael@0: dictionary MozStkSetUpEventList michael@0: { michael@0: /** michael@0: * The list of events that needs to provide details to ICC when they happen. michael@0: * When this valus is null, means an indication to remove the existing list michael@0: * of events in ME. michael@0: * michael@0: * @see nsIDOMMozIccManager.STK_EVENT_TYPE_* michael@0: */ michael@0: sequence eventList; michael@0: }; michael@0: michael@0: dictionary MozStkLocationInfo michael@0: { michael@0: /** michael@0: * Mobile Country Code (MCC) of the current serving operator. michael@0: */ michael@0: unsigned short mcc; michael@0: michael@0: /** michael@0: * Mobile Network Code (MNC) of the current serving operator. michael@0: */ michael@0: unsigned short mnc; michael@0: michael@0: /** michael@0: * Mobile Location Area Code (LAC) for the current serving operator. michael@0: */ michael@0: unsigned short gsmLocationAreaCode; michael@0: michael@0: /** michael@0: * Mobile Cell ID for the current serving operator. michael@0: */ michael@0: unsigned long gsmCellId; michael@0: }; michael@0: michael@0: dictionary MozStkDuration michael@0: { michael@0: /** michael@0: * Time unit used, should be one of STK_TIME_UNIT_*. michael@0: */ michael@0: unsigned short timeUnit; michael@0: michael@0: /** michael@0: * The length of time required, expressed in timeUnit. michael@0: */ michael@0: octet timeInterval; michael@0: }; michael@0: michael@0: dictionary MozStkPlayTone michael@0: { michael@0: /** michael@0: * Text String. michael@0: */ michael@0: DOMString text; michael@0: michael@0: /** michael@0: * One of STK_TONE_TYPE_*. michael@0: */ michael@0: unsigned short tone; michael@0: michael@0: /** michael@0: * The length of time for which the ME shall generate the tone. michael@0: */ michael@0: MozStkDuration duration; michael@0: michael@0: /** michael@0: * Need to vibrate or not. michael@0: * true: vibrate alert, if available, with the tone. michael@0: * false: use of vibrate alert is up to the ME. michael@0: */ michael@0: boolean isVibrate; michael@0: }; michael@0: michael@0: dictionary MozStkProvideLocalInfo michael@0: { michael@0: /** michael@0: * Indicate which local information is required. michael@0: * It shall be one of following: michael@0: * - nsIDOMMozIccManager.STK_LOCAL_INFO_LOCATION_INFO michael@0: * - nsIDOMMozIccManager.STK_LOCAL_INFO_IMEI michael@0: * - nsIDOMMozIccManager.STK_LOCAL_INFO_DATE_TIME_ZONE michael@0: * - nsIDOMMozIccManager.STK_LOCAL_INFO_LANGUAGE michael@0: */ michael@0: unsigned short localInfoType; michael@0: }; michael@0: michael@0: dictionary MozStkLocationEvent michael@0: { michael@0: /** michael@0: * The type of this event. michael@0: * It shall be nsIDOMMozIccManager.STK_EVENT_TYPE_LOCATION_STATUS; michael@0: */ michael@0: unsigned short eventType; michael@0: michael@0: /** michael@0: * Indicate current service state of the MS with one of the values listed michael@0: * below: michael@0: * - nsIDOMMozIccManager.STK_SERVICE_STATE_NORMAL michael@0: * - nsIDOMMozIccManager.STK_SERVICE_STATE_LIMITED michael@0: * - nsIDOMMozIccManager.STK_SERVICE_STATE_UNAVAILABLE michael@0: */ michael@0: unsigned short locationStatus; michael@0: michael@0: /** michael@0: * See MozStkLocationInfo. michael@0: * This value shall only be provided if the locationStatus indicates michael@0: * 'STK_SERVICE_STATE_NORMAL'. michael@0: */ michael@0: MozStkLocationInfo locationInfo; michael@0: }; michael@0: michael@0: dictionary MozStkTimer michael@0: { michael@0: /** michael@0: * Identifier of a timer. michael@0: */ michael@0: octet timerId; michael@0: michael@0: /** michael@0: * Length of time during which the timer has to run. michael@0: * The resolution of a timer is 1 second. michael@0: */ michael@0: unsigned long timerValue; michael@0: michael@0: /** michael@0: * The action requested from UICC. michael@0: * It shall be one of below: michael@0: * - nsIDOMMozIccManager.STK_TIMER_START michael@0: * - nsIDOMMozIccManager.STK_TIMER_DEACTIVATE michael@0: * - nsIDOMMozIccManager.STK_TIMER_GET_CURRENT_VALUE michael@0: */ michael@0: unsigned short timerAction; michael@0: }; michael@0: michael@0: dictionary MozStkBipMessage michael@0: { michael@0: /** michael@0: * Text String michael@0: */ michael@0: DOMString text; michael@0: }; michael@0: michael@0: dictionary MozStkCommand michael@0: { michael@0: /** michael@0: * The number of command issued by ICC. And it is assigned michael@0: * by ICC may take any hexadecimal value betweean '01' and 'FE'. michael@0: * michael@0: * @see TS 11.14, clause 6.5.1 michael@0: */ michael@0: unsigned short commandNumber; michael@0: michael@0: /** michael@0: * One of STK_CMD_* michael@0: */ michael@0: unsigned short typeOfCommand; michael@0: michael@0: /** michael@0: * Qualifiers specific to the command. michael@0: */ michael@0: unsigned short commandQualifier; michael@0: michael@0: /** michael@0: * options varies accrording to the typeOfCommand in MozStkCommand. michael@0: * michael@0: * When typeOfCommand is michael@0: * - STK_CMD_DISPLAY_TEXT michael@0: * - STK_CMD_SET_UP_IDLE_MODE_TEXT michael@0: * - STK_CMD_SEND_{SS|USSD|SMS|DTMF}, michael@0: * options is MozStkTextMessage. michael@0: * michael@0: * When typeOfCommand is michael@0: * - STK_CMD_SELECT_ITEM michael@0: * - STK_CMD_SET_UP_MENU michael@0: * options is MozStkMenu. michael@0: * michael@0: * When typeOfCommand is michael@0: * - STK_CMD_GET_INKEY michael@0: * - STK_CMD_GET_INPUT, michael@0: * options is MozStkInput. michael@0: * michael@0: * When typeOfCommand is michael@0: * - STK_CMD_LAUNCH_BROWSER michael@0: * options is MozStkBrowserSetting. michael@0: * michael@0: * When typeOfCommand is michael@0: * - STK_CMD_SET_UP_CALL michael@0: * options is MozStkSetUpCall. michael@0: * michael@0: * When typeOfCommand is michael@0: * - STK_CMD_SET_UP_EVENT_LIST michael@0: * options is MozStkSetUpEventList. michael@0: * michael@0: * When typeOfCommand is michael@0: * - STK_CMD_PLAY_TONE michael@0: * options is MozStkPlayTone. michael@0: * michael@0: * When typeOfCommand is michael@0: * - STK_CMD_POLL_INTERVAL michael@0: * options is MozStkDuration. michael@0: * michael@0: * When typeOfCommand is michael@0: * - STK_CMD_PROVIDE_LOCAL_INFO michael@0: * options is MozStkProvideLocalInfo. michael@0: * michael@0: * When typeOfCommand is michael@0: * - STK_CMD_TIMER_MANAGEMENT michael@0: * option is MozStkTimer michael@0: * michael@0: * When typeOfCommand is michael@0: * - STK_CMD_OPEN_CHANNEL michael@0: * - STK_CMD_CLOSE_CHANNEL michael@0: * - STK_CMD_SEND_DATA michael@0: * - STK_CMD_RECEIVE_DATA michael@0: * options is MozStkBipMessage michael@0: * michael@0: * When typeOfCommand is michael@0: * - STK_CMD_POLL_OFF michael@0: * options is null. michael@0: * michael@0: * When typeOfCommand is michael@0: * - STK_CMD_REFRESH michael@0: * options is null. michael@0: */ michael@0: any options; michael@0: }; michael@0: michael@0: dictionary MozStkResponse michael@0: { michael@0: /** michael@0: * One of RESULT_* michael@0: */ michael@0: unsigned short resultCode; michael@0: michael@0: /** michael@0: * The identifier of the item selected by user. michael@0: * michael@0: * @see MozStkItem.identifier michael@0: */ michael@0: unsigned short itemIdentifier; michael@0: michael@0: /** michael@0: * User input. michael@0: */ michael@0: DOMString input; michael@0: michael@0: /** michael@0: * YES/NO response. michael@0: * michael@0: * @see MozStkInput.isYesNoRequested michael@0: */ michael@0: boolean isYesNo; michael@0: michael@0: /** michael@0: * User has confirmed or rejected the call during STK_CMD_CALL_SET_UP. michael@0: * michael@0: * @see RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM michael@0: * michael@0: * true: Confirmed by User. michael@0: * false: Rejected by User. michael@0: */ michael@0: boolean hasConfirmed; michael@0: michael@0: /** michael@0: * The response for STK_CMD_PROVIDE_LOCAL_INFO michael@0: */ michael@0: MozStkLocalInfo localInfo; michael@0: michael@0: /** michael@0: * The response for STK_CMD_TIMER_MANAGEMENT. michael@0: * The 'timerValue' is needed if the action of STK_CMD_TIMER_MANAGEMENT is michael@0: * 'STK_TIMER_DEACTIVATE' or 'STK_TIMER_GET_CURRENT_VALUE'. It shall state michael@0: * the current value of a timer. And the resolution is 1 second. michael@0: */ michael@0: MozStkTimer timer; michael@0: }; michael@0: michael@0: dictionary MozStkCallEvent michael@0: { michael@0: /** michael@0: * The type of this event. michael@0: * It shall be one of following: michael@0: * - nsIDOMMozIccManager.STK_EVENT_TYPE_MT_CALL, michael@0: * - nsIDOMMozIccManager.STK_EVENT_TYPE_CALL_CONNECTED, michael@0: * - nsIDOMMozIccManager.STK_EVENT_TYPE_CALL_DISCONNECTED. michael@0: */ michael@0: unsigned short eventType; michael@0: michael@0: /** michael@0: * Remote party number. michael@0: */ michael@0: DOMString number; michael@0: michael@0: /** michael@0: * This field is available in 'STK_EVENT_TYPE_CALL_CONNECTED' and michael@0: * 'STK_EVENT_TYPE_CALL_DISCONNECTED' events. michael@0: * For the STK_EVENT_TYPE_CALL_CONNECTED event, setting this to true means the michael@0: * connection is answered by remote end, that is, this is an outgoing call. michael@0: * For the STK_EVENT_TYPE_CALL_DISCONNECTED event, setting this to true michael@0: * indicates the connection is hung up by remote. michael@0: */ michael@0: boolean isIssuedByRemote; michael@0: michael@0: /** michael@0: * This field is available in Call Disconnected event to indicate the cause michael@0: * of disconnection. The cause string is passed to gaia through the error michael@0: * listener of nsIDOMCallEvent. Null if there's no error. michael@0: */ michael@0: DOMString error; michael@0: }; michael@0: michael@0: dictionary MozStkLocalInfo michael@0: { michael@0: /** michael@0: * IMEI information michael@0: */ michael@0: DOMString imei; michael@0: michael@0: /** michael@0: * Location Information michael@0: */ michael@0: MozStkLocationInfo locationInfo; michael@0: michael@0: /** michael@0: * Date information michael@0: */ michael@0: Date date; michael@0: michael@0: /** michael@0: * Language Information michael@0: * michael@0: * @see ISO 639-1, Alpha-2 code michael@0: */ michael@0: DOMString language; michael@0: }; michael@0: michael@0: dictionary MozStkLanguageSelectionEvent michael@0: { michael@0: /** michael@0: * The type of this event. michael@0: * It shall be nsIDOMMozIccManager.STK_EVENT_TYPE_LANGUAGE_SELECTION. michael@0: */ michael@0: unsigned short eventType; michael@0: michael@0: /** michael@0: * Language Information michael@0: * michael@0: * @see ISO 639-1, Alpha-2 code michael@0: * "de" for German, "en" for English, "zh" for Chinese, etc. michael@0: */ michael@0: DOMString language; michael@0: }; michael@0: michael@0: dictionary MozStkBrowserTerminationEvent michael@0: { michael@0: /** michael@0: * The type of this event. michael@0: * It shall be nsIDOMMozIccManager.STK_EVENT_TYPE_BROWSER_TERMINATION michael@0: */ michael@0: unsigned short eventType; michael@0: michael@0: /** michael@0: * This object shall contain the browser termination cause. michael@0: * See TZ 102 223 8.51. It shall be one of following: michael@0: * - nsIDOMMozIccManager.STK_BROWSER_TERMINATION_CAUSE_USER michael@0: * - nsIDOMMozIccManager.STK_BROWSER_TERMINATION_CAUSE_ERROR michael@0: */ michael@0: unsigned short terminationCause; michael@0: }; michael@0: michael@0: dictionary MozStkGeneralEvent michael@0: { michael@0: /** michael@0: * The type of this event, MozStkGeneralEvent can be used for all Stk Event michael@0: * requires no more parameter than event type, including michael@0: * nsIDOMMozIccManager.STK_EVENT_TYPE_USER_ACTIVITY. michael@0: * nsIDOMMozIccManager.STK_EVENT_TYPE_IDLE_SCREEN_AVAILABLE. michael@0: * HCI Connectivity Event(Not defined in interface yet). michael@0: */ michael@0: unsigned short eventType; michael@0: };