michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIDOMDOMRequest; michael@0: interface nsIDOMMozIccInfo; michael@0: interface nsIDOMWindow; michael@0: michael@0: [scriptable, uuid(7c0ada3d-d8d4-493e-9243-fa3df39855e4)] michael@0: interface nsIIccListener : nsISupports michael@0: { michael@0: void notifyStkCommand(in DOMString aMessage); michael@0: void notifyStkSessionEnd(); michael@0: void notifyCardStateChanged(); michael@0: void notifyIccInfoChanged(); michael@0: }; michael@0: michael@0: /** michael@0: * XPCOM component (in the content process) that provides the ICC information. michael@0: */ michael@0: [scriptable, uuid(7c67ab92-52a3-4e11-995c-c0ad2f66c4cb)] michael@0: interface nsIIccProvider : nsISupports michael@0: { michael@0: /** michael@0: * Called when a content process registers receiving unsolicited messages from michael@0: * RadioInterfaceLayer in the chrome process. Only a content process that has michael@0: * the 'mobileconnection' permission is allowed to register. michael@0: */ michael@0: void registerIccMsg(in unsigned long clientId, in nsIIccListener listener); michael@0: void unregisterIccMsg(in unsigned long clientId, in nsIIccListener listener); michael@0: michael@0: /** michael@0: * UICC Information michael@0: */ michael@0: nsIDOMMozIccInfo getIccInfo(in unsigned long clientId); michael@0: michael@0: /** michael@0: * Card State michael@0: */ michael@0: DOMString getCardState(in unsigned long clientId); michael@0: michael@0: /** michael@0: * STK interfaces. michael@0: */ michael@0: void sendStkResponse(in unsigned long clientId, michael@0: in nsIDOMWindow window, michael@0: in jsval command, michael@0: in jsval response); michael@0: void sendStkMenuSelection(in unsigned long clientId, michael@0: in nsIDOMWindow window, michael@0: in unsigned short itemIdentifier, michael@0: in boolean helpRequested); michael@0: void sendStkTimerExpiration(in unsigned long clientId, michael@0: in nsIDOMWindow window, michael@0: in jsval timer); michael@0: void sendStkEventDownload(in unsigned long clientId, michael@0: in nsIDOMWindow window, michael@0: in jsval event); michael@0: michael@0: /** michael@0: * Card lock interfaces. michael@0: */ michael@0: nsIDOMDOMRequest getCardLockState(in unsigned long clientId, michael@0: in nsIDOMWindow window, michael@0: in DOMString lockType); michael@0: nsIDOMDOMRequest unlockCardLock(in unsigned long clientId, michael@0: in nsIDOMWindow window, michael@0: in jsval info); michael@0: nsIDOMDOMRequest setCardLock(in unsigned long clientId, michael@0: in nsIDOMWindow window, michael@0: in jsval info); michael@0: nsIDOMDOMRequest getCardLockRetryCount(in unsigned long clientId, michael@0: in nsIDOMWindow window, michael@0: in DOMString lockType); michael@0: michael@0: /** michael@0: * Phonebook interfaces. michael@0: */ michael@0: nsIDOMDOMRequest readContacts(in unsigned long clientId, michael@0: in nsIDOMWindow window, michael@0: in DOMString contactType); michael@0: michael@0: nsIDOMDOMRequest updateContact(in unsigned long clientId, michael@0: in nsIDOMWindow window, michael@0: in DOMString contactType, michael@0: in jsval contact, michael@0: in DOMString pin2); michael@0: michael@0: /** michael@0: * Secure Card Icc communication channel michael@0: */ michael@0: nsIDOMDOMRequest iccOpenChannel(in unsigned long clientId, michael@0: in nsIDOMWindow window, michael@0: in DOMString aid); michael@0: michael@0: nsIDOMDOMRequest iccExchangeAPDU(in unsigned long clientId, michael@0: in nsIDOMWindow window, michael@0: in long channel, michael@0: in jsval apdu); michael@0: michael@0: nsIDOMDOMRequest iccCloseChannel(in unsigned long clientId, michael@0: in nsIDOMWindow window, michael@0: in long channel); michael@0: michael@0: /** michael@0: * Helpers michael@0: */ michael@0: nsIDOMDOMRequest matchMvno(in unsigned long clientId, michael@0: in nsIDOMWindow window, michael@0: in DOMString mvnoType, michael@0: in DOMString mvnoData); michael@0: };