WebAPI/WebSTK: Difference between revisions

Line 167: Line 167:
=== STK command ===
=== STK command ===
<pre>
<pre>
interface nsIDOMMozStkCommand : nsISupports
dictionary nsIDOMMozStkCommand
{
{
   /**
   /**
   * The number of command issued by ICC. And it is assigned  
   * The number of command issued by ICC. And it is assigned
   * by ICC may take any hexadecimal value betweean '01' and 'FE'.
   * by ICC may take any hexadecimal value betweean '01' and 'FE'.
   *
   *
   * @see TS 11.14, clause 6.5.1
   * @see TS 11.14, clause 6.5.1
   */  
   */
   readonly attribute unsigned short number;
   unsigned short commandNumber;


   /**
   /**
   * One of CMD_*
   * One of STK_CMD_*
   */
   */
   readonly attribute unsigned short type;  
   unsigned short typeOfCommand;


   /**
   /**
   * Qualifiers specific to the command.
   * Qualifiers specific to the command.
  */
  readonly attribute unsigned short qualifier;
 
  /**
  * Used when type in nsIDOMMozStkCommand is
  * DISPLAY_TEXT, SET_UP_IDLE_MODE_TEXT, REFRESH and SEND_*.
   */
   */
   readonly attribute nsIDOMMozStkTextMessage textMessage;
   unsigned short commandQualifier;
  /**
  * Used when type in nsIDOMMozStkCommand is
  * SELECT_ITEM or SET_UP_MENU.
  */ 
  readonly attribute nsIDOMMozStkMenu menu;


   /**
   /**
   * Used when type in nsIDOMMozStkCommand is  
   * options varies accrording to the typeOfCommand in nsIDOMMozStkCommand.
   * GET_INKEY or GET_INPUT.
  *
   */
  * When typeOfCommand is
  readonly attribute nsIDOMMozStkInput input;
   * - STK_DISPLAY_TEXT
  * - STK_SET_UP_IDLE_MODE_TEXT
  /**
  * - STK_REFRESH
   * Used when type in nsIDOMMozStkCommand is  
  * - STK_SEND_{SS|USSD|SMS|DTMF},
   * LAUNCH_BROWSER.
  * options is nsIDOMMozStkTextMessage.
   */
   *
  readonly attribute nsIDOMMozStkBrowserSetting setting;
  * When typeOfCommand is
  * - STK_SELECT_ITEM
  /**
  * - STK_SET_UP_MENU
   * Used when type in nsIDOMMozStkCommand is  
  * options is nsIDOMMozStkMenu.
   * SET_UP_CALL.
  *
   */  
   * When typeOfCommand is
   readonly attribute nsIDOMMozStkSetUpCall call;
   * - STK_GET_INKEY
  * - STK_GET_INPUT,
  * options is nsIDOMMozStkInput.
   *
  * When typeOfCommand is
  * - STK_LAUNCH_BROWSER
  * options is nsIDOMMozStkBrowserSetting.
  *
   * When typeOfCommand is
   * - STK_SET_UP_CALL
  * options is nsIDOMMozStkSetUpCall.
   */
   jsval options;
};
};
</pre>
</pre>
Line 222: Line 222:
===== Text Message =====
===== Text Message =====
<pre>
<pre>
interface nsIDOMMozStkTextMessage : nsISupports
dictionary nsIDOMMozStkTextMessage
{
{
   /**
   /**
Line 228: Line 228:
   *
   *
   * @see TS 11.14, clause 12.15, Text String.
   * @see TS 11.14, clause 12.15, Text String.
   */  
   */
   readonly attribute DOMString text;
   DOMString text;


   /**
   /**
Line 236: Line 236:
   * @see TS 11.14, clause 12.6, Command Qualifier, Display Text, bit 1.
   * @see TS 11.14, clause 12.6, Command Qualifier, Display Text, bit 1.
   *
   *
   * High priority text shall be displayed on the screen immediately, except if  
   * High priority text shall be displayed on the screen immediately, except if
   * there is a conflict of priority level of alerting such as incoming calls  
   * there is a conflict of priority level of alerting such as incoming calls
   * or a low battery warning. In that situation, the resolution is left to  
   * or a low battery warning. In that situation, the resolution is left to
   * the terminal. If the command is rejected in spite of the high priority,  
   * the terminal. If the command is rejected in spite of the high priority,
   * the terminal shall inform the ICC with resultCode is
   * the terminal shall inform the ICC with resultCode is
   * TERMINAL_CRNTLY_UNABLE_TO_PROCESS in MozStkResponse.
   * TERMINAL_CRNTLY_UNABLE_TO_PROCESS in MozStkResponse.
Line 245: Line 245:
   * true: high priority
   * true: high priority
   * false: normal priority
   * false: normal priority
   */  
   */
   readonly attribute boolean isHighPriority;
   boolean isHighPriority;


   /**
   /**
Line 254: Line 254:
   *
   *
   * If this attribute is true, but user doesn't give any input within a period
   * If this attribute is true, but user doesn't give any input within a period
   * of time(said 30 secs), the terminal shall inform the ICC with resultCode  
   * of time(said 30 secs), the terminal shall inform the ICC with resultCode
   * is NO_RESPONSE_FROM_USER in MozStkResponse.
   * is NO_RESPONSE_FROM_USER in MozStkResponse.
   *
   *
   * true: Wait for user to clear message.
   * true: Wait for user to clear message.
   * false: clear message after a delay.
   * false: clear message after a delay.
   */  
   */
   readonly attribute boolean userClear;
   boolean userClear;


   /**
   /**
Line 267: Line 267:
   * @see TS 11.14, clause 12.43, Immediate response.
   * @see TS 11.14, clause 12.43, Immediate response.
   *
   *
   * When this attribute is true, the terminal shall immediately send  
   * When this attribute is true, the terminal shall immediately send
   * MozStkResponse with resultCode is OK.
   * MozStkResponse with resultCode is OK.
   *
   *
Line 273: Line 273:
   * false: otherwise.
   * false: otherwise.
   */
   */
   readonly attribute boolean responseNeeded;
   boolean responseNeeded;
};
};
</pre>
</pre>
Line 279: Line 279:
===== Menu =====
===== Menu =====
<pre>
<pre>
interface nsIDOMMozStkItem : nsISupports
dictionary nsIDOMMozStkItem
{
{
   /**
   /**
   * Identifier of item.
   * Identifier of item.
   *
   *
   * The identifier is a single byte between '01' and 'FF'. Each item shall  
   * The identifier is a single byte between '01' and 'FF'. Each item shall
   * have a unique identifier within an Item list.
   * have a unique identifier within an Item list.
   */  
   */
   readonly attribute unsigned short identifier;
   unsigned short identifier;
 
 
   /**
   /**
   * Text string of item.
   * Text string of item.
   */  
   */
   readonly attribute DOMString text;
   DOMString text;
};
};
</pre>
</pre>


