Confirmed users
1,340
edits
m (→Web API: navigator.mozMobileConnections) |
No edit summary |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 5: | Line 5: | ||
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.' | 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 | interface nsIMozNavigatorMobileConnectionManager: nsISupports | ||
| Line 60: | 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 106: | 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 126: | 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 194: | 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]] | |||