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"
|
|
|
|
|
2013-05-30 03:04:48 -07:00
|
|
|
interface nsIDOMDOMRequest;
|
|
|
|
interface nsIDOMMozIccInfo;
|
|
|
|
interface nsIDOMWindow;
|
2013-03-06 01:53:08 -08:00
|
|
|
|
2014-01-28 15:15:00 -08:00
|
|
|
[scriptable, uuid(7c0ada3d-d8d4-493e-9243-fa3df39855e4)]
|
2013-03-06 01:53:08 -08:00
|
|
|
interface nsIIccListener : nsISupports
|
|
|
|
{
|
|
|
|
void notifyStkCommand(in DOMString aMessage);
|
|
|
|
void notifyStkSessionEnd();
|
2013-05-22 01:47:23 -07:00
|
|
|
void notifyCardStateChanged();
|
2013-05-30 03:04:48 -07:00
|
|
|
void notifyIccInfoChanged();
|
2013-03-06 01:53:08 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* XPCOM component (in the content process) that provides the ICC information.
|
|
|
|
*/
|
2013-09-30 02:34:38 -07:00
|
|
|
[scriptable, uuid(7c67ab92-52a3-4e11-995c-c0ad2f66c4cb)]
|
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.
|
|
|
|
*/
|
2013-09-30 02:34:38 -07:00
|
|
|
void registerIccMsg(in unsigned long clientId, in nsIIccListener listener);
|
|
|
|
void unregisterIccMsg(in unsigned long clientId, in nsIIccListener listener);
|
2013-03-06 01:53:08 -08:00
|
|
|
|
2013-05-30 03:04:48 -07:00
|
|
|
/**
|
|
|
|
* UICC Information
|
|
|
|
*/
|
2013-09-30 02:34:38 -07:00
|
|
|
nsIDOMMozIccInfo getIccInfo(in unsigned long clientId);
|
2013-05-30 03:04:48 -07:00
|
|
|
|
2013-05-22 01:47:23 -07:00
|
|
|
/**
|
|
|
|
* Card State
|
|
|
|
*/
|
2013-09-30 02:34:38 -07:00
|
|
|
DOMString getCardState(in unsigned long clientId);
|
2013-05-22 01:47:23 -07:00
|
|
|
|
2013-03-05 18:51:40 -08:00
|
|
|
/**
|
|
|
|
* STK interfaces.
|
|
|
|
*/
|
2013-09-30 02:34:38 -07:00
|
|
|
void sendStkResponse(in unsigned long clientId,
|
|
|
|
in nsIDOMWindow window,
|
|
|
|
in jsval command,
|
|
|
|
in jsval response);
|
|
|
|
void sendStkMenuSelection(in unsigned long clientId,
|
|
|
|
in nsIDOMWindow window,
|
2013-03-06 01:53:08 -08:00
|
|
|
in unsigned short itemIdentifier,
|
2013-09-30 02:34:38 -07:00
|
|
|
in boolean helpRequested);
|
|
|
|
void sendStkTimerExpiration(in unsigned long clientId,
|
|
|
|
in nsIDOMWindow window,
|
|
|
|
in jsval timer);
|
|
|
|
void sendStkEventDownload(in unsigned long clientId,
|
|
|
|
in nsIDOMWindow window,
|
|
|
|
in jsval event);
|
2013-03-06 01:53:08 -08:00
|
|
|
|
2013-04-10 20:19:36 -07:00
|
|
|
/**
|
|
|
|
* Card lock interfaces.
|
|
|
|
*/
|
2013-09-30 02:34:38 -07:00
|
|
|
nsIDOMDOMRequest getCardLockState(in unsigned long clientId,
|
|
|
|
in nsIDOMWindow window,
|
|
|
|
in DOMString lockType);
|
|
|
|
nsIDOMDOMRequest unlockCardLock(in unsigned long clientId,
|
|
|
|
in nsIDOMWindow window,
|
|
|
|
in jsval info);
|
|
|
|
nsIDOMDOMRequest setCardLock(in unsigned long clientId,
|
|
|
|
in nsIDOMWindow window,
|
|
|
|
in jsval info);
|
|
|
|
nsIDOMDOMRequest getCardLockRetryCount(in unsigned long clientId,
|
|
|
|
in nsIDOMWindow window,
|
|
|
|
in DOMString lockType);
|
2013-04-10 20:19:36 -07:00
|
|
|
|
2013-03-05 18:51:40 -08:00
|
|
|
/**
|
|
|
|
* Phonebook interfaces.
|
|
|
|
*/
|
2013-09-30 02:34:38 -07:00
|
|
|
nsIDOMDOMRequest readContacts(in unsigned long clientId,
|
|
|
|
in nsIDOMWindow window,
|
2013-03-05 18:51:40 -08:00
|
|
|
in DOMString contactType);
|
|
|
|
|
2013-09-30 02:34:38 -07:00
|
|
|
nsIDOMDOMRequest updateContact(in unsigned long clientId,
|
|
|
|
in nsIDOMWindow window,
|
2012-12-24 00:49:29 -08:00
|
|
|
in DOMString contactType,
|
2013-10-19 15:38:32 -07:00
|
|
|
in jsval contact,
|
2012-12-24 00:49:29 -08:00
|
|
|
in DOMString pin2);
|
|
|
|
|
2013-03-06 01:53:08 -08:00
|
|
|
/**
|
|
|
|
* Secure Card Icc communication channel
|
|
|
|
*/
|
2013-09-30 02:34:38 -07:00
|
|
|
nsIDOMDOMRequest iccOpenChannel(in unsigned long clientId,
|
|
|
|
in nsIDOMWindow window,
|
2013-03-06 01:53:08 -08:00
|
|
|
in DOMString aid);
|
|
|
|
|
2013-09-30 02:34:38 -07:00
|
|
|
nsIDOMDOMRequest iccExchangeAPDU(in unsigned long clientId,
|
|
|
|
in nsIDOMWindow window,
|
2013-03-06 01:53:08 -08:00
|
|
|
in long channel,
|
|
|
|
in jsval apdu);
|
|
|
|
|
2013-09-30 02:34:38 -07:00
|
|
|
nsIDOMDOMRequest iccCloseChannel(in unsigned long clientId,
|
|
|
|
in nsIDOMWindow window,
|
2013-03-06 01:53:08 -08:00
|
|
|
in long channel);
|
2014-01-28 15:15:00 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Helpers
|
|
|
|
*/
|
|
|
|
nsIDOMDOMRequest matchMvno(in unsigned long clientId,
|
|
|
|
in nsIDOMWindow window,
|
|
|
|
in DOMString mvnoType,
|
|
|
|
in DOMString mvnoData);
|
2013-03-06 01:53:08 -08:00
|
|
|
};
|