1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/icc/interfaces/nsIIccProvider.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,114 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#include "nsISupports.idl" 1.9 + 1.10 +interface nsIDOMDOMRequest; 1.11 +interface nsIDOMMozIccInfo; 1.12 +interface nsIDOMWindow; 1.13 + 1.14 +[scriptable, uuid(7c0ada3d-d8d4-493e-9243-fa3df39855e4)] 1.15 +interface nsIIccListener : nsISupports 1.16 +{ 1.17 + void notifyStkCommand(in DOMString aMessage); 1.18 + void notifyStkSessionEnd(); 1.19 + void notifyCardStateChanged(); 1.20 + void notifyIccInfoChanged(); 1.21 +}; 1.22 + 1.23 +/** 1.24 + * XPCOM component (in the content process) that provides the ICC information. 1.25 + */ 1.26 +[scriptable, uuid(7c67ab92-52a3-4e11-995c-c0ad2f66c4cb)] 1.27 +interface nsIIccProvider : nsISupports 1.28 +{ 1.29 + /** 1.30 + * Called when a content process registers receiving unsolicited messages from 1.31 + * RadioInterfaceLayer in the chrome process. Only a content process that has 1.32 + * the 'mobileconnection' permission is allowed to register. 1.33 + */ 1.34 + void registerIccMsg(in unsigned long clientId, in nsIIccListener listener); 1.35 + void unregisterIccMsg(in unsigned long clientId, in nsIIccListener listener); 1.36 + 1.37 + /** 1.38 + * UICC Information 1.39 + */ 1.40 + nsIDOMMozIccInfo getIccInfo(in unsigned long clientId); 1.41 + 1.42 + /** 1.43 + * Card State 1.44 + */ 1.45 + DOMString getCardState(in unsigned long clientId); 1.46 + 1.47 + /** 1.48 + * STK interfaces. 1.49 + */ 1.50 + void sendStkResponse(in unsigned long clientId, 1.51 + in nsIDOMWindow window, 1.52 + in jsval command, 1.53 + in jsval response); 1.54 + void sendStkMenuSelection(in unsigned long clientId, 1.55 + in nsIDOMWindow window, 1.56 + in unsigned short itemIdentifier, 1.57 + in boolean helpRequested); 1.58 + void sendStkTimerExpiration(in unsigned long clientId, 1.59 + in nsIDOMWindow window, 1.60 + in jsval timer); 1.61 + void sendStkEventDownload(in unsigned long clientId, 1.62 + in nsIDOMWindow window, 1.63 + in jsval event); 1.64 + 1.65 + /** 1.66 + * Card lock interfaces. 1.67 + */ 1.68 + nsIDOMDOMRequest getCardLockState(in unsigned long clientId, 1.69 + in nsIDOMWindow window, 1.70 + in DOMString lockType); 1.71 + nsIDOMDOMRequest unlockCardLock(in unsigned long clientId, 1.72 + in nsIDOMWindow window, 1.73 + in jsval info); 1.74 + nsIDOMDOMRequest setCardLock(in unsigned long clientId, 1.75 + in nsIDOMWindow window, 1.76 + in jsval info); 1.77 + nsIDOMDOMRequest getCardLockRetryCount(in unsigned long clientId, 1.78 + in nsIDOMWindow window, 1.79 + in DOMString lockType); 1.80 + 1.81 + /** 1.82 + * Phonebook interfaces. 1.83 + */ 1.84 + nsIDOMDOMRequest readContacts(in unsigned long clientId, 1.85 + in nsIDOMWindow window, 1.86 + in DOMString contactType); 1.87 + 1.88 + nsIDOMDOMRequest updateContact(in unsigned long clientId, 1.89 + in nsIDOMWindow window, 1.90 + in DOMString contactType, 1.91 + in jsval contact, 1.92 + in DOMString pin2); 1.93 + 1.94 + /** 1.95 + * Secure Card Icc communication channel 1.96 + */ 1.97 + nsIDOMDOMRequest iccOpenChannel(in unsigned long clientId, 1.98 + in nsIDOMWindow window, 1.99 + in DOMString aid); 1.100 + 1.101 + nsIDOMDOMRequest iccExchangeAPDU(in unsigned long clientId, 1.102 + in nsIDOMWindow window, 1.103 + in long channel, 1.104 + in jsval apdu); 1.105 + 1.106 + nsIDOMDOMRequest iccCloseChannel(in unsigned long clientId, 1.107 + in nsIDOMWindow window, 1.108 + in long channel); 1.109 + 1.110 + /** 1.111 + * Helpers 1.112 + */ 1.113 + nsIDOMDOMRequest matchMvno(in unsigned long clientId, 1.114 + in nsIDOMWindow window, 1.115 + in DOMString mvnoType, 1.116 + in DOMString mvnoData); 1.117 +};