WebAPI/WebSTK: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 5: Line 5:
* These interface will be added in WebMobileConnection
* These interface will be added in WebMobileConnection


==== Event handler for STK events ====
== Event handler for STK events ==
<pre>
<pre>
   /**
   /**
Line 20: Line 20:
</pre>
</pre>


==== Send Response from ME to SIM ====
== Send Response from ME to SIM ==
<pre>
<pre>
   /**
   /**
Line 90: Line 90:


==== Command Parameter ====
==== Command Parameter ====
<pre>
<pre>
interface nsIDOMMozStkCmdParameter : nsISupports
interface nsIDOMMozStkCmdParameter : nsISupports
Line 107: Line 106:


   /**
   /**
   * Used as command parameter when typeOfCommand in nsIDOMMozStkCommand is  
   * Used when typeOfCommand in nsIDOMMozStkCommand is  
   * GET_INKEY or GET_INPUT.
   * GET_INKEY or GET_INPUT.
   */  
   */  
Line 113: Line 112:
   
   
   /**
   /**
   * Used as command parameter when typeOfCommand in nsIDOMMozStkCommand is  
   * Used when typeOfCommand in nsIDOMMozStkCommand is  
   * LAUNCH_BROWSER.
   * LAUNCH_BROWSER.
   */  
   */  
Line 119: Line 118:
   
   
   /**
   /**
   * Used as command parameter when typeOfCommand in nsIDOMMozStkCommand is  
   * Used when typeOfCommand in nsIDOMMozStkCommand is  
   * SET_UP_CALL.
   * SET_UP_CALL.
   */  
   */  
   readonly attribute nsIDOMMozStkSetUpCall setup;
   readonly attribute nsIDOMMozStkSetUpCall setup;
};
};
</pre>
</pre>


Line 188: Line 185:
interface nsIDOMMozStkMenu : nsISupports
interface nsIDOMMozStkMenu : nsISupports
{
{
  /**
  * 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.
Line 196: Line 200:


   /**
   /**
   * Presentation type, one of STK_MENU_PRESENTATION_TYPE_*.
   * Presentation type, one of TYPE_*.
   */  
   */  
   readonly attribute unsigned short presentationType;
   readonly attribute unsigned short presentationType;
Line 309: Line 313:
};
};
</pre>
</pre>
== From ME to SIM ==  
== From ME to SIM ==  
=== STK response ===
=== STK response ===
Line 433: Line 435:


</pre>
</pre>
= TODO =


= Examples =
= Examples =
* TODO: STK constants.
== Show STK menu ==
== Show STK menu ==
<pre>
<pre>
Line 443: Line 442:
   var details = command.cmdDetails;
   var details = command.cmdDetails;
   switch (details.typeOfCommand) {
   switch (details.typeOfCommand) {
     case STK_SET_UP_MENU:
     case MozStkProactiveCommand.STK_SET_UP_MENU:
         var menu = command.param.menu;
         var menu = command.param.menu;
         // create a Menu-like UI according to 'menu'
         // create a Menu-like UI according to 'menu'
Line 457: Line 456:
// and assume it's a SET_UP_MENU command.
// and assume it's a SET_UP_MENU command.
var response = new MozStkResponse(command);
var response = new MozStkResponse(command);
response.resultCode = STK_RESULT_OK;
response.resultCode = MozStkResultCode.STK_RESULT_OK;
// 'id' is got from the chosen item identifier (menu.item[].identifier)
// 'id' is got from the chosen item identifier (menu.item[].identifier)
response.menuSelection(id);
response.menuSelection(id);
mobileConnection.sendStkResponse(response);
mobileConnection.sendStkResponse(response);
</pre>
</pre>
= TODO =
- Icon
- Duration
- Tone
- Command Qualifier in CALL_SET_UP
Confirmed users
266

edits

Navigation menu