<pre>
<pre>
interface nsIDOMMozStkMenu : nsISupports
dictionary nsIDOMMozStkMenu
{
{
  /**
  * STK Menu Presentation types.
  */
  const unsigned short TYPE_NOT_SPECIFIED      = 0x00;
  const unsigned short TYPE_DATA_VALUES        = 0x01;
  const unsigned short TYPE_NAVIGATION_OPTIONS = 0x03;
   /**
   /**
   * Array of nsIDOMMozStkItem.
   * Array of nsIDOMMozStkItem.
   *
   *
   * @see TS 11.14, clause 12.9
   * @see TS 11.14, clause 12.9
   */  
   */
   readonly attribute jsval items; // nsIDOMMozStkItem[]
   jsval items; // nsIDOMMozStkItem[]


   /**
   /**
   * Presentation type, one of TYPE_*.
   * Presentation type, one of TYPE_*.
   */  
   */
   readonly attribute unsigned short presentationType;
   unsigned short presentationType;
 
 
   /**
   /**
   * Title of the menu.
   * Title of the menu.
   */  
   */
   readonly attribute DOMString title;
   DOMString title;


   /**
   /**
   * Default item identifier of the menu.
   * Default item identifier of the menu.
   */  
   */
   readonly attribute unsigned short defaultItem;
   unsigned short defaultItem;


   /**
   /**
   * Help information available or not.
   * Help information available or not.
   *  
   *
   * @see TS 11.14, clause 12.6, Command Qualifier, SET UP MENU, bit 8.
   * @see TS 11.14, clause 12.6, Command Qualifier, SET UP MENU, bit 8.
   *
   *
   * true: help information available.
   * true: help information available.
   * false: no help information available.
   * false: no help information available.
   */  
   */
   readonly attribute boolean isHelpAvailable;
   boolean isHelpAvailable;
};
};
</pre>
</pre>
Line 342: Line 335:
===== Input =====
===== Input =====
<pre>
<pre>
interface nsIDOMMozStkInput : nsISupports
dictionary nsIDOMMozStkInput
{
{
   /**
   /**
   * Text for the ME to display in conjunction with asking the user to respond.
   * Text for the ME to display in conjunction with asking the user to respond.
   */  
   */
   readonly attribute DOMString text;
   DOMString text;


   /**
   /**
   * Minimum length of response.
   * Minimum length of response.
   */  
   */
   readonly attribute unsigned short minLength;
   unsigned short minLength;


   /**
   /**
   * Maximum length of response.
   * Maximum length of response.
   */
   */
   readonly attribute unsigned short maxLength;
   unsigned short maxLength;


   /**
   /**
   * Text for the ME to display, corresponds to a default text string offered  
   * Text for the ME to display, corresponds to a default text string offered
   * by the ICC.
   * by the ICC.
   */  
   */
   readonly attribute DOMString defaultText;
   DOMString defaultText;


   /**
   /**
Line 372: Line 365:
   * true: Alphabet set.
   * true: Alphabet set.
   * false: Digits only.
   * false: Digits only.
   */  
   */
   readonly attribute boolean isAlphabet;
   boolean isAlphabet;


   /**
   /**
Line 382: Line 375:
   * true: UCS2 alphabet.
   * true: UCS2 alphabet.
   * false: default SMS alphabet.
   * false: default SMS alphabet.
   */  
   */
   readonly attribute boolean isUCS2;
   boolean isUCS2;
 
 
   /**
   /**
   * Visibility of input.
   * Visibility of input.
Line 392: Line 385:
   * true: User input shall not be revealed in any way.
   * true: User input shall not be revealed in any way.
   * false: ME may echo user input on the display.
   * false: ME may echo user input on the display.
   */  
   */
   readonly attribute boolean hideInput;
   boolean hideInput;
 
 
   /**
   /**
   * Yes/No response is requested.
   * Yes/No response is requested.
Line 400: Line 393:
   * @see TS 11.14, clause 12.6, Command Qualifier, GET INKEY, bit 3.
   * @see TS 11.14, clause 12.6, Command Qualifier, GET INKEY, bit 3.
   *
   *
   * true: Yes/No response is requested. And character sets  
   * true: Yes/No response is requested, and character sets
   *      (Alphabet set and UCS2) are disabled.
   *      (Alphabet set and UCS2) are disabled.
   * false: Character sets (Alphabet set and UCS2) are enabled.
   * false: Character sets (Alphabet set and UCS2) are enabled.
   */  
   */
   readonly attribute boolean isYesNoRequested;
   boolean isYesNoRequested;


   /**
   /**
   * User input in Packed or unpacked format.
   * User input in packed or unpacked format.
   *
   *
   * @see TS 11.14, clause 12.6, Command Qualifier, GET INPUT, bit 4.
   * @see TS 11.14, clause 12.6, Command Qualifier, GET INPUT, bit 4.
Line 413: Line 406:
   * true: User input to be in SMS packed format.
   * true: User input to be in SMS packed format.
   * false: User input to be in unpacked format.
   * false: User input to be in unpacked format.
   */  
   */
   readonly attribute boolean isPacked;
   boolean isPacked;


   /**
   /**
   * Help information available or not.
   * Help information available or not.
   *  
   *
   * @see TS 11.14, clause 12.6, Command Qualifier, GET INPUT/GET INKEY, bit 8.
   * @see TS 11.14, clause 12.6, Command Qualifier, GET INPUT/GET INKEY, bit 8.
   *
   *
   * true: help information available.
   * true: help information available.
   * false: no help information available.
   * false: no help information available.
   */  
   */
   readonly attribute boolean isHelpAvailable;
   boolean isHelpAvailable;
};
};
</pre>
</pre>
Line 430: Line 423:
===== Browser Settings =====
===== Browser Settings =====
<pre>
<pre>
interface nsIDOMMozStkBrowserSetting : nsISupports
dictionary nsIDOMMozStkBrowserSetting
{
{
  /**
  * Browser launch mode.
  */
  const unsigned short MODE_LAUNCH_IF_NOT_ALREADY_LAUNCHED = 0x00;
  // 0x01 is not used.
  const unsigned short MODE_USING_EXISTING_BROWSER        = 0x02;
  const unsigned short MODE_USING_NEW_BROWSER              = 0x03;
   /**
   /**
   * Confirm message to launch browser.
   * Confirm message to launch browser.
   */  
  *
   readonly attribute nsIDOMMozStkTextMessage confirmMessage;
  * @see nsIDOMMozStkTextMessage for the detail specification of
  *      confirmMessage.
   */
   jsval confirmMessage;


   /**
   /**
   * The URL to be opened by browser.
   * The URL to be opened by browser.
   */  
   */
   readonly attribute DOMString url;
   DOMString url;


   /**
   /**
   * One of MODE_*.
   * One of STK_BROWSER_MODE_*.
   */  
  *
   readonly attribute unsigned short mode;
  * @see nsIDOMMozIccManager.STK_BROWSER_MODE_*
   */
   unsigned short mode;
};
};
</pre>
</pre>


===== Call Set Up =====
===== Set Up Call =====
<pre>
<pre>
interface nsIDOMMozStkSetUpCall : nsISupports
dictionary nsIDOMMozStkSetUpCall
{
{
   /**
   /**
   * The Dialling number.
   * The Dialling number.
   */  
   */
   readonly attribute DOMString address;
   DOMString address;


   /**
   /**
   * The text message used in user confirmation phase.
   * The text message used in user confirmation phase.
   */  
  *
   readonly attribute nsIDOMMozStkTextMessage confirmMessage;
  * @see nsIDOMMozStkTextMessage for the detail specification of
  *      confirmMessage.
   */
   jsval confirmMessage;


   /**
   /**
   * The text message used in call set up phase.
   * The text message used in call set up phase.
   */  
  *
   readonly attribute nsIDOMMozStkTextMessage callMessage;
  * @see nsIDOMMozStkTextMessage for the detail specification of
  *      callMessage.
   */
   jsval callMessage;
};
};
</pre>
</pre>
Confirmed users
266

edits