• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2021-2023 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
16/**
17 * @file
18 * @kit TelephonyKit
19 */
20
21import type { AsyncCallback } from './@ohos.base';
22
23/**
24 * Provides applications with APIs for obtaining SIM card status, card file information, and card specifications.
25 * SIM cards include SIM, USIM, and CSIM cards.
26 *
27 * @namespace sim
28 * @syscap SystemCapability.Telephony.CoreService
29 * @since 6
30 */
31declare namespace sim {
32  /**
33   * Checks whether the SIM card in a specified slot is activated.
34   *
35   * @param { number } slotId - Indicates the card slot index number,
36   * ranging from {@code 0} to the maximum card slot index number supported by the device.
37   * @param { AsyncCallback<boolean> } callback - Indicates the callback for checking
38   * whether the SIM card in a specified slot is activated.
39   * Returns {@code true} if the SIM card is activated; returns {@code false} otherwise.
40   * @syscap SystemCapability.Telephony.CoreService
41   * @since 7
42   */
43  function isSimActive(slotId: number, callback: AsyncCallback<boolean>): void;
44
45  /**
46   * Checks whether the SIM card in a specified slot is activated.
47   *
48   * @param { number } slotId - Indicates the card slot index number,
49   * ranging from {@code 0} to the maximum card slot index number supported by the device.
50   * @returns { Promise<boolean> } Returns {@code true} if the SIM card is activated; returns {@code false} otherwise.
51   * @syscap SystemCapability.Telephony.CoreService
52   * @since 7
53   */
54  function isSimActive(slotId: number): Promise<boolean>;
55
56  /**
57   * Checks whether the SIM card in a specified slot is activated.
58   *
59   * @param { number } slotId - Indicates the card slot index number,
60   * ranging from 0 to the maximum card slots supported by the device.
61   * @returns { boolean } Returns {@code true} if the SIM card is activated; returns {@code false} otherwise.
62   * @syscap SystemCapability.Telephony.CoreService
63   * @since 10
64   */
65  function isSimActiveSync(slotId: number): boolean;
66
67  /**
68   * Obtains the default card slot for the voice service.
69   *
70   * @param { AsyncCallback<number> } callback - Indicates the callback for getting
71   * the default card slot for the voice service.
72   * Returns {@code 0} if card 1 is used as the default card slot for the voice service;
73   * returns {@code 1} if card 2 is used as the default card slot for the voice service;
74   * returns {@code -1} if no card is available for the voice service.
75   * @syscap SystemCapability.Telephony.CoreService
76   * @since 7
77   */
78  function getDefaultVoiceSlotId(callback: AsyncCallback<number>): void;
79
80  /**
81   * Obtains the default card slot for the voice service.
82   *
83   * @returns { Promise<number> } Returns {@code 0} if card 1 is used as the default card slot for the voice service;
84   * returns {@code 1} if card 2 is used as the default card slot for the voice service;
85   * returns {@code -1} if no card is available for the voice service.
86   * @syscap SystemCapability.Telephony.CoreService
87   * @since 7
88   */
89  function getDefaultVoiceSlotId(): Promise<number>;
90
91  /**
92   * Checks whether your application (the caller) has been granted the operator permissions.
93   *
94   * @param { number } slotId - Indicates the card slot index number,
95   * ranging from {@code 0} to the maximum card slot index number supported by the device.
96   * @param { AsyncCallback<boolean> } callback - Indicates the callback of hasOperatorPrivileges.
97   * Returns {@code true} if your application has been granted the operator permissions; returns {@code false} otherwise.
98   * If no SIM card is inserted or the SIM card is deactivated will be return {@code false}.
99   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
100   *     2. Incorrect parameter types.
101   * @throws { BusinessError } 8300001 - Invalid parameter value.
102   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
103   * @throws { BusinessError } 8300003 - System internal error.
104   * @throws { BusinessError } 8300999 - Unknown error code.
105   * @syscap SystemCapability.Telephony.CoreService
106   * @since 7
107   */
108  function hasOperatorPrivileges(slotId: number, callback: AsyncCallback<boolean>): void;
109
110  /**
111   * Checks whether your application (the caller) has been granted the operator permissions.
112   *
113   * @param { number } slotId - Indicates the card slot index number,
114   * ranging from {@code 0} to the maximum card slot index number supported by the device.
115   * @returns { Promise<boolean> } Returns {@code true} if your application has been granted the operator permissions;
116   * returns {@code false} otherwise. If no SIM card is inserted or the SIM card is deactivated will be
117   * return {@code false}.
118   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
119   *     2. Incorrect parameter types.
120   * @throws { BusinessError } 8300001 - Invalid parameter value.
121   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
122   * @throws { BusinessError } 8300003 - System internal error.
123   * @throws { BusinessError } 8300999 - Unknown error code.
124   * @syscap SystemCapability.Telephony.CoreService
125   * @since 7
126   */
127  function hasOperatorPrivileges(slotId: number): Promise<boolean>;
128
129  /**
130   * Obtains the ISO country code of the SIM card in a specified slot.
131   *
132   * @param { number } slotId - Indicates the card slot index number,
133   * ranging from 0 to the maximum card slot index number supported by the device.
134   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the country code defined
135   * in ISO 3166-2; returns an empty string if no SIM card is inserted.
136   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
137   *     2. Incorrect parameter types.
138   * @throws { BusinessError } 8300001 - Invalid parameter value.
139   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
140   * @throws { BusinessError } 8300003 - System internal error.
141   * @throws { BusinessError } 8300004 - Do not have sim card.
142   * @throws { BusinessError } 8300999 - Unknown error code.
143   * @syscap SystemCapability.Telephony.CoreService
144   * @since 6
145   */
146  function getISOCountryCodeForSim(slotId: number, callback: AsyncCallback<string>): void;
147
148  /**
149   * Obtains the ISO country code of the SIM card in a specified slot.
150   *
151   * @param { number } slotId - Indicates the card slot index number,
152   * ranging from 0 to the maximum card slot index number supported by the device.
153   * @returns { Promise<string> } Returns the country code defined in ISO 3166-2;
154   * returns an empty string if no SIM card is inserted.
155   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
156   *     2. Incorrect parameter types.
157   * @throws { BusinessError } 8300001 - Invalid parameter value.
158   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
159   * @throws { BusinessError } 8300003 - System internal error.
160   * @throws { BusinessError } 8300004 - Do not have sim card.
161   * @throws { BusinessError } 8300999 - Unknown error code.
162   * @syscap SystemCapability.Telephony.CoreService
163   * @since 6
164   */
165  function getISOCountryCodeForSim(slotId: number): Promise<string>;
166
167  /**
168   * Obtains the ISO country code of the SIM card in a specified slot.
169   *
170   * @param { number } slotId - Indicates the card slot index number,
171   * ranging from 0 to the maximum card slots supported by the device.
172   * @returns { string } Returns the country code defined in ISO 3166-2; returns an empty string if no SIM card
173   * is inserted.
174   * @syscap SystemCapability.Telephony.CoreService
175   * @since 10
176   */
177  function getISOCountryCodeForSimSync(slotId: number): string;
178
179  /**
180   * Obtains the home PLMN number of the SIM card in a specified slot.
181   *
182   * <p>The value is recorded in the SIM card and is irrelevant to the network
183   * with which the SIM card is currently registered.
184   *
185   * @param { number } slotId - Indicates the card slot index number,
186   * ranging from 0 to the maximum card slot index number supported by the device.
187   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the PLMN number;
188   * returns an empty string if no SIM card is inserted.
189   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
190   *     2. Incorrect parameter types.
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   * @syscap SystemCapability.Telephony.CoreService
197   * @since 6
198   */
199  function getSimOperatorNumeric(slotId: number, callback: AsyncCallback<string>): void;
200
201  /**
202   * Obtains the home PLMN number of the SIM card in a specified slot.
203   *
204   * <p>The value is recorded in the SIM card and is irrelevant to the network
205   * with which the SIM card is currently registered.
206   *
207   * @param { number } slotId - Indicates the card slot index number,
208   * ranging from 0 to the maximum card slot index number supported by the device.
209   * @returns { Promise<string> } Returns the PLMN number; returns an empty string if no SIM card is inserted.
210   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
211   *     2. Incorrect parameter types.
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   * @syscap SystemCapability.Telephony.CoreService
218   * @since 6
219   */
220  function getSimOperatorNumeric(slotId: number): Promise<string>;
221
222  /**
223   * Obtains the home PLMN number of the SIM card in a specified slot.
224   *
225   * <p>The value is recorded in the SIM card and is irrelevant to the network
226   * with which the SIM card is currently registered.
227   *
228   * @param { number } slotId - Indicates the card slot index number,
229   * ranging from 0 to the maximum card slots supported by the device.
230   * @returns { string } Returns the PLMN number; returns an empty string if no SIM card is inserted.
231   * @syscap SystemCapability.Telephony.CoreService
232   * @since 10
233   */
234  function getSimOperatorNumericSync(slotId: number): string;
235
236  /**
237   * Obtains the service provider name (SPN) of the SIM card in a specified slot.
238   *
239   * <p>The value is recorded in the EFSPN file of the SIM card and is irrelevant to the network
240   * with which the SIM card is currently registered.
241   *
242   * @param { number } slotId - Indicates the card slot index number,
243   * ranging from 0 to the maximum card slot index number supported by the device.
244   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the SPN;
245   * returns an empty string if no SIM card is inserted or no EFSPN file in the SIM card.
246   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
247   *     2. Incorrect parameter types.
248   * @throws { BusinessError } 8300001 - Invalid parameter value.
249   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
250   * @throws { BusinessError } 8300003 - System internal error.
251   * @throws { BusinessError } 8300004 - Do not have sim card.
252   * @throws { BusinessError } 8300999 - Unknown error code.
253   * @syscap SystemCapability.Telephony.CoreService
254   * @since 6
255   */
256  function getSimSpn(slotId: number, callback: AsyncCallback<string>): void;
257
258  /**
259   * Obtains the service provider name (SPN) of the SIM card in a specified slot.
260   *
261   * <p>The value is recorded in the EFSPN file of the SIM card and is irrelevant to the network
262   * with which the SIM card is currently registered.
263   *
264   * @param { number } slotId - Indicates the card slot index number,
265   * ranging from 0 to the maximum card slot index number supported by the device.
266   * @returns { Promise<string> } Returns the SPN; returns an empty string if no SIM card is inserted or
267   * no EFSPN file in the SIM card.
268   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
269   *     2. Incorrect parameter types.
270   * @throws { BusinessError } 8300001 - Invalid parameter value.
271   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
272   * @throws { BusinessError } 8300003 - System internal error.
273   * @throws { BusinessError } 8300004 - Do not have sim card.
274   * @throws { BusinessError } 8300999 - Unknown error code.
275   * @syscap SystemCapability.Telephony.CoreService
276   * @since 6
277   */
278  function getSimSpn(slotId: number): Promise<string>;
279
280  /**
281   * Obtains the service provider name (SPN) of the SIM card in a specified slot.
282   *
283   * <p>The value is recorded in the EFSPN file of the SIM card and is irrelevant to the network
284   * with which the SIM card is currently registered.
285   *
286   * @param { number } slotId - Indicates the card slot index number,
287   * ranging from 0 to the maximum card slots supported by the device.
288   * @returns { string } Returns the SPN; returns an empty string if no EFSPN file is configured for the SIM card.
289   * in the SIM card.
290   * @syscap SystemCapability.Telephony.CoreService
291   * @since 10
292   */
293  function getSimSpnSync(slotId: number): string;
294
295  /**
296   * Obtains the state of the SIM card in a specified slot.
297   *
298   * @param { number } slotId - Indicates the card slot index number,
299   * ranging from {@code 0} to the maximum card slot index number supported by the device.
300   * @param { AsyncCallback<SimState> } callback - Indicates the callback for getting one of the following SIM card states:
301   * <ul>
302   * <li>{@code SimState#SIM_STATE_UNKNOWN}
303   * <li>{@code SimState#SIM_STATE_NOT_PRESENT}
304   * <li>{@code SimState#SIM_STATE_LOCKED}
305   * <li>{@code SimState#SIM_STATE_NOT_READY}
306   * <li>{@code SimState#SIM_STATE_READY}
307   * <li>{@code SimState#SIM_STATE_LOADED}
308   * </ul>
309   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
310   *     2. Incorrect parameter types.
311   * @throws { BusinessError } 8300001 - Invalid parameter value.
312   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
313   * @throws { BusinessError } 8300003 - System internal error.
314   * @throws { BusinessError } 8300999 - Unknown error code.
315   * @syscap SystemCapability.Telephony.CoreService
316   * @since 6
317   */
318  function getSimState(slotId: number, callback: AsyncCallback<SimState>): void;
319
320  /**
321   * Obtains the state of the SIM card in a specified slot.
322   *
323   * @param { number } slotId - Indicates the card slot index number,
324   * ranging from {@code 0} to the maximum card slot index number supported by the device.
325   * @returns { Promise<SimState> } Returns one of the following SIM card states:
326   * <ul>
327   * <li>{@code SimState#SIM_STATE_UNKNOWN}
328   * <li>{@code SimState#SIM_STATE_NOT_PRESENT}
329   * <li>{@code SimState#SIM_STATE_LOCKED}
330   * <li>{@code SimState#SIM_STATE_NOT_READY}
331   * <li>{@code SimState#SIM_STATE_READY}
332   * <li>{@code SimState#SIM_STATE_LOADED}
333   * </ul>
334   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
335   *     2. Incorrect parameter types.
336   * @throws { BusinessError } 8300001 - Invalid parameter value.
337   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
338   * @throws { BusinessError } 8300003 - System internal error.
339   * @throws { BusinessError } 8300999 - Unknown error code.
340   * @syscap SystemCapability.Telephony.CoreService
341   * @since 6
342   */
343  function getSimState(slotId: number): Promise<SimState>;
344
345  /**
346   * Obtains the state of the SIM card in a specified slot.
347   *
348   * @param { number } slotId - Indicates the card slot index number,
349   * ranging from 0 to the maximum card slots supported by the device.
350   * @returns { SimState } Returns one of the following SIM card states:
351   * <ul>
352   * <li>{@code SimState#SIM_STATE_UNKNOWN}
353   * <li>{@code SimState#SIM_STATE_NOT_PRESENT}
354   * <li>{@code SimState#SIM_STATE_LOCKED}
355   * <li>{@code SimState#SIM_STATE_NOT_READY}
356   * <li>{@code SimState#SIM_STATE_READY}
357   * <li>{@code SimState#SIM_STATE_LOADED}
358   * </ul>
359   * @syscap SystemCapability.Telephony.CoreService
360   * @since 10
361   */
362  function getSimStateSync(slotId: number): SimState;
363
364  /**
365   * Obtains the type of the SIM card installed in a specified slot.
366   *
367   * @param { number } slotId - Indicates the card slot index number,
368   * ranging from {@code 0} to the maximum card slot index number supported by the device.
369   * @param { AsyncCallback<CardType> } callback - Indicates the callback for getting the SIM card type.
370   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
371   *     2. Incorrect parameter types.
372   * @throws { BusinessError } 8300001 - Invalid parameter value.
373   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
374   * @throws { BusinessError } 8300003 - System internal error.
375   * @throws { BusinessError } 8300004 - Do not have sim card.
376   * @throws { BusinessError } 8300999 - Unknown error code.
377   * @syscap SystemCapability.Telephony.CoreService
378   * @since 7
379   */
380  function getCardType(slotId: number, callback: AsyncCallback<CardType>): void;
381
382  /**
383   * Obtains the type of the SIM card installed in a specified slot.
384   *
385   * @param { number } slotId - Indicates the card slot index number,
386   * ranging from {@code 0} to the maximum card slot index number supported by the device.
387   * @returns { Promise<CardType> } Returns the SIM card type.
388   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
389   *     2. Incorrect parameter types.
390   * @throws { BusinessError } 8300001 - Invalid parameter value.
391   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
392   * @throws { BusinessError } 8300003 - System internal error.
393   * @throws { BusinessError } 8300004 - Do not have sim card.
394   * @throws { BusinessError } 8300999 - Unknown error code.
395   * @syscap SystemCapability.Telephony.CoreService
396   * @since 7
397   */
398  function getCardType(slotId: number): Promise<CardType>;
399
400  /**
401   * Obtains the type of the SIM card inserted in a specified slot.
402   *
403   * @param { number } slotId - Indicates the card slot index number,
404   * ranging from 0 to the maximum card slots supported by the device.
405   * @returns { CardType } Returns the SIM card type.
406   * @syscap SystemCapability.Telephony.CoreService
407   * @since 10
408   */
409  function getCardTypeSync(slotId: number): CardType;
410
411  /**
412   * Obtains the ICCID of the SIM card in a specified slot.
413   *
414   * <p>The ICCID is a unique identifier of a SIM card. It consists of 20 digits
415   * and is recorded in the EFICCID file of the SIM card.
416   *
417   * @permission ohos.permission.GET_TELEPHONY_STATE
418   * @param { number } slotId - Indicates the card slot index number,
419   * ranging from 0 to the maximum card slot index number supported by the device.
420   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the ICCID;
421   * returns an empty string if no SIM card is inserted.
422   * @throws { BusinessError } 201 - Permission denied.
423   * @throws { BusinessError } 202 - Non-system applications use system APIs.
424   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
425   *     2. Incorrect parameter types.
426   * @throws { BusinessError } 8300001 - Invalid parameter value.
427   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
428   * @throws { BusinessError } 8300003 - System internal error.
429   * @throws { BusinessError } 8300004 - Do not have sim card.
430   * @throws { BusinessError } 8300999 - Unknown error code.
431   * @syscap SystemCapability.Telephony.CoreService
432   * @systemapi Hide this for inner system use.
433   * @since 7
434   */
435  function getSimIccId(slotId: number, callback: AsyncCallback<string>): void;
436
437  /**
438   * Obtains the ICCID of the SIM card in a specified slot.
439   *
440   * <p>The ICCID is a unique identifier of a SIM card. It consists of 20 digits
441   * and is recorded in the EFICCID file of the SIM card.
442   *
443   * @permission ohos.permission.GET_TELEPHONY_STATE
444   * @param { number } slotId - Indicates the card slot index number,
445   * ranging from 0 to the maximum card slot index number supported by the device.
446   * @returns { Promise<string> } Returns the ICCID; returns an empty string if no SIM card is inserted.
447   * @throws { BusinessError } 201 - Permission denied.
448   * @throws { BusinessError } 202 - Non-system applications use system APIs.
449   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
450   *     2. Incorrect parameter types.
451   * @throws { BusinessError } 8300001 - Invalid parameter value.
452   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
453   * @throws { BusinessError } 8300003 - System internal error.
454   * @throws { BusinessError } 8300004 - Do not have sim card.
455   * @throws { BusinessError } 8300999 - Unknown error code.
456   * @syscap SystemCapability.Telephony.CoreService
457   * @systemapi Hide this for inner system use.
458   * @since 7
459   */
460  function getSimIccId(slotId: number): Promise<string>;
461
462  /**
463   * Obtains the alpha identifier of the voice mailbox of the SIM card in a specified slot.
464   *
465   * @permission ohos.permission.GET_TELEPHONY_STATE
466   * @param { number } slotId - Indicates the card slot index number,
467   * ranging from {@code 0} to the maximum card slot index number supported by the device.
468   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the voice mailbox alpha identifier;
469   * returns an empty string if no voice mailbox alpha identifier is written into the SIM card.
470   * @throws { BusinessError } 201 - Permission denied.
471   * @throws { BusinessError } 202 - Non-system applications use system APIs.
472   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
473   *     2. Incorrect parameter types.
474   * @throws { BusinessError } 8300001 - Invalid parameter value.
475   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
476   * @throws { BusinessError } 8300003 - System internal error.
477   * @throws { BusinessError } 8300004 - Do not have sim card.
478   * @throws { BusinessError } 8300999 - Unknown error code.
479   * @syscap SystemCapability.Telephony.CoreService
480   * @systemapi Hide this for inner system use.
481   * @since 8
482   */
483  function getVoiceMailIdentifier(slotId: number, callback: AsyncCallback<string>): void;
484
485  /**
486   * Obtains the alpha identifier of the voice mailbox of the SIM card in a specified slot.
487   *
488   * @permission ohos.permission.GET_TELEPHONY_STATE
489   * @param { number } slotId - Indicates the card slot index number,
490   * ranging from {@code 0} to the maximum card slot index number supported by the device.
491   * @returns { Promise<string> } Returns the voice mailbox alpha identifier;
492   * returns an empty string if no voice mailbox alpha identifier is written into the SIM card.
493   * @throws { BusinessError } 201 - Permission denied.
494   * @throws { BusinessError } 202 - Non-system applications use system APIs.
495   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
496   *     2. Incorrect parameter types.
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   * @syscap SystemCapability.Telephony.CoreService
503   * @systemapi Hide this for inner system use.
504   * @since 8
505   */
506  function getVoiceMailIdentifier(slotId: number): Promise<string>;
507
508  /**
509   * Obtains the voice mailbox number of the SIM card in a specified slot.
510   *
511   * @permission ohos.permission.GET_TELEPHONY_STATE
512   * @param { number } slotId - Indicates the card slot index number,
513   * ranging from {@code 0} to the maximum card slot index number supported by the device.
514   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the voice mailbox number;
515   * returns an empty string if no voice mailbox number is written into the SIM card.
516   * @throws { BusinessError } 201 - Permission denied.
517   * @throws { BusinessError } 202 - Non-system applications use system APIs.
518   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
519   *     2. Incorrect parameter types.
520   * @throws { BusinessError } 8300001 - Invalid parameter value.
521   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
522   * @throws { BusinessError } 8300003 - System internal error.
523   * @throws { BusinessError } 8300004 - Do not have sim card.
524   * @throws { BusinessError } 8300999 - Unknown error code.
525   * @syscap SystemCapability.Telephony.CoreService
526   * @systemapi Hide this for inner system use.
527   * @since 8
528   */
529  function getVoiceMailNumber(slotId: number, callback: AsyncCallback<string>): void;
530
531  /**
532   * Obtains the voice mailbox number of the SIM card in a specified slot.
533   *
534   * @permission ohos.permission.GET_TELEPHONY_STATE
535   * @param { number } slotId - Indicates the card slot index number,
536   * ranging from {@code 0} to the maximum card slot index number supported by the device.
537   * @returns { Promise<string> } Returns the voice mailbox number.
538   * returns an empty string if no voice mailbox number is written into the SIM card.
539   * @throws { BusinessError } 201 - Permission denied.
540   * @throws { BusinessError } 202 - Non-system applications use system APIs.
541   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
542   *     2. Incorrect parameter types.
543   * @throws { BusinessError } 8300001 - Invalid parameter value.
544   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
545   * @throws { BusinessError } 8300003 - System internal error.
546   * @throws { BusinessError } 8300004 - Do not have sim card.
547   * @throws { BusinessError } 8300999 - Unknown error code.
548   * @syscap SystemCapability.Telephony.CoreService
549   * @systemapi Hide this for inner system use.
550   * @since 8
551   */
552  function getVoiceMailNumber(slotId: number): Promise<string>;
553
554  /**
555   * Sets the voice mail information.
556   *
557   * @permission ohos.permission.SET_TELEPHONY_STATE
558   * @param { number } slotId - Indicates the card slot index number,
559   * ranging from {@code 0} to the maximum card slot index number supported by the device.
560   * @param { string } mailName - Indicates the name of voice mail.
561   * @param { string } mailNumber - Indicates the number of voice mail.
562   * @param { AsyncCallback<void> } callback - The callback of setVoiceMailInfo.
563   * @throws { BusinessError } 201 - Permission denied.
564   * @throws { BusinessError } 202 - Non-system applications use system APIs.
565   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
566   *     2. Incorrect parameter types.
567   * @throws { BusinessError } 8300001 - Invalid parameter value.
568   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
569   * @throws { BusinessError } 8300003 - System internal error.
570   * @throws { BusinessError } 8300004 - Do not have sim card.
571   * @throws { BusinessError } 8300999 - Unknown error code.
572   * @throws { BusinessError } 8301002 - SIM card operation error.
573   * @syscap SystemCapability.Telephony.CoreService
574   * @systemapi Hide this for inner system use.
575   * @since 8
576   */
577  function setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string, callback: AsyncCallback<void>): void;
578
579  /**
580   * Sets the voice mail information.
581   *
582   * @permission ohos.permission.SET_TELEPHONY_STATE
583   * @param { number } slotId - Indicates the card slot index number,
584   * ranging from {@code 0} to the maximum card slot index number supported by the device.
585   * @param { string } mailName - Indicates the name of voice mail.
586   * @param { string } mailNumber - Indicates the number of voice mail.
587   * @returns { Promise<void> } The promise returned by the setVoiceMailInfo.
588   * @throws { BusinessError } 201 - Permission denied.
589   * @throws { BusinessError } 202 - Non-system applications use system APIs.
590   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
591   *     2. Incorrect parameter types.
592   * @throws { BusinessError } 8300001 - Invalid parameter value.
593   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
594   * @throws { BusinessError } 8300003 - System internal error.
595   * @throws { BusinessError } 8300004 - Do not have sim card.
596   * @throws { BusinessError } 8300999 - Unknown error code.
597   * @throws { BusinessError } 8301002 - SIM card operation error.
598   * @syscap SystemCapability.Telephony.CoreService
599   * @systemapi Hide this for inner system use.
600   * @since 8
601   */
602  function setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string): Promise<void>;
603
604  /**
605   * Obtains the MSISDN of the SIM card in a specified slot.
606   * The MSISDN is recorded in the EFMSISDN file of the SIM card.
607   *
608   * @permission ohos.permission.GET_PHONE_NUMBERS
609   * @param { number } slotId - Indicates the card slot index number,
610   * ranging from 0 to the maximum card slot index number supported by the device.
611   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the MSISDN;
612   * Returns an empty string if no SIM card is inserted or
613   * no MSISDN is recorded in the EFMSISDN file.
614   * @throws { BusinessError } 201 - Permission denied.
615   * @throws { BusinessError } 202 - Non-system applications use system APIs.
616   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
617   *     2. Incorrect parameter types.
618   * @throws { BusinessError } 8300001 - Invalid parameter value.
619   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
620   * @throws { BusinessError } 8300003 - System internal error.
621   * @throws { BusinessError } 8300004 - Do not have sim card.
622   * @throws { BusinessError } 8300999 - Unknown error code.
623   * @syscap SystemCapability.Telephony.CoreService
624   * @systemapi Hide this for inner system use.
625   * @since 8
626   */
627  function getSimTelephoneNumber(slotId: number, callback: AsyncCallback<string>): void;
628
629  /**
630   * Obtains the MSISDN of the SIM card in a specified slot.
631   * The MSISDN is recorded in the EFMSISDN file of the SIM card.
632   *
633   * @permission ohos.permission.GET_PHONE_NUMBERS
634   * @param { number } slotId - Indicates the card slot index number,
635   * ranging from 0 to the maximum card slot index number supported by the device.
636   * @returns { Promise<string> } Returns the MSISDN; returns an empty string if no SIM card is inserted or
637   * no MSISDN is recorded in the EFMSISDN file.
638   * @throws { BusinessError } 201 - Permission denied.
639   * @throws { BusinessError } 202 - Non-system applications use system APIs.
640   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
641   *     2. Incorrect parameter types.
642   * @throws { BusinessError } 8300001 - Invalid parameter value.
643   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
644   * @throws { BusinessError } 8300003 - System internal error.
645   * @throws { BusinessError } 8300004 - Do not have sim card.
646   * @throws { BusinessError } 8300999 - Unknown error code.
647   * @syscap SystemCapability.Telephony.CoreService
648   * @systemapi Hide this for inner system use.
649   * @since 8
650   */
651  function getSimTelephoneNumber(slotId: number): Promise<string>;
652
653  /**
654   * Obtains the Group Identifier Level 1 (GID1) of the SIM card in a specified slot.
655   * The GID1 is recorded in the EFGID1 file of the SIM card.
656   *
657   * @permission ohos.permission.GET_TELEPHONY_STATE
658   * @param { number } slotId - Indicates the card slot index number,
659   * ranging from 0 to the maximum card slot index number supported by the device.
660   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the GID1;
661   * Returns an empty string if no SIM card is inserted or no GID1 in the SIM card.
662   * @throws { BusinessError } 201 - Permission denied.
663   * @throws { BusinessError } 202 - Non-system applications use system APIs.
664   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
665   *     2. Incorrect parameter types.
666   * @throws { BusinessError } 8300001 - Invalid parameter value.
667   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
668   * @throws { BusinessError } 8300003 - System internal error.
669   * @throws { BusinessError } 8300004 - Do not have sim card.
670   * @throws { BusinessError } 8300999 - Unknown error code.
671   * @syscap SystemCapability.Telephony.CoreService
672   * @systemapi Hide this for inner system use.
673   * @since 7
674   */
675  function getSimGid1(slotId: number, callback: AsyncCallback<string>): void;
676
677  /**
678   * Obtains the Group Identifier Level 1 (GID1) of the SIM card in a specified slot.
679   * The GID1 is recorded in the EFGID1 file of the SIM card.
680   *
681   * @permission ohos.permission.GET_TELEPHONY_STATE
682   * @param { number } slotId - Indicates the card slot index number,
683   * ranging from 0 to the maximum card slot index number supported by the device.
684   * @returns { Promise<string> } Returns the GID1; returns an empty string if no SIM card is inserted or
685   * no GID1 in the SIM card.
686   * @throws { BusinessError } 201 - Permission denied.
687   * @throws { BusinessError } 202 - Non-system applications use system APIs.
688   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
689   *     2. Incorrect parameter types.
690   * @throws { BusinessError } 8300001 - Invalid parameter value.
691   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
692   * @throws { BusinessError } 8300003 - System internal error.
693   * @throws { BusinessError } 8300004 - Do not have sim card.
694   * @throws { BusinessError } 8300999 - Unknown error code.
695   * @syscap SystemCapability.Telephony.CoreService
696   * @systemapi Hide this for inner system use.
697   * @since 7
698   */
699  function getSimGid1(slotId: number): Promise<string>;
700
701  /**
702   * Obtains the maximum number of SIM cards that can be used simultaneously on the device,
703   * that is, the maximum number of SIM card slots.
704   *
705   * @returns { number } Returns the maximum number of SIM card slots.
706   * @syscap SystemCapability.Telephony.CoreService
707   * @since 7
708   */
709  function getMaxSimCount(): number;
710
711  /**
712   * Get the international mobile subscriber ID.
713   *
714   * @permission ohos.permission.GET_TELEPHONY_STATE
715   * @param { number } slotId - Indicates the card slot index number,
716   * ranging from 0 to the maximum card slot index number supported by the device.
717   * @param { AsyncCallback<string> } callback - Indicates the callback for getting
718   * the international mobile subscriber ID.
719   * @throws { BusinessError } 201 - Permission denied.
720   * @throws { BusinessError } 202 - Non-system applications use system APIs.
721   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
722   *     2. Incorrect parameter types.
723   * @throws { BusinessError } 8300001 - Invalid parameter value.
724   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
725   * @throws { BusinessError } 8300003 - System internal error.
726   * @throws { BusinessError } 8300004 - Do not have sim card.
727   * @throws { BusinessError } 8300999 - Unknown error code.
728   * @syscap SystemCapability.Telephony.CoreService
729   * @systemapi Hide this for inner system use.
730   * @since 6
731   */
732  function getIMSI(slotId: number, callback: AsyncCallback<string>): void;
733
734  /**
735   * Get the international mobile subscriber ID.
736   *
737   * @permission ohos.permission.GET_TELEPHONY_STATE
738   * @param { number } slotId - Indicates the card slot index number,
739   * ranging from 0 to the maximum card slot index number supported by the device.
740   * @returns { Promise<string> } Returns the international mobile subscriber ID.
741   * @throws { BusinessError } 201 - Permission denied.
742   * @throws { BusinessError } 202 - Non-system applications use system APIs.
743   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
744   *     2. Incorrect parameter types.
745   * @throws { BusinessError } 8300001 - Invalid parameter value.
746   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
747   * @throws { BusinessError } 8300003 - System internal error.
748   * @throws { BusinessError } 8300004 - Do not have sim card.
749   * @throws { BusinessError } 8300999 - Unknown error code.
750   * @syscap SystemCapability.Telephony.CoreService
751   * @systemapi Hide this for inner system use.
752   * @since 6
753   */
754  function getIMSI(slotId: number): Promise<string>;
755
756  /**
757   * Indicates whether the SIM card in a specified slot is a specified operator.
758   *
759   * @param { number } slotId - Indicates the card slot index number,
760   * ranging from 0 to the maximum card slot index number supported by the device.
761   * @param { OperatorSimCard } operator - Indicates the operator of sim.
762   * @returns { boolean } Returns {@code true} if the SIM card is specified operator; return {@code false} otherwise.
763   * @throws { BusinessError } 202 - Non-system applications use system APIs.
764   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
765   *     2. Incorrect parameter types.
766   * @throws { BusinessError } 8300001 - Invalid parameter value.
767   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
768   * @throws { BusinessError } 8300003 - System internal error.
769   * @throws { BusinessError } 8300004 - Do not have sim card.
770   * @throws { BusinessError } 8300999 - Unknown error code.
771   * @syscap SystemCapability.Telephony.CoreService
772   * @systemapi Hide this for inner system use.
773   * @since 11
774   */
775  function isOperatorSimCard(slotId: number, operator: OperatorSimCard): boolean;
776
777  /**
778   * Checks whether a SIM card is inserted in a specified slot.
779   *
780   * @param { number } slotId - Indicates the card slot index number,
781   * ranging from 0 to the maximum card slot index number supported by the device.
782   * @param { AsyncCallback<boolean> } callback - Indicates the callback for hasSimCard.
783   * Returns {@code true} if a SIM card is inserted; return {@code false} otherwise.
784   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
785   *     2. Incorrect parameter types.
786   * @throws { BusinessError } 8300001 - Invalid parameter value.
787   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
788   * @throws { BusinessError } 8300003 - System internal error.
789   * @throws { BusinessError } 8300999 - Unknown error code.
790   * @syscap SystemCapability.Telephony.CoreService
791   * @since 7
792   */
793  function hasSimCard(slotId: number, callback: AsyncCallback<boolean>): void;
794
795  /**
796   * Checks whether a SIM card is inserted in a specified slot.
797   *
798   * @param { number } slotId - Indicates the card slot index number,
799   * ranging from 0 to the maximum card slot index number supported by the device.
800   * @returns { Promise<boolean> } Returns {@code true} if a SIM card is inserted; return {@code false} otherwise.
801   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
802   *     2. Incorrect parameter types.
803   * @throws { BusinessError } 8300001 - Invalid parameter value.
804   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
805   * @throws { BusinessError } 8300003 - System internal error.
806   * @throws { BusinessError } 8300999 - Unknown error code.
807   * @syscap SystemCapability.Telephony.CoreService
808   * @since 7
809   */
810  function hasSimCard(slotId: number): Promise<boolean>;
811
812  /**
813   * Checks whether a SIM card is inserted in a specified slot.
814   *
815   * @param { number } slotId - Indicates the card slot index number,
816   * ranging from 0 to the maximum card slots supported by the device.
817   * @returns { boolean } Returns {@code true} if a SIM card is inserted; return {@code false} otherwise.
818   * @syscap SystemCapability.Telephony.CoreService
819   * @since 10
820   */
821  function hasSimCardSync(slotId: number): boolean;
822
823  /**
824   * Get account information of SIM card.
825   *
826   * @permission ohos.permission.GET_TELEPHONY_STATE
827   * @param { number } slotId - Indicates the card slot index number,
828   * ranging from 0 to the maximum card slot index number supported by the device.
829   * @param { AsyncCallback<IccAccountInfo> } callback - Indicates the callback for
830   * getting a {@code IccAccountInfo} object. The ICCID and phone number will be null
831   * if has no ohos.permission.GET_TELEPHONY_STATE.
832   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
833   *     2. Incorrect parameter types.
834   * @throws { BusinessError } 8300001 - Invalid parameter value.
835   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
836   * @throws { BusinessError } 8300003 - System internal error.
837   * @throws { BusinessError } 8300004 - Do not have sim card.
838   * @throws { BusinessError } 8300999 - Unknown error code.
839   * @throws { BusinessError } 8301002 - SIM card operation error.
840   * @syscap SystemCapability.Telephony.CoreService
841   * @since 10
842   */
843  function getSimAccountInfo(slotId: number, callback: AsyncCallback<IccAccountInfo>): void;
844
845  /**
846   * Get account information of SIM card.
847   *
848   * @permission ohos.permission.GET_TELEPHONY_STATE
849   * @param { number } slotId - Indicates the card slot index number,
850   * ranging from 0 to the maximum card slot index number supported by the device.
851   * @returns { Promise<IccAccountInfo> } Returns a {@code IccAccountInfo} object. The ICCID and phone number
852   * will be null if has no ohos.permission.GET_TELEPHONY_STATE.
853   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
854   *     2. Incorrect parameter types.
855   * @throws { BusinessError } 8300001 - Invalid parameter value.
856   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
857   * @throws { BusinessError } 8300003 - System internal error.
858   * @throws { BusinessError } 8300004 - Do not have sim card.
859   * @throws { BusinessError } 8300999 - Unknown error code.
860   * @throws { BusinessError } 8301002 - SIM card operation error.
861   * @syscap SystemCapability.Telephony.CoreService
862   * @since 10
863   */
864  function getSimAccountInfo(slotId: number): Promise<IccAccountInfo>;
865
866  /**
867   * Get the list of active SIM card account information.
868   *
869   * @permission ohos.permission.GET_TELEPHONY_STATE
870   * @param { AsyncCallback<Array<IccAccountInfo>> } callback - The callback is used to
871   * return the array of {@link IccAccountInfo}. The ICCID and phone number will be null
872   * if has no ohos.permission.GET_TELEPHONY_STATE.
873   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
874   *     2. Incorrect parameter types.
875   * @throws { BusinessError } 8300001 - Invalid parameter value.
876   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
877   * @throws { BusinessError } 8300003 - System internal error.
878   * @throws { BusinessError } 8300004 - Do not have sim card.
879   * @throws { BusinessError } 8300999 - Unknown error code.
880   * @syscap SystemCapability.Telephony.CoreService
881   * @since 10
882   */
883  function getActiveSimAccountInfoList(callback: AsyncCallback<Array<IccAccountInfo>>): void;
884
885  /**
886   * Get the list of active SIM card account information.
887   *
888   * @permission ohos.permission.GET_TELEPHONY_STATE
889   * @returns { Promise<Array<IccAccountInfo>> } Returns the array of {@link IccAccountInfo}. The ICCID
890   * and phone number will be null if has no ohos.permission.GET_TELEPHONY_STATE.
891   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
892   * @throws { BusinessError } 8300003 - System internal error.
893   * @throws { BusinessError } 8300004 - Do not have sim card.
894   * @throws { BusinessError } 8300999 - Unknown error code.
895   * @syscap SystemCapability.Telephony.CoreService
896   * @since 10
897   */
898  function getActiveSimAccountInfoList(): Promise<Array<IccAccountInfo>>;
899
900  /**
901   * Set the card slot ID of the default voice service.
902   *
903   * @permission ohos.permission.SET_TELEPHONY_STATE
904   * @param { number } slotId - Indicates the card slot index number,
905   * ranging from 0 to the maximum card slot index number supported by the device.
906   * @param { AsyncCallback<void> } callback - The callback of setDefaultVoiceSlotId.
907   * @throws { BusinessError } 201 - Permission denied.
908   * @throws { BusinessError } 202 - Non-system applications use system APIs.
909   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
910   *     2. Incorrect parameter types.
911   * @throws { BusinessError } 8300001 - Invalid parameter value.
912   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
913   * @throws { BusinessError } 8300003 - System internal error.
914   * @throws { BusinessError } 8300004 - Do not have sim card.
915   * @throws { BusinessError } 8300999 - Unknown error code.
916   * @throws { BusinessError } 8301001 - SIM card is not activated.
917   * @syscap SystemCapability.Telephony.CoreService
918   * @systemapi Hide this for inner system use.
919   * @since 7
920   */
921  function setDefaultVoiceSlotId(slotId: number, callback: AsyncCallback<void>): void;
922
923  /**
924   * Set the card slot ID of the default voice service.
925   *
926   * @permission ohos.permission.SET_TELEPHONY_STATE
927   * @param { number } slotId - Indicates the card slot index number,
928   * ranging from 0 to the maximum card slot index number supported by the device.
929   * @returns { Promise<void> } The promise returned by the setVoiceMailInfo.
930   * @throws { BusinessError } 201 - Permission denied.
931   * @throws { BusinessError } 202 - Non-system applications use system APIs.
932   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
933   *     2. Incorrect parameter types.
934   * @throws { BusinessError } 8300001 - Invalid parameter value.
935   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
936   * @throws { BusinessError } 8300003 - System internal error.
937   * @throws { BusinessError } 8300004 - Do not have sim card.
938   * @throws { BusinessError } 8300999 - Unknown error code.
939   * @throws { BusinessError } 8301001 - SIM card is not activated.
940   * @syscap SystemCapability.Telephony.CoreService
941   * @systemapi Hide this for inner system use.
942   * @since 7
943   */
944  function setDefaultVoiceSlotId(slotId: number): Promise<void>;
945
946  /**
947   * Activate the SIM card in the specified slot.
948   *
949   * @permission ohos.permission.SET_TELEPHONY_STATE
950   * @param { number } slotId - Indicates the card slot index number,
951   * ranging from 0 to the maximum card slot index number supported by the device.
952   * @param { AsyncCallback<void> } callback - The callback of activateSim.
953   * @throws { BusinessError } 201 - Permission denied.
954   * @throws { BusinessError } 202 - Non-system applications use system APIs.
955   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
956   *     2. Incorrect parameter types.
957   * @throws { BusinessError } 8300001 - Invalid parameter value.
958   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
959   * @throws { BusinessError } 8300003 - System internal error.
960   * @throws { BusinessError } 8300004 - Do not have sim card.
961   * @throws { BusinessError } 8300999 - Unknown error code.
962   * @syscap SystemCapability.Telephony.CoreService
963   * @systemapi Hide this for inner system use.
964   * @since 8
965   */
966  function activateSim(slotId: number, callback: AsyncCallback<void>): void;
967
968  /**
969   * Activate the SIM card in the specified slot.
970   *
971   * @permission ohos.permission.SET_TELEPHONY_STATE
972   * @param { number } slotId - Indicates the card slot index number,
973   * ranging from 0 to the maximum card slot index number supported by the device.
974   * @returns { Promise<void> } The promise returned by the activateSim.
975   * @throws { BusinessError } 201 - Permission denied.
976   * @throws { BusinessError } 202 - Non-system applications use system APIs.
977   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
978   *     2. Incorrect parameter types.
979   * @throws { BusinessError } 8300001 - Invalid parameter value.
980   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
981   * @throws { BusinessError } 8300003 - System internal error.
982   * @throws { BusinessError } 8300004 - Do not have sim card.
983   * @throws { BusinessError } 8300999 - Unknown error code.
984   * @syscap SystemCapability.Telephony.CoreService
985   * @systemapi Hide this for inner system use.
986   * @since 8
987   */
988  function activateSim(slotId: number): Promise<void>;
989
990  /**
991   * Disable SIM card in specified slot.
992   *
993   * @permission ohos.permission.SET_TELEPHONY_STATE
994   * @param { number } slotId - Indicates the card slot index number,
995   * ranging from 0 to the maximum card slot index number supported by the device.
996   * @param { AsyncCallback<void> } callback - The callback of deactivateSim.
997   * @throws { BusinessError } 201 - Permission denied.
998   * @throws { BusinessError } 202 - Non-system applications use system APIs.
999   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1000   *     2. Incorrect parameter types.
1001   * @throws { BusinessError } 8300001 - Invalid parameter value.
1002   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1003   * @throws { BusinessError } 8300003 - System internal error.
1004   * @throws { BusinessError } 8300004 - Do not have sim card.
1005   * @throws { BusinessError } 8300999 - Unknown error code.
1006   * @syscap SystemCapability.Telephony.CoreService
1007   * @systemapi Hide this for inner system use.
1008   * @since 8
1009   */
1010  function deactivateSim(slotId: number, callback: AsyncCallback<void>): void;
1011
1012  /**
1013   * Disable SIM card in specified slot.
1014   *
1015   * @permission ohos.permission.SET_TELEPHONY_STATE
1016   * @param { number } slotId - Indicates the card slot index number,
1017   * ranging from 0 to the maximum card slot index number supported by the device.
1018   * @returns { Promise<void> } The promise returned by the deactivateSim.
1019   * @throws { BusinessError } 201 - Permission denied.
1020   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1021   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1022   *     2. Incorrect parameter types.
1023   * @throws { BusinessError } 8300001 - Invalid parameter value.
1024   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1025   * @throws { BusinessError } 8300003 - System internal error.
1026   * @throws { BusinessError } 8300004 - Do not have sim card.
1027   * @throws { BusinessError } 8300999 - Unknown error code.
1028   * @syscap SystemCapability.Telephony.CoreService
1029   * @systemapi Hide this for inner system use.
1030   * @since 8
1031   */
1032  function deactivateSim(slotId: number): Promise<void>;
1033
1034  /**
1035   * Set the SIM card display name of the specified card slot.
1036   *
1037   * @permission ohos.permission.SET_TELEPHONY_STATE
1038   * @param { number } slotId - Indicates the card slot index number,
1039   * ranging from 0 to the maximum card slot index number supported by the device.
1040   * @param { string } name - Indicates SIM card name.
1041   * @param { AsyncCallback<void> } callback - The callback of setShowName.
1042   * @throws { BusinessError } 201 - Permission denied.
1043   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1044   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1045   *     2. Incorrect parameter types.
1046   * @throws { BusinessError } 8300001 - Invalid parameter value.
1047   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1048   * @throws { BusinessError } 8300003 - System internal error.
1049   * @throws { BusinessError } 8300004 - Do not have sim card.
1050   * @throws { BusinessError } 8300999 - Unknown error code.
1051   * @syscap SystemCapability.Telephony.CoreService
1052   * @systemapi Hide this for inner system use.
1053   * @since 8
1054   */
1055  function setShowName(slotId: number, name: string, callback: AsyncCallback<void>): void;
1056
1057  /**
1058   * Set the SIM card display name of the specified card slot.
1059   *
1060   * @permission ohos.permission.SET_TELEPHONY_STATE
1061   * @param { number } slotId - Indicates the card slot index number,
1062   * ranging from 0 to the maximum card slot index number supported by the device.
1063   * @param { string } name - Indicates SIM card name.
1064   * @returns { Promise<void> } The promise returned by the setShowName.
1065   * @throws { BusinessError } 201 - Permission denied.
1066   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1067   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1068   *     2. Incorrect parameter types.
1069   * @throws { BusinessError } 8300001 - Invalid parameter value.
1070   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1071   * @throws { BusinessError } 8300003 - System internal error.
1072   * @throws { BusinessError } 8300004 - Do not have sim card.
1073   * @throws { BusinessError } 8300999 - Unknown error code.
1074   * @syscap SystemCapability.Telephony.CoreService
1075   * @systemapi Hide this for inner system use.
1076   * @since 8
1077   */
1078  function setShowName(slotId: number, name: string): Promise<void>;
1079
1080  /**
1081   * Gets the name of the SIM card in the specified slot.
1082   *
1083   * @permission ohos.permission.GET_TELEPHONY_STATE
1084   * @param { number } slotId - Indicates the card slot index number,
1085   * ranging from 0 to the maximum card slot index number supported by the device.
1086   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the SIM card name.
1087   * @throws { BusinessError } 201 - Permission denied.
1088   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1089   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1090   *     2. Incorrect parameter types.
1091   * @throws { BusinessError } 8300001 - Invalid parameter value.
1092   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1093   * @throws { BusinessError } 8300003 - System internal error.
1094   * @throws { BusinessError } 8300004 - Do not have sim card.
1095   * @throws { BusinessError } 8300999 - Unknown error code.
1096   * @syscap SystemCapability.Telephony.CoreService
1097   * @systemapi Hide this for inner system use.
1098   * @since 8
1099   */
1100  function getShowName(slotId: number, callback: AsyncCallback<string>): void;
1101
1102  /**
1103   * Gets the name of the SIM card in the specified slot.
1104   *
1105   * @permission ohos.permission.GET_TELEPHONY_STATE
1106   * @param { number } slotId - Indicates the card slot index number,
1107   * ranging from 0 to the maximum card slot index number supported by the device.
1108   * @returns { Promise<string> } Returns the SIM card name.
1109   * @throws { BusinessError } 201 - Permission denied.
1110   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1111   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1112   *     2. Incorrect parameter types.
1113   * @throws { BusinessError } 8300001 - Invalid parameter value.
1114   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1115   * @throws { BusinessError } 8300003 - System internal error.
1116   * @throws { BusinessError } 8300004 - Do not have sim card.
1117   * @throws { BusinessError } 8300999 - Unknown error code.
1118   * @syscap SystemCapability.Telephony.CoreService
1119   * @systemapi Hide this for inner system use.
1120   * @since 8
1121   */
1122  function getShowName(slotId: number): Promise<string>;
1123
1124  /**
1125   * Set the SIM card number in the specified slot.
1126   *
1127   * @permission ohos.permission.SET_TELEPHONY_STATE
1128   * @param { number } slotId - Indicates the card slot index number,
1129   * ranging from 0 to the maximum card slot index number supported by the device.
1130   * @param { string } number - Indicates SIM card number.
1131   * @param { AsyncCallback<void> } callback - The callback of setShowNumber.
1132   * @throws { BusinessError } 201 - Permission denied.
1133   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1134   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1135   *     2. Incorrect parameter types.
1136   * @throws { BusinessError } 8300001 - Invalid parameter value.
1137   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1138   * @throws { BusinessError } 8300003 - System internal error.
1139   * @throws { BusinessError } 8300004 - Do not have sim card.
1140   * @throws { BusinessError } 8300999 - Unknown error code.
1141   * @syscap SystemCapability.Telephony.CoreService
1142   * @systemapi Hide this for inner system use.
1143   * @since 8
1144   */
1145  function setShowNumber(slotId: number, number: string, callback: AsyncCallback<void>): void;
1146
1147  /**
1148   * Set the SIM card number in the specified slot.
1149   *
1150   * @permission ohos.permission.SET_TELEPHONY_STATE
1151   * @param { number } slotId - Indicates the card slot index number,
1152   * ranging from 0 to the maximum card slot index number supported by the device.
1153   * @param { string } number - Indicates SIM card number.
1154   * @returns { Promise<void> } The promise returned by the setShowNumber.
1155   * @throws { BusinessError } 201 - Permission denied.
1156   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1157   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1158   *     2. Incorrect parameter types.
1159   * @throws { BusinessError } 8300001 - Invalid parameter value.
1160   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1161   * @throws { BusinessError } 8300003 - System internal error.
1162   * @throws { BusinessError } 8300004 - Do not have sim card.
1163   * @throws { BusinessError } 8300999 - Unknown error code.
1164   * @syscap SystemCapability.Telephony.CoreService
1165   * @systemapi Hide this for inner system use.
1166   * @since 8
1167   */
1168  function setShowNumber(slotId: number, number: string): Promise<void>;
1169
1170  /**
1171   * Get the SIM card number of the specified card slot.
1172   *
1173   * @permission ohos.permission.GET_TELEPHONY_STATE
1174   * @param { number } slotId - Indicates the card slot index number,
1175   * ranging from 0 to the maximum card slot index number supported by the device.
1176   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the SIM card number.
1177   * @throws { BusinessError } 201 - Permission denied.
1178   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1179   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1180   *     2. Incorrect parameter types.
1181   * @throws { BusinessError } 8300001 - Invalid parameter value.
1182   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1183   * @throws { BusinessError } 8300003 - System internal error.
1184   * @throws { BusinessError } 8300004 - Do not have sim card.
1185   * @throws { BusinessError } 8300999 - Unknown error code.
1186   * @syscap SystemCapability.Telephony.CoreService
1187   * @systemapi Hide this for inner system use.
1188   * @since 8
1189   */
1190  function getShowNumber(slotId: number, callback: AsyncCallback<string>): void;
1191
1192  /**
1193   * Get the SIM card number of the specified card slot.
1194   *
1195   * @permission ohos.permission.GET_TELEPHONY_STATE
1196   * @param { number } slotId - Indicates the card slot index number,
1197   * ranging from 0 to the maximum card slot index number supported by the device.
1198   * @returns { Promise<string> } Returns the SIM card number.
1199   * @throws { BusinessError } 201 - Permission denied.
1200   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1201   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1202   *     2. Incorrect parameter types.
1203   * @throws { BusinessError } 8300001 - Invalid parameter value.
1204   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1205   * @throws { BusinessError } 8300003 - System internal error.
1206   * @throws { BusinessError } 8300004 - Do not have sim card.
1207   * @throws { BusinessError } 8300999 - Unknown error code.
1208   * @syscap SystemCapability.Telephony.CoreService
1209   * @systemapi Hide this for inner system use.
1210   * @since 8
1211   */
1212  function getShowNumber(slotId: number): Promise<string>;
1213
1214  /**
1215   * Obtains the operatorconfigs of the SIM card in a specified slot.
1216   *
1217   * @permission ohos.permission.GET_TELEPHONY_STATE
1218   * @param { number } slotId - Indicates the card slot index number,
1219   * ranging from 0 to the maximum card slot index number supported by the device.
1220   * @param { AsyncCallback<Array<OperatorConfig>> } callback - Indicates the callback for
1221   * getting the operatorconfigs in a specified slot;
1222   * returns empty OperatorConfig if no SIM card is inserted.
1223   * @throws { BusinessError } 201 - Permission denied.
1224   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1225   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1226   *     2. Incorrect parameter types.
1227   * @throws { BusinessError } 8300001 - Invalid parameter value.
1228   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1229   * @throws { BusinessError } 8300003 - System internal error.
1230   * @throws { BusinessError } 8300999 - Unknown error code.
1231   * @syscap SystemCapability.Telephony.CoreService
1232   * @systemapi Hide this for inner system use.
1233   * @since 8
1234   */
1235  function getOperatorConfigs(slotId: number, callback: AsyncCallback<Array<OperatorConfig>>): void;
1236
1237  /**
1238   * Obtains the operatorconfigs of the SIM card in a specified slot.
1239   *
1240   * @permission ohos.permission.GET_TELEPHONY_STATE
1241   * @param { number } slotId - Indicates the card slot index number,
1242   * ranging from 0 to the maximum card slot index number supported by the device.
1243   * @returns { Promise<Array<OperatorConfig>> } Returns the operatorconfigs in a specified slot;
1244   * returns empty OperatorConfig if no SIM card is inserted.
1245   * @throws { BusinessError } 201 - Permission denied.
1246   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1247   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1248   *     2. Incorrect parameter types.
1249   * @throws { BusinessError } 8300001 - Invalid parameter value.
1250   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1251   * @throws { BusinessError } 8300003 - System internal error.
1252   * @throws { BusinessError } 8300999 - Unknown error code.
1253   * @syscap SystemCapability.Telephony.CoreService
1254   * @systemapi Hide this for inner system use.
1255   * @since 8
1256   */
1257  function getOperatorConfigs(slotId: number): Promise<Array<OperatorConfig>>;
1258
1259  /**
1260   * Unlock the SIM card password of the specified card slot.
1261   *
1262   * @permission ohos.permission.SET_TELEPHONY_STATE
1263   * @param { number } slotId - Indicates the card slot index number,
1264   * ranging from 0 to the maximum card slot index number supported by the device.
1265   * @param { string } pin - Indicates the password of the SIM card.
1266   * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback for getting
1267   * the response to obtain the SIM card lock status of the specified card slot.
1268   * @throws { BusinessError } 201 - Permission denied.
1269   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1270   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1271   *     2. Incorrect parameter types.
1272   * @throws { BusinessError } 8300001 - Invalid parameter value.
1273   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1274   * @throws { BusinessError } 8300003 - System internal error.
1275   * @throws { BusinessError } 8300004 - Do not have sim card.
1276   * @throws { BusinessError } 8300999 - Unknown error code.
1277   * @throws { BusinessError } 8301002 - SIM card operation error.
1278   * @syscap SystemCapability.Telephony.CoreService
1279   * @systemapi Hide this for inner system use.
1280   * @since 7
1281   */
1282  function unlockPin(slotId: number, pin: string, callback: AsyncCallback<LockStatusResponse>): void;
1283
1284  /**
1285   * Unlock the SIM card password of the specified card slot.
1286   *
1287   * @permission ohos.permission.SET_TELEPHONY_STATE
1288   * @param { number } slotId - Indicates the card slot index number,
1289   * ranging from 0 to the maximum card slot index number supported by the device.
1290   * @param { string } pin - Indicates the password of the SIM card.
1291   * @returns { Promise<LockStatusResponse> } Returns the response to obtain
1292   * the SIM card lock status of the specified card slot.
1293   * @throws { BusinessError } 201 - Permission denied.
1294   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1295   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1296   *     2. Incorrect parameter types.
1297   * @throws { BusinessError } 8300001 - Invalid parameter value.
1298   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1299   * @throws { BusinessError } 8300003 - System internal error.
1300   * @throws { BusinessError } 8300004 - Do not have sim card.
1301   * @throws { BusinessError } 8300999 - Unknown error code.
1302   * @throws { BusinessError } 8301002 - SIM card operation error.
1303   * @syscap SystemCapability.Telephony.CoreService
1304   * @systemapi Hide this for inner system use.
1305   * @since 7
1306   */
1307  function unlockPin(slotId: number, pin: string): Promise<LockStatusResponse>;
1308
1309  /**
1310   * Unlock the SIM card password in the specified card slot.
1311   *
1312   * @permission ohos.permission.SET_TELEPHONY_STATE
1313   * @param { number } slotId - Indicates the card slot index number,
1314   * ranging from 0 to the maximum card slot index number supported by the device.
1315   * @param { string } newPin - Indicates to reset the SIM card password.
1316   * @param { string } puk - Indicates the unlock password of the SIM card password.
1317   * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback for getting
1318   * the response to obtain the SIM card lock status of the specified card slot.
1319   * @throws { BusinessError } 201 - Permission denied.
1320   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1321   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1322   *     2. Incorrect parameter types.
1323   * @throws { BusinessError } 8300001 - Invalid parameter value.
1324   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1325   * @throws { BusinessError } 8300003 - System internal error.
1326   * @throws { BusinessError } 8300004 - Do not have sim card.
1327   * @throws { BusinessError } 8300999 - Unknown error code.
1328   * @throws { BusinessError } 8301002 - SIM card operation error.
1329   * @syscap SystemCapability.Telephony.CoreService
1330   * @systemapi Hide this for inner system use.
1331   * @since 7
1332   */
1333  function unlockPuk(slotId: number, newPin: string, puk: string, callback: AsyncCallback<LockStatusResponse>): void;
1334
1335  /**
1336   * Unlock the SIM card password in the specified card slot.
1337   *
1338   * @permission ohos.permission.SET_TELEPHONY_STATE
1339   * @param { number } slotId - Indicates the card slot index number,
1340   * ranging from 0 to the maximum card slot index number supported by the device.
1341   * @param { string } newPin - Indicates to reset the SIM card password.
1342   * @param { string } puk - Indicates the unlock password of the SIM card password.
1343   * @returns { Promise<LockStatusResponse> } Returns the response to obtain
1344   * the SIM card lock status of the specified card slot.
1345   * @throws { BusinessError } 201 - Permission denied.
1346   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1347   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1348   *     2. Incorrect parameter types.
1349   * @throws { BusinessError } 8300001 - Invalid parameter value.
1350   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1351   * @throws { BusinessError } 8300003 - System internal error.
1352   * @throws { BusinessError } 8300004 - Do not have sim card.
1353   * @throws { BusinessError } 8300999 - Unknown error code.
1354   * @throws { BusinessError } 8301002 - SIM card operation error.
1355   * @syscap SystemCapability.Telephony.CoreService
1356   * @systemapi Hide this for inner system use.
1357   * @since 7
1358   */
1359  function unlockPuk(slotId: number, newPin: string, puk: string): Promise<LockStatusResponse>;
1360
1361  /**
1362   * Change Pin Password.
1363   *
1364   * @permission ohos.permission.SET_TELEPHONY_STATE
1365   * @param { number } slotId - Indicates the card slot index number,
1366   * ranging from 0 to the maximum card slot index number supported by the device.
1367   * @param { string } newPin - Indicates a new password.
1368   * @param { string } oldPin - Indicates old password.
1369   * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback for getting
1370   * the response to obtain the SIM card lock status of the specified card slot.
1371   * @throws { BusinessError } 201 - Permission denied.
1372   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1373   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1374   *     2. Incorrect parameter types.
1375   * @throws { BusinessError } 8300001 - Invalid parameter value.
1376   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1377   * @throws { BusinessError } 8300003 - System internal error.
1378   * @throws { BusinessError } 8300004 - Do not have sim card.
1379   * @throws { BusinessError } 8300999 - Unknown error code.
1380   * @throws { BusinessError } 8301002 - SIM card operation error.
1381   * @syscap SystemCapability.Telephony.CoreService
1382   * @systemapi Hide this for inner system use.
1383   * @since 7
1384   */
1385  function alterPin(slotId: number, newPin: string, oldPin: string, callback: AsyncCallback<LockStatusResponse>): void;
1386
1387  /**
1388   * Change Pin Password.
1389   *
1390   * @permission ohos.permission.SET_TELEPHONY_STATE
1391   * @param { number } slotId - Indicates the card slot index number,
1392   * ranging from 0 to the maximum card slot index number supported by the device.
1393   * @param { string } newPin - Indicates a new password.
1394   * @param { string } oldPin - Indicates old password.
1395   * @returns { Promise<LockStatusResponse> } Returns the response to obtain
1396   * the SIM card lock status of the specified card slot.
1397   * @throws { BusinessError } 201 - Permission denied.
1398   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1399   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1400   *     2. Incorrect parameter types.
1401   * @throws { BusinessError } 8300001 - Invalid parameter value.
1402   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1403   * @throws { BusinessError } 8300003 - System internal error.
1404   * @throws { BusinessError } 8300004 - Do not have sim card.
1405   * @throws { BusinessError } 8300999 - Unknown error code.
1406   * @throws { BusinessError } 8301002 - SIM card operation error.
1407   * @syscap SystemCapability.Telephony.CoreService
1408   * @systemapi Hide this for inner system use.
1409   * @since 7
1410   */
1411  function alterPin(slotId: number, newPin: string, oldPin: string): Promise<LockStatusResponse>;
1412
1413  /**
1414   * Set the lock status of the SIM card in the specified slot.
1415   *
1416   * @permission ohos.permission.SET_TELEPHONY_STATE
1417   * @param { number } slotId - Indicates the card slot index number,
1418   * ranging from 0 to the maximum card slot index number supported by the device.
1419   * @param { LockInfo } options - Indicates lock information.
1420   * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback for getting
1421   * the response to obtain the SIM card lock status of the specified card slot.
1422   * @throws { BusinessError } 201 - Permission denied.
1423   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1424   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1425   *     2. Incorrect parameter types.
1426   * @throws { BusinessError } 8300001 - Invalid parameter value.
1427   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1428   * @throws { BusinessError } 8300003 - System internal error.
1429   * @throws { BusinessError } 8300004 - Do not have sim card.
1430   * @throws { BusinessError } 8300999 - Unknown error code.
1431   * @throws { BusinessError } 8301002 - SIM card operation error.
1432   * @syscap SystemCapability.Telephony.CoreService
1433   * @systemapi Hide this for inner system use.
1434   * @since 7
1435   */
1436  function setLockState(slotId: number, options: LockInfo, callback: AsyncCallback<LockStatusResponse>): void;
1437
1438  /**
1439   * Set the lock status of the SIM card in the specified slot.
1440   *
1441   * @permission ohos.permission.SET_TELEPHONY_STATE
1442   * @param { number } slotId - Indicates the card slot index number,
1443   * ranging from 0 to the maximum card slot index number supported by the device.
1444   * @param { LockInfo } options - Indicates lock information.
1445   * @returns { Promise<LockStatusResponse> } Returns the response to obtain
1446   * the SIM card lock status of the specified card slot.
1447   * @throws { BusinessError } 201 - Permission denied.
1448   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1449   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1450   *     2. Incorrect parameter types.
1451   * @throws { BusinessError } 8300001 - Invalid parameter value.
1452   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1453   * @throws { BusinessError } 8300003 - System internal error.
1454   * @throws { BusinessError } 8300004 - Do not have sim card.
1455   * @throws { BusinessError } 8300999 - Unknown error code.
1456   * @throws { BusinessError } 8301002 - SIM card operation error.
1457   * @syscap SystemCapability.Telephony.CoreService
1458   * @systemapi Hide this for inner system use.
1459   * @since 7
1460   */
1461  function setLockState(slotId: number, options: LockInfo): Promise<LockStatusResponse>;
1462
1463  /**
1464   * Unlock the SIM card password of the specified card slot.
1465   *
1466   * @permission ohos.permission.SET_TELEPHONY_STATE
1467   * @param { number } slotId - Indicates the card slot index number,
1468   * ranging from 0 to the maximum card slot index number supported by the device.
1469   * @param { string } pin2 - Indicates the password of the SIM card.
1470   * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback for getting
1471   * the response to obtain the SIM card lock status of the specified card slot.
1472   * @throws { BusinessError } 201 - Permission denied.
1473   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1474   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1475   *     2. Incorrect parameter types.
1476   * @throws { BusinessError } 8300001 - Invalid parameter value.
1477   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1478   * @throws { BusinessError } 8300003 - System internal error.
1479   * @throws { BusinessError } 8300004 - Do not have sim card.
1480   * @throws { BusinessError } 8300999 - Unknown error code.
1481   * @throws { BusinessError } 8301002 - SIM card operation error.
1482   * @syscap SystemCapability.Telephony.CoreService
1483   * @systemapi Hide this for inner system use.
1484   * @since 8
1485   */
1486  function unlockPin2(slotId: number, pin2: string, callback: AsyncCallback<LockStatusResponse>): void;
1487
1488  /**
1489   * Unlock the SIM card password of the specified card slot.
1490   *
1491   * @permission ohos.permission.SET_TELEPHONY_STATE
1492   * @param { number } slotId - Indicates the card slot index number,
1493   * ranging from 0 to the maximum card slot index number supported by the device.
1494   * @param { string } pin2 - Indicates the password of the SIM card.
1495   * @returns { Promise<LockStatusResponse> } Returns the response to obtain
1496   * the SIM card lock status of the specified card slot.
1497   * @throws { BusinessError } 201 - Permission denied.
1498   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1499   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1500   *     2. Incorrect parameter types.
1501   * @throws { BusinessError } 8300001 - Invalid parameter value.
1502   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1503   * @throws { BusinessError } 8300003 - System internal error.
1504   * @throws { BusinessError } 8300004 - Do not have sim card.
1505   * @throws { BusinessError } 8300999 - Unknown error code.
1506   * @throws { BusinessError } 8301002 - SIM card operation error.
1507   * @syscap SystemCapability.Telephony.CoreService
1508   * @systemapi Hide this for inner system use.
1509   * @since 8
1510   */
1511  function unlockPin2(slotId: number, pin2: string): Promise<LockStatusResponse>;
1512
1513  /**
1514   * Unlock the SIM card password in the specified card slot.
1515   *
1516   * @permission ohos.permission.SET_TELEPHONY_STATE
1517   * @param { number } slotId - Indicates the card slot index number,
1518   * ranging from 0 to the maximum card slot index number supported by the device.
1519   * @param { string } newPin2 - Indicates to reset the SIM card password.
1520   * @param { string } puk2 - Indicates the unlock password of the SIM card password.
1521   * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback for getting
1522   * the response to obtain the SIM card lock status of the specified card slot.
1523   * @throws { BusinessError } 201 - Permission denied.
1524   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1525   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1526   *     2. Incorrect parameter types.
1527   * @throws { BusinessError } 8300001 - Invalid parameter value.
1528   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1529   * @throws { BusinessError } 8300003 - System internal error.
1530   * @throws { BusinessError } 8300004 - Do not have sim card.
1531   * @throws { BusinessError } 8300999 - Unknown error code.
1532   * @throws { BusinessError } 8301002 - SIM card operation error.
1533   * @syscap SystemCapability.Telephony.CoreService
1534   * @systemapi Hide this for inner system use.
1535   * @since 8
1536   */
1537  function unlockPuk2(slotId: number, newPin2: string, puk2: string, callback: AsyncCallback<LockStatusResponse>): void;
1538
1539  /**
1540   * Unlock the SIM card password in the specified card slot.
1541   *
1542   * @permission ohos.permission.SET_TELEPHONY_STATE
1543   * @param { number } slotId - Indicates the card slot index number,
1544   * ranging from 0 to the maximum card slot index number supported by the device.
1545   * @param { string } newPin2 - Indicates to reset the SIM card password.
1546   * @param { string } puk2 - Indicates the unlock password of the SIM card password.
1547   * @returns { Promise<LockStatusResponse> } Returns the response to obtain
1548   * the SIM card lock status of the specified card slot.
1549   * @throws { BusinessError } 201 - Permission denied.
1550   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1551   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1552   *     2. Incorrect parameter types.
1553   * @throws { BusinessError } 8300001 - Invalid parameter value.
1554   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1555   * @throws { BusinessError } 8300003 - System internal error.
1556   * @throws { BusinessError } 8300004 - Do not have sim card.
1557   * @throws { BusinessError } 8300999 - Unknown error code.
1558   * @throws { BusinessError } 8301002 - SIM card operation error.
1559   * @syscap SystemCapability.Telephony.CoreService
1560   * @systemapi Hide this for inner system use.
1561   * @since 8
1562   */
1563  function unlockPuk2(slotId: number, newPin2: string, puk2: string): Promise<LockStatusResponse>;
1564
1565  /**
1566   * Change Pin2 password.
1567   *
1568   * @permission ohos.permission.SET_TELEPHONY_STATE
1569   * @param { number } slotId - Indicates the card slot index number,
1570   * ranging from 0 to the maximum card slot index number supported by the device.
1571   * @param { string } newPin2 - Indicates a new password.
1572   * @param { string } oldPin2 - Indicates old password.
1573   * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback for getting
1574   * the response to obtain the SIM card lock status of the specified card slot.
1575   * @throws { BusinessError } 201 - Permission denied.
1576   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1577   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1578   *     2. Incorrect parameter types.
1579   * @throws { BusinessError } 8300001 - Invalid parameter value.
1580   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1581   * @throws { BusinessError } 8300003 - System internal error.
1582   * @throws { BusinessError } 8300004 - Do not have sim card.
1583   * @throws { BusinessError } 8300999 - Unknown error code.
1584   * @throws { BusinessError } 8301002 - SIM card operation error.
1585   * @syscap SystemCapability.Telephony.CoreService
1586   * @systemapi Hide this for inner system use.
1587   * @since 8
1588   */
1589  function alterPin2(slotId: number, newPin2: string, oldPin2: string, callback: AsyncCallback<LockStatusResponse>): void;
1590
1591  /**
1592   * Change Pin2 password.
1593   *
1594   * @permission ohos.permission.SET_TELEPHONY_STATE
1595   * @param { number } slotId - Indicates the card slot index number,
1596   * ranging from 0 to the maximum card slot index number supported by the device.
1597   * @param { string } newPin2 - Indicates a new password.
1598   * @param { string } oldPin2 - Indicates old password.
1599   * @returns { Promise<LockStatusResponse> } Returns the response to obtain
1600   * the SIM card lock status of the specified card slot.
1601   * @throws { BusinessError } 201 - Permission denied.
1602   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1603   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1604   *     2. Incorrect parameter types.
1605   * @throws { BusinessError } 8300001 - Invalid parameter value.
1606   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1607   * @throws { BusinessError } 8300003 - System internal error.
1608   * @throws { BusinessError } 8300004 - Do not have sim card.
1609   * @throws { BusinessError } 8300999 - Unknown error code.
1610   * @throws { BusinessError } 8301002 - SIM card operation error.
1611   * @syscap SystemCapability.Telephony.CoreService
1612   * @systemapi Hide this for inner system use.
1613   * @since 8
1614   */
1615  function alterPin2(slotId: number, newPin2: string, oldPin2: string): Promise<LockStatusResponse>;
1616
1617  /**
1618   * Query dialing number information on SIM card.
1619   *
1620   * @permission ohos.permission.READ_CONTACTS
1621   * @param { number } slotId - Indicates the card slot index number,
1622   * ranging from 0 to the maximum card slot index number supported by the device.
1623   * @param { ContactType } type - Indicates contact type.
1624   * @param { AsyncCallback<Array<DiallingNumbersInfo>> } callback - Indicates the callback for
1625   * getting the dialing number information.
1626   * @throws { BusinessError } 201 - Permission denied.
1627   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1628   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1629   *     2. Incorrect parameter types.
1630   * @throws { BusinessError } 8300001 - Invalid parameter value.
1631   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1632   * @throws { BusinessError } 8300003 - System internal error.
1633   * @throws { BusinessError } 8300004 - Do not have sim card.
1634   * @throws { BusinessError } 8300999 - Unknown error code.
1635   * @throws { BusinessError } 8301002 - SIM card operation error.
1636   * @syscap SystemCapability.Telephony.CoreService
1637   * @systemapi Hide this for inner system use.
1638   * @since 8
1639   */
1640  function queryIccDiallingNumbers(slotId: number, type: ContactType, callback: AsyncCallback<Array<DiallingNumbersInfo>>): void;
1641
1642  /**
1643   * Query dialing number information on SIM card.
1644   *
1645   * @permission ohos.permission.READ_CONTACTS
1646   * @param { number } slotId - Indicates the card slot index number,
1647   * ranging from 0 to the maximum card slot index number supported by the device.
1648   * @param { ContactType } type - Indicates contact type.
1649   * @returns { Promise<Array<DiallingNumbersInfo>> } Returns the dialing number information.
1650   * @throws { BusinessError } 201 - Permission denied.
1651   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1652   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1653   *     2. Incorrect parameter types.
1654   * @throws { BusinessError } 8300001 - Invalid parameter value.
1655   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1656   * @throws { BusinessError } 8300003 - System internal error.
1657   * @throws { BusinessError } 8300004 - Do not have sim card.
1658   * @throws { BusinessError } 8300999 - Unknown error code.
1659   * @throws { BusinessError } 8301002 - SIM card operation error.
1660   * @syscap SystemCapability.Telephony.CoreService
1661   * @systemapi Hide this for inner system use.
1662   * @since 8
1663   */
1664  function queryIccDiallingNumbers(slotId: number, type: ContactType): Promise<Array<DiallingNumbersInfo>>;
1665
1666  /**
1667   * Add dialing number information to SIM card.
1668   *
1669   * @permission ohos.permission.WRITE_CONTACTS
1670   * @param { number } slotId - Indicates the card slot index number,
1671   * ranging from 0 to the maximum card slot index number supported by the device.
1672   * @param { ContactType } type - Indicates contact type.
1673   * @param { DiallingNumbersInfo } diallingNumbers - Indicates dialing number information.
1674   * @param { AsyncCallback<void> } callback - The callback of addIccDiallingNumbers.
1675   * @throws { BusinessError } 201 - Permission denied.
1676   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1677   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1678   *     2. Incorrect parameter types.
1679   * @throws { BusinessError } 8300001 - Invalid parameter value.
1680   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1681   * @throws { BusinessError } 8300003 - System internal error.
1682   * @throws { BusinessError } 8300004 - Do not have sim card.
1683   * @throws { BusinessError } 8300999 - Unknown error code.
1684   * @throws { BusinessError } 8301002 - SIM card operation error.
1685   * @syscap SystemCapability.Telephony.CoreService
1686   * @systemapi Hide this for inner system use.
1687   * @since 8
1688   */
1689  function addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo, callback: AsyncCallback<void>): void;
1690
1691  /**
1692   * Add dialing number information to SIM card.
1693   *
1694   * @permission ohos.permission.WRITE_CONTACTS
1695   * @param { number } slotId - Indicates the card slot index number,
1696   * ranging from 0 to the maximum card slot index number supported by the device.
1697   * @param { ContactType } type - Indicates contact type.
1698   * @param { DiallingNumbersInfo } diallingNumbers - Indicates dialing number information.
1699   * @returns { Promise<void> } The promise returned by the addIccDiallingNumbers.
1700   * @throws { BusinessError } 201 - Permission denied.
1701   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1702   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1703   *     2. Incorrect parameter types.
1704   * @throws { BusinessError } 8300001 - Invalid parameter value.
1705   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1706   * @throws { BusinessError } 8300003 - System internal error.
1707   * @throws { BusinessError } 8300004 - Do not have sim card.
1708   * @throws { BusinessError } 8300999 - Unknown error code.
1709   * @throws { BusinessError } 8301002 - SIM card operation error.
1710   * @syscap SystemCapability.Telephony.CoreService
1711   * @systemapi Hide this for inner system use.
1712   * @since 8
1713   */
1714  function addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo): Promise<void>;
1715
1716  /**
1717   * Delete dialing number information on SIM card.
1718   *
1719   * @permission ohos.permission.WRITE_CONTACTS
1720   * @param { number } slotId - Indicates the card slot index number,
1721   * ranging from 0 to the maximum card slot index number supported by the device.
1722   * @param { ContactType } type - Indicates contact type.
1723   * @param { DiallingNumbersInfo } diallingNumbers - Indicates dialing number information.
1724   * @param { AsyncCallback<void> } callback - The callback of delIccDiallingNumbers.
1725   * @throws { BusinessError } 201 - Permission denied.
1726   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1727   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1728   *     2. Incorrect parameter types.
1729   * @throws { BusinessError } 8300001 - Invalid parameter value.
1730   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1731   * @throws { BusinessError } 8300003 - System internal error.
1732   * @throws { BusinessError } 8300004 - Do not have sim card.
1733   * @throws { BusinessError } 8300999 - Unknown error code.
1734   * @throws { BusinessError } 8301002 - SIM card operation error.
1735   * @syscap SystemCapability.Telephony.CoreService
1736   * @systemapi Hide this for inner system use.
1737   * @since 8
1738   */
1739  function delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo, callback: AsyncCallback<void>): void;
1740
1741  /**
1742   * Delete dialing number information on SIM card.
1743   *
1744   * @permission ohos.permission.WRITE_CONTACTS
1745   * @param { number } slotId - Indicates the card slot index number,
1746   * ranging from 0 to the maximum card slot index number supported by the device.
1747   * @param { ContactType } type - Indicates contact type.
1748   * @param { DiallingNumbersInfo } diallingNumbers - Indicates dialing number information.
1749   * @returns { Promise<void> } The promise returned by the delIccDiallingNumbers.
1750   * @throws { BusinessError } 201 - Permission denied.
1751   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1752   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1753   *     2. Incorrect parameter types.
1754   * @throws { BusinessError } 8300001 - Invalid parameter value.
1755   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1756   * @throws { BusinessError } 8300003 - System internal error.
1757   * @throws { BusinessError } 8300004 - Do not have sim card.
1758   * @throws { BusinessError } 8300999 - Unknown error code.
1759   * @throws { BusinessError } 8301002 - SIM card operation error.
1760   * @syscap SystemCapability.Telephony.CoreService
1761   * @systemapi Hide this for inner system use.
1762   * @since 8
1763   */
1764  function delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo): Promise<void>;
1765
1766  /**
1767   * Update dialing number information on SIM card.
1768   *
1769   * @permission ohos.permission.WRITE_CONTACTS
1770   * @param { number } slotId - Indicates the card slot index number,
1771   * ranging from 0 to the maximum card slot index number supported by the device.
1772   * @param { ContactType } type - Indicates contact type.
1773   * @param { DiallingNumbersInfo } diallingNumbers - Indicates dialing number information.
1774   * @param { AsyncCallback<void> } callback - The callback of updateIccDiallingNumbers.
1775   * @throws { BusinessError } 201 - Permission denied.
1776   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1777   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1778   *     2. Incorrect parameter types.
1779   * @throws { BusinessError } 8300001 - Invalid parameter value.
1780   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1781   * @throws { BusinessError } 8300003 - System internal error.
1782   * @throws { BusinessError } 8300004 - Do not have sim card.
1783   * @throws { BusinessError } 8300999 - Unknown error code.
1784   * @throws { BusinessError } 8301002 - SIM card operation error.
1785   * @syscap SystemCapability.Telephony.CoreService
1786   * @systemapi Hide this for inner system use.
1787   * @since 8
1788   */
1789  function updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo, callback: AsyncCallback<void>): void;
1790
1791  /**
1792   * Update dialing number information on SIM card.
1793   *
1794   * @permission ohos.permission.WRITE_CONTACTS
1795   * @param { number } slotId - Indicates the card slot index number,
1796   * ranging from 0 to the maximum card slot index number supported by the device.
1797   * @param { ContactType } type - Indicates contact type.
1798   * @param { DiallingNumbersInfo } diallingNumbers - Indicates dialing number information.
1799   * @returns { Promise<void> } The promise returned by the updateIccDiallingNumbers.
1800   * @throws { BusinessError } 201 - Permission denied.
1801   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1802   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1803   *     2. Incorrect parameter types.
1804   * @throws { BusinessError } 8300001 - Invalid parameter value.
1805   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1806   * @throws { BusinessError } 8300003 - System internal error.
1807   * @throws { BusinessError } 8300004 - Do not have sim card.
1808   * @throws { BusinessError } 8300999 - Unknown error code.
1809   * @throws { BusinessError } 8301002 - SIM card operation error.
1810   * @syscap SystemCapability.Telephony.CoreService
1811   * @systemapi Hide this for inner system use.
1812   * @since 8
1813   */
1814  function updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo): Promise<void>;
1815
1816  /**
1817   * Get the lock status of the SIM card in the specified slot.
1818   *
1819   * @permission ohos.permission.GET_TELEPHONY_STATE
1820   * @param { number } slotId - Indicates the card slot index number,
1821   * ranging from 0 to the maximum card slot index number supported by the device.
1822   * @param { LockType } lockType - Indicates the lock type.
1823   * @param { AsyncCallback<LockState> } callback - Indicates the callback for getting the sim card lock status.
1824   * @throws { BusinessError } 201 - Permission denied.
1825   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1826   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1827   *     2. Incorrect parameter types.
1828   * @throws { BusinessError } 8300001 - Invalid parameter value.
1829   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1830   * @throws { BusinessError } 8300003 - System internal error.
1831   * @throws { BusinessError } 8300004 - Do not have sim card.
1832   * @throws { BusinessError } 8300999 - Unknown error code.
1833   * @throws { BusinessError } 8301002 - SIM card operation error.
1834   * @syscap SystemCapability.Telephony.CoreService
1835   * @systemapi Hide this for inner system use.
1836   * @since 8
1837   */
1838  function getLockState(slotId: number, lockType: LockType, callback: AsyncCallback<LockState>): void;
1839
1840  /**
1841   * Get the lock status of the SIM card in the specified slot.
1842   *
1843   * @permission ohos.permission.GET_TELEPHONY_STATE
1844   * @param { number } slotId - Indicates the card slot index number,
1845   * ranging from 0 to the maximum card slot index number supported by the device.
1846   * @param { LockType } lockType - Indicates the lock type.
1847   * @returns { Promise<LockState> } Returns the sim card lock status.
1848   * @throws { BusinessError } 201 - Permission denied.
1849   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1850   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1851   *     2. Incorrect parameter types.
1852   * @throws { BusinessError } 8300001 - Invalid parameter value.
1853   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1854   * @throws { BusinessError } 8300003 - System internal error.
1855   * @throws { BusinessError } 8300004 - Do not have sim card.
1856   * @throws { BusinessError } 8300999 - Unknown error code.
1857   * @throws { BusinessError } 8301002 - SIM card operation error.
1858   * @syscap SystemCapability.Telephony.CoreService
1859   * @systemapi Hide this for inner system use.
1860   * @since 8
1861   */
1862  function getLockState(slotId: number, lockType: LockType): Promise<LockState>;
1863
1864  /**
1865   * Send envelope command to SIM card.
1866   *
1867   * @permission ohos.permission.SET_TELEPHONY_STATE
1868   * @param { number } slotId - Indicates the card slot index number,
1869   * ranging from 0 to the maximum card slot index number supported by the device.
1870   * @param { string } cmd - Indicates sending command.
1871   * @param { AsyncCallback<void> } callback - The callback of sendEnvelopeCmd.
1872   * @throws { BusinessError } 201 - Permission denied.
1873   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1874   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1875   *     2. Incorrect parameter types.
1876   * @throws { BusinessError } 8300001 - Invalid parameter value.
1877   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1878   * @throws { BusinessError } 8300003 - System internal error.
1879   * @throws { BusinessError } 8300004 - Do not have sim card.
1880   * @throws { BusinessError } 8300999 - Unknown error code.
1881   * @syscap SystemCapability.Telephony.CoreService
1882   * @systemapi Hide this for inner system use.
1883   * @since 8
1884   */
1885  function sendEnvelopeCmd(slotId: number, cmd: string, callback: AsyncCallback<void>): void;
1886
1887  /**
1888   * Send envelope command to SIM card.
1889   *
1890   * @permission ohos.permission.SET_TELEPHONY_STATE
1891   * @param { number } slotId - Indicates the card slot index number,
1892   * ranging from 0 to the maximum card slot index number supported by the device.
1893   * @param { string } cmd - Indicates sending command.
1894   * @returns { Promise<void> } The promise returned by the sendEnvelopeCmd.
1895   * @throws { BusinessError } 201 - Permission denied.
1896   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1897   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1898   *     2. Incorrect parameter types.
1899   * @throws { BusinessError } 8300001 - Invalid parameter value.
1900   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1901   * @throws { BusinessError } 8300003 - System internal error.
1902   * @throws { BusinessError } 8300004 - Do not have sim card.
1903   * @throws { BusinessError } 8300999 - Unknown error code.
1904   * @syscap SystemCapability.Telephony.CoreService
1905   * @systemapi Hide this for inner system use.
1906   * @since 8
1907   */
1908  function sendEnvelopeCmd(slotId: number, cmd: string): Promise<void>;
1909
1910  /**
1911   * Send terminal response command to SIM card.
1912   *
1913   * @permission ohos.permission.SET_TELEPHONY_STATE
1914   * @param { number } slotId - Indicates the card slot index number,
1915   * ranging from 0 to the maximum card slot index number supported by the device.
1916   * @param { string } cmd - Indicates sending command.
1917   * @param { AsyncCallback<void> } callback - The callback of sendTerminalResponseCmd.
1918   * @throws { BusinessError } 201 - Permission denied.
1919   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1920   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1921   *     2. Incorrect parameter types.
1922   * @throws { BusinessError } 8300001 - Invalid parameter value.
1923   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1924   * @throws { BusinessError } 8300003 - System internal error.
1925   * @throws { BusinessError } 8300004 - Do not have sim card.
1926   * @throws { BusinessError } 8300999 - Unknown error code.
1927   * @syscap SystemCapability.Telephony.CoreService
1928   * @systemapi Hide this for inner system use.
1929   * @since 8
1930   */
1931  function sendTerminalResponseCmd(slotId: number, cmd: string, callback: AsyncCallback<void>): void;
1932
1933  /**
1934   * Send terminal response command to SIM card.
1935   *
1936   * @permission ohos.permission.SET_TELEPHONY_STATE
1937   * @param { number } slotId - Indicates the card slot index number,
1938   * ranging from 0 to the maximum card slot index number supported by the device.
1939   * @param { string } cmd - Indicates sending command.
1940   * @returns { Promise<void> } The promise returned by the sendTerminalResponseCmd.
1941   * @throws { BusinessError } 201 - Permission denied.
1942   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1943   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1944   *     2. Incorrect parameter types.
1945   * @throws { BusinessError } 8300001 - Invalid parameter value.
1946   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1947   * @throws { BusinessError } 8300003 - System internal error.
1948   * @throws { BusinessError } 8300004 - Do not have sim card.
1949   * @throws { BusinessError } 8300999 - Unknown error code.
1950   * @syscap SystemCapability.Telephony.CoreService
1951   * @systemapi Hide this for inner system use.
1952   * @since 8
1953   */
1954  function sendTerminalResponseCmd(slotId: number, cmd: string): Promise<void>;
1955
1956
1957  /**
1958   * Unlock SIM card.
1959   *
1960   * @permission ohos.permission.SET_TELEPHONY_STATE
1961   * @param { number } slotId - Indicates the card slot index number,
1962   * ranging from 0 to the maximum card slot index number supported by the device.
1963   * @param { PersoLockInfo } lockInfo - Indicates customized lock type information.
1964   * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback used to obtain a response
1965   * to obtain the SIM card lock status for the specified card slot.
1966   * @throws { BusinessError } 201 - Permission denied.
1967   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1968   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1969   *     2. Incorrect parameter types.
1970   * @throws { BusinessError } 8300001 - Invalid parameter value.
1971   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1972   * @throws { BusinessError } 8300003 - System internal error.
1973   * @throws { BusinessError } 8300004 - Do not have sim card.
1974   * @throws { BusinessError } 8300999 - Unknown error code.
1975   * @throws { BusinessError } 8301002 - SIM card operation error.
1976   * @syscap SystemCapability.Telephony.CoreService
1977   * @systemapi Hide this for inner system use.
1978   * @since 8
1979   */
1980  function unlockSimLock(slotId: number, lockInfo: PersoLockInfo, callback: AsyncCallback<LockStatusResponse>): void;
1981
1982  /**
1983   * Unlock SIM card.
1984   *
1985   * @permission ohos.permission.SET_TELEPHONY_STATE
1986   * @param { number } slotId - Indicates the card slot index number,
1987   * ranging from 0 to the maximum card slot index number supported by the device.
1988   * @param { PersoLockInfo } lockInfo - Indicates customized lock type information.
1989   * @returns { Promise<LockStatusResponse> } Returns the response to obtain
1990   * the SIM card lock status of the specified card slot.
1991   * @throws { BusinessError } 201 - Permission denied.
1992   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1993   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1994   *     2. Incorrect parameter types.
1995   * @throws { BusinessError } 8300001 - Invalid parameter value.
1996   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1997   * @throws { BusinessError } 8300003 - System internal error.
1998   * @throws { BusinessError } 8300004 - Do not have sim card.
1999   * @throws { BusinessError } 8300999 - Unknown error code.
2000   * @throws { BusinessError } 8301002 - SIM card operation error.
2001   * @syscap SystemCapability.Telephony.CoreService
2002   * @systemapi Hide this for inner system use.
2003   * @since 8
2004   */
2005  function unlockSimLock(slotId: number, lockInfo: PersoLockInfo): Promise<LockStatusResponse>;
2006
2007  /**
2008   * Obtains the operator key of the SIM card in a specified slot.
2009   *
2010   * @param { number } slotId - Indicates the card slot index number,
2011   * ranging from 0 to the maximum card slot index number supported by the device.
2012   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the operator key;
2013   * Returns an empty string if no SIM card is inserted or no operator key matched.
2014   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2015   *     2. Incorrect parameter types.
2016   * @throws { BusinessError } 801 - Capability not supported.
2017   * @throws { BusinessError } 8300001 - Invalid parameter value.
2018   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
2019   * @throws { BusinessError } 8300003 - System internal error.
2020   * @throws { BusinessError } 8300999 - Unknown error code.
2021   * @syscap SystemCapability.Telephony.CoreService
2022   * @since 9
2023   */
2024  function getOpKey(slotId: number, callback: AsyncCallback<string>): void;
2025
2026  /**
2027   * Obtains the operator key of the SIM card in a specified slot.
2028   *
2029   * @param { number } slotId - Indicates the card slot index number,
2030   * ranging from 0 to the maximum card slot index number supported by the device.
2031   * @returns { Promise<string> } Returns the operator key;
2032   * Returns an empty string if no SIM card is inserted or no operator key matched.
2033   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2034   *     2. Incorrect parameter types.
2035   * @throws { BusinessError } 801 - Capability not supported.
2036   * @throws { BusinessError } 8300001 - Invalid parameter value.
2037   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
2038   * @throws { BusinessError } 8300003 - System internal error.
2039   * @throws { BusinessError } 8300999 - Unknown error code.
2040   * @syscap SystemCapability.Telephony.CoreService
2041   * @since 9
2042   */
2043  function getOpKey(slotId: number): Promise<string>;
2044
2045  /**
2046   * Obtains the operator key of the SIM card in a specified slot.
2047   *
2048   * @param { number } slotId - Indicates the card slot index number,
2049   * ranging from 0 to the maximum card slots supported by the device.
2050   * @returns { string } Returns the operator key; returns an empty string if no SIM card is inserted or
2051   * no operator key is matched.
2052   * @syscap SystemCapability.Telephony.CoreService
2053   * @since 10
2054   */
2055  function getOpKeySync(slotId: number): string;
2056
2057  /**
2058   * Obtains the operator name of the SIM card in a specified slot.
2059   *
2060   * @param { number } slotId - Indicates the card slot index number,
2061   * ranging from 0 to the maximum card slot index number supported by the device.
2062   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the operator name;
2063   * Returns an empty string if no SIM card is inserted or no operator name matched.
2064   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2065   *     2. Incorrect parameter types.
2066   * @throws { BusinessError } 801 - Capability not supported.
2067   * @throws { BusinessError } 8300001 - Invalid parameter value.
2068   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
2069   * @throws { BusinessError } 8300003 - System internal error.
2070   * @throws { BusinessError } 8300999 - Unknown error code.
2071   * @syscap SystemCapability.Telephony.CoreService
2072   * @since 9
2073   */
2074  function getOpName(slotId: number, callback: AsyncCallback<string>): void;
2075
2076  /**
2077   * Obtains the operator name of the SIM card in a specified slot.
2078   *
2079   * @param { number } slotId - Indicates the card slot index number,
2080   * ranging from 0 to the maximum card slot index number supported by the device.
2081   * @returns { Promise<string> } Returns the operator name; returns an empty string if no SIM card is inserted or
2082   * no operator name matched.
2083   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2084   *     2. Incorrect parameter types.
2085   * @throws { BusinessError } 801 - Capability not supported.
2086   * @throws { BusinessError } 8300001 - Invalid parameter value.
2087   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
2088   * @throws { BusinessError } 8300003 - System internal error.
2089   * @throws { BusinessError } 8300999 - Unknown error code.
2090   * @syscap SystemCapability.Telephony.CoreService
2091   * @since 9
2092   */
2093  function getOpName(slotId: number): Promise<string>;
2094
2095  /**
2096   * Obtains the operator name of the SIM card in a specified slot.
2097   *
2098   * @param { number } slotId - Indicates the card slot index number,
2099   * ranging from 0 to the maximum card slots supported by the device.
2100   * @returns { string } Returns the operator name; returns an empty string if no SIM card is inserted or
2101   * no operator name is matched.
2102   * @syscap SystemCapability.Telephony.CoreService
2103   * @since 10
2104   */
2105  function getOpNameSync(slotId: number): string;
2106
2107  /**
2108   * Obtains the default SIM ID for the voice service.
2109   *
2110   * @param { AsyncCallback<number> } callback - Returns the SIM ID of the default voice sim
2111   * and SIM ID will increase from 1.
2112   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2113   *     2. Incorrect parameter types.
2114   * @throws { BusinessError } 8300001 - Invalid parameter value.
2115   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
2116   * @throws { BusinessError } 8300003 - System internal error.
2117   * @throws { BusinessError } 8300004 - Do not have sim card.
2118   * @throws { BusinessError } 8300999 - Unknown error code.
2119   * @throws { BusinessError } 8301001 - SIM card is not activated.
2120   * @syscap SystemCapability.Telephony.CoreService
2121   * @since 10
2122   */
2123  function getDefaultVoiceSimId(callback: AsyncCallback<number>): void;
2124
2125  /**
2126   * Obtains the default SIM ID for the voice service.
2127   *
2128   * @returns { Promise<number> } Returns the SIM ID of the default voice sim
2129   * and SIM ID will increase from 1.
2130   * @throws { BusinessError } 8300001 - Invalid parameter value.
2131   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
2132   * @throws { BusinessError } 8300003 - System internal error.
2133   * @throws { BusinessError } 8300004 - Do not have sim card.
2134   * @throws { BusinessError } 8300999 - Unknown error code.
2135   * @throws { BusinessError } 8301001 - SIM card is not activated.
2136   * @syscap SystemCapability.Telephony.CoreService
2137   * @since 10
2138   */
2139  function getDefaultVoiceSimId(): Promise<number>;
2140
2141  /**
2142   * Obtains the value of dsds mode.
2143   *
2144   * @permission ohos.permission.GET_TELEPHONY_STATE
2145   * @param { AsyncCallback<DsdsMode> } callback - Indicates the callback for
2146   *     getting one of the following dsds mode states:
2147   * <ul>
2148   * <li>{@code DsdsMode#DSDS_MODE_V2}
2149   * <li>{@code DsdsMode#DSDS_MODE_V3}
2150   * <li>{@code DsdsMode#DSDS_MODE_V5_TDM}
2151   * <li>{@code DsdsMode#DSDS_MODE_V5_DSDA}
2152   * </ul>
2153   * @throws { BusinessError } 201 - Permission denied.
2154   * @throws { BusinessError } 202 - Non-system applications use system APIs.
2155   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2156   *     2. Incorrect parameter types.
2157   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to
2158   *     service.
2159   * @throws { BusinessError } 8300003 - System internal error.
2160   * @throws { BusinessError } 8300999 - Unknown error code.
2161   * @syscap SystemCapability.Telephony.CoreService
2162   * @systemapi Hide this for inner system use.
2163   * @since 11
2164   */
2165  function getDsdsMode(callback: AsyncCallback<DsdsMode>): void;
2166
2167  /**
2168   * Obtains the value of dsds mode.
2169   *
2170   * @permission ohos.permission.GET_TELEPHONY_STATE
2171   * @returns { Promise<DsdsMode> } Returns one of the following dsds mode
2172   *     states:
2173   * <ul>
2174   * <li>{@code DsdsMode#DSDS_MODE_V2}
2175   * <li>{@code DsdsMode#DSDS_MODE_V3}
2176   * <li>{@code DsdsMode#DSDS_MODE_V5_TDM}
2177   * <li>{@code DsdsMode#DSDS_MODE_V5_DSDA}
2178   * </ul>
2179   * @throws { BusinessError } 201 - Permission denied.
2180   * @throws { BusinessError } 202 - Non-system applications use system APIs.
2181   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2182   *     2. Incorrect parameter types.
2183   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to
2184   *     service.
2185   * @throws { BusinessError } 8300003 - System internal error.
2186   * @throws { BusinessError } 8300999 - Unknown error code.
2187   * @syscap SystemCapability.Telephony.CoreService
2188   * @systemapi Hide this for inner system use.
2189   * @since 11
2190   */
2191  function getDsdsMode(): Promise<DsdsMode>;
2192
2193  /**
2194   * Defines the carrier configuration.
2195   *
2196   * @interface OperatorConfig
2197   * @syscap SystemCapability.Telephony.CoreService
2198   * @systemapi Hide this for inner system use.
2199   * @since 8
2200   */
2201  export interface OperatorConfig {
2202    /**
2203     * Indicates the field.
2204     *
2205     * @type { string }
2206     * @syscap SystemCapability.Telephony.CoreService
2207     * @systemapi Hide this for inner system use.
2208     * @since 8
2209     */
2210    field: string;
2211
2212    /**
2213     * Indicates the value.
2214     *
2215     * @type { string }
2216     * @syscap SystemCapability.Telephony.CoreService
2217     * @systemapi Hide this for inner system use.
2218     * @since 8
2219     */
2220    value: string;
2221  }
2222
2223  /**
2224   * Defines the ICC account information.
2225   *
2226   * @interface IccAccountInfo
2227   * @syscap SystemCapability.Telephony.CoreService
2228   * @since 10
2229   */
2230  export interface IccAccountInfo {
2231    /**
2232     * Indicates the sim Id for card.
2233     *
2234     * @type { number }
2235     * @syscap SystemCapability.Telephony.CoreService
2236     * @since 10
2237     */
2238    simId: number;
2239
2240    /**
2241     * Indicates the card slot index number,
2242     * ranging from 0 to the maximum card slot index number supported by the device.
2243     *
2244     * @type { number }
2245     * @syscap SystemCapability.Telephony.CoreService
2246     * @since 10
2247     */
2248    slotIndex: number;
2249
2250    /**
2251     * Indicates the mark card is eSim or not.
2252     *
2253     * @type { boolean }
2254     * @syscap SystemCapability.Telephony.CoreService
2255     * @since 10
2256     */
2257    isEsim: boolean;
2258
2259    /**
2260     * Indicates the active status for card.
2261     *
2262     * @type { boolean }
2263     * @syscap SystemCapability.Telephony.CoreService
2264     * @since 10
2265     */
2266    isActive: boolean;
2267
2268    /**
2269     * Indicates the iccId for card.
2270     *
2271     * @type { string }
2272     * @syscap SystemCapability.Telephony.CoreService
2273     * @since 10
2274     */
2275    iccId: string;
2276
2277    /**
2278     * Indicates the display name for card.
2279     *
2280     * @type { string }
2281     * @syscap SystemCapability.Telephony.CoreService
2282     * @since 10
2283     */
2284    showName: string;
2285
2286    /**
2287     * Indicates the display number for card.
2288     *
2289     * @type { string }
2290     * @syscap SystemCapability.Telephony.CoreService
2291     * @since 10
2292     */
2293    showNumber: string;
2294  }
2295
2296  /**
2297   * Defines the personalized lock information.
2298   *
2299   * @interface LockStatusResponse
2300   * @syscap SystemCapability.Telephony.CoreService
2301   * @systemapi Hide this for inner system use.
2302   * @since 7
2303   */
2304  export interface LockStatusResponse {
2305    /**
2306     * Indicates the current operation result.
2307     *
2308     * @type { number }
2309     * @syscap SystemCapability.Telephony.CoreService
2310     * @systemapi Hide this for inner system use.
2311     * @since 7
2312     */
2313    result: number;
2314
2315    /**
2316     * Indicates the operations remaining.
2317     *
2318     * @type { ?number }
2319     * @syscap SystemCapability.Telephony.CoreService
2320     * @systemapi Hide this for inner system use.
2321     * @since 7
2322     */
2323    remain?: number;
2324  }
2325
2326  /**
2327   * Defines the contact number information.
2328   *
2329   * @interface DiallingNumbersInfo
2330   * @syscap SystemCapability.Telephony.CoreService
2331   * @systemapi Hide this for inner system use.
2332   * @since 8
2333   */
2334  export interface DiallingNumbersInfo {
2335    /**
2336     * Indicates the tag.
2337     *
2338     * @type { string }
2339     * @syscap SystemCapability.Telephony.CoreService
2340     * @systemapi Hide this for inner system use.
2341     * @since 8
2342     */
2343    alphaTag: string;
2344
2345    /**
2346     * Indicates the call transfer number.
2347     *
2348     * @type { string }
2349     * @syscap SystemCapability.Telephony.CoreService
2350     * @systemapi Hide this for inner system use.
2351     * @since 8
2352     */
2353    number: string;
2354
2355    /**
2356     * Indicates the record number.
2357     *
2358     * @type { ?number }
2359     * @syscap SystemCapability.Telephony.CoreService
2360     * @systemapi Hide this for inner system use.
2361     * @since 8
2362     */
2363    recordNumber?: number;
2364
2365    /**
2366     * Indicates the PIN 2.
2367     *
2368     * @type { ?string }
2369     * @syscap SystemCapability.Telephony.CoreService
2370     * @systemapi Hide this for inner system use.
2371     * @since 8
2372     */
2373    pin2?: string;
2374  }
2375
2376  /**
2377   * Defines the personalized lock information.
2378   *
2379   * @interface LockInfo
2380   * @syscap SystemCapability.Telephony.CoreService
2381   * @systemapi Hide this for inner system use.
2382   * @since 8
2383   */
2384  export interface LockInfo {
2385    /**
2386     * Indicates the lock type.
2387     *
2388     * @type { LockType }
2389     * @syscap SystemCapability.Telephony.CoreService
2390     * @systemapi Hide this for inner system use.
2391     * @since 8
2392     */
2393    lockType: LockType;
2394
2395    /**
2396     * Indicates the password.
2397     *
2398     * @type { string }
2399     * @syscap SystemCapability.Telephony.CoreService
2400     * @systemapi Hide this for inner system use.
2401     * @since 8
2402     */
2403    password: string;
2404
2405    /**
2406     * Indicates the lock state.
2407     *
2408     * @type { LockState }
2409     * @syscap SystemCapability.Telephony.CoreService
2410     * @systemapi Hide this for inner system use.
2411     * @since 8
2412     */
2413    state: LockState;
2414  }
2415
2416  /**
2417   * Defines the personalized lock information.
2418   *
2419   * @interface PersoLockInfo
2420   * @syscap SystemCapability.Telephony.CoreService
2421   * @systemapi Hide this for inner system use.
2422   * @since 8
2423   */
2424  export interface PersoLockInfo {
2425    /**
2426     * Indicates the personalized lock type.
2427     *
2428     * @type { PersoLockType }
2429     * @syscap SystemCapability.Telephony.CoreService
2430     * @systemapi Hide this for inner system use.
2431     * @since 8
2432     */
2433    lockType: PersoLockType;
2434
2435    /**
2436     * Indicates the password.
2437     *
2438     * @type { string }
2439     * @syscap SystemCapability.Telephony.CoreService
2440     * @systemapi Hide this for inner system use.
2441     * @since 8
2442     */
2443    password: string;
2444  }
2445
2446  /**
2447   * Indicates the lock types.
2448   *
2449   * @enum { number }
2450   * @syscap SystemCapability.Telephony.CoreService
2451   * @systemapi Hide this for inner system use.
2452   * @since 8
2453   */
2454  export enum LockType {
2455    /**
2456     * Indicates the SIM card password lock.
2457     *
2458     * @syscap SystemCapability.Telephony.CoreService
2459     * @systemapi Hide this for inner system use.
2460     * @since 8
2461     */
2462    PIN_LOCK = 1,
2463
2464    /**
2465     * Indicates the fixed dialing lock.
2466     *
2467     * @syscap SystemCapability.Telephony.CoreService
2468     * @systemapi Hide this for inner system use.
2469     * @since 8
2470     */
2471    FDN_LOCK = 2,
2472  }
2473
2474  /**
2475   * Indicates the SIM card types.
2476   *
2477   * @enum { number }
2478   * @syscap SystemCapability.Telephony.CoreService
2479   * @since 7
2480   */
2481  export enum CardType {
2482    /**
2483     * Icc card type: unknown type Card.
2484     *
2485     * @syscap SystemCapability.Telephony.CoreService
2486     * @since 7
2487     */
2488    UNKNOWN_CARD = -1,
2489
2490    /**
2491     * Icc card type: Single sim card type.
2492     *
2493     * @syscap SystemCapability.Telephony.CoreService
2494     * @since 7
2495     */
2496    SINGLE_MODE_SIM_CARD = 10,
2497
2498    /**
2499     * Icc card type: Single usim card type.
2500     *
2501     * @syscap SystemCapability.Telephony.CoreService
2502     * @since 7
2503     */
2504    SINGLE_MODE_USIM_CARD = 20,
2505
2506    /**
2507     * Icc card type: Single ruim card type.
2508     *
2509     * @syscap SystemCapability.Telephony.CoreService
2510     * @since 7
2511     */
2512    SINGLE_MODE_RUIM_CARD = 30,
2513
2514    /**
2515     * Icc card type: Double card C+G.
2516     *
2517     * @syscap SystemCapability.Telephony.CoreService
2518     * @since 7
2519     */
2520    DUAL_MODE_CG_CARD = 40,
2521
2522    /**
2523     * Icc card type: China Telecom Internal Roaming Card (Dual Mode).
2524     *
2525     * @syscap SystemCapability.Telephony.CoreService
2526     * @since 7
2527     */
2528    CT_NATIONAL_ROAMING_CARD = 41,
2529
2530    /**
2531     * Icc card type: China Unicom Dual Mode Card.
2532     *
2533     * @syscap SystemCapability.Telephony.CoreService
2534     * @since 7
2535     */
2536    CU_DUAL_MODE_CARD = 42,
2537
2538    /**
2539     * Icc card type: China Telecom LTE Card (Dual Mode).
2540     *
2541     * @syscap SystemCapability.Telephony.CoreService
2542     * @since 7
2543     */
2544    DUAL_MODE_TELECOM_LTE_CARD = 43,
2545
2546    /**
2547     * Icc card type: Double card U+G.
2548     *
2549     * @syscap SystemCapability.Telephony.CoreService
2550     * @since 7
2551     */
2552    DUAL_MODE_UG_CARD = 50,
2553
2554    /**
2555     * Icc card type: Single isim card type.
2556     * @syscap SystemCapability.Telephony.CoreService
2557     * @since 8
2558     */
2559    SINGLE_MODE_ISIM_CARD = 60
2560  }
2561
2562  /**
2563   * Indicates the SIM card states.
2564   *
2565   * @enum { number }
2566   * @syscap SystemCapability.Telephony.CoreService
2567   * @since 6
2568   */
2569  export enum SimState {
2570    /**
2571     * Indicates unknown SIM card state, that is, the accurate status cannot be
2572     * obtained.
2573     *
2574     * @syscap SystemCapability.Telephony.CoreService
2575     * @since 6
2576     */
2577    SIM_STATE_UNKNOWN,
2578
2579    /**
2580     * Indicates that the SIM card is in the <b>not present</b> state, that is,
2581     * no SIM card is inserted into the card slot.
2582     *
2583     * @syscap SystemCapability.Telephony.CoreService
2584     * @since 6
2585     */
2586    SIM_STATE_NOT_PRESENT,
2587
2588    /**
2589     * Indicates that the SIM card is in the <b>locked</b> state, that is, the
2590     * SIM card is locked by the personal identification number (PIN)/PIN
2591     * unblocking key (PUK) or network.
2592     *
2593     * @syscap SystemCapability.Telephony.CoreService
2594     * @since 6
2595     */
2596    SIM_STATE_LOCKED,
2597
2598    /**
2599     * Indicates that the SIM card is in the <b>not ready</b> state, that is,
2600     * the SIM card is in position but cannot work properly.
2601     *
2602     * @syscap SystemCapability.Telephony.CoreService
2603     * @since 6
2604     */
2605    SIM_STATE_NOT_READY,
2606
2607    /**
2608     * Indicates that the SIM card is in the <b>ready</b> state, that is, the
2609     * SIM card is in position and is working properly.
2610     *
2611     * @syscap SystemCapability.Telephony.CoreService
2612     * @since 6
2613     */
2614    SIM_STATE_READY,
2615
2616    /**
2617     * Indicates that the SIM card is in the <b>loaded</b> state, that is, the
2618     * SIM card is in position and is working properly.
2619     *
2620     * @syscap SystemCapability.Telephony.CoreService
2621     * @since 6
2622     */
2623    SIM_STATE_LOADED
2624  }
2625
2626  /**
2627   * Indicates the lock states.
2628   *
2629   * @enum { number }
2630   * @syscap SystemCapability.Telephony.CoreService
2631   * @systemapi Hide this for inner system use.
2632   * @since 8
2633   */
2634  export enum LockState {
2635    /**
2636     * Indicates that the lock state card is in the <b>off</b> state.
2637     *
2638     * @syscap SystemCapability.Telephony.CoreService
2639     * @systemapi Hide this for inner system use.
2640     * @since 8
2641     */
2642    LOCK_OFF = 0,
2643
2644    /**
2645     * Indicates that the lock state card is in the <b>on</b> state.
2646     *
2647     * @syscap SystemCapability.Telephony.CoreService
2648     * @systemapi Hide this for inner system use.
2649     * @since 8
2650     */
2651    LOCK_ON = 1,
2652  }
2653
2654  /**
2655   * Indicates the contact types.
2656   *
2657   * @enum { number }
2658   * @syscap SystemCapability.Telephony.CoreService
2659   * @systemapi Hide this for inner system use.
2660   * @since 8
2661   */
2662  export enum ContactType {
2663    /**
2664     * Indicates the common contact number.
2665     *
2666     * @syscap SystemCapability.Telephony.CoreService
2667     * @systemapi Hide this for inner system use.
2668     * @since 8
2669     */
2670    GENERAL_CONTACT = 1,
2671
2672    /**
2673     * Indicates the fixed dialing number.
2674     *
2675     * @syscap SystemCapability.Telephony.CoreService
2676     * @systemapi Hide this for inner system use.
2677     * @since 8
2678     */
2679    FIXED_DIALING = 2,
2680  }
2681
2682  /**
2683   * Indicates the personalized lock types.
2684   *
2685   * @enum { number }
2686   * @syscap SystemCapability.Telephony.CoreService
2687   * @systemapi Hide this for inner system use.
2688   * @since 8
2689   */
2690  export enum PersoLockType {
2691    /**
2692     * Indicates network personalization of PIN lock(refer 3GPP TS 22.022 [33]).
2693     *
2694     * @syscap SystemCapability.Telephony.CoreService
2695     * @systemapi Hide this for inner system use.
2696     * @since 8
2697     */
2698    PN_PIN_LOCK,
2699
2700    /**
2701     * Indicates network personalization of PUK lock(refer 3GPP TS 22.022 [33]).
2702     *
2703     * @syscap SystemCapability.Telephony.CoreService
2704     * @systemapi Hide this for inner system use.
2705     * @since 8
2706     */
2707    PN_PUK_LOCK,
2708
2709    /**
2710     * Indicates network subset personalization of PIN lock(refer 3GPP TS 22.022 [33]).
2711     *
2712     * @syscap SystemCapability.Telephony.CoreService
2713     * @systemapi Hide this for inner system use.
2714     * @since 8
2715     */
2716    PU_PIN_LOCK,
2717
2718    /**
2719     * Indicates network subset personalization of PUK lock(refer 3GPP TS 22.022 [33]).
2720     *
2721     * @syscap SystemCapability.Telephony.CoreService
2722     * @systemapi Hide this for inner system use.
2723     * @since 8
2724     */
2725    PU_PUK_LOCK,
2726
2727    /**
2728     * Indicates service provider personalization of PIN lock(refer 3GPP TS 22.022 [33]).
2729     *
2730     * @syscap SystemCapability.Telephony.CoreService
2731     * @systemapi Hide this for inner system use.
2732     * @since 8
2733     */
2734    PP_PIN_LOCK,
2735
2736    /**
2737     * Indicates service provider personalization of PUK lock(refer 3GPP TS 22.022 [33]).
2738     *
2739     * @syscap SystemCapability.Telephony.CoreService
2740     * @systemapi Hide this for inner system use.
2741     * @since 8
2742     */
2743    PP_PUK_LOCK,
2744
2745    /**
2746     * Indicates corporate personalization of PIN lock(refer 3GPP TS 22.022 [33]).
2747     *
2748     * @syscap SystemCapability.Telephony.CoreService
2749     * @systemapi Hide this for inner system use.
2750     * @since 8
2751     */
2752    PC_PIN_LOCK,
2753
2754    /**
2755     * Indicates corporate personalization of PUK lock(refer 3GPP TS 22.022 [33]).
2756     *
2757     * @syscap SystemCapability.Telephony.CoreService
2758     * @systemapi Hide this for inner system use.
2759     * @since 8
2760     */
2761    PC_PUK_LOCK,
2762
2763    /**
2764     * Indicates SIM/USIM personalization of PIN lock(refer 3GPP TS 22.022 [33]).
2765     *
2766     * @syscap SystemCapability.Telephony.CoreService
2767     * @systemapi Hide this for inner system use.
2768     * @since 8
2769     */
2770    SIM_PIN_LOCK,
2771
2772    /**
2773     * Indicates SIM/USIM personalization of PUK lock(refer 3GPP TS 22.022 [33]).
2774     *
2775     * @syscap SystemCapability.Telephony.CoreService
2776     * @systemapi Hide this for inner system use.
2777     * @since 8
2778     */
2779    SIM_PUK_LOCK,
2780  }
2781
2782  /**
2783   * Indicates the carrier configuration keys.
2784   *
2785   * @enum { string }
2786   * @syscap SystemCapability.Telephony.CoreService
2787   * @systemapi Hide this for inner system use.
2788   * @since 9
2789   */
2790  export enum OperatorConfigKey {
2791    /**
2792     * Indicates the voice mail number.
2793     *
2794     * @syscap SystemCapability.Telephony.CoreService
2795     * @systemapi Hide this for inner system use.
2796     * @since 9
2797     */
2798    KEY_VOICE_MAIL_NUMBER_STRING = 'voice_mail_number_string',
2799
2800    /**
2801     * Indicates the status of ims switch.
2802     *
2803     * @syscap SystemCapability.Telephony.CoreService
2804     * @systemapi Hide this for inner system use.
2805     * @since 9
2806     */
2807    KEY_IMS_SWITCH_ON_BY_DEFAULT_BOOL = 'ims_switch_on_by_default_bool',
2808
2809    /**
2810     * Indicates whether the ims switch status is hidden.
2811     *
2812     * @syscap SystemCapability.Telephony.CoreService
2813     * @systemapi Hide this for inner system use.
2814     * @since 9
2815     */
2816    KEY_HIDE_IMS_SWITCH_BOOL = 'hide_ims_switch_bool',
2817
2818    /**
2819     * Indicates whether volte mode is supported.
2820     *
2821     * @syscap SystemCapability.Telephony.CoreService
2822     * @systemapi Hide this for inner system use.
2823     * @since 9
2824     */
2825    KEY_VOLTE_SUPPORTED_BOOL = 'volte_supported_bool',
2826
2827    /**
2828     * Indicates the list supported by nr mode.
2829     *
2830     * @syscap SystemCapability.Telephony.CoreService
2831     * @systemapi Hide this for inner system use.
2832     * @since 9
2833     */
2834    KEY_NR_MODE_SUPPORTED_LIST_INT_ARRAY = 'nr_mode_supported_list_int_array',
2835
2836    /**
2837     * Indicates whether VOLTE supports configuration.
2838     *
2839     * @syscap SystemCapability.Telephony.CoreService
2840     * @systemapi Hide this for inner system use.
2841     * @since 9
2842     */
2843    KEY_VOLTE_PROVISIONING_SUPPORTED_BOOL = 'volte_provisioning_supported_bool',
2844
2845    /**
2846     * Indicates whether SS service supports UT.
2847     *
2848     * @syscap SystemCapability.Telephony.CoreService
2849     * @systemapi Hide this for inner system use.
2850     * @since 9
2851     */
2852    KEY_SS_OVER_UT_SUPPORTED_BOOL = 'ss_over_ut_supported_bool',
2853
2854    /**
2855     * Indicates whether the IMS requires GBA.
2856     *
2857     * @syscap SystemCapability.Telephony.CoreService
2858     * @systemapi Hide this for inner system use.
2859     * @since 9
2860     */
2861    KEY_IMS_GBA_REQUIRED_BOOL = 'ims_gba_required_bool',
2862
2863    /**
2864     * Indicates whether UT configuration is supported.
2865     *
2866     * @syscap SystemCapability.Telephony.CoreService
2867     * @systemapi Hide this for inner system use.
2868     * @since 9
2869     */
2870    KEY_UT_PROVISIONING_SUPPORTED_BOOL = 'ut_provisioning_supported_bool',
2871
2872    /**
2873     * Indicates the ims emergency preference.
2874     *
2875     * @syscap SystemCapability.Telephony.CoreService
2876     * @systemapi Hide this for inner system use.
2877     * @since 9
2878     */
2879    KEY_IMS_PREFER_FOR_EMERGENCY_BOOL = 'ims_prefer_for_emergency_bool',
2880
2881    /**
2882     * Indicates call waiting service.
2883     *
2884     * @syscap SystemCapability.Telephony.CoreService
2885     * @systemapi Hide this for inner system use.
2886     * @since 9
2887     */
2888    KEY_CALL_WAITING_SERVICE_CLASS_INT = 'call_waiting_service_class_int',
2889
2890    /**
2891     * Indicates call forwarding visibility.
2892     *
2893     * @syscap SystemCapability.Telephony.CoreService
2894     * @systemapi Hide this for inner system use.
2895     * @since 9
2896     */
2897    KEY_CALL_TRANSFER_VISIBILITY_BOOL = 'call_transfer_visibility_bool',
2898
2899    /**
2900     * Indicates the list of ims call end reasons.
2901     *
2902     * @syscap SystemCapability.Telephony.CoreService
2903     * @systemapi Hide this for inner system use.
2904     * @since 9
2905     */
2906    KEY_IMS_CALL_DISCONNECT_REASON_INFO_MAPPING_STRING_ARRAY =
2907    'ims_call_disconnect_reason_info_mapping_string_array',
2908
2909    /**
2910     * Indicates the forced Volte switch on state.
2911     *
2912     * @syscap SystemCapability.Telephony.CoreService
2913     * @systemapi Hide this for inner system use.
2914     * @since 9
2915     */
2916    KEY_FORCE_VOLTE_SWITCH_ON_BOOL = 'force_volte_switch_on_bool',
2917
2918    /**
2919     * Indicates whether the operator name is displayed.
2920     *
2921     * @syscap SystemCapability.Telephony.CoreService
2922     * @systemapi Hide this for inner system use.
2923     * @since 9
2924     */
2925    KEY_ENABLE_OPERATOR_NAME_CUST_BOOL = 'enable_operator_name_cust_bool',
2926
2927    /**
2928     * Indicates the name of the operator.
2929     *
2930     * @syscap SystemCapability.Telephony.CoreService
2931     * @systemapi Hide this for inner system use.
2932     * @since 9
2933     */
2934    KEY_OPERATOR_NAME_CUST_STRING = 'operator_name_cust_string',
2935
2936    /**
2937     * Indicates the spn display rule.
2938     *
2939     * @syscap SystemCapability.Telephony.CoreService
2940     * @systemapi Hide this for inner system use.
2941     * @since 9
2942     */
2943    KEY_SPN_DISPLAY_CONDITION_CUST_INT = 'spn_display_condition_cust_int',
2944
2945    /**
2946     * Indicates the PLMN name.
2947     *
2948     * @syscap SystemCapability.Telephony.CoreService
2949     * @systemapi Hide this for inner system use.
2950     * @since 9
2951     */
2952    KEY_PNN_CUST_STRING_ARRAY = 'pnn_cust_string_array',
2953
2954    /**
2955     * Indicates operator PLMN information.
2956     *
2957     * @syscap SystemCapability.Telephony.CoreService
2958     * @systemapi Hide this for inner system use.
2959     * @since 9
2960     */
2961    KEY_OPL_CUST_STRING_ARRAY = 'opl_cust_string_array',
2962
2963    /**
2964     * Indicates the emergency call list.
2965     *
2966     * @syscap SystemCapability.Telephony.CoreService
2967     * @systemapi Hide this for inner system use.
2968     * @since 9
2969     */
2970    KEY_EMERGENCY_CALL_STRING_ARRAY = 'emergency_call_string_array',
2971  }
2972
2973  /**
2974   * Indicates the Dsds Mode.
2975   *
2976   * @enum { number }
2977   * @syscap SystemCapability.Telephony.CoreService
2978   * @systemapi Hide this for inner system use.
2979   * @since 11
2980   */
2981  export enum DsdsMode {
2982    /**
2983     * Indicates the DSDS 2.0 Mode.
2984     *
2985     * @syscap SystemCapability.Telephony.CoreService
2986     * @systemapi Hide this for inner system use.
2987     * @since 11
2988     */
2989    DSDS_MODE_V2 = 0,
2990
2991    /**
2992     * Indicates the DSDS 3.0 Mode.
2993     *
2994     * @syscap SystemCapability.Telephony.CoreService
2995     * @systemapi Hide this for inner system use.
2996     * @since 11
2997     */
2998    DSDS_MODE_V3 = 1,
2999
3000    /**
3001     * Indicates the DSDS 5.0 TDM Mode.
3002     *
3003     * @syscap SystemCapability.Telephony.CoreService
3004     * @systemapi Hide this for inner system use.
3005     * @since 11
3006     */
3007    DSDS_MODE_V5_TDM = 2,
3008
3009    /**
3010     * Indicates the DSDS 5.0 DSDA Mode.
3011     *
3012     * @syscap SystemCapability.Telephony.CoreService
3013     * @systemapi Hide this for inner system use.
3014     * @since 11
3015     */
3016    DSDS_MODE_V5_DSDA = 3,
3017  }
3018
3019  /**
3020   * Indicates the operator of SIM.
3021   *
3022   * @enum { string }
3023   * @syscap SystemCapability.Telephony.CoreService
3024   * @systemapi Hide this for inner system use.
3025   * @since 11
3026   */
3027  export enum OperatorSimCard {
3028    /**
3029     * Indicates the China Telecom card.
3030     *
3031     * @syscap SystemCapability.Telephony.CoreService
3032     * @systemapi Hide this for inner system use.
3033     * @since 11
3034     */
3035    CHINA_TELECOM_CARD = 'china_telecom_card',
3036  }
3037}
3038
3039export default sim;
3040