1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/webidl/MozIccManager.webidl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,253 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +[Pref="dom.icc.enabled"] 1.10 +interface MozIccManager : EventTarget 1.11 +{ 1.12 + /** 1.13 + * STK menu presentation types. 1.14 + */ 1.15 + const unsigned short STK_MENU_TYPE_NOT_SPECIFIED = 0x00; 1.16 + const unsigned short STK_MENU_TYPE_DATA_VALUES = 0x01; 1.17 + const unsigned short STK_MENU_TYPE_NAVIGATION_OPTIONS = 0x03; 1.18 + 1.19 + /** 1.20 + * Browser launch mode. 1.21 + */ 1.22 + const unsigned short STK_BROWSER_MODE_LAUNCH_IF_NOT_ALREADY_LAUNCHED = 0x00; 1.23 + const unsigned short STK_BROWSER_MODE_USING_EXISTING_BROWSER = 0x02; 1.24 + const unsigned short STK_BROWSER_MODE_USING_NEW_BROWSER = 0x03; 1.25 + 1.26 + /** 1.27 + * STK proactive commands. 1.28 + * 1.29 + * @see TS 11.14, clause 13.4 1.30 + */ 1.31 + const unsigned short STK_CMD_REFRESH = 0x01; 1.32 + const unsigned short STK_CMD_POLL_INTERVAL = 0x03; 1.33 + const unsigned short STK_CMD_POLL_OFF = 0x04; 1.34 + const unsigned short STK_CMD_SET_UP_EVENT_LIST = 0x05; 1.35 + const unsigned short STK_CMD_SET_UP_CALL = 0x10; 1.36 + const unsigned short STK_CMD_SEND_SS = 0x11; 1.37 + const unsigned short STK_CMD_SEND_USSD = 0x12; 1.38 + const unsigned short STK_CMD_SEND_SMS = 0x13; 1.39 + const unsigned short STK_CMD_SEND_DTMF = 0x14; 1.40 + const unsigned short STK_CMD_LAUNCH_BROWSER = 0x15; 1.41 + const unsigned short STK_CMD_PLAY_TONE = 0x20; 1.42 + const unsigned short STK_CMD_DISPLAY_TEXT = 0x21; 1.43 + const unsigned short STK_CMD_GET_INKEY = 0x22; 1.44 + const unsigned short STK_CMD_GET_INPUT = 0x23; 1.45 + const unsigned short STK_CMD_SELECT_ITEM = 0x24; 1.46 + const unsigned short STK_CMD_SET_UP_MENU = 0x25; 1.47 + const unsigned short STK_CMD_PROVIDE_LOCAL_INFO = 0x26; 1.48 + const unsigned short STK_CMD_TIMER_MANAGEMENT = 0x27; 1.49 + const unsigned short STK_CMD_SET_UP_IDLE_MODE_TEXT = 0x28; 1.50 + const unsigned short STK_CMD_OPEN_CHANNEL = 0x40; 1.51 + const unsigned short STK_CMD_CLOSE_CHANNEL = 0x41; 1.52 + const unsigned short STK_CMD_RECEIVE_DATA = 0x42; 1.53 + const unsigned short STK_CMD_SEND_DATA = 0x43; 1.54 + 1.55 + /** 1.56 + * STK result code. 1.57 + * 1.58 + * @see TS 11.14, clause 12.12 1.59 + * 1.60 + * Results '0X' and '1X' indicate that the command has been performed. 1.61 + */ 1.62 + /** Command performed successfully */ 1.63 + const unsigned short STK_RESULT_OK = 0x00; 1.64 + 1.65 + /** Command performed with partial comprehension */ 1.66 + const unsigned short STK_RESULT_PRFRMD_WITH_PARTIAL_COMPREHENSION = 0x01; 1.67 + 1.68 + /** Command performed, with missing information */ 1.69 + const unsigned short STK_RESULT_PRFRMD_WITH_MISSING_INFO = 0x02; 1.70 + 1.71 + /** REFRESH performed with additional EFs read */ 1.72 + const unsigned short STK_RESULT_PRFRMD_WITH_ADDITIONAL_EFS_READ = 0x03; 1.73 + 1.74 + /** Command performed successfully, limited service */ 1.75 + const unsigned short STK_RESULT_PRFRMD_LIMITED_SERVICE = 0x06; 1.76 + 1.77 + /** Proactive UICC session terminated by the user */ 1.78 + const unsigned short STK_RESULT_UICC_SESSION_TERM_BY_USER = 0x10; 1.79 + 1.80 + /** Backward move in the proactive UICC session requested by the user */ 1.81 + const unsigned short STK_RESULT_BACKWARD_MOVE_BY_USER = 0x11; 1.82 + 1.83 + /** No response from user */ 1.84 + const unsigned short STK_RESULT_NO_RESPONSE_FROM_USER = 0x12; 1.85 + 1.86 + /** Help information required by the user */ 1.87 + const unsigned short STK_RESULT_HELP_INFO_REQUIRED = 0x13; 1.88 + 1.89 + /** USSD or SS transaction terminated by the user */ 1.90 + const unsigned short STK_RESULT_USSD_SS_SESSION_TERM_BY_USER = 0x14; 1.91 + 1.92 + /** 1.93 + * Results '2X' indicate to the UICC that it may be worth re-trying the 1.94 + * command at a later opportunity. 1.95 + */ 1.96 + /** Terminal currently unable to process command */ 1.97 + const unsigned short STK_RESULT_TERMINAL_CRNTLY_UNABLE_TO_PROCESS = 0x20; 1.98 + 1.99 + /** Network currently unable to process command */ 1.100 + const unsigned short STK_RESULT_NETWORK_CRNTLY_UNABLE_TO_PROCESS = 0x21; 1.101 + 1.102 + /** User did not accept the proactive command */ 1.103 + const unsigned short STK_RESULT_USER_NOT_ACCEPT = 0x22; 1.104 + 1.105 + /** User cleared down call before connection or network release */ 1.106 + const unsigned short STK_RESULT_USER_CLEAR_DOWN_CALL = 0x23; 1.107 + 1.108 + /** Launch browser generic error code */ 1.109 + const unsigned short STK_RESULT_LAUNCH_BROWSER_ERROR = 0x26; 1.110 + 1.111 + /** 1.112 + * Results '3X' indicate that it is not worth the UICC re-trying with an 1.113 + * identical command, as it will only get the same response. However, the 1.114 + * decision to retry lies with the application. 1.115 + */ 1.116 + /** Command beyond terminal's capabilities */ 1.117 + const unsigned short STK_RESULT_BEYOND_TERMINAL_CAPABILITY = 0x30; 1.118 + 1.119 + /** Command type not understood by terminal */ 1.120 + const unsigned short STK_RESULT_CMD_TYPE_NOT_UNDERSTOOD = 0x31; 1.121 + 1.122 + /** Command data not understood by terminal */ 1.123 + const unsigned short STK_RESULT_CMD_DATA_NOT_UNDERSTOOD = 0x32; 1.124 + 1.125 + /** Command number not known by terminal */ 1.126 + const unsigned short STK_RESULT_CMD_NUM_NOT_KNOWN = 0x33; 1.127 + 1.128 + /** SS return error */ 1.129 + const unsigned short STK_RESULT_SS_RETURN_ERROR = 0x34; 1.130 + 1.131 + /** SMS RP-ERROR */ 1.132 + const unsigned short STK_RESULT_SMS_RP_ERROR = 0x35; 1.133 + 1.134 + /** Error, required values are missing */ 1.135 + const unsigned short STK_RESULT_REQUIRED_VALUES_MISSING = 0x36; 1.136 + 1.137 + /** USSD return error */ 1.138 + const unsigned short STK_RESULT_USSD_RETURN_ERROR = 0x37; 1.139 + 1.140 + /** MultipleCard commands error */ 1.141 + const unsigned short STK_RESULT_MULTI_CARDS_CMD_ERROR = 0x38; 1.142 + 1.143 + /** 1.144 + * Interaction with call control by USIM or MO short message control by 1.145 + * USIM, permanent problem. 1.146 + */ 1.147 + const unsigned short STK_RESULT_USIM_CALL_CONTROL_PERMANENT = 0x39; 1.148 + 1.149 + /** Bearer independent protocol error */ 1.150 + const unsigned short STK_RESULT_BIP_ERROR = 0x3a; 1.151 + 1.152 + /** 1.153 + * STK event list. 1.154 + */ 1.155 + const unsigned short STK_EVENT_TYPE_MT_CALL = 0x00; 1.156 + const unsigned short STK_EVENT_TYPE_CALL_CONNECTED = 0x01; 1.157 + const unsigned short STK_EVENT_TYPE_CALL_DISCONNECTED = 0x02; 1.158 + const unsigned short STK_EVENT_TYPE_LOCATION_STATUS = 0x03; 1.159 + const unsigned short STK_EVENT_TYPE_USER_ACTIVITY = 0x04; 1.160 + const unsigned short STK_EVENT_TYPE_IDLE_SCREEN_AVAILABLE = 0x05; 1.161 + const unsigned short STK_EVENT_TYPE_CARD_READER_STATUS = 0x06; 1.162 + const unsigned short STK_EVENT_TYPE_LANGUAGE_SELECTION = 0x07; 1.163 + const unsigned short STK_EVENT_TYPE_BROWSER_TERMINATION = 0x08; 1.164 + const unsigned short STK_EVENT_TYPE_DATA_AVAILABLE = 0x09; 1.165 + const unsigned short STK_EVENT_TYPE_CHANNEL_STATUS = 0x0a; 1.166 + const unsigned short STK_EVENT_TYPE_SINGLE_ACCESS_TECHNOLOGY_CHANGED = 0x0b; 1.167 + const unsigned short STK_EVENT_TYPE_DISPLAY_PARAMETER_CHANGED = 0x0c; 1.168 + const unsigned short STK_EVENT_TYPE_LOCAL_CONNECTION = 0x0d; 1.169 + const unsigned short STK_EVENT_TYPE_NETWORK_SEARCH_MODE_CHANGED = 0x0e; 1.170 + const unsigned short STK_EVENT_TYPE_BROWSING_STATUS = 0x0f; 1.171 + const unsigned short STK_EVENT_TYPE_FRAMES_INFORMATION_CHANGED = 0x10; 1.172 + 1.173 + /** 1.174 + * The service state of STK location status. 1.175 + */ 1.176 + const unsigned short STK_SERVICE_STATE_NORMAL = 0x00; 1.177 + const unsigned short STK_SERVICE_STATE_LIMITED = 0x01; 1.178 + const unsigned short STK_SERVICE_STATE_UNAVAILABLE = 0x02; 1.179 + 1.180 + /** 1.181 + * Tone type. 1.182 + */ 1.183 + const unsigned short STK_TONE_TYPE_DIAL_TONE = 0x01; 1.184 + const unsigned short STK_TONE_TYPE_CALLED_SUBSCRIBER_BUSY = 0x02; 1.185 + const unsigned short STK_TONE_TYPE_CONGESTION = 0x03; 1.186 + const unsigned short STK_TONE_TYPE_RADIO_PATH_ACK = 0x04; 1.187 + const unsigned short STK_TONE_TYPE_RADIO_PATH_NOT_AVAILABLE = 0x05; 1.188 + const unsigned short STK_TONE_TYPE_ERROR = 0x06; 1.189 + const unsigned short STK_TONE_TYPE_CALL_WAITING_TONE = 0x07; 1.190 + const unsigned short STK_TONE_TYPE_RINGING_TONE = 0x08; 1.191 + const unsigned short STK_TONE_TYPE_GENERAL_BEEP = 0x10; 1.192 + const unsigned short STK_TONE_TYPE_POSITIVE_ACK_TONE = 0x11; 1.193 + const unsigned short STK_TONE_TYPE_NEGATIVE_ACK_TONE = 0x12; 1.194 + 1.195 + /** 1.196 + * Time unit. 1.197 + */ 1.198 + const unsigned short STK_TIME_UNIT_MINUTE = 0x00; 1.199 + const unsigned short STK_TIME_UNIT_SECOND = 0x01; 1.200 + const unsigned short STK_TIME_UNIT_TENTH_SECOND = 0x02; 1.201 + 1.202 + /** 1.203 + * Local Information list. 1.204 + * 1.205 + * @see TS 102.223, clause 8.6 1.206 + */ 1.207 + const unsigned short STK_LOCAL_INFO_LOCATION_INFO = 0x00; 1.208 + const unsigned short STK_LOCAL_INFO_IMEI = 0x01; 1.209 + const unsigned short STK_LOCAL_INFO_DATE_TIME_ZONE = 0x03; 1.210 + const unsigned short STK_LOCAL_INFO_LANGUAGE = 0x04; 1.211 + 1.212 + /** 1.213 + * Timer management. 1.214 + */ 1.215 + const unsigned short STK_TIMER_START = 0x00; 1.216 + const unsigned short STK_TIMER_DEACTIVATE = 0x01; 1.217 + const unsigned short STK_TIMER_GET_CURRENT_VALUE = 0x02; 1.218 + 1.219 + /** 1.220 + * Browser termination cause. 1.221 + */ 1.222 + const unsigned short STK_BROWSER_TERMINATION_CAUSE_USER = 0x00; 1.223 + const unsigned short STK_BROWSER_TERMINATION_CAUSE_ERROR = 0x01; 1.224 + 1.225 + /** 1.226 + * Next Action Indicator. 1.227 + */ 1.228 + const unsigned short STK_NEXT_ACTION_NULL = 0x00; 1.229 + const unsigned short STK_NEXT_ACTION_END_PROACTIVE_SESSION = 0x81; 1.230 + 1.231 + /** 1.232 + * Array of iccIds that are currently detected. 1.233 + */ 1.234 + [Cached, Pure] 1.235 + readonly attribute sequence<DOMString> iccIds; 1.236 + 1.237 + /** 1.238 + * Get ICC object by iccId. 1.239 + * 1.240 + * @param iccId 1.241 + * The identifier of the ICC. 1.242 + * 1.243 + * @return see MozIcc.webidl for the detail. 1.244 + */ 1.245 + nsISupports getIccById(DOMString iccId); 1.246 + 1.247 + /** 1.248 + * 'oniccdetected' event is notified whenever a new ICC is detected. 1.249 + */ 1.250 + attribute EventHandler oniccdetected; 1.251 + 1.252 + /** 1.253 + * 'oniccundetected' event is notified whenever an ICC becomes undetected. 1.254 + */ 1.255 + attribute EventHandler oniccundetected; 1.256 +};