2013-03-06 01:53:08 -08:00
|
|
|
/* 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"
|
|
|
|
|
|
|
|
interface nsIDOMWindow;
|
|
|
|
interface nsIDOMDOMRequest;
|
2012-12-24 00:49:29 -08:00
|
|
|
interface nsIDOMContact;
|
2013-03-06 01:53:08 -08:00
|
|
|
|
2013-05-22 01:47:23 -07:00
|
|
|
[scriptable, uuid(5902d9b0-c2be-11e2-8b8b-0800200c9a66)]
|
2013-03-06 01:53:08 -08:00
|
|
|
interface nsIIccListener : nsISupports
|
|
|
|
{
|
|
|
|
void notifyStkCommand(in DOMString aMessage);
|
|
|
|
void notifyStkSessionEnd();
|
2013-04-10 20:19:36 -07:00
|
|
|
void notifyIccCardLockError(in DOMString lockType,
|
|
|
|
in unsigned long retryCount);
|
2013-05-22 01:47:23 -07:00
|
|
|
void notifyCardStateChanged();
|
2013-03-06 01:53:08 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* XPCOM component (in the content process) that provides the ICC information.
|
|
|
|
*/
|
Bug 875710: Added getCardLockRetryCount to nsIIccProvider, r=vyang, sr=mounir
This patch adds getCardLockRetryCount to nsIIccProvider and its
implementations. This method allows callers to query the number
of remaining tries for unlocking a SIM-card lock. Supported locks
are 'pin', 'puk', 'pin2', 'puk2', 'nck', 'cck', and 'spck'. The
call returns a DOM request that returns the retry count in its
success handler, or signals an appropriate error.
Reading the retry count is an optional feature and may not be
supported for all lock types. In this case the DOM request receives
and error with the name GECKO_ERROR_NOT_SUPPORTED. For an invalid
lock type, the error name is GECKO_ERROR_GENERIC_FAILURE.
getCardLockRetryCount replaces retryCount in nsIDOMMobileConnection,
which is now deprecated.
--HG--
extra : rebase_source : d1d11612f836652dca85f7c701f09e7af962e3b7
2013-07-09 07:06:05 -07:00
|
|
|
[scriptable, uuid(7131dfbe-9a2c-434d-b6b8-3eebf491ce1a)]
|
2013-03-06 01:53:08 -08:00
|
|
|
interface nsIIccProvider : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Called when a content process registers receiving unsolicited messages from
|
|
|
|
* RadioInterfaceLayer in the chrome process. Only a content process that has
|
|
|
|
* the 'mobileconnection' permission is allowed to register.
|
|
|
|
*/
|
|
|
|
void registerIccMsg(in nsIIccListener listener);
|
|
|
|
void unregisterIccMsg(in nsIIccListener listener);
|
|
|
|
|
2013-05-22 01:47:23 -07:00
|
|
|
/**
|
|
|
|
* Card State
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString cardState;
|
|
|
|
|
2013-03-05 18:51:40 -08:00
|
|
|
/**
|
|
|
|
* STK interfaces.
|
|
|
|
*/
|
2013-03-06 01:53:08 -08:00
|
|
|
void sendStkResponse(in nsIDOMWindow window,
|
|
|
|
in jsval command,
|
|
|
|
in jsval response);
|
|
|
|
void sendStkMenuSelection(in nsIDOMWindow window,
|
|
|
|
in unsigned short itemIdentifier,
|
|
|
|
in boolean helpRequested);
|
|
|
|
void sendStkTimerExpiration(in nsIDOMWindow window,
|
|
|
|
in jsval timer);
|
|
|
|
void sendStkEventDownload(in nsIDOMWindow window,
|
|
|
|
in jsval event);
|
|
|
|
|
2013-04-10 20:19:36 -07:00
|
|
|
/**
|
|
|
|
* 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);
|
Bug 875710: Added getCardLockRetryCount to nsIIccProvider, r=vyang, sr=mounir
This patch adds getCardLockRetryCount to nsIIccProvider and its
implementations. This method allows callers to query the number
of remaining tries for unlocking a SIM-card lock. Supported locks
are 'pin', 'puk', 'pin2', 'puk2', 'nck', 'cck', and 'spck'. The
call returns a DOM request that returns the retry count in its
success handler, or signals an appropriate error.
Reading the retry count is an optional feature and may not be
supported for all lock types. In this case the DOM request receives
and error with the name GECKO_ERROR_NOT_SUPPORTED. For an invalid
lock type, the error name is GECKO_ERROR_GENERIC_FAILURE.
getCardLockRetryCount replaces retryCount in nsIDOMMobileConnection,
which is now deprecated.
--HG--
extra : rebase_source : d1d11612f836652dca85f7c701f09e7af962e3b7
2013-07-09 07:06:05 -07:00
|
|
|
nsIDOMDOMRequest getCardLockRetryCount(in nsIDOMWindow window, in DOMString lockType);
|
2013-04-10 20:19:36 -07:00
|
|
|
|
2013-03-05 18:51:40 -08:00
|
|
|
/**
|
|
|
|
* Phonebook interfaces.
|
|
|
|
*/
|
|
|
|
nsIDOMDOMRequest readContacts(in nsIDOMWindow window,
|
|
|
|
in DOMString contactType);
|
|
|
|
|
2012-12-24 00:49:29 -08:00
|
|
|
nsIDOMDOMRequest updateContact(in nsIDOMWindow window,
|
|
|
|
in DOMString contactType,
|
|
|
|
in nsIDOMContact contact,
|
|
|
|
in DOMString pin2);
|
|
|
|
|
2013-03-06 01:53:08 -08:00
|
|
|
/**
|
|
|
|
* Secure Card Icc communication channel
|
|
|
|
*/
|
|
|
|
nsIDOMDOMRequest iccOpenChannel(in nsIDOMWindow window,
|
|
|
|
in DOMString aid);
|
|
|
|
|
|
|
|
nsIDOMDOMRequest iccExchangeAPDU(in nsIDOMWindow window,
|
|
|
|
in long channel,
|
|
|
|
in jsval apdu);
|
|
|
|
|
|
|
|
nsIDOMDOMRequest iccCloseChannel(in nsIDOMWindow window,
|
|
|
|
in long channel);
|
|
|
|
};
|