Bug 874744 - Part 1: Move card state related attribute/event from mozMobileConnection to mozIccManager (IDL). r=allstars.chh. sr=sicking

This commit is contained in:
Edgar Chen 2013-05-22 16:47:23 +08:00
parent 968285e4dc
commit 2a90c4175d
4 changed files with 28 additions and 22 deletions

View File

@ -9,7 +9,7 @@ interface nsIDOMEventListener;
interface nsIDOMDOMRequest;
interface nsIDOMContact;
[scriptable, builtinclass, uuid(b4e16bb0-a258-11e2-9e96-0800200c9a66)]
[scriptable, builtinclass, uuid(d21b7070-c2bc-11e2-8b8b-0800200c9a66)]
interface nsIDOMMozIccManager : nsIDOMEventTarget
{
/**
@ -275,6 +275,22 @@ interface nsIDOMMozIccManager : nsIDOMEventTarget
*/
[implicit_jscontext] attribute jsval onstksessionend;
// UICC Card State.
/**
* Indicates the state of the device's ICC card.
*
* Possible values: null, 'unknown', 'absent', 'pinRequired', 'pukRequired',
* 'networkLocked', 'corporateLocked', 'serviceProviderLocked', 'ready'.
*/
readonly attribute DOMString cardState;
/**
* The 'cardstatechange' event is notified when the 'cardState' attribute
* changes value.
*/
[implicit_jscontext] attribute jsval oncardstatechange;
// UICC Card Lock interfaces.
/**

View File

@ -8,19 +8,20 @@ interface nsIDOMWindow;
interface nsIDOMDOMRequest;
interface nsIDOMContact;
[scriptable, uuid(dca08580-a25a-11e2-9e96-0800200c9a66)]
[scriptable, uuid(5902d9b0-c2be-11e2-8b8b-0800200c9a66)]
interface nsIIccListener : nsISupports
{
void notifyStkCommand(in DOMString aMessage);
void notifyStkSessionEnd();
void notifyIccCardLockError(in DOMString lockType,
in unsigned long retryCount);
void notifyCardStateChanged();
};
/**
* XPCOM component (in the content process) that provides the ICC information.
*/
[scriptable, uuid(e60ec460-a25a-11e2-9e96-0800200c9a66)]
[scriptable, uuid(77487bf0-c2be-11e2-8b8b-0800200c9a66)]
interface nsIIccProvider : nsISupports
{
/**
@ -31,6 +32,11 @@ interface nsIIccProvider : nsISupports
void registerIccMsg(in nsIIccListener listener);
void unregisterIccMsg(in nsIIccListener listener);
/**
* Card State
*/
readonly attribute DOMString cardState;
/**
* STK interfaces.
*/

View File

@ -12,7 +12,7 @@ interface nsIDOMMozMobileNetworkInfo;
interface nsIDOMMozMobileCellInfo;
interface nsIDOMMozMobileCFInfo;
[scriptable, builtinclass, uuid(c7fdf0f0-a740-11e2-9e96-0800200c9a66)]
[scriptable, builtinclass, uuid(dc010230-c2bc-11e2-8b8b-0800200c9a66)]
interface nsIDOMMozMobileConnection : nsIDOMEventTarget
{
const long ICC_SERVICE_CLASS_VOICE = (1 << 0);
@ -47,14 +47,6 @@ interface nsIDOMMozMobileConnection : nsIDOMEventTarget
readonly attribute DOMString lastKnownNetwork;
readonly attribute DOMString lastKnownHomeNetwork;
/**
* Indicates the state of the device's ICC card.
*
* Possible values: null, 'unknown', 'absent', 'pinRequired', 'pukRequired',
* 'networkLocked', 'corporateLocked', 'serviceProviderLocked', 'ready'.
*/
readonly attribute DOMString cardState;
/**
* Indicates the number of retries remaining when cardState equals 'pinRequired'
* or 'pukRequired'. 0 denotes the retry count is unavailable.
@ -240,12 +232,6 @@ interface nsIDOMMozMobileConnection : nsIDOMEventTarget
*/
nsIDOMDOMRequest getCallWaitingOption();
/**
* The 'cardstatechange' event is notified when the 'cardState' attribute
* changes value.
*/
[implicit_jscontext] attribute jsval oncardstatechange;
/**
* The 'iccinfochange' event is notified whenever the icc info object
* changes.

View File

@ -11,12 +11,11 @@ interface nsIDOMMozMobileCFInfo;
interface nsIDOMDOMRequest;
interface nsIDOMWindow;
[scriptable, uuid(d09099b0-a25a-11e2-9e96-0800200c9a66)]
[scriptable, uuid(529864f0-c2be-11e2-8b8b-0800200c9a66)]
interface nsIMobileConnectionListener : nsISupports
{
void notifyVoiceChanged();
void notifyDataChanged();
void notifyCardStateChanged();
void notifyIccInfoChanged();
void notifyUssdReceived(in DOMString message,
in boolean sessionEnded);
@ -33,7 +32,7 @@ interface nsIMobileConnectionListener : nsISupports
* XPCOM component (in the content process) that provides the mobile
* network information.
*/
[scriptable, uuid(b9605230-a25a-11e2-9e96-0800200c9a66)]
[scriptable, uuid(66e7ac90-c2be-11e2-8b8b-0800200c9a66)]
interface nsIMobileConnectionProvider : nsISupports
{
/**
@ -44,7 +43,6 @@ interface nsIMobileConnectionProvider : nsISupports
void registerMobileConnectionMsg(in nsIMobileConnectionListener listener);
void unregisterMobileConnectionMsg(in nsIMobileConnectionListener listener);
readonly attribute DOMString cardState;
readonly attribute long retryCount;
readonly attribute nsIDOMMozMobileICCInfo iccInfo;
readonly attribute nsIDOMMozMobileConnectionInfo voiceConnectionInfo;