diff --git a/dom/icc/interfaces/moz.build b/dom/icc/interfaces/moz.build index 8bf7a354d8a..caf6a9d6b5c 100644 --- a/dom/icc/interfaces/moz.build +++ b/dom/icc/interfaces/moz.build @@ -6,7 +6,7 @@ XPIDL_SOURCES += [ 'SimToolKit.idl', - 'nsIDOMICCCardLockErrorEvent.idl', + 'nsIDOMIccCardLockErrorEvent.idl', 'nsIDOMIccManager.idl', 'nsIIccProvider.idl', 'nsINavigatorIccManager.idl', diff --git a/dom/icc/interfaces/nsIDOMICCCardLockErrorEvent.idl b/dom/icc/interfaces/nsIDOMIccCardLockErrorEvent.idl similarity index 73% rename from dom/icc/interfaces/nsIDOMICCCardLockErrorEvent.idl rename to dom/icc/interfaces/nsIDOMIccCardLockErrorEvent.idl index 964f98e2aa4..50fb98aecc4 100644 --- a/dom/icc/interfaces/nsIDOMICCCardLockErrorEvent.idl +++ b/dom/icc/interfaces/nsIDOMIccCardLockErrorEvent.idl @@ -4,20 +4,20 @@ #include "nsIDOMEvent.idl" -[scriptable, builtinclass, uuid(05d269bc-7049-4df8-b72f-4318aaee54de)] -interface nsIDOMICCCardLockErrorEvent : nsIDOMEvent +[scriptable, builtinclass, uuid(47d4db10-a258-11e2-9e96-0800200c9a66)] +interface nsIDOMIccCardLockErrorEvent : nsIDOMEvent { readonly attribute DOMString lockType; readonly attribute long retryCount; - [noscript] void initICCCardLockErrorEvent(in DOMString aType, + [noscript] void initIccCardLockErrorEvent(in DOMString aType, in boolean aCanBubble, in boolean aCancelable, in DOMString aLockType, in int32_t aRetryCount); }; -dictionary ICCCardLockErrorEventInit : EventInit +dictionary IccCardLockErrorEventInit : EventInit { DOMString lockType; long retryCount; diff --git a/dom/icc/interfaces/nsIDOMIccManager.idl b/dom/icc/interfaces/nsIDOMIccManager.idl index a5c575f0db2..540ee103881 100644 --- a/dom/icc/interfaces/nsIDOMIccManager.idl +++ b/dom/icc/interfaces/nsIDOMIccManager.idl @@ -9,7 +9,7 @@ interface nsIDOMEventListener; interface nsIDOMDOMRequest; interface nsIDOMContact; -[scriptable, builtinclass, uuid(fcc1971a-ddb7-4b38-8474-25bef7e5bf40)] +[scriptable, builtinclass, uuid(b4e16bb0-a258-11e2-9e96-0800200c9a66)] interface nsIDOMMozIccManager : nsIDOMEventTarget { /** @@ -275,6 +275,147 @@ interface nsIDOMMozIccManager : nsIDOMEventTarget */ [implicit_jscontext] attribute jsval onstksessionend; + // UICC Card Lock interfaces. + + /** + * Find out about the status of an ICC lock (e.g. the PIN lock). + * + * @param lockType + * Identifies the lock type, e.g. "pin" for the PIN lock, "fdn" for + * the FDN lock. + * + * @return a DOM Request. + * The request's result will be an object containing + * information about the specified lock's status, + * e.g. {lockType: "pin", enabled: true}. + */ + nsIDOMDOMRequest getCardLock(in DOMString lockType); + + /** + * Unlock a card lock. + * + * @param info + * An object containing the information necessary to unlock + * the given lock. At a minimum, this object must have a + * "lockType" attribute which specifies the type of lock, e.g. + * "pin" for the PIN lock. Other attributes are dependent on + * the lock type. + * + * Examples: + * + * (1) Unlocking the PIN: + * + * unlockCardLock({lockType: "pin", + * pin: "..."}); + * + * (2) Unlocking the PUK and supplying a new PIN: + * + * unlockCardLock({lockType: "puk", + * puk: "...", + * newPin: "..."}); + * + * (3) Network depersonalization. Unlocking the network control key (NCK). + * + * unlockCardLock({lockType: "nck", + * pin: "..."}); + * + * (4) Corporate depersonalization. Unlocking the corporate control key (CCK). + * + * unlockCardLock({lockType: "cck", + * pin: "..."}); + * + * (5) Service Provider depersonalization. Unlocking the service provider + * control key (SPCK). + * + * unlockCardLock({lockType: "spck", + * pin: "..."}); + * + * @return a nsIDOMDOMRequest. + * The request's result will be an object containing + * information about the unlock operation. + * + * Examples: + * + * (1) Unlocking failed: + * + * { + * lockType: "pin", + * success: false, + * retryCount: 2 + * } + * + * (2) Unlocking succeeded: + * + * { + * lockType: "pin", + * success: true + * } + */ + nsIDOMDOMRequest unlockCardLock(in jsval info); + + /** + * Modify the state of a card lock. + * + * @param info + * An object containing information about the lock and + * how to modify its state. At a minimum, this object + * must have a "lockType" attribute which specifies the + * type of lock, e.g. "pin" for the PIN lock. Other + * attributes are dependent on the lock type. + * + * Examples: + * + * (1a) Disabling the PIN lock: + * + * setCardLock({lockType: "pin", + * pin: "...", + * enabled: false}); + * + * (1b) Disabling the FDN lock: + * + * setCardLock({lockType: "fdn", + * pin2: "...", + * enabled: false}); + * + * (2) Changing the PIN: + * + * setCardLock({lockType: "pin", + * pin: "...", + * newPin: "..."}); + * + * @return a nsIDOMDOMRequest. + * The request's result will be an object containing + * information about the operation. + * + * Examples: + * + * (1) Enabling/Disabling card lock failed or change card lock failed. + * + * { + * lockType: "pin", + * success: false, + * retryCount: 2 + * } + * + * (2) Enabling/Disabling card lock succeed or change card lock succeed. + * + * { + * lockType: "pin", + * success: true + * } + */ + nsIDOMDOMRequest setCardLock(in jsval info); + + /** + * The 'icccardlockerror' event is notified whenever 'unlockCardLock' or + * 'setCardLock' fails. + * + * The result will be an object containing information + * about the specified lock's status, + * e.g. {lockType: "pin", retryCount: 2}. + */ + [implicit_jscontext] attribute jsval onicccardlockerror; + // UICC Phonebook Interfaces. /** diff --git a/dom/icc/interfaces/nsIIccProvider.idl b/dom/icc/interfaces/nsIIccProvider.idl index e601e5ec07c..3c42f9a7db1 100644 --- a/dom/icc/interfaces/nsIIccProvider.idl +++ b/dom/icc/interfaces/nsIIccProvider.idl @@ -8,17 +8,19 @@ interface nsIDOMWindow; interface nsIDOMDOMRequest; interface nsIDOMContact; -[scriptable, uuid(f383a42b-0961-4bb0-b45e-dbc345d59237)] +[scriptable, uuid(dca08580-a25a-11e2-9e96-0800200c9a66)] interface nsIIccListener : nsISupports { void notifyStkCommand(in DOMString aMessage); void notifyStkSessionEnd(); + void notifyIccCardLockError(in DOMString lockType, + in unsigned long retryCount); }; /** * XPCOM component (in the content process) that provides the ICC information. */ -[scriptable, uuid(041aee4f-fad0-4ed8-a11c-774b1aedd09e)] +[scriptable, uuid(e60ec460-a25a-11e2-9e96-0800200c9a66)] interface nsIIccProvider : nsISupports { /** @@ -43,6 +45,13 @@ interface nsIIccProvider : nsISupports void sendStkEventDownload(in nsIDOMWindow window, in jsval event); + /** + * Card lock interfaces. + */ + nsIDOMDOMRequest getCardLockState(in nsIDOMWindow window, in DOMString lockType); + nsIDOMDOMRequest unlockCardLock(in nsIDOMWindow window, in jsval info); + nsIDOMDOMRequest setCardLock(in nsIDOMWindow window, in jsval info); + /** * Phonebook interfaces. */ diff --git a/dom/network/interfaces/nsIDOMMobileConnection.idl b/dom/network/interfaces/nsIDOMMobileConnection.idl index 24af2915f88..02c4ee6e117 100644 --- a/dom/network/interfaces/nsIDOMMobileConnection.idl +++ b/dom/network/interfaces/nsIDOMMobileConnection.idl @@ -12,7 +12,7 @@ interface nsIDOMMozMobileNetworkInfo; interface nsIDOMMozMobileCellInfo; interface nsIDOMMozMobileCFInfo; -[scriptable, builtinclass, uuid(2566dcb8-c82f-4420-a807-0806bd01a3b4)] +[scriptable, builtinclass, uuid(c7fdf0f0-a740-11e2-9e96-0800200c9a66)] interface nsIDOMMozMobileConnection : nsIDOMEventTarget { const long ICC_SERVICE_CLASS_VOICE = (1 << 0); @@ -124,135 +124,6 @@ interface nsIDOMMozMobileConnection : nsIDOMEventTarget */ nsIDOMDOMRequest selectNetworkAutomatically(); - /** - * Find out about the status of an ICC lock (e.g. the PIN lock). - * - * @param lockType - * Identifies the lock type, e.g. "pin" for the PIN lock, "fdn" for - * the FDN lock. - * - * @return a DOM Request. - * The request's result will be an object containing - * information about the specified lock's status, - * e.g. {lockType: "pin", enabled: true}. - */ - nsIDOMDOMRequest getCardLock(in DOMString lockType); - - /** - * Unlock a card lock. - * - * @param info - * An object containing the information necessary to unlock - * the given lock. At a minimum, this object must have a - * "lockType" attribute which specifies the type of lock, e.g. - * "pin" for the PIN lock. Other attributes are dependent on - * the lock type. - * - * Examples: - * - * (1) Unlocking the PIN: - * - * unlockCardLock({lockType: "pin", - * pin: "..."}); - * - * (2) Unlocking the PUK and supplying a new PIN: - * - * unlockCardLock({lockType: "puk", - * puk: "...", - * newPin: "..."}); - * - * (3) Network depersonalization. Unlocking the network control key (NCK). - * - * unlockCardLock({lockType: "nck", - * pin: "..."}); - * - * (4) Corporate depersonalization. Unlocking the corporate control key (CCK). - * - * unlockCardLock({lockType: "cck", - * pin: "..."}); - * - * (5) Service Provider depersonalization. Unlocking the service provider - * control key (SPCK). - * - * unlockCardLock({lockType: "spck", - * pin: "..."}); - * - * @return a nsIDOMDOMRequest. - * The request's result will be an object containing - * information about the unlock operation. - * - * Examples: - * - * (1) Unlocking failed: - * - * { - * lockType: "pin", - * success: false, - * retryCount: 2 - * } - * - * (2) Unlocking succeeded: - * - * { - * lockType: "pin", - * success: true - * } - */ - nsIDOMDOMRequest unlockCardLock(in jsval info); - - /** - * Modify the state of a card lock. - * - * @param info - * An object containing information about the lock and - * how to modify its state. At a minimum, this object - * must have a "lockType" attribute which specifies the - * type of lock, e.g. "pin" for the PIN lock. Other - * attributes are dependent on the lock type. - * - * Examples: - * - * (1a) Disabling the PIN lock: - * - * setCardLock({lockType: "pin", - * pin: "...", - * enabled: false}); - * - * (1b) Disabling the FDN lock: - * - * setCardLock({lockType: "fdn", - * pin2: "...", - * enabled: false}); - * - * (2) Changing the PIN: - * - * setCardLock({lockType: "pin", - * pin: "...", - * newPin: "..."}); - * - * @return a nsIDOMDOMRequest. - * The request's result will be an object containing - * information about the operation. - * - * Examples: - * - * (1) Enabling/Disabling card lock failed or change card lock failed. - * - * { - * lockType: "pin", - * success: false, - * retryCount: 2 - * } - * - * (2) Enabling/Disabling card lock succeed or change card lock succeed. - * - * { - * lockType: "pin", - * success: true - * } - */ - nsIDOMDOMRequest setCardLock(in jsval info); - /** * Send a MMI message. * @@ -405,12 +276,6 @@ interface nsIDOMMozMobileConnection : nsIDOMEventTarget */ [implicit_jscontext] attribute jsval ondataerror; - /** - * The 'icccardlockerror' event is notified whenever 'unlockCardLock' or - * 'setCardLock' fails. - */ - [implicit_jscontext] attribute jsval onicccardlockerror; - /** * The 'oncfstatechange' event is notified whenever the call forwarding * state changes. diff --git a/dom/network/interfaces/nsIMobileConnectionProvider.idl b/dom/network/interfaces/nsIMobileConnectionProvider.idl index 9d8608e4997..ddba41fb315 100644 --- a/dom/network/interfaces/nsIMobileConnectionProvider.idl +++ b/dom/network/interfaces/nsIMobileConnectionProvider.idl @@ -11,7 +11,7 @@ interface nsIDOMMozMobileCFInfo; interface nsIDOMDOMRequest; interface nsIDOMWindow; -[scriptable, uuid(d919e279-b0e4-4bc0-8464-f5b37aa41484)] +[scriptable, uuid(d09099b0-a25a-11e2-9e96-0800200c9a66)] interface nsIMobileConnectionListener : nsISupports { void notifyVoiceChanged(); @@ -21,8 +21,6 @@ interface nsIMobileConnectionListener : nsISupports void notifyUssdReceived(in DOMString message, in boolean sessionEnded); void notifyDataError(in DOMString message); - void notifyIccCardLockError(in DOMString lockType, - in unsigned long retryCount); void notifyCFStateChange(in boolean success, in unsigned short action, in unsigned short reason, @@ -35,7 +33,7 @@ interface nsIMobileConnectionListener : nsISupports * XPCOM component (in the content process) that provides the mobile * network information. */ -[scriptable, uuid(0abc25f7-372e-4398-8b49-ae8fcdb575d3)] +[scriptable, uuid(b9605230-a25a-11e2-9e96-0800200c9a66)] interface nsIMobileConnectionProvider : nsISupports { /** @@ -57,10 +55,6 @@ interface nsIMobileConnectionProvider : nsISupports nsIDOMDOMRequest selectNetwork(in nsIDOMWindow window, in nsIDOMMozMobileNetworkInfo network); nsIDOMDOMRequest selectNetworkAutomatically(in nsIDOMWindow window); - nsIDOMDOMRequest getCardLock(in nsIDOMWindow window, in DOMString lockType); - nsIDOMDOMRequest unlockCardLock(in nsIDOMWindow window, in jsval info); - nsIDOMDOMRequest setCardLock(in nsIDOMWindow window, in jsval info); - nsIDOMDOMRequest sendMMI(in nsIDOMWindow window, in DOMString mmi); nsIDOMDOMRequest cancelMMI(in nsIDOMWindow window); diff --git a/js/xpconnect/src/event_impl_gen.conf.in b/js/xpconnect/src/event_impl_gen.conf.in index 7e072904cf1..c0b5709421e 100644 --- a/js/xpconnect/src/event_impl_gen.conf.in +++ b/js/xpconnect/src/event_impl_gen.conf.in @@ -34,7 +34,7 @@ simple_events = [ 'CallEvent', 'CFStateChangeEvent', 'DataErrorEvent', - 'ICCCardLockErrorEvent', + 'IccCardLockErrorEvent', 'MozWifiStatusChangeEvent', 'MozWifiConnectionInfoEvent', 'MozCellBroadcastEvent',