Bug 1110619 - Part 1: IDL Interface Changes. r=echen

--HG--
extra : rebase_source : 397f71ccf3f70a3c796a3098c39cdd47123db7b5
This commit is contained in:
Bevis Tseng 2015-11-10 15:29:36 +08:00
parent 57dcb65bb0
commit 686572f7d9
4 changed files with 84 additions and 3 deletions

View File

@ -9,7 +9,7 @@
"@mozilla.org/mobileconnection/gonkmobileconnectionservice;1"
%}
[scriptable, uuid(3a7b8d47-d1c6-44c3-a312-df73fda1161e)]
[scriptable, uuid(3c306f88-86bf-11e5-91af-3b2233acec65)]
interface nsIGonkMobileConnectionService : nsIMobileConnectionService
{
void notifyNetworkInfoChanged(in unsigned long clientId, in jsval networkInfo);
@ -248,4 +248,27 @@ interface nsIGonkMobileConnectionService : nsIMobileConnectionService
void notifyCdmaInfoRecAudioControl(in unsigned long clientId,
in short upLink,
in short downLink);
/**
* Notify Device Identities.
*
* @param aClientId
* The ID of radioInterface where this info is notified from.
* @param aImei
* Device IMEI, valid if GSM subscription is available.
* @param aImeisv
* Device IMEISV, valid if GSM subscription is available.
* @param aEsn
* Device ESN, valid if CDMA subscription is available.
* @param aMeid
* Device MEID, valid if CDMA subscription is available.
*
* Note: The value might be dummy like "000..." from modem
* if the corresponding subscription is not available.
*/
void notifyDeviceIdentitiesChanged(in unsigned long aClientId,
in DOMString aImei,
in DOMString aImeisv,
in DOMString aEsn,
in DOMString aMeid);
};

View File

@ -8,11 +8,12 @@ interface nsICellInfoListCallback;
interface nsIMobileCallForwardingOptions;
interface nsIMobileConnection;
interface nsIMobileConnectionInfo;
interface nsIMobileDeviceIdentities;
interface nsIMobileNetworkInfo;
interface nsINeighboringCellIdsCallback;
interface nsIVariant;
[scriptable, uuid(d6827b51-61a7-4b7c-8454-42d0cffc1829)]
[scriptable, uuid(8884b326-891c-11e5-a434-67def07c4a41)]
interface nsIMobileConnectionListener : nsISupports
{
/**
@ -102,6 +103,11 @@ interface nsIMobileConnectionListener : nsISupports
* Notify when network selection mode is changed.
*/
void notifyNetworkSelectionModeChanged();
/**
* Notify when device identities are changed.
*/
void notifyDeviceIdentitiesChanged();
};
%{C++
@ -165,7 +171,7 @@ already_AddRefed<nsIMobileConnectionService>
NS_CreateMobileConnectionService();
%}
[scriptable, uuid(d7173ff3-a8da-41c1-a976-440e5402b856)]
[scriptable, uuid(7a557116-8753-11e5-9f9b-6794b577c0a1)]
interface nsIMobileConnection : nsISupports
{
/*
@ -320,6 +326,11 @@ interface nsIMobileConnection : nsISupports
*/
readonly attribute long radioState;
/**
* Device Identities, including IMEI, IMEISV, ESN and MEID.
*/
readonly attribute nsIMobileDeviceIdentities deviceIdentities;
/**
* The network types supported by this radio.
*

View File

@ -0,0 +1,46 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
[scriptable, uuid(3fc79ece-8399-11e5-beff-6b8209cb93f6)]
interface nsIMobileDeviceIdentities : nsISupports
{
/**
* Device IMEI, including check digit.
*
* Valid if GSM subscription is available.
*
* Note: The value might be dummy like "000..." from modem if invalid.
*/
readonly attribute DOMString imei;
/**
* Device IMEISV.
*
* Valid if GSM subscription is available.
*
* Note: IMEISV is presented in 2-decimal digits.
* The value might be dummy like "00" from modem if invalid.
*/
readonly attribute DOMString imeisv;
/**
* Device ESN.
*
* Valid if CDMA subscription is available.
*
* Note: The value might be dummy like "000..." from modem if invalid.
*/
readonly attribute DOMString esn;
/**
* Device MEID.
*
* Valid if CDMA subscription is available.
*
* Note: The value might be dummy like "000..." from modem if invalid.
*/
readonly attribute DOMString meid;
};

View File

@ -27,6 +27,7 @@ XPIDL_SOURCES += [
'interfaces/nsIMobileCellInfo.idl',
'interfaces/nsIMobileConnectionInfo.idl',
'interfaces/nsIMobileConnectionService.idl',
'interfaces/nsIMobileDeviceIdentities.idl',
'interfaces/nsIMobileNetworkInfo.idl',
'interfaces/nsINeighboringCellInfo.idl',
]