WebAPI/WebMobileConnection/Multi-SIM: Difference between revisions

Line 84: Line 84:


=== Implementation ===
=== Implementation ===
Replace nsIMozNavigatorMobileConnection by nsIMozNavigatorMobileConnectionManager in nsINavigatorMobileConnection.idl
mozMobileConnection becomes an array of nsIDOMMozMobileConnection in nsINavigatorMobileConnection.idl


  interface nsIMozNavigatorMobileConnectionManager: nsISupports
  interface nsIMozNavigatorMobileConnectionManager: nsISupports
  {
  {
   readonly attribute nsIDOMMozMobileConnectionManager mozMobileConnectionManager;
  // An array of nsIDOMMozMobileConnection.
   readonly attribute jsval mozMobileConnections;
  };
  };


Add subscriptionId in the interface of nsIMobileConnectionProvider.idl and change the implementation of getCardState, getIccInfo, getVoiceConnectionInfo, getDataConnectionInfo, and getNetworkSelectionMode.
Add subscriptionId in the interface of nsIMobileConnectionProvider.idl and change the implementation of getVoiceConnectionInfo, getDataConnectionInfo, and getNetworkSelectionMode.


  interface nsIMobileConnectionProvider: nsISupports
  interface nsIMobileConnectionProvider: nsISupports
  {
  {
   void registerMobileConnectionMsg(in unsigned long subscriptionId);
   void registerMobileConnectionMsg(in unsigned long serviceId, in nsIMobileConnectionListener listener);
   DOMString getCardState(in unsigned long subscriptionId);
   void unregisterMobileConnectionMsg(in unsigned long serviceId, in nsIMobileConnectionListener listener);
   nsIDOMMozMobileICCInfo getIccInfo(in unsigned long subscriptionId);
    
   nsIDOMMozMobileConnectionInfo getVoiceConnectionInfo(in unsigned long subscriptionId);
   nsIDOMMozMobileConnectionInfo getVoiceConnectionInfo(in unsigned long subscriptionId);
   nsIDOMMozMobileConnectionInfo getDataConnectionInfo(in unsigned long subscriptionId);
   nsIDOMMozMobileConnectionInfo getDataConnectionInfo(in unsigned long subscriptionId);
   DOMString getNetworkSelectionMode(in unsigned long subscriptionId);
   DOMString getNetworkSelectionMode(in unsigned long subscriptionId);
   nsIDOMDOMRequest getNetworks(in nsIDOMWindow window, in unsigned long subscriptionId);
 
   nsIDOMDOMRequest selectNetwork(in nsIDOMWindow window, in nsIDOMMozMobileNetworkInfo network, in unsigned long subscriptionId);
   nsIDOMDOMRequest getNetworks(in unsigned long subscriptionId, in nsIDOMWindow window);
   nsIDOMDOMRequest selectNetworkAutomatically(in nsIDOMWindow window, in unsigned long subscriptionId);
   nsIDOMDOMRequest selectNetwork(in unsigned long subscriptionId, in nsIDOMWindow window, in nsIDOMMozMobileNetworkInfo network);
  nsIDOMDOMRequest getCardLock(in nsIDOMWindow window, in DOMString lockType, in unsigned long subscriptionId);
   nsIDOMDOMRequest selectNetworkAutomatically(in unsigned long subscriptionId, in nsIDOMWindow window);
   nsIDOMDOMRequest unlockCardLock(in nsIDOMWindow window, in jsval info, in unsigned long subscriptionId);
    
   nsIDOMDOMRequest setCardLock(in nsIDOMWindow window, in jsval info, in unsigned long subscriptionId);
   nsIDOMDOMRequest sendMMI(in unsigned long subscriptionId, in nsIDOMWindow window, in DOMString mmi);
  nsIDOMDOMRequest sendMMI(in nsIDOMWindow window, in DOMString mmi, in unsigned long subscriptionId);
   nsIDOMDOMRequest cancelMMI(in unsigned long subscriptionId, in nsIDOMWindow window);
   nsIDOMDOMRequest cancelMMI(in nsIDOMWindow window, in unsigned long subscriptionId);
  void sendStkResponse(in nsIDOMWindow window, in jsval command, in jsval response);
  void sendStkMenuSelection(in nsIDOMWindow   window, in unsigned short itemIdentifier, in boolean helpRequested);
  void sendStkEventDownload(in nsIDOMWindow window, in jsval event);
  };
  };


The data structures of cardState, iccInfo, voiceConnectionInfo, dataConnectionInfo, and networkSelectionMode are changed to be the array format in RILContentHelper.js for storing the information among different SIM.
The data structures of voiceConnectionInfo, dataConnectionInfo, and networkSelectionMode may need to change to be an array format in RILContentHelper.js for storing the information among different SIM.


   // nsIRILContentHelper
   // nsIRILContentHelper
  cardState:            [],
  iccInfo:              [],
   voiceConnectionInfo:  [],
   voiceConnectionInfo:  [],
   dataConnectionInfo:  [],
   dataConnectionInfo:  [],
Confirmed users
258

edits