• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2021-2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import {AsyncCallback} from "./basic";
17
18/**
19 * Provides applications with APIs for obtaining SIM card status, card file information, and card specifications.
20 * SIM cards include SIM, USIM, and CSIM cards.
21 *
22 * @since 6
23 * @syscap SystemCapability.Telephony.CoreService
24 */
25declare namespace sim {
26  /**
27   * Checks whether the SIM card in a specified slot is activated.
28   *
29   * @param slotId Indicates the card slot index number,
30   * ranging from {@code 0} to the maximum card slot index number supported by the device.
31   * @param callback Returns {@code true} if the SIM card is activated; returns {@code false} otherwise.
32   * @since 7
33   */
34  function isSimActive(slotId: number, callback: AsyncCallback<boolean>): void;
35  function isSimActive(slotId: number): Promise<boolean>;
36
37  /**
38   * Obtains the default card slot for the voice service.
39   *
40   * @param callback Returns {@code 0} if card 1 is used as the default card slot for the voice service;
41   * returns {@code 1} if card 2 is used as the default card slot for the voice service;
42   * returns {@code -1} if no card is available for the voice service.
43   * @since 7
44   */
45  function getDefaultVoiceSlotId(callback: AsyncCallback<number>): void;
46  function getDefaultVoiceSlotId(): Promise<number>;
47
48  /**
49   * Checks whether your application (the caller) has been granted the operator permissions.
50   *
51   * @param slotId Indicates the ID of the SIM card slot.
52   * @param callback Returns {@code true} if your application has been granted the operator permissions;
53   * returns {@code false} otherwise.
54   * @throws {BusinessError} 401 - Parameter error.
55   * @throws {BusinessError} 8300001 - Invalid parameter value.
56   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
57   * @throws {BusinessError} 8300003 - System internal error.
58   * @throws {BusinessError} 8300999 - Unknown error code.
59   * @since 7
60   */
61  function hasOperatorPrivileges(slotId: number, callback: AsyncCallback<boolean>): void;
62  function hasOperatorPrivileges(slotId: number): Promise<boolean>;
63
64  /**
65   * Obtains the ISO country code of the SIM card in a specified slot.
66   *
67   * @param slotId Indicates the card slot index number,
68   * ranging from 0 to the maximum card slot index number supported by the device.
69   * @param callback Returns the country code defined in ISO 3166-2; returns an empty string if no SIM card is inserted.
70   * @throws {BusinessError} 401 - Parameter error.
71   * @throws {BusinessError} 8300001 - Invalid parameter value.
72   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
73   * @throws {BusinessError} 8300003 - System internal error.
74   * @throws {BusinessError} 8300004 - Do not have sim card.
75   * @throws {BusinessError} 8300999 - Unknown error code.
76   */
77  function getISOCountryCodeForSim(slotId: number, callback: AsyncCallback<string>): void;
78  function getISOCountryCodeForSim(slotId: number): Promise<string>;
79
80  /**
81   * Obtains the home PLMN number of the SIM card in a specified slot.
82   *
83   * <p>The value is recorded in the SIM card and is irrelevant to the network
84   * with which the SIM card is currently registered.
85   *
86   * @param slotId Indicates the card slot index number,
87   * ranging from 0 to the maximum card slot index number supported by the device.
88   * @param callback Returns the PLMN number; returns an empty string if no SIM card is inserted.
89   * @throws {BusinessError} 401 - Parameter error.
90   * @throws {BusinessError} 8300001 - Invalid parameter value.
91   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
92   * @throws {BusinessError} 8300003 - System internal error.
93   * @throws {BusinessError} 8300004 - Do not have sim card.
94   * @throws {BusinessError} 8300999 - Unknown error code.
95   */
96  function getSimOperatorNumeric(slotId: number, callback: AsyncCallback<string>): void;
97  function getSimOperatorNumeric(slotId: number): Promise<string>;
98
99  /**
100   * Obtains the service provider name (SPN) of the SIM card in a specified slot.
101   *
102   * <p>The value is recorded in the EFSPN file of the SIM card and is irrelevant to the network
103   * with which the SIM card is currently registered.
104   *
105   * @param slotId Indicates the card slot index number,
106   * ranging from 0 to the maximum card slot index number supported by the device.
107   * @param callback Returns the SPN; returns an empty string if no SIM card is inserted or
108   * no EFSPN file in the SIM card.
109   * @throws {BusinessError} 401 - Parameter error.
110   * @throws {BusinessError} 8300001 - Invalid parameter value.
111   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
112   * @throws {BusinessError} 8300003 - System internal error.
113   * @throws {BusinessError} 8300004 - Do not have sim card.
114   * @throws {BusinessError} 8300999 - Unknown error code.
115   */
116  function getSimSpn(slotId: number, callback: AsyncCallback<string>): void;
117  function getSimSpn(slotId: number): Promise<string>;
118
119  /**
120   * Obtains the state of the SIM card in a specified slot.
121   *
122   * @param slotId Indicates the card slot index number,
123   * ranging from {@code 0} to the maximum card slot index number supported by the device.
124   * @param callback Returns one of the following SIM card states:
125   * <ul>
126   * <li>{@code SimState#SIM_STATE_UNKNOWN}
127   * <li>{@code SimState#SIM_STATE_NOT_PRESENT}
128   * <li>{@code SimState#SIM_STATE_LOCKED}
129   * <li>{@code SimState#SIM_STATE_NOT_READY}
130   * <li>{@code SimState#SIM_STATE_READY}
131   * <li>{@code SimState#SIM_STATE_LOADED}
132   * </ul>
133   * @throws {BusinessError} 401 - Parameter error.
134   * @throws {BusinessError} 8300001 - Invalid parameter value.
135   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
136   * @throws {BusinessError} 8300003 - System internal error.
137   * @throws {BusinessError} 8300999 - Unknown error code.
138   */
139  function getSimState(slotId: number, callback: AsyncCallback<SimState>): void;
140  function getSimState(slotId: number): Promise<SimState>;
141
142  /**
143   * Obtains the type of the SIM card installed in a specified slot.
144   *
145   * @param slotId Indicates the ID of the specified slot.
146   * @param callback Returns the SIM card type.
147   * @throws {BusinessError} 401 - Parameter error.
148   * @throws {BusinessError} 8300001 - Invalid parameter value.
149   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
150   * @throws {BusinessError} 8300003 - System internal error.
151   * @throws {BusinessError} 8300004 - Do not have sim card.
152   * @throws {BusinessError} 8300999 - Unknown error code.
153   * @since 7
154   */
155  function getCardType(slotId: number, callback: AsyncCallback<CardType>): void;
156  function getCardType(slotId: number): Promise<CardType>;
157
158  /**
159   * Obtains the ICCID of the SIM card in a specified slot.
160   *
161   * <p>The ICCID is a unique identifier of a SIM card. It consists of 20 digits
162   * and is recorded in the EFICCID file of the SIM card.
163   *
164   * @param slotId Indicates the card slot index number,
165   * ranging from 0 to the maximum card slot index number supported by the device.
166   * @param callback Returns the ICCID; returns an empty string if no SIM card is inserted.
167   * @permission ohos.permission.GET_TELEPHONY_STATE
168   * @throws {BusinessError} 201 - Permission denied.
169   * @throws {BusinessError} 401 - Parameter error.
170   * @throws {BusinessError} 8300001 - Invalid parameter value.
171   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
172   * @throws {BusinessError} 8300003 - System internal error.
173   * @throws {BusinessError} 8300004 - Do not have sim card.
174   * @throws {BusinessError} 8300999 - Unknown error code.
175   * @systemapi Hide this for inner system use.
176   * @since 7
177   */
178  function getSimIccId(slotId: number, callback: AsyncCallback<string>): void;
179  function getSimIccId(slotId: number): Promise<string>;
180
181  /**
182   * Obtains the alpha identifier of the voice mailbox of the SIM card in a specified slot.
183   *
184   * @param slotId Indicates the card slot index number,
185   * ranging from {@code 0} to the maximum card slot index number supported by the device.
186   * @param callback Returns the voice mailbox alpha identifier;
187   * returns an empty string if no voice mailbox alpha identifier is written into the SIM card.
188   * @permission ohos.permission.GET_TELEPHONY_STATE
189   * @throws {BusinessError} 201 - Permission denied.
190   * @throws {BusinessError} 401 - Parameter error.
191   * @throws {BusinessError} 8300001 - Invalid parameter value.
192   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
193   * @throws {BusinessError} 8300003 - System internal error.
194   * @throws {BusinessError} 8300004 - Do not have sim card.
195   * @throws {BusinessError} 8300999 - Unknown error code.
196   * @systemapi Hide this for inner system use.
197   * @since 8
198   */
199  function getVoiceMailIdentifier(slotId: number, callback: AsyncCallback<string>): void;
200  function getVoiceMailIdentifier(slotId: number): Promise<string>;
201
202  /**
203   * Obtains the voice mailbox number of the SIM card in a specified slot.
204   *
205   * @param slotId Indicates the card slot index number,
206   * ranging from {@code 0} to the maximum card slot index number supported by the device.
207   * @param callback Returns the voice mailbox number;
208   * returns an empty string if no voice mailbox number is written into the SIM card.
209   * @permission ohos.permission.GET_TELEPHONY_STATE
210   * @throws {BusinessError} 201 - Permission denied.
211   * @throws {BusinessError} 401 - Parameter error.
212   * @throws {BusinessError} 8300001 - Invalid parameter value.
213   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
214   * @throws {BusinessError} 8300003 - System internal error.
215   * @throws {BusinessError} 8300004 - Do not have sim card.
216   * @throws {BusinessError} 8300999 - Unknown error code.
217   * @systemapi Hide this for inner system use.
218   * @since 8
219   */
220  function getVoiceMailNumber(slotId: number, callback: AsyncCallback<string>): void;
221  function getVoiceMailNumber(slotId: number): Promise<string>;
222
223  /**
224   * Sets the voice mail information.
225   *
226   * @param slotId Indicates the card slot index number,
227   * ranging from {@code 0} to the maximum card slot index number supported by the device.
228   * @param mailName Indicates the name of voice mail.
229   * @param mailNumber Indicates the number of voice mail.
230   * @permission ohos.permission.SET_TELEPHONY_STATE
231   * @throws {BusinessError} 201 - Permission denied.
232   * @throws {BusinessError} 401 - Parameter error.
233   * @throws {BusinessError} 8300001 - Invalid parameter value.
234   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
235   * @throws {BusinessError} 8300003 - System internal error.
236   * @throws {BusinessError} 8300004 - Do not have sim card.
237   * @throws {BusinessError} 8300999 - Unknown error code.
238   * @throws {BusinessError} 8301002 - SIM card operation error.
239   * @systemapi Hide this for inner system use.
240   * @since 8
241   */
242  function setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string, callback: AsyncCallback<void>): void;
243  function setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string): Promise<void>;
244
245  /**
246   * Obtains the MSISDN of the SIM card in a specified slot.
247   * The MSISDN is recorded in the EFMSISDN file of the SIM card.
248   *
249   * @param slotId Indicates the card slot index number,
250   * ranging from 0 to the maximum card slot index number supported by the device.
251   * @param callback Returns the MSISDN; returns an empty string if no SIM card is inserted or
252   * no MSISDN is recorded in the EFMSISDN file.
253   * @permission ohos.permission.GET_TELEPHONY_STATE
254   * @throws {BusinessError} 201 - Permission denied.
255   * @throws {BusinessError} 401 - Parameter error.
256   * @throws {BusinessError} 8300001 - Invalid parameter value.
257   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
258   * @throws {BusinessError} 8300003 - System internal error.
259   * @throws {BusinessError} 8300004 - Do not have sim card.
260   * @throws {BusinessError} 8300999 - Unknown error code.
261   * @systemapi Hide this for inner system use.
262   * @since 8
263   */
264  function getSimTelephoneNumber(slotId: number, callback: AsyncCallback<string>): void;
265  function getSimTelephoneNumber(slotId: number): Promise<string>;
266
267  /**
268   * Obtains the Group Identifier Level 1 (GID1) of the SIM card in a specified slot.
269   * The GID1 is recorded in the EFGID1 file of the SIM card.
270   *
271   * @param slotId Indicates the card slot index number,
272   * ranging from 0 to the maximum card slot index number supported by the device.
273   * @param callback Returns the GID1; returns an empty string if no SIM card is inserted or
274   * no GID1 in the SIM card.
275   * @permission ohos.permission.GET_TELEPHONY_STATE
276   * @throws {BusinessError} 201 - Permission denied.
277   * @throws {BusinessError} 401 - Parameter error.
278   * @throws {BusinessError} 8300001 - Invalid parameter value.
279   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
280   * @throws {BusinessError} 8300003 - System internal error.
281   * @throws {BusinessError} 8300004 - Do not have sim card.
282   * @throws {BusinessError} 8300999 - Unknown error code.
283   * @systemapi Hide this for inner system use.
284   * @since 7
285   */
286  function getSimGid1(slotId: number, callback: AsyncCallback<string>): void;
287  function getSimGid1(slotId: number): Promise<string>;
288
289  /**
290   * Obtains the maximum number of SIM cards that can be used simultaneously on the device,
291   * that is, the maximum number of SIM card slots.
292   *
293   * @returns Returns the maximum number of SIM card slots.
294   * @since 7
295   */
296  function getMaxSimCount(): number;
297
298  /**
299   * Get the international mobile subscriber ID.
300   *
301   * @param slotId Indicates the card slot index number,
302   * ranging from 0 to the maximum card slot index number supported by the device.
303   * @param callback Returns the international mobile subscriber ID.
304   * @permission ohos.permission.GET_TELEPHONY_STATE
305   * @throws {BusinessError} 201 - Permission denied.
306   * @throws {BusinessError} 401 - Parameter error.
307   * @throws {BusinessError} 8300001 - Invalid parameter value.
308   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
309   * @throws {BusinessError} 8300003 - System internal error.
310   * @throws {BusinessError} 8300004 - Do not have sim card.
311   * @throws {BusinessError} 8300999 - Unknown error code.
312   * @systemapi Hide this for inner system use.
313   */
314  function getIMSI(slotId: number, callback: AsyncCallback<string>): void;
315  function getIMSI(slotId: number): Promise<string>;
316
317  /**
318   * Checks whether a SIM card is inserted in a specified slot.
319   *
320   * @param slotId Indicates the card slot index number,
321   * ranging from 0 to the maximum card slot index number supported by the device.
322   * @param callback Returns true if a SIM card is inserted; return false otherwise.
323   * @throws {BusinessError} 401 - Parameter error.
324   * @throws {BusinessError} 8300001 - Invalid parameter value.
325   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
326   * @throws {BusinessError} 8300003 - System internal error.
327   * @throws {BusinessError} 8300999 - Unknown error code.
328   * @since 7
329   */
330  function hasSimCard(slotId: number, callback: AsyncCallback<boolean>): void;
331  function hasSimCard(slotId: number): Promise<boolean>;
332
333  /**
334   * Get account information of SIM card.
335   *
336   * @param slotId Indicates the card slot index number,
337   * ranging from 0 to the maximum card slot index number supported by the device.
338   * @param callback Returns a {@code IccAccountInfo} object. The iccid and phone number will be null if permission denied.
339   * @permission ohos.permission.GET_TELEPHONY_STATE
340   * @throws {BusinessError} 401 - Parameter error.
341   * @throws {BusinessError} 8300001 - Invalid parameter value.
342   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
343   * @throws {BusinessError} 8300003 - System internal error.
344   * @throws {BusinessError} 8300004 - Do not have sim card.
345   * @throws {BusinessError} 8300999 - Unknown error code.
346   * @throws {BusinessError} 8301002 - SIM card operation error.
347   * @systemapi Hide this for inner system use.
348   * @since 7
349   */
350  function getSimAccountInfo(slotId: number, callback: AsyncCallback<IccAccountInfo>): void;
351  function getSimAccountInfo(slotId: number): Promise<IccAccountInfo>;
352
353  /**
354   * Get the list of active SIM card account information.
355   *
356   * @param callback Returns the list of IccAccountInfo; The iccid and phone number will be null if permission denied.
357   * @permission ohos.permission.GET_TELEPHONY_STATE
358   * @throws {BusinessError} 401 - Parameter error.
359   * @throws {BusinessError} 8300001 - Invalid parameter value.
360   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
361   * @throws {BusinessError} 8300003 - System internal error.
362   * @throws {BusinessError} 8300004 - Do not have sim card.
363   * @throws {BusinessError} 8300999 - Unknown error code.
364   * @systemapi Hide this for inner system use.
365   * @since 8
366   */
367  function getActiveSimAccountInfoList(callback: AsyncCallback<Array<IccAccountInfo>>): void;
368  function getActiveSimAccountInfoList(): Promise<Array<IccAccountInfo>>;
369
370  /**
371   * Set the card slot ID of the default voice service.
372   *
373   * @param slotId Indicates the card slot index number,
374   * ranging from 0 to the maximum card slot index number supported by the device.
375   * @permission ohos.permission.SET_TELEPHONY_STATE
376   * @throws {BusinessError} 201 - Permission denied.
377   * @throws {BusinessError} 401 - Parameter error.
378   * @throws {BusinessError} 8300001 - Invalid parameter value.
379   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
380   * @throws {BusinessError} 8300003 - System internal error.
381   * @throws {BusinessError} 8300004 - Do not have sim card.
382   * @throws {BusinessError} 8300999 - Unknown error code.
383   * @throws {BusinessError} 8301001 - SIM card is not activated.
384   * @systemapi Hide this for inner system use.
385   * @since 7
386   */
387  function setDefaultVoiceSlotId(slotId: number, callback: AsyncCallback<void>): void;
388  function setDefaultVoiceSlotId(slotId: number): Promise<void>;
389
390  /**
391   * Activate the SIM card in the specified slot.
392   *
393   * @param slotId Indicates the card slot index number,
394   * ranging from 0 to the maximum card slot index number supported by the device.
395   * @permission ohos.permission.SET_TELEPHONY_STATE
396   * @throws {BusinessError} 201 - Permission denied.
397   * @throws {BusinessError} 401 - Parameter error.
398   * @throws {BusinessError} 8300001 - Invalid parameter value.
399   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
400   * @throws {BusinessError} 8300003 - System internal error.
401   * @throws {BusinessError} 8300004 - Do not have sim card.
402   * @throws {BusinessError} 8300999 - Unknown error code.
403   * @systemapi Hide this for inner system use.
404   * @since 8
405   */
406  function activateSim(slotId: number, callback: AsyncCallback<void>): void;
407  function activateSim(slotId: number): Promise<void>;
408
409  /**
410   * Disable SIM card in specified slot.
411   *
412   * @param slotId Indicates the card slot index number,
413   * ranging from 0 to the maximum card slot index number supported by the device.
414   * @permission ohos.permission.SET_TELEPHONY_STATE
415   * @throws {BusinessError} 201 - Permission denied.
416   * @throws {BusinessError} 401 - Parameter error.
417   * @throws {BusinessError} 8300001 - Invalid parameter value.
418   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
419   * @throws {BusinessError} 8300003 - System internal error.
420   * @throws {BusinessError} 8300004 - Do not have sim card.
421   * @throws {BusinessError} 8300999 - Unknown error code.
422   * @systemapi Hide this for inner system use.
423   * @since 8
424   */
425  function deactivateSim(slotId: number, callback: AsyncCallback<void>): void;
426  function deactivateSim(slotId: number): Promise<void>;
427
428  /**
429   * Set the SIM card display name of the specified card slot.
430   *
431   * @param slotId Indicates the card slot index number,
432   * ranging from 0 to the maximum card slot index number supported by the device.
433   * @param name Indicates SIM card name.
434   * @permission ohos.permission.SET_TELEPHONY_STATE
435   * @throws {BusinessError} 201 - Permission denied.
436   * @throws {BusinessError} 401 - Parameter error.
437   * @throws {BusinessError} 8300001 - Invalid parameter value.
438   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
439   * @throws {BusinessError} 8300003 - System internal error.
440   * @throws {BusinessError} 8300004 - Do not have sim card.
441   * @throws {BusinessError} 8300999 - Unknown error code.
442   * @systemapi Hide this for inner system use.
443   * @since 8
444   */
445  function setShowName(slotId: number, name: string, callback: AsyncCallback<void>): void;
446  function setShowName(slotId: number, name: string): Promise<void>;
447
448  /**
449   * Gets the name of the SIM card in the specified slot.
450   *
451   * @param slotId Indicates the card slot index number,
452   * ranging from 0 to the maximum card slot index number supported by the device.
453   * @param callback Returns SIM card name.
454   * @permission ohos.permission.GET_TELEPHONY_STATE
455   * @throws {BusinessError} 201 - Permission denied.
456   * @throws {BusinessError} 401 - Parameter error.
457   * @throws {BusinessError} 8300001 - Invalid parameter value.
458   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
459   * @throws {BusinessError} 8300003 - System internal error.
460   * @throws {BusinessError} 8300004 - Do not have sim card.
461   * @throws {BusinessError} 8300999 - Unknown error code.
462   * @systemapi Hide this for inner system use.
463   * @since 8
464   */
465  function getShowName(slotId: number, callback: AsyncCallback<string>): void;
466  function getShowName(slotId: number): Promise<string>;
467
468  /**
469   * Set the SIM card number in the specified slot.
470   *
471   * @param slotId Indicates the card slot index number,
472   * ranging from 0 to the maximum card slot index number supported by the device.
473   * @param number Indicates SIM card number.
474   * @permission ohos.permission.SET_TELEPHONY_STATE
475   * @throws {BusinessError} 201 - Permission denied.
476   * @throws {BusinessError} 401 - Parameter error.
477   * @throws {BusinessError} 8300001 - Invalid parameter value.
478   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
479   * @throws {BusinessError} 8300003 - System internal error.
480   * @throws {BusinessError} 8300004 - Do not have sim card.
481   * @throws {BusinessError} 8300999 - Unknown error code.
482   * @systemapi Hide this for inner system use.
483   * @since 8
484   */
485  function setShowNumber(slotId: number, number: string, callback: AsyncCallback<void>): void;
486  function setShowNumber(slotId: number, number: string): Promise<void>;
487
488  /**
489   * Get the SIM card number of the specified card slot.
490   *
491   * @param slotId Indicates the card slot index number,
492   * ranging from 0 to the maximum card slot index number supported by the device.
493   * @param callback Returns SIM card number.
494   * @permission ohos.permission.GET_TELEPHONY_STATE
495   * @throws {BusinessError} 201 - Permission denied.
496   * @throws {BusinessError} 401 - Parameter error.
497   * @throws {BusinessError} 8300001 - Invalid parameter value.
498   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
499   * @throws {BusinessError} 8300003 - System internal error.
500   * @throws {BusinessError} 8300004 - Do not have sim card.
501   * @throws {BusinessError} 8300999 - Unknown error code.
502   * @systemapi Hide this for inner system use.
503   * @since 8
504   */
505  function getShowNumber(slotId: number, callback: AsyncCallback<string>): void;
506  function getShowNumber(slotId: number): Promise<string>;
507
508  /**
509   * Obtains the operatorconfigs of the SIM card in a specified slot.
510   *
511   * @param slotId Indicates the card slot index number,
512   * ranging from 0 to the maximum card slot index number supported by the device.
513   * @returns Returns the operatorconfigs in a specified slot; returns empty OperatorConfig
514   * if no SIM card is inserted
515   * @permission ohos.permission.GET_TELEPHONY_STATE
516   * @throws {BusinessError} 201 - Permission denied.
517   * @throws {BusinessError} 401 - Parameter error.
518   * @throws {BusinessError} 8300001 - Invalid parameter value.
519   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
520   * @throws {BusinessError} 8300003 - System internal error.
521   * @throws {BusinessError} 8300999 - Unknown error code.
522   * @systemapi Hide this for inner system use.
523   * @since 8
524   */
525  function getOperatorConfigs(slotId: number, callback: AsyncCallback<Array<OperatorConfig>>): void;
526  function getOperatorConfigs(slotId: number): Promise<Array<OperatorConfig>>;
527
528  /**
529   * Unlock the SIM card password of the specified card slot.
530   *
531   * @param slotId Indicates the card slot index number,
532   * ranging from 0 to the maximum card slot index number supported by the device.
533   * @param pin Indicates the password of the SIM card.
534   * @param callback Returns the response to obtain the SIM card lock status of the specified card slot.
535   * @permission ohos.permission.SET_TELEPHONY_STATE
536   * @throws {BusinessError} 201 - Permission denied.
537   * @throws {BusinessError} 401 - Parameter error.
538   * @throws {BusinessError} 8300001 - Invalid parameter value.
539   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
540   * @throws {BusinessError} 8300003 - System internal error.
541   * @throws {BusinessError} 8300004 - Do not have sim card.
542   * @throws {BusinessError} 8300999 - Unknown error code.
543   * @throws {BusinessError} 8301002 - SIM card operation error.
544   * @systemapi Hide this for inner system use.
545   * @since 7
546   */
547  function unlockPin(slotId: number, pin: string, callback: AsyncCallback<LockStatusResponse>): void;
548  function unlockPin(slotId: number, pin: string): Promise<LockStatusResponse>;
549
550  /**
551   * Unlock the SIM card password in the specified card slot.
552   *
553   * @param slotId Indicates the card slot index number,
554   * ranging from 0 to the maximum card slot index number supported by the device.
555   * @param newPin Indicates to reset the SIM card password.
556   * @param puk Indicates the unlock password of the SIM card password.
557   * @param callback Returns the response to obtain the SIM card lock status of the specified card slot.
558   * @permission ohos.permission.SET_TELEPHONY_STATE
559   * @throws {BusinessError} 201 - Permission denied.
560   * @throws {BusinessError} 401 - Parameter error.
561   * @throws {BusinessError} 8300001 - Invalid parameter value.
562   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
563   * @throws {BusinessError} 8300003 - System internal error.
564   * @throws {BusinessError} 8300004 - Do not have sim card.
565   * @throws {BusinessError} 8300999 - Unknown error code.
566   * @throws {BusinessError} 8301002 - SIM card operation error.
567   * @systemapi Hide this for inner system use.
568   * @since 7
569   */
570  function unlockPuk(slotId: number, newPin: string, puk: string, callback: AsyncCallback<LockStatusResponse>): void;
571  function unlockPuk(slotId: number, newPin: string, puk: string): Promise<LockStatusResponse>;
572
573  /**
574   * Change Pin Password.
575   *
576   * @param slotId Indicates the card slot index number,
577   * ranging from 0 to the maximum card slot index number supported by the device.
578   * @param newPin Indicates a new password.
579   * @param oldPin Indicates old password.
580   * @param callback Returns the response to obtain the SIM card lock status of the specified card slot.
581   * @permission ohos.permission.SET_TELEPHONY_STATE
582   * @throws {BusinessError} 201 - Permission denied.
583   * @throws {BusinessError} 401 - Parameter error.
584   * @throws {BusinessError} 8300001 - Invalid parameter value.
585   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
586   * @throws {BusinessError} 8300003 - System internal error.
587   * @throws {BusinessError} 8300004 - Do not have sim card.
588   * @throws {BusinessError} 8300999 - Unknown error code.
589   * @throws {BusinessError} 8301002 - SIM card operation error.
590   * @systemapi Hide this for inner system use.
591   * @since 7
592   */
593  function alterPin(slotId: number, newPin: string, oldPin: string, callback: AsyncCallback<LockStatusResponse>): void;
594  function alterPin(slotId: number, newPin: string, oldPin: string): Promise<LockStatusResponse>;
595
596  /**
597   * Set the lock status of the SIM card in the specified slot.
598   *
599   * @param slotId Indicates the card slot index number,
600   * ranging from 0 to the maximum card slot index number supported by the device.
601   * @param options Indicates lock information.
602   * @param callback Returns the response to obtain the SIM card lock status of the specified card slot.
603   * @permission ohos.permission.SET_TELEPHONY_STATE
604   * @throws {BusinessError} 201 - Permission denied.
605   * @throws {BusinessError} 401 - Parameter error.
606   * @throws {BusinessError} 8300001 - Invalid parameter value.
607   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
608   * @throws {BusinessError} 8300003 - System internal error.
609   * @throws {BusinessError} 8300004 - Do not have sim card.
610   * @throws {BusinessError} 8300999 - Unknown error code.
611   * @throws {BusinessError} 8301002 - SIM card operation error.
612   * @systemapi Hide this for inner system use.
613   * @since 7
614   */
615  function setLockState(slotId: number, options: LockInfo, callback: AsyncCallback<LockStatusResponse>): void;
616  function setLockState(slotId: number, options: LockInfo): Promise<LockStatusResponse>;
617
618  /**
619   * Unlock the SIM card password of the specified card slot.
620   *
621   * @param slotId Indicates the card slot index number,
622   * ranging from 0 to the maximum card slot index number supported by the device.
623   * @param pin2 Indicates the password of the SIM card.
624   * @param callback Returns the response to obtain the SIM card lock status of the specified card slot.
625   * @permission ohos.permission.SET_TELEPHONY_STATE
626   * @throws {BusinessError} 201 - Permission denied.
627   * @throws {BusinessError} 401 - Parameter error.
628   * @throws {BusinessError} 8300001 - Invalid parameter value.
629   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
630   * @throws {BusinessError} 8300003 - System internal error.
631   * @throws {BusinessError} 8300004 - Do not have sim card.
632   * @throws {BusinessError} 8300999 - Unknown error code.
633   * @throws {BusinessError} 8301002 - SIM card operation error.
634   * @systemapi Hide this for inner system use.
635   * @since 8
636   */
637  function unlockPin2(slotId: number, pin2: string, callback: AsyncCallback<LockStatusResponse>): void;
638  function unlockPin2(slotId: number, pin2: string): Promise<LockStatusResponse>;
639
640  /**
641   * Unlock the SIM card password in the specified card slot.
642   *
643   * @param slotId Indicates the card slot index number,
644   * ranging from 0 to the maximum card slot index number supported by the device.
645   * @param newPin2 Indicates to reset the SIM card password.
646   * @param puk2 Indicates the unlock password of the SIM card password.
647   * @param callback Returns the response to obtain the SIM card lock status of the specified card slot.
648   * @permission ohos.permission.SET_TELEPHONY_STATE
649   * @throws {BusinessError} 201 - Permission denied.
650   * @throws {BusinessError} 401 - Parameter error.
651   * @throws {BusinessError} 8300001 - Invalid parameter value.
652   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
653   * @throws {BusinessError} 8300003 - System internal error.
654   * @throws {BusinessError} 8300004 - Do not have sim card.
655   * @throws {BusinessError} 8300999 - Unknown error code.
656   * @throws {BusinessError} 8301002 - SIM card operation error.
657   * @systemapi Hide this for inner system use.
658   * @since 8
659   */
660  function unlockPuk2(slotId: number, newPin2: string, puk2: string, callback: AsyncCallback<LockStatusResponse>): void;
661  function unlockPuk2(slotId: number, newPin2: string, puk2: string): Promise<LockStatusResponse>;
662
663  /**
664   * Change Pin2 password.
665   *
666   * @param slotId Indicates the card slot index number,
667   * ranging from 0 to the maximum card slot index number supported by the device.
668   * @param newPin2 Indicates a new password.
669   * @param oldPin2 Indicates old password.
670   * @param callback Returns the response to obtain the SIM card lock status of the specified card slot.
671   * @permission ohos.permission.SET_TELEPHONY_STATE
672   * @throws {BusinessError} 201 - Permission denied.
673   * @throws {BusinessError} 401 - Parameter error.
674   * @throws {BusinessError} 8300001 - Invalid parameter value.
675   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
676   * @throws {BusinessError} 8300003 - System internal error.
677   * @throws {BusinessError} 8300004 - Do not have sim card.
678   * @throws {BusinessError} 8300999 - Unknown error code.
679   * @throws {BusinessError} 8301002 - SIM card operation error.
680   * @systemapi Hide this for inner system use.
681   * @since 8
682   */
683  function alterPin2(slotId: number, newPin2: string, oldPin2: string, callback: AsyncCallback<LockStatusResponse>): void;
684  function alterPin2(slotId: number, newPin2: string, oldPin2: string): Promise<LockStatusResponse>;
685
686  /**
687   * Query dialing number information on SIM card.
688   *
689   * @param slotId Indicates the card slot index number,
690   * ranging from 0 to the maximum card slot index number supported by the device.
691   * @param type Indicates contact type.
692   * @param callback Return dialing number information.
693   * @permission ohos.permission.READ_CONTACTS
694   * @throws {BusinessError} 201 - Permission denied.
695   * @throws {BusinessError} 401 - Parameter error.
696   * @throws {BusinessError} 8300001 - Invalid parameter value.
697   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
698   * @throws {BusinessError} 8300003 - System internal error.
699   * @throws {BusinessError} 8300004 - Do not have sim card.
700   * @throws {BusinessError} 8300999 - Unknown error code.
701   * @throws {BusinessError} 8301002 - SIM card operation error.
702   * @systemapi Hide this for inner system use.
703   * @since 8
704   */
705  function queryIccDiallingNumbers(slotId: number, type: ContactType, callback: AsyncCallback<Array<DiallingNumbersInfo>>): void;
706  function queryIccDiallingNumbers(slotId: number, type: ContactType): Promise<Array<DiallingNumbersInfo>>;
707
708  /**
709   * Add dialing number information to SIM card.
710   *
711   * @param slotId Indicates the card slot index number,
712   * ranging from 0 to the maximum card slot index number supported by the device.
713   * @param type Indicates contact type.
714   * @param diallingNumbers Indicates dialing number information.
715   * @permission ohos.permission.WRITE_CONTACTS
716   * @throws {BusinessError} 201 - Permission denied.
717   * @throws {BusinessError} 401 - Parameter error.
718   * @throws {BusinessError} 8300001 - Invalid parameter value.
719   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
720   * @throws {BusinessError} 8300003 - System internal error.
721   * @throws {BusinessError} 8300004 - Do not have sim card.
722   * @throws {BusinessError} 8300999 - Unknown error code.
723   * @throws {BusinessError} 8301002 - SIM card operation error.
724   * @systemapi Hide this for inner system use.
725   * @since 8
726   */
727  function addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo, callback: AsyncCallback<void>): void;
728  function addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo): Promise<void>;
729
730  /**
731   * Delete dialing number information on SIM card.
732   *
733   * @param slotId Indicates the card slot index number,
734   * ranging from 0 to the maximum card slot index number supported by the device.
735   * @param type Indicates contact type.
736   * @param diallingNumbers Indicates dialing number information.
737   * @permission ohos.permission.WRITE_CONTACTS
738   * @throws {BusinessError} 201 - Permission denied.
739   * @throws {BusinessError} 401 - Parameter error.
740   * @throws {BusinessError} 8300001 - Invalid parameter value.
741   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
742   * @throws {BusinessError} 8300003 - System internal error.
743   * @throws {BusinessError} 8300004 - Do not have sim card.
744   * @throws {BusinessError} 8300999 - Unknown error code.
745   * @throws {BusinessError} 8301002 - SIM card operation error.
746   * @systemapi Hide this for inner system use.
747   * @since 8
748   */
749  function delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo, callback: AsyncCallback<void>): void;
750  function delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo): Promise<void>;
751
752  /**
753   * Update dialing number information on SIM card.
754   *
755   * @param slotId Indicates the card slot index number,
756   * ranging from 0 to the maximum card slot index number supported by the device.
757   * @param type Indicates contact type.
758   * @param diallingNumbers Indicates dialing number information.
759   * @permission ohos.permission.WRITE_CONTACTS
760   * @throws {BusinessError} 201 - Permission denied.
761   * @throws {BusinessError} 401 - Parameter error.
762   * @throws {BusinessError} 8300001 - Invalid parameter value.
763   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
764   * @throws {BusinessError} 8300003 - System internal error.
765   * @throws {BusinessError} 8300004 - Do not have sim card.
766   * @throws {BusinessError} 8300999 - Unknown error code.
767   * @throws {BusinessError} 8301002 - SIM card operation error.
768   * @systemapi Hide this for inner system use.
769   * @since 8
770   */
771  function updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo, callback: AsyncCallback<void>): void;
772  function updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo): Promise<void>;
773
774  /**
775   * Get the lock status of the SIM card in the specified slot.
776   *
777   * @param slotId Indicates the card slot index number,
778   * ranging from 0 to the maximum card slot index number supported by the device.
779   * @param lockType Indicates the lock type.
780   * @param callback Returns sim card lock status.
781   * @permission ohos.permission.GET_TELEPHONY_STATE
782   * @throws {BusinessError} 201 - Permission denied.
783   * @throws {BusinessError} 401 - Parameter error.
784   * @throws {BusinessError} 8300001 - Invalid parameter value.
785   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
786   * @throws {BusinessError} 8300003 - System internal error.
787   * @throws {BusinessError} 8300004 - Do not have sim card.
788   * @throws {BusinessError} 8300999 - Unknown error code.
789   * @throws {BusinessError} 8301002 - SIM card operation error.
790   * @systemapi Hide this for inner system use.
791   * @since 8
792   */
793  function getLockState(slotId: number, lockType: LockType, callback: AsyncCallback<LockState>): void;
794  function getLockState(slotId: number, lockType: LockType): Promise<LockState>;
795
796  /**
797   * Send envelope command to SIM card.
798   *
799   * @param slotId Indicates the card slot index number,
800   * ranging from 0 to the maximum card slot index number supported by the device.
801   * @param cmd Indicates sending command.
802   * @permission ohos.permission.SET_TELEPHONY_STATE
803   * @throws {BusinessError} 201 - Permission denied.
804   * @throws {BusinessError} 401 - Parameter error.
805   * @throws {BusinessError} 8300001 - Invalid parameter value.
806   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
807   * @throws {BusinessError} 8300003 - System internal error.
808   * @throws {BusinessError} 8300004 - Do not have sim card.
809   * @throws {BusinessError} 8300999 - Unknown error code.
810   * @systemapi Hide this for inner system use.
811   * @since 8
812   */
813  function sendEnvelopeCmd(slotId: number, cmd: string, callback: AsyncCallback<void>): void;
814  function sendEnvelopeCmd(slotId: number, cmd: string): Promise<void>;
815
816  /**
817   * Send terminal response command to SIM card.
818   *
819   * @param slotId Indicates the card slot index number,
820   * ranging from 0 to the maximum card slot index number supported by the device.
821   * @param cmd Indicates sending command.
822   * @permission ohos.permission.SET_TELEPHONY_STATE
823   * @throws {BusinessError} 201 - Permission denied.
824   * @throws {BusinessError} 401 - Parameter error.
825   * @throws {BusinessError} 8300001 - Invalid parameter value.
826   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
827   * @throws {BusinessError} 8300003 - System internal error.
828   * @throws {BusinessError} 8300004 - Do not have sim card.
829   * @throws {BusinessError} 8300999 - Unknown error code.
830   * @systemapi Hide this for inner system use.
831   * @since 8
832   */
833  function sendTerminalResponseCmd(slotId: number, cmd: string, callback: AsyncCallback<void>): void;
834  function sendTerminalResponseCmd(slotId: number, cmd: string): Promise<void>;
835
836  /**
837   * Accept the call setup request.
838   *
839   * @param slotId Indicates the card slot index number,
840   * ranging from 0 to the maximum card slot index number supported by the device.
841   * @permission ohos.permission.SET_TELEPHONY_STATE
842   * @throws {BusinessError} 201 - Permission denied.
843   * @throws {BusinessError} 401 - Parameter error.
844   * @throws {BusinessError} 801 - Capability not supported.
845   * @throws {BusinessError} 8300001 - Invalid parameter value.
846   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
847   * @throws {BusinessError} 8300003 - System internal error.
848   * @throws {BusinessError} 8300004 - Do not have sim card.
849   * @throws {BusinessError} 8300999 - Unknown error code.
850   * @systemapi Hide this for inner system use.
851   * @since 9
852   */
853  function acceptCallSetupRequest(slotId: number, callback: AsyncCallback<void>): void;
854  function acceptCallSetupRequest(slotId: number): Promise<void>;
855
856  /**
857   * The call setup request was rejected.
858   *
859   * @param slotId Indicates the card slot index number,
860   * ranging from 0 to the maximum card slot index number supported by the device.
861   * @permission ohos.permission.SET_TELEPHONY_STATE
862   * @throws {BusinessError} 201 - Permission denied.
863   * @throws {BusinessError} 401 - Parameter error.
864   * @throws {BusinessError} 801 - Capability not supported.
865   * @throws {BusinessError} 8300001 - Invalid parameter value.
866   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
867   * @throws {BusinessError} 8300003 - System internal error.
868   * @throws {BusinessError} 8300004 - Do not have sim card.
869   * @throws {BusinessError} 8300999 - Unknown error code.
870   * @systemapi Hide this for inner system use.
871   * @since 9
872   */
873  function rejectCallSetupRequest(slotId: number, callback: AsyncCallback<void>): void;
874  function rejectCallSetupRequest(slotId: number): Promise<void>;
875
876  /**
877   * Unlock SIM card.
878   *
879   * @param slotId Indicates the card slot index number,
880   * ranging from 0 to the maximum card slot index number supported by the device.
881   * @param lockInfo Indicates customized lock type information.
882   * @param callback Returns the response to obtain the SIM card lock status of the specified card slot.
883   * @permission ohos.permission.SET_TELEPHONY_STATE
884   * @throws {BusinessError} 201 - Permission denied.
885   * @throws {BusinessError} 401 - Parameter error.
886   * @throws {BusinessError} 8300001 - Invalid parameter value.
887   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
888   * @throws {BusinessError} 8300003 - System internal error.
889   * @throws {BusinessError} 8300004 - Do not have sim card.
890   * @throws {BusinessError} 8300999 - Unknown error code.
891   * @throws {BusinessError} 8301002 - SIM card operation error.
892   * @systemapi Hide this for inner system use.
893   * @since 8
894   */
895  function unlockSimLock(slotId: number, lockInfo: PersoLockInfo, callback: AsyncCallback<LockStatusResponse>): void;
896  function unlockSimLock(slotId: number, lockInfo: PersoLockInfo): Promise<LockStatusResponse>;
897
898  /**
899   * Obtains the operator key of the SIM card in a specified slot.
900   *
901   * @param slotId Indicates the card slot index number,
902   * ranging from 0 to the maximum card slot index number supported by the device.
903   * @returns Returns the operator key; returns an empty string if no SIM card is inserted or
904   * no operator key matched.
905   * @throws {BusinessError} 401 - Parameter error.
906   * @throws {BusinessError} 801 - Capability not supported.
907   * @throws {BusinessError} 8300001 - Invalid parameter value.
908   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
909   * @throws {BusinessError} 8300003 - System internal error.
910   * @throws {BusinessError} 8300999 - Unknown error code.
911   * @since 9
912   */
913  function getOpKey(slotId: number, callback: AsyncCallback<string>): void;
914  function getOpKey(slotId: number): Promise<string>;
915
916  /**
917   * Obtains the operator name of the SIM card in a specified slot.
918   *
919   * @param slotId Indicates the card slot index number,
920   * ranging from 0 to the maximum card slot index number supported by the device.
921   * @returns Returns the operator name; returns an empty string if no SIM card is inserted or
922   * no operator name matched.
923   * @throws {BusinessError} 401 - Parameter error.
924   * @throws {BusinessError} 801 - Capability not supported.
925   * @throws {BusinessError} 8300001 - Invalid parameter value.
926   * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
927   * @throws {BusinessError} 8300003 - System internal error.
928   * @throws {BusinessError} 8300999 - Unknown error code.
929   * @since 9
930   */
931  function getOpName(slotId: number, callback: AsyncCallback<string>): void;
932  function getOpName(slotId: number): Promise<string>;
933
934  /**
935   * @systemapi Hide this for inner system use.
936   * @since 8
937   */
938  export interface OperatorConfig {
939    field: string;
940    value: string;
941  }
942
943  /**
944   * @systemapi Hide this for inner system use.
945   * @since 7
946   */
947  export interface IccAccountInfo {
948    /**
949     * sim Id for card.
950     */
951    simId: number;
952    /**
953     * slot id.
954     */
955    slotIndex: number;
956    /**
957     * mark card is eSim or not.
958     */
959    isEsim: boolean;
960    /**
961     * active status for card.
962     */
963    isActive: boolean;
964    /**
965     * iccId for card.
966     */
967    iccId: string;
968    /**
969     * display name for card.
970     */
971    showName: string;
972    /**
973     * display number for card.
974     */
975    showNumber: string;
976  }
977
978  /**
979   * @systemapi Hide this for inner system use.
980   * @since 7
981   */
982  export interface LockStatusResponse {
983    /**
984     * Current operation result
985     */
986    result: number;
987    /**
988     * Operations remaining
989     */
990    remain?: number;
991  }
992
993  /**
994   * @systemapi Hide this for inner system use.
995   * @since 8
996   */
997  export interface DiallingNumbersInfo {
998    alphaTag: string;
999    number: string;
1000    recordNumber?: number;
1001    pin2?: string;
1002  }
1003
1004  /**
1005   * @systemapi Hide this for inner system use.
1006   * @since 8
1007   */
1008  export interface LockInfo {
1009    lockType: LockType;
1010    password: string;
1011    state: LockState;
1012  }
1013
1014  /**
1015   * @systemapi Hide this for inner system use.
1016   * @since 8
1017   */
1018  export interface PersoLockInfo {
1019    lockType: PersoLockType;
1020    password: string;
1021  }
1022
1023  /**
1024   * @systemapi Hide this for inner system use.
1025   * @since 8
1026   */
1027  export enum LockType {
1028    PIN_LOCK = 1,
1029    FDN_LOCK = 2,
1030  }
1031
1032  /**
1033   * @since 7
1034   */
1035  export enum CardType {
1036    /** Icc card type: unknown type Card. */
1037    UNKNOWN_CARD = -1,
1038
1039    /** Icc card type: Single sim card type. */
1040    SINGLE_MODE_SIM_CARD = 10,
1041
1042    /** Icc card type: Single usim card type. */
1043    SINGLE_MODE_USIM_CARD = 20,
1044
1045    /** Icc card type: Single ruim card type. */
1046    SINGLE_MODE_RUIM_CARD = 30,
1047
1048    /** Icc card type: Double card C+G. */
1049    DUAL_MODE_CG_CARD = 40,
1050
1051    /** Icc card type: China Telecom Internal Roaming Card (Dual Mode). */
1052    CT_NATIONAL_ROAMING_CARD = 41,
1053
1054    /** Icc card type: China Unicom Dual Mode Card. */
1055    CU_DUAL_MODE_CARD = 42,
1056
1057    /** Icc card type: China Telecom LTE Card (Dual Mode). */
1058    DUAL_MODE_TELECOM_LTE_CARD = 43,
1059
1060    /** Icc card type: Double card U+G. */
1061    DUAL_MODE_UG_CARD = 50,
1062
1063    /**
1064     * Icc card type: Single isim card type.
1065     * @since 8
1066     */
1067    SINGLE_MODE_ISIM_CARD = 60
1068  }
1069
1070  export enum SimState {
1071    /**
1072     * Indicates unknown SIM card state, that is, the accurate status cannot be obtained.
1073     */
1074    SIM_STATE_UNKNOWN,
1075
1076    /**
1077     * Indicates that the SIM card is in the <b>not present</b> state, that is, no SIM card is inserted
1078     * into the card slot.
1079     */
1080    SIM_STATE_NOT_PRESENT,
1081
1082    /**
1083     * Indicates that the SIM card is in the <b>locked</b> state, that is, the SIM card is locked by the
1084     * personal identification number (PIN)/PIN unblocking key (PUK) or network.
1085     */
1086    SIM_STATE_LOCKED,
1087
1088    /**
1089     * Indicates that the SIM card is in the <b>not ready</b> state, that is, the SIM card is in position
1090     * but cannot work properly.
1091     */
1092    SIM_STATE_NOT_READY,
1093
1094    /**
1095     * Indicates that the SIM card is in the <b>ready</b> state, that is, the SIM card is in position and
1096     * is working properly.
1097     */
1098    SIM_STATE_READY,
1099
1100    /**
1101     * Indicates that the SIM card is in the <b>loaded</b> state, that is, the SIM card is in position and
1102     * is working properly.
1103     */
1104    SIM_STATE_LOADED
1105  }
1106
1107  /**
1108   * @systemapi Hide this for inner system use.
1109   * @since 8
1110   */
1111  export enum LockState {
1112    /**Indicates that the lock state card is in the <b>off</b> state. */
1113    LOCK_OFF = 0,
1114
1115    /**Indicates that the lock state card is in the <b>on</b> state. */
1116    LOCK_ON = 1,
1117  }
1118
1119  /**
1120   * @systemapi Hide this for inner system use.
1121   * @since 8
1122   */
1123  export enum ContactType {
1124    GENERAL_CONTACT = 1,
1125    FIXED_DIALING = 2,
1126  }
1127
1128  /**
1129   * @systemapi Hide this for inner system use.
1130   * @since 8
1131   */
1132  export enum PersoLockType {
1133    PN_PIN_LOCK, //Network Personalization (refer 3GPP TS 22.022 [33])
1134    PN_PUK_LOCK,
1135    PU_PIN_LOCK, //Network Subset Personalization (refer 3GPP TS 22.022 [33])
1136    PU_PUK_LOCK,
1137    PP_PIN_LOCK, //Service Provider Personalization (refer 3GPP TS 22.022 [33])
1138    PP_PUK_LOCK,
1139    PC_PIN_LOCK, //Corporate Personalization (refer 3GPP TS 22.022 [33])
1140    PC_PUK_LOCK,
1141    SIM_PIN_LOCK, //SIM/USIM Personalization (refer 3GPP TS 22.022 [33])
1142    SIM_PUK_LOCK,
1143  }
1144
1145  /**
1146   * @systemapi Hide this for inner system use.
1147   * @since 9
1148   */
1149  export enum OperatorConfigKey {
1150    /**
1151     * Indicates the voice mail number.
1152     */
1153    KEY_VOICE_MAIL_NUMBER_STRING = "voice_mail_number_string",
1154    /**
1155     * Indicates the status of ims switch.
1156     */
1157    KEY_IMS_SWITCH_ON_BY_DEFAULT_BOOL = "ims_switch_on_by_default_bool",
1158    /**
1159     * Indicates whether the ims switch status is hidden.
1160     */
1161    KEY_HIDE_IMS_SWITCH_BOOL = "hide_ims_switch_bool",
1162    /**
1163     * Indicates whether volte mode is supported.
1164     */
1165    KEY_VOLTE_SUPPORTED_BOOL = "volte_supported_bool",
1166    /**
1167     * Indicates the list supported by nr mode.
1168     */
1169    KEY_NR_MODE_SUPPORTED_LIST_INT_ARRAY = "nr_mode_supported_list_int_array",
1170    /**
1171     * Indicates whether VOLTE supports configuration.
1172     */
1173    KEY_VOLTE_PROVISIONING_SUPPORTED_BOOL = "volte_provisioning_supported_bool",
1174    /**
1175     * Indicates whether SS service supports UT.
1176     */
1177    KEY_SS_OVER_UT_SUPPORTED_BOOL = "ss_over_ut_supported_bool",
1178    /**
1179     * Indicates whether the IMS requires GBA.
1180     */
1181    KEY_IMS_GBA_REQUIRED_BOOL = "ims_gba_required_bool",
1182    /**
1183     * Indicates whether UT configuration is supported.
1184     */
1185    KEY_UT_PROVISIONING_SUPPORTED_BOOL = "ut_provisioning_supported_bool",
1186    /**
1187     * Indicates the ims emergency preference.
1188     */
1189    KEY_IMS_PREFER_FOR_EMERGENCY_BOOL = "ims_prefer_for_emergency_bool",
1190    /**
1191     * Indicates call waiting service.
1192     */
1193    KEY_CALL_WAITING_SERVICE_CLASS_INT = "call_waiting_service_class_int",
1194    /**
1195     * Indicates call forwarding visibility.
1196     */
1197    KEY_CALL_TRANSFER_VISIBILITY_BOOL = "call_transfer_visibility_bool",
1198    /**
1199     * Indicates the list of ims call end reasons.
1200     */
1201    KEY_IMS_CALL_DISCONNECT_REASON_INFO_MAPPING_STRING_ARRAY = "ims_call_disconnect_reason_info_mapping_string_array",
1202    /**
1203     * Indicates the forced Volte switch on state.
1204     */
1205    KEY_FORCE_VOLTE_SWITCH_ON_BOOL = "force_volte_switch_on_bool",
1206    /**
1207     * Indicates whether the operator name is displayed.
1208     */
1209    KEY_ENABLE_OPERATOR_NAME_CUST_BOOL = "enable_operator_name_cust_bool",
1210    /**
1211     * Indicates the name of the operator.
1212     */
1213    KEY_OPERATOR_NAME_CUST_STRING = "operator_name_cust_string",
1214    /**
1215     * Indicates the spn display rule.
1216     */
1217    KEY_SPN_DISPLAY_CONDITION_CUST_INT = "spn_display_condition_cust_int",
1218    /**
1219     * Indicates the PLMN name.
1220     */
1221    KEY_PNN_CUST_STRING_ARRAY = "pnn_cust_string_array",
1222    /**
1223     * Indicates operator PLMN information.
1224     */
1225    KEY_OPL_CUST_STRING_ARRAY = "opl_cust_string_array",
1226    /**
1227     * Indicates the emergency call list.
1228     */
1229    KEY_EMERGENCY_CALL_STRING_ARRAY = "emergency_call_string_array",
1230  }
1231}
1232
1233export default sim;
1234