|
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 [Pref="dom.icc.enabled"] |
|
7 interface MozIccManager : EventTarget |
|
8 { |
|
9 /** |
|
10 * STK menu presentation types. |
|
11 */ |
|
12 const unsigned short STK_MENU_TYPE_NOT_SPECIFIED = 0x00; |
|
13 const unsigned short STK_MENU_TYPE_DATA_VALUES = 0x01; |
|
14 const unsigned short STK_MENU_TYPE_NAVIGATION_OPTIONS = 0x03; |
|
15 |
|
16 /** |
|
17 * Browser launch mode. |
|
18 */ |
|
19 const unsigned short STK_BROWSER_MODE_LAUNCH_IF_NOT_ALREADY_LAUNCHED = 0x00; |
|
20 const unsigned short STK_BROWSER_MODE_USING_EXISTING_BROWSER = 0x02; |
|
21 const unsigned short STK_BROWSER_MODE_USING_NEW_BROWSER = 0x03; |
|
22 |
|
23 /** |
|
24 * STK proactive commands. |
|
25 * |
|
26 * @see TS 11.14, clause 13.4 |
|
27 */ |
|
28 const unsigned short STK_CMD_REFRESH = 0x01; |
|
29 const unsigned short STK_CMD_POLL_INTERVAL = 0x03; |
|
30 const unsigned short STK_CMD_POLL_OFF = 0x04; |
|
31 const unsigned short STK_CMD_SET_UP_EVENT_LIST = 0x05; |
|
32 const unsigned short STK_CMD_SET_UP_CALL = 0x10; |
|
33 const unsigned short STK_CMD_SEND_SS = 0x11; |
|
34 const unsigned short STK_CMD_SEND_USSD = 0x12; |
|
35 const unsigned short STK_CMD_SEND_SMS = 0x13; |
|
36 const unsigned short STK_CMD_SEND_DTMF = 0x14; |
|
37 const unsigned short STK_CMD_LAUNCH_BROWSER = 0x15; |
|
38 const unsigned short STK_CMD_PLAY_TONE = 0x20; |
|
39 const unsigned short STK_CMD_DISPLAY_TEXT = 0x21; |
|
40 const unsigned short STK_CMD_GET_INKEY = 0x22; |
|
41 const unsigned short STK_CMD_GET_INPUT = 0x23; |
|
42 const unsigned short STK_CMD_SELECT_ITEM = 0x24; |
|
43 const unsigned short STK_CMD_SET_UP_MENU = 0x25; |
|
44 const unsigned short STK_CMD_PROVIDE_LOCAL_INFO = 0x26; |
|
45 const unsigned short STK_CMD_TIMER_MANAGEMENT = 0x27; |
|
46 const unsigned short STK_CMD_SET_UP_IDLE_MODE_TEXT = 0x28; |
|
47 const unsigned short STK_CMD_OPEN_CHANNEL = 0x40; |
|
48 const unsigned short STK_CMD_CLOSE_CHANNEL = 0x41; |
|
49 const unsigned short STK_CMD_RECEIVE_DATA = 0x42; |
|
50 const unsigned short STK_CMD_SEND_DATA = 0x43; |
|
51 |
|
52 /** |
|
53 * STK result code. |
|
54 * |
|
55 * @see TS 11.14, clause 12.12 |
|
56 * |
|
57 * Results '0X' and '1X' indicate that the command has been performed. |
|
58 */ |
|
59 /** Command performed successfully */ |
|
60 const unsigned short STK_RESULT_OK = 0x00; |
|
61 |
|
62 /** Command performed with partial comprehension */ |
|
63 const unsigned short STK_RESULT_PRFRMD_WITH_PARTIAL_COMPREHENSION = 0x01; |
|
64 |
|
65 /** Command performed, with missing information */ |
|
66 const unsigned short STK_RESULT_PRFRMD_WITH_MISSING_INFO = 0x02; |
|
67 |
|
68 /** REFRESH performed with additional EFs read */ |
|
69 const unsigned short STK_RESULT_PRFRMD_WITH_ADDITIONAL_EFS_READ = 0x03; |
|
70 |
|
71 /** Command performed successfully, limited service */ |
|
72 const unsigned short STK_RESULT_PRFRMD_LIMITED_SERVICE = 0x06; |
|
73 |
|
74 /** Proactive UICC session terminated by the user */ |
|
75 const unsigned short STK_RESULT_UICC_SESSION_TERM_BY_USER = 0x10; |
|
76 |
|
77 /** Backward move in the proactive UICC session requested by the user */ |
|
78 const unsigned short STK_RESULT_BACKWARD_MOVE_BY_USER = 0x11; |
|
79 |
|
80 /** No response from user */ |
|
81 const unsigned short STK_RESULT_NO_RESPONSE_FROM_USER = 0x12; |
|
82 |
|
83 /** Help information required by the user */ |
|
84 const unsigned short STK_RESULT_HELP_INFO_REQUIRED = 0x13; |
|
85 |
|
86 /** USSD or SS transaction terminated by the user */ |
|
87 const unsigned short STK_RESULT_USSD_SS_SESSION_TERM_BY_USER = 0x14; |
|
88 |
|
89 /** |
|
90 * Results '2X' indicate to the UICC that it may be worth re-trying the |
|
91 * command at a later opportunity. |
|
92 */ |
|
93 /** Terminal currently unable to process command */ |
|
94 const unsigned short STK_RESULT_TERMINAL_CRNTLY_UNABLE_TO_PROCESS = 0x20; |
|
95 |
|
96 /** Network currently unable to process command */ |
|
97 const unsigned short STK_RESULT_NETWORK_CRNTLY_UNABLE_TO_PROCESS = 0x21; |
|
98 |
|
99 /** User did not accept the proactive command */ |
|
100 const unsigned short STK_RESULT_USER_NOT_ACCEPT = 0x22; |
|
101 |
|
102 /** User cleared down call before connection or network release */ |
|
103 const unsigned short STK_RESULT_USER_CLEAR_DOWN_CALL = 0x23; |
|
104 |
|
105 /** Launch browser generic error code */ |
|
106 const unsigned short STK_RESULT_LAUNCH_BROWSER_ERROR = 0x26; |
|
107 |
|
108 /** |
|
109 * Results '3X' indicate that it is not worth the UICC re-trying with an |
|
110 * identical command, as it will only get the same response. However, the |
|
111 * decision to retry lies with the application. |
|
112 */ |
|
113 /** Command beyond terminal's capabilities */ |
|
114 const unsigned short STK_RESULT_BEYOND_TERMINAL_CAPABILITY = 0x30; |
|
115 |
|
116 /** Command type not understood by terminal */ |
|
117 const unsigned short STK_RESULT_CMD_TYPE_NOT_UNDERSTOOD = 0x31; |
|
118 |
|
119 /** Command data not understood by terminal */ |
|
120 const unsigned short STK_RESULT_CMD_DATA_NOT_UNDERSTOOD = 0x32; |
|
121 |
|
122 /** Command number not known by terminal */ |
|
123 const unsigned short STK_RESULT_CMD_NUM_NOT_KNOWN = 0x33; |
|
124 |
|
125 /** SS return error */ |
|
126 const unsigned short STK_RESULT_SS_RETURN_ERROR = 0x34; |
|
127 |
|
128 /** SMS RP-ERROR */ |
|
129 const unsigned short STK_RESULT_SMS_RP_ERROR = 0x35; |
|
130 |
|
131 /** Error, required values are missing */ |
|
132 const unsigned short STK_RESULT_REQUIRED_VALUES_MISSING = 0x36; |
|
133 |
|
134 /** USSD return error */ |
|
135 const unsigned short STK_RESULT_USSD_RETURN_ERROR = 0x37; |
|
136 |
|
137 /** MultipleCard commands error */ |
|
138 const unsigned short STK_RESULT_MULTI_CARDS_CMD_ERROR = 0x38; |
|
139 |
|
140 /** |
|
141 * Interaction with call control by USIM or MO short message control by |
|
142 * USIM, permanent problem. |
|
143 */ |
|
144 const unsigned short STK_RESULT_USIM_CALL_CONTROL_PERMANENT = 0x39; |
|
145 |
|
146 /** Bearer independent protocol error */ |
|
147 const unsigned short STK_RESULT_BIP_ERROR = 0x3a; |
|
148 |
|
149 /** |
|
150 * STK event list. |
|
151 */ |
|
152 const unsigned short STK_EVENT_TYPE_MT_CALL = 0x00; |
|
153 const unsigned short STK_EVENT_TYPE_CALL_CONNECTED = 0x01; |
|
154 const unsigned short STK_EVENT_TYPE_CALL_DISCONNECTED = 0x02; |
|
155 const unsigned short STK_EVENT_TYPE_LOCATION_STATUS = 0x03; |
|
156 const unsigned short STK_EVENT_TYPE_USER_ACTIVITY = 0x04; |
|
157 const unsigned short STK_EVENT_TYPE_IDLE_SCREEN_AVAILABLE = 0x05; |
|
158 const unsigned short STK_EVENT_TYPE_CARD_READER_STATUS = 0x06; |
|
159 const unsigned short STK_EVENT_TYPE_LANGUAGE_SELECTION = 0x07; |
|
160 const unsigned short STK_EVENT_TYPE_BROWSER_TERMINATION = 0x08; |
|
161 const unsigned short STK_EVENT_TYPE_DATA_AVAILABLE = 0x09; |
|
162 const unsigned short STK_EVENT_TYPE_CHANNEL_STATUS = 0x0a; |
|
163 const unsigned short STK_EVENT_TYPE_SINGLE_ACCESS_TECHNOLOGY_CHANGED = 0x0b; |
|
164 const unsigned short STK_EVENT_TYPE_DISPLAY_PARAMETER_CHANGED = 0x0c; |
|
165 const unsigned short STK_EVENT_TYPE_LOCAL_CONNECTION = 0x0d; |
|
166 const unsigned short STK_EVENT_TYPE_NETWORK_SEARCH_MODE_CHANGED = 0x0e; |
|
167 const unsigned short STK_EVENT_TYPE_BROWSING_STATUS = 0x0f; |
|
168 const unsigned short STK_EVENT_TYPE_FRAMES_INFORMATION_CHANGED = 0x10; |
|
169 |
|
170 /** |
|
171 * The service state of STK location status. |
|
172 */ |
|
173 const unsigned short STK_SERVICE_STATE_NORMAL = 0x00; |
|
174 const unsigned short STK_SERVICE_STATE_LIMITED = 0x01; |
|
175 const unsigned short STK_SERVICE_STATE_UNAVAILABLE = 0x02; |
|
176 |
|
177 /** |
|
178 * Tone type. |
|
179 */ |
|
180 const unsigned short STK_TONE_TYPE_DIAL_TONE = 0x01; |
|
181 const unsigned short STK_TONE_TYPE_CALLED_SUBSCRIBER_BUSY = 0x02; |
|
182 const unsigned short STK_TONE_TYPE_CONGESTION = 0x03; |
|
183 const unsigned short STK_TONE_TYPE_RADIO_PATH_ACK = 0x04; |
|
184 const unsigned short STK_TONE_TYPE_RADIO_PATH_NOT_AVAILABLE = 0x05; |
|
185 const unsigned short STK_TONE_TYPE_ERROR = 0x06; |
|
186 const unsigned short STK_TONE_TYPE_CALL_WAITING_TONE = 0x07; |
|
187 const unsigned short STK_TONE_TYPE_RINGING_TONE = 0x08; |
|
188 const unsigned short STK_TONE_TYPE_GENERAL_BEEP = 0x10; |
|
189 const unsigned short STK_TONE_TYPE_POSITIVE_ACK_TONE = 0x11; |
|
190 const unsigned short STK_TONE_TYPE_NEGATIVE_ACK_TONE = 0x12; |
|
191 |
|
192 /** |
|
193 * Time unit. |
|
194 */ |
|
195 const unsigned short STK_TIME_UNIT_MINUTE = 0x00; |
|
196 const unsigned short STK_TIME_UNIT_SECOND = 0x01; |
|
197 const unsigned short STK_TIME_UNIT_TENTH_SECOND = 0x02; |
|
198 |
|
199 /** |
|
200 * Local Information list. |
|
201 * |
|
202 * @see TS 102.223, clause 8.6 |
|
203 */ |
|
204 const unsigned short STK_LOCAL_INFO_LOCATION_INFO = 0x00; |
|
205 const unsigned short STK_LOCAL_INFO_IMEI = 0x01; |
|
206 const unsigned short STK_LOCAL_INFO_DATE_TIME_ZONE = 0x03; |
|
207 const unsigned short STK_LOCAL_INFO_LANGUAGE = 0x04; |
|
208 |
|
209 /** |
|
210 * Timer management. |
|
211 */ |
|
212 const unsigned short STK_TIMER_START = 0x00; |
|
213 const unsigned short STK_TIMER_DEACTIVATE = 0x01; |
|
214 const unsigned short STK_TIMER_GET_CURRENT_VALUE = 0x02; |
|
215 |
|
216 /** |
|
217 * Browser termination cause. |
|
218 */ |
|
219 const unsigned short STK_BROWSER_TERMINATION_CAUSE_USER = 0x00; |
|
220 const unsigned short STK_BROWSER_TERMINATION_CAUSE_ERROR = 0x01; |
|
221 |
|
222 /** |
|
223 * Next Action Indicator. |
|
224 */ |
|
225 const unsigned short STK_NEXT_ACTION_NULL = 0x00; |
|
226 const unsigned short STK_NEXT_ACTION_END_PROACTIVE_SESSION = 0x81; |
|
227 |
|
228 /** |
|
229 * Array of iccIds that are currently detected. |
|
230 */ |
|
231 [Cached, Pure] |
|
232 readonly attribute sequence<DOMString> iccIds; |
|
233 |
|
234 /** |
|
235 * Get ICC object by iccId. |
|
236 * |
|
237 * @param iccId |
|
238 * The identifier of the ICC. |
|
239 * |
|
240 * @return see MozIcc.webidl for the detail. |
|
241 */ |
|
242 nsISupports getIccById(DOMString iccId); |
|
243 |
|
244 /** |
|
245 * 'oniccdetected' event is notified whenever a new ICC is detected. |
|
246 */ |
|
247 attribute EventHandler oniccdetected; |
|
248 |
|
249 /** |
|
250 * 'oniccundetected' event is notified whenever an ICC becomes undetected. |
|
251 */ |
|
252 attribute EventHandler oniccundetected; |
|
253 }; |