Confirmed users
1,340
edits
No edit summary |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
=== Web API === | === Web API === | ||
The change is quite simple | The change is quite simple -- navigator.mozMobileConnection becomes an array of nsIDOMMozMobileConnection obect, i.e. navigator.mozMobileConnections. The length of the array is actually the number of services provided on a device. And the index of the array is used as 'serviceId.' | ||
We don't modify the | We don't modify the existing interface, like nsIDOMMozMobileConnection, nsIDOMMozMobileConnectionInfo ...etc, to minimize the coding effort of gaia. | ||
interface nsIMozNavigatorMobileConnectionManager: nsISupports | |||
{ | |||
// An array of nsIDOMMozMobileConnection. | |||
readonly attribute jsval mozMobileConnections; | |||
}; | |||
interface nsIDOMMozMobileConnection : nsIDOMEventTarget | interface nsIDOMMozMobileConnection : nsIDOMEventTarget | ||
{ | { | ||
Line 54: | Line 60: | ||
[implicit_jscontext] attribute jsval onemergencycbmodechange; | [implicit_jscontext] attribute jsval onemergencycbmodechange; | ||
[implicit_jscontext] attribute jsval onotastatuschange; | [implicit_jscontext] attribute jsval onotastatuschange; | ||
[implicit_jscontext] attribute jsval | [implicit_jscontext] attribute jsval oniccchange; // Icc card is inserted or removed. | ||
}; | }; | ||
Line 100: | Line 106: | ||
var numberOfServices = window.navigator.mozMobileConnections.length; | var numberOfServices = window.navigator.mozMobileConnections.length; | ||
=== Implementation === | === Internal API and Implementation === | ||
Add clientId in the interface of nsIMobileConnectionProvider.idl and change the implementation of getVoiceConnectionInfo, getDataConnectionInfo, and getNetworkSelectionMode. | Add clientId in the interface of nsIMobileConnectionProvider.idl and change the implementation of getVoiceConnectionInfo, getDataConnectionInfo, and getNetworkSelectionMode. | ||
Line 120: | Line 118: | ||
void notifyEmergencyCbModeChanged(in boolean active, in unsigned long timeoutMs); | void notifyEmergencyCbModeChanged(in boolean active, in unsigned long timeoutMs); | ||
void notifyOtaStatusChanged(in DOMString status); | void notifyOtaStatusChanged(in DOMString status); | ||
void | void notifyIccChanged(); | ||
}; | }; | ||
Line 188: | Line 186: | ||
== Status == | == Status == | ||
* [https://bugzilla.mozilla.org/show_bug.cgi?id=814629 bug 814629] for WebMobileConnection API. ( | * [https://bugzilla.mozilla.org/show_bug.cgi?id=814629 bug 814629] for WebMobileConnection API. (Landed) | ||
* [https://bugzilla.mozilla.org/show_bug.cgi?id=818353 bug 818353] for adding subscriptId in backend implementation. ( | * [https://bugzilla.mozilla.org/show_bug.cgi?id=818353 bug 818353] for adding subscriptId in backend implementation. (Landed) | ||
[[Category:Web APIs]] |