Bug 804671 - Part 1: IDL for PROVIDE_LOCAL_INFO. r=allstars.chh. sr=jonas
authorEdgar Chen <echen@mozilla.com>
Fri, 23 Nov 2012 10:18:52 +0800
changeset 124560 1ffb3bd63f71ea20e4101cbbd7d891d41976a043
parent 124559 0319dd845d5318f55396e3e4a23fb2046d74242c
child 124561 0bd9ff852c5e33d6f64bc70e605c7d2f841da67f
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersallstars, jonas
bugs804671
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 804671 - Part 1: IDL for PROVIDE_LOCAL_INFO. r=allstars.chh. sr=jonas
dom/icc/interfaces/SimToolKit.idl
dom/icc/interfaces/nsIDOMIccManager.idl
--- a/dom/icc/interfaces/SimToolKit.idl
+++ b/dom/icc/interfaces/SimToolKit.idl
@@ -313,16 +313,29 @@ dictionary MozStkPlayTone
   /**
    * Need to vibrate or not.
    * true: vibrate alert, if available, with the tone.
    * false: use of vibrate alert is up to the ME.
    */
   boolean isVibrate;
 };
 
+dictionary MozStkProvideLocalInfo
+{
+  /**
+   * Indicate which local information is required.
+   * It shall be one of following:
+   *  - nsIDOMMozIccManager.STK_LOCAL_INFO_LOCATION_INFO
+   *  - nsIDOMMozIccManager.STK_LOCAL_INFO_IMEI
+   *  - nsIDOMMozIccManager.STK_LOCAL_INFO_DATE_TIME_ZONE
+   *  - nsIDOMMozIccManager.STK_LOCAL_INFO_LANGUAGE
+   */
+  unsigned short localInfoType;
+};
+
 dictionary MozStkLocationEvent
 {
   /**
    * The type of this event.
    * It shall be nsIDOMMozIccManager.STK_EVENT_TYPE_LOCATION_STATUS;
    */
   unsigned short eventType;
 
@@ -398,16 +411,20 @@ dictionary MozStkCommand
    * - STK_CMD_PLAY_TONE
    * options is MozStkPlayTone.
    *
    * When typeOfCommand is
    * - STK_CMD_POLL_INTERVAL
    * options is MozStkDuration.
    *
    * When typeOfCommand is
+   * - STK_CMD_PROVIDE_LOCAL_INFO
+   * options is MozStkProvideLocalInfo.
+   *
+   * When typeOfCommand is
    * - STK_CMD_POLL_OFF
    * options is null.
    *
    * When typeOfCommand is
    * - STK_CMD_REFRESH
    * options is null.
    */
   jsval options;
@@ -453,16 +470,23 @@ dictionary MozStkResponse
    * User has confirmed or rejected the call during STK_CMD_CALL_SET_UP.
    *
    * @see RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
    *
    * true: Confirmed by User.
    * false: Rejected by User.
    */
   boolean hasConfirmed;
+
+  /**
+   * The response for STK_CMD_PROVIDE_LOCAL_INFO
+   *
+   * @see MozStkLocalInfo
+   */
+  jsval localInfo;
 };
 
 dictionary MozStkCallEvent
 {
   /**
    * The type of this event.
    * It shall be one of following:
    *     - nsIDOMMozIccManager.STK_EVENT_TYPE_MT_CALL,
@@ -488,8 +512,37 @@ dictionary MozStkCallEvent
 
   /**
    * This field is available in Call Disconnected event to indicate the cause
    * of disconnection. The cause string is passed to gaia through the error
    * listener of nsIDOMCallEvent. Null if there's no error.
    */
   DOMString error;
 };
+
+dictionary MozStkLocalInfo
+{
+  /**
+   * IMEI information
+   */
+  DOMString imei;
+
+  /**
+   * Location Information
+   *
+   * @see MozStkLocationInfo.
+   */
+  jsval locationInfo;
+
+  /**
+   * Date information
+   *
+   * @see Date
+   */
+  jsval date;
+
+  /**
+   * Language Information
+   *
+   * @see ISO 639-1, Alpha-2 code
+   */
+  DOMString language;
+};
--- a/dom/icc/interfaces/nsIDOMIccManager.idl
+++ b/dom/icc/interfaces/nsIDOMIccManager.idl
@@ -40,16 +40,17 @@ interface nsIDOMMozIccManager : nsIDOMEv
   const unsigned short STK_CMD_SEND_DTMF             = 0x14;
   const unsigned short STK_CMD_LAUNCH_BROWSER        = 0x15;
   const unsigned short STK_CMD_PLAY_TONE             = 0x20;
   const unsigned short STK_CMD_DISPLAY_TEXT          = 0x21;
   const unsigned short STK_CMD_GET_INKEY             = 0x22;
   const unsigned short STK_CMD_GET_INPUT             = 0x23;
   const unsigned short STK_CMD_SELECT_ITEM           = 0x24;
   const unsigned short STK_CMD_SET_UP_MENU           = 0x25;
+  const unsigned short STK_CMD_PROVIDE_LOCAL_INFO    = 0x26;
   const unsigned short STK_CMD_SET_UP_IDLE_MODE_TEXT = 0x28;
 
   /**
    * STK Result code.
    *
    * @see TS 11.14, clause 12.12
    *
    * Results '0X' and '1X' indicate that the command has been performed.
@@ -190,16 +191,26 @@ interface nsIDOMMozIccManager : nsIDOMEv
   /**
    * Time unit
    */
   const unsigned short STK_TIME_UNIT_MINUTE       = 0x00;
   const unsigned short STK_TIME_UNIT_SECOND       = 0x01;
   const unsigned short STK_TIME_UNIT_TENTH_SECOND = 0x02;
 
   /**
+   * Local Information list
+   *
+   * @see TS 102.223, clause 8.6
+   */
+  const unsigned short STK_LOCAL_INFO_LOCATION_INFO  = 0x00;
+  const unsigned short STK_LOCAL_INFO_IMEI           = 0x01;
+  const unsigned short STK_LOCAL_INFO_DATE_TIME_ZONE = 0x03;
+  const unsigned short STK_LOCAL_INFO_LANGUAGE       = 0x04;
+
+  /**
    * Send the response back to ICC after an attempt to execute STK Proactive
    * Command.
    *
    * @param command
    *        Command received from ICC. See MozStkCommand.
    * @param response
    *        The response that will be sent to ICC.
    * @see MozStkResponse for the detail of response.