• 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
16import {AsyncCallback, Callback} from "./basic";
17
18/**
19 * Provides interfaces for applications to obtain the network state, cell information, signal information,
20 * and device ID of the wireless cellular network (WCN), and provides a callback registration mechanism to
21 * listen for changes of the network, cell, and signal status of the WCN.
22 *
23 * @namespace radio
24 * @syscap SystemCapability.Telephony.CoreService
25 * @since 6
26 */
27declare namespace radio {
28  /**
29   * Obtains radio access technology (RAT) of the registered network. The system
30   * returns RAT of the packet service (PS) and circuit service (CS) domain.
31   *
32   * @permission ohos.permission.GET_NETWORK_INFO
33   * @param { number } slotId - Indicates the card slot index number,
34   * ranging from 0 to the maximum card slot index number supported by the device.
35   * @param { AsyncCallback<{psRadioTech: RadioTechnology, csRadioTech: RadioTechnology}> } callback - Returns
36   * an integer indicating the RAT in use. The values are as follows:
37   * <ul>
38   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_UNKNOWN}
39   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_GSM}
40   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_1XRTT}
41   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_WCDMA}
42   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_HSPA}
43   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_HSPAP}
44   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_TD_SCDMA}
45   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_EVDO}
46   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_EHRPD}
47   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_LTE}
48   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_LTE_CA}
49   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_IWLAN}
50   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_NR}
51   * </ul>
52   * @throws { BusinessError } 201 - Permission denied.
53   * @throws { BusinessError } 401 - Parameter error.
54   * @throws { BusinessError } 8300001 - Invalid parameter value.
55   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
56   * @throws { BusinessError } 8300003 - System internal error.
57   * @throws { BusinessError } 8300999 - Unknown error code.
58   * @syscap SystemCapability.Telephony.CoreService
59   * @since 6
60   */
61  /**
62   * Obtains radio access technology (RAT) of the registered network. The system
63   * returns RAT of the packet service (PS) and circuit service (CS) domain.
64   *
65   * @permission ohos.permission.GET_NETWORK_INFO
66   * @param { number } slotId - Indicates the card slot index number,
67   * ranging from 0 to the maximum card slot index number supported by the device.
68   * @param { AsyncCallback<NetworkRadioTech> } callback - Returns
69   * the RAT of PS domain and CS domain of registered network.
70   * The values of RAT are as follows:
71   * <ul>
72   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_UNKNOWN}
73   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_GSM}
74   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_1XRTT}
75   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_WCDMA}
76   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_HSPA}
77   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_HSPAP}
78   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_TD_SCDMA}
79   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_EVDO}
80   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_EHRPD}
81   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_LTE}
82   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_LTE_CA}
83   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_IWLAN}
84   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_NR}
85   * </ul>
86   * @throws { BusinessError } 201 - Permission denied.
87   * @throws { BusinessError } 401 - Parameter error.
88   * @throws { BusinessError } 8300001 - Invalid parameter value.
89   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
90   * @throws { BusinessError } 8300003 - System internal error.
91   * @throws { BusinessError } 8300999 - Unknown error code.
92   * @syscap SystemCapability.Telephony.CoreService
93   * @since 11
94   */
95  function getRadioTech(slotId: number, callback: AsyncCallback<NetworkRadioTech>): void;
96
97  /**
98   * Obtains radio access technology (RAT) of the registered network. The system
99   * returns RAT of the packet service (PS) and circuit service (CS) domain.
100   *
101   * @permission ohos.permission.GET_NETWORK_INFO
102   * @param { number } slotId - Indicates the card slot index number,
103   * ranging from 0 to the maximum card slot index number supported by the device.
104   * @returns { Promise<{psRadioTech: RadioTechnology, csRadioTech: RadioTechnology}> } Returns
105   * the enumeration of RadioTechnology. The values are as follows:
106   * <ul>
107   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_UNKNOWN}
108   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_GSM}
109   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_1XRTT}
110   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_WCDMA}
111   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_HSPA}
112   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_HSPAP}
113   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_TD_SCDMA}
114   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_EVDO}
115   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_EHRPD}
116   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_LTE}
117   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_LTE_CA}
118   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_IWLAN}
119   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_NR}
120   * </ul>
121   * @throws { BusinessError } 201 - Permission denied.
122   * @throws { BusinessError } 401 - Parameter error.
123   * @throws { BusinessError } 8300001 - Invalid parameter value.
124   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
125   * @throws { BusinessError } 8300003 - System internal error.
126   * @throws { BusinessError } 8300999 - Unknown error code.
127   * @syscap SystemCapability.Telephony.CoreService
128   * @since 6
129   */
130  /**
131   * Obtains radio access technology (RAT) of the registered network. The system
132   * returns RAT of the packet service (PS) and circuit service (CS) domain.
133   *
134   * @permission ohos.permission.GET_NETWORK_INFO
135   * @param { number } slotId - Indicates the card slot index number,
136   * ranging from 0 to the maximum card slot index number supported by the device.
137   * @returns { Promise<NetworkRadioTech> } Returns the RAT of PS domain and CS domain of registered network.
138   * The values of RAT are as follows:
139   * <ul>
140   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_UNKNOWN}
141   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_GSM}
142   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_1XRTT}
143   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_WCDMA}
144   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_HSPA}
145   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_HSPAP}
146   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_TD_SCDMA}
147   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_EVDO}
148   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_EHRPD}
149   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_LTE}
150   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_LTE_CA}
151   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_IWLAN}
152   * <li>{@code RadioTechnology#RADIO_TECHNOLOGY_NR}
153   * </ul>
154   * @throws { BusinessError } 201 - Permission denied.
155   * @throws { BusinessError } 401 - Parameter error.
156   * @throws { BusinessError } 8300001 - Invalid parameter value.
157   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
158   * @throws { BusinessError } 8300003 - System internal error.
159   * @throws { BusinessError } 8300999 - Unknown error code.
160   * @syscap SystemCapability.Telephony.CoreService
161   * @since 11
162   */
163  function getRadioTech(slotId: number): Promise<NetworkRadioTech>;
164
165  /**
166   * Obtains the network state of the registered network.
167   *
168   * @permission ohos.permission.GET_NETWORK_INFO
169   * @param { number } slotId - Indicates the card slot index number,
170   * ranging from 0 to the maximum card slot index number supported by the device.
171   * @param { AsyncCallback<NetworkState> } callback - Indicates the callback for getting network registration state.
172   * @throws { BusinessError } 201 - Permission denied.
173   * @throws { BusinessError } 401 - Parameter error.
174   * @throws { BusinessError } 8300001 - Invalid parameter value.
175   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
176   * @throws { BusinessError } 8300003 - System internal error.
177   * @throws { BusinessError } 8300999 - Unknown error code.
178   * @syscap SystemCapability.Telephony.CoreService
179   * @since 6
180   */
181  function getNetworkState(slotId: number, callback: AsyncCallback<NetworkState>): void;
182
183  /**
184   * Obtains the network state of the registered network.
185   *
186   * @permission ohos.permission.GET_NETWORK_INFO
187   * @param { number } slotId - Indicates the card slot index number,
188   * ranging from 0 to the maximum card slot index number supported by the device.
189   * @returns { Promise<NetworkState> } Returns the NetworkState object.
190   * @throws { BusinessError } 201 - Permission denied.
191   * @throws { BusinessError } 401 - Parameter error.
192   * @throws { BusinessError } 8300001 - Invalid parameter value.
193   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
194   * @throws { BusinessError } 8300003 - System internal error.
195   * @throws { BusinessError } 8300999 - Unknown error code.
196   * @syscap SystemCapability.Telephony.CoreService
197   * @since 6
198   */
199  function getNetworkState(slotId?: number): Promise<NetworkState>;
200
201  /**
202   * Obtains the network state of the registered network.
203   *
204   * @permission ohos.permission.GET_NETWORK_INFO
205   * @param { AsyncCallback<NetworkState> } callback - Indicates the callback for getting network registration state.
206   * @throws { BusinessError } 201 - Permission denied.
207   * @throws { BusinessError } 401 - Parameter error.
208   * @throws { BusinessError } 8300001 - Invalid parameter value.
209   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
210   * @throws { BusinessError } 8300003 - System internal error.
211   * @throws { BusinessError } 8300999 - Unknown error code.
212   * @syscap SystemCapability.Telephony.CoreService
213   * @since 6
214   */
215  function getNetworkState(callback: AsyncCallback<NetworkState>): void;
216
217  /**
218   * Actively requests to update location information.
219   *
220   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
221   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
222   * index number supported by the device.
223   * @param { AsyncCallback<void> } callback - The callback of sendUpdateCellLocationRequest.
224   * @throws { BusinessError } 201 - Permission denied.
225   * @throws { BusinessError } 202 - Non-system applications use system APIs.
226   * @throws { BusinessError } 401 - Parameter error.
227   * @throws { BusinessError } 8300001 - Invalid parameter value.
228   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
229   * @throws { BusinessError } 8300003 - System internal error.
230   * @throws { BusinessError } 8300999 - Unknown error code.
231   * @syscap SystemCapability.Telephony.CoreService
232   * @systemapi Hide this for inner system use.
233   * @since 8
234   */
235  function sendUpdateCellLocationRequest(slotId: number, callback: AsyncCallback<void>): void;
236
237  /**
238   * Actively requests to update location information.
239   *
240   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
241   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
242   * index number supported by the device.
243   * @returns { Promise<void> } The promise returned by the sendUpdateCellLocationRequest.
244   * @throws { BusinessError } 201 - Permission denied.
245   * @throws { BusinessError } 202 - Non-system applications use system APIs.
246   * @throws { BusinessError } 401 - Parameter error.
247   * @throws { BusinessError } 8300001 - Invalid parameter value.
248   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
249   * @throws { BusinessError } 8300003 - System internal error.
250   * @throws { BusinessError } 8300999 - Unknown error code.
251   * @syscap SystemCapability.Telephony.CoreService
252   * @systemapi Hide this for inner system use.
253   * @since 8
254   */
255  function sendUpdateCellLocationRequest(slotId?: number): Promise<void>;
256
257  /**
258   * Actively requests to update location information.
259   *
260   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
261   * @param { AsyncCallback<void> } callback - The callback of sendUpdateCellLocationRequest.
262   * @throws { BusinessError } 201 - Permission denied.
263   * @throws { BusinessError } 202 - Non-system applications use system APIs.
264   * @throws { BusinessError } 401 - Parameter error.
265   * @throws { BusinessError } 8300001 - Invalid parameter value.
266   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
267   * @throws { BusinessError } 8300003 - System internal error.
268   * @throws { BusinessError } 8300999 - Unknown error code.
269   * @syscap SystemCapability.Telephony.CoreService
270   * @systemapi Hide this for inner system use.
271   * @since 8
272   */
273  function sendUpdateCellLocationRequest(callback: AsyncCallback<void>): void;
274
275  /**
276   * Get the current cell information.
277   *
278   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
279   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
280   * index number supported by the device.
281   * @param { AsyncCallback<Array<CellInformation>> } callback - Indicates the callback for getting cell information.
282   * @throws { BusinessError } 201 - Permission denied.
283   * @throws { BusinessError } 202 - Non-system applications use system APIs.
284   * @throws { BusinessError } 401 - Parameter error.
285   * @throws { BusinessError } 8300001 - Invalid parameter value.
286   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
287   * @throws { BusinessError } 8300003 - System internal error.
288   * @throws { BusinessError } 8300999 - Unknown error code.
289   * @syscap SystemCapability.Telephony.CoreService
290   * @systemapi Hide this for inner system use.
291   * @since 8
292   */
293  function getCellInformation(slotId: number, callback: AsyncCallback<Array<CellInformation>>): void;
294
295  /**
296   * Get the current cell information.
297   *
298   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
299   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
300   * index number supported by the device.
301   * @returns { Promise<Array<CellInformation>> } Returns the current cell information.
302   * @throws { BusinessError } 201 - Permission denied.
303   * @throws { BusinessError } 202 - Non-system applications use system APIs.
304   * @throws { BusinessError } 401 - Parameter error.
305   * @throws { BusinessError } 8300001 - Invalid parameter value.
306   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
307   * @throws { BusinessError } 8300003 - System internal error.
308   * @throws { BusinessError } 8300999 - Unknown error code.
309   * @syscap SystemCapability.Telephony.CoreService
310   * @systemapi Hide this for inner system use.
311   * @since 8
312   */
313  function getCellInformation(slotId?: number): Promise<Array<CellInformation>>;
314
315  /**
316   * Get the current cell information.
317   *
318   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
319   * @param { AsyncCallback<Array<CellInformation>> } callback - Indicates the callback for getting cell information.
320   * @throws { BusinessError } 201 - Permission denied.
321   * @throws { BusinessError } 202 - Non-system applications use system APIs.
322   * @throws { BusinessError } 401 - Parameter error.
323   * @throws { BusinessError } 8300001 - Invalid parameter value.
324   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
325   * @throws { BusinessError } 8300003 - System internal error.
326   * @throws { BusinessError } 8300999 - Unknown error code.
327   * @syscap SystemCapability.Telephony.CoreService
328   * @systemapi Hide this for inner system use.
329   * @since 8
330   */
331  function getCellInformation(callback: AsyncCallback<Array<CellInformation>>): void;
332
333  /**
334   * Obtains the network search mode of the SIM card in a specified slot.
335   *
336   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
337   * index number supported by the device.
338   * @param { AsyncCallback<NetworkSelectionMode> } callback - Indicates the callback for getting
339   * the network search mode of the SIM card. Available values are as follows:
340   * <ul>
341   * <li>{@link NetworkSelectionMode#NETWORK_SELECTION_UNKNOWN}
342   * <li>{@link NetworkSelectionMode#NETWORK_SELECTION_AUTOMATIC}
343   * <li>{@link NetworkSelectionMode#NETWORK_SELECTION_MANUAL}
344   * <ul>
345   * @throws { BusinessError } 401 - Parameter error.
346   * @throws { BusinessError } 8300001 - Invalid parameter value.
347   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
348   * @throws { BusinessError } 8300003 - System internal error.
349   * @throws { BusinessError } 8300999 - Unknown error code.
350   * @syscap SystemCapability.Telephony.CoreService
351   * @since 6
352   */
353  function getNetworkSelectionMode(slotId: number, callback: AsyncCallback<NetworkSelectionMode>): void;
354
355  /**
356   * Obtains the network search mode of the SIM card in a specified slot.
357   *
358   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
359   * index number supported by the device.
360   * @returns { Promise<NetworkSelectionMode> } Returns the network search mode of the SIM card.
361   * Available values are as follows:
362   * <ul>
363   * <li>{@link NetworkSelectionMode#NETWORK_SELECTION_UNKNOWN}
364   * <li>{@link NetworkSelectionMode#NETWORK_SELECTION_AUTOMATIC}
365   * <li>{@link NetworkSelectionMode#NETWORK_SELECTION_MANUAL}
366   * <ul>
367   * @throws { BusinessError } 401 - Parameter error.
368   * @throws { BusinessError } 8300001 - Invalid parameter value.
369   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
370   * @throws { BusinessError } 8300003 - System internal error.
371   * @throws { BusinessError } 8300999 - Unknown error code.
372   * @syscap SystemCapability.Telephony.CoreService
373   * @since 6
374   */
375  function getNetworkSelectionMode(slotId: number): Promise<NetworkSelectionMode>;
376
377  /**
378   * Set the current network selection mode.
379   *
380   * @permission ohos.permission.SET_TELEPHONY_STATE
381   * @param { NetworkSelectionModeOptions } options Indicates the network selection mode option.
382   * @param { AsyncCallback<void> } callback - The callback of setNetworkSelectionMode.
383   * @throws { BusinessError } 201 - Permission denied.
384   * @throws { BusinessError } 202 - Non-system applications use system APIs.
385   * @throws { BusinessError } 401 - Parameter error.
386   * @throws { BusinessError } 8300001 - Invalid parameter value.
387   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
388   * @throws { BusinessError } 8300003 - System internal error.
389   * @throws { BusinessError } 8300999 - Unknown error code.
390   * @syscap SystemCapability.Telephony.CoreService
391   * @systemapi Hide this for inner system use.
392   * @since 6
393   */
394  function setNetworkSelectionMode(options: NetworkSelectionModeOptions, callback: AsyncCallback<void>): void;
395
396  /**
397   * Set the current network selection mode.
398   *
399   * @permission ohos.permission.SET_TELEPHONY_STATE
400   * @param { NetworkSelectionModeOptions } options Indicates the network selection mode option.
401   * @returns { Promise<void> } The promise returned by the setNetworkSelectionMode.
402   * @throws { BusinessError } 201 - Permission denied.
403   * @throws { BusinessError } 202 - Non-system applications use system APIs.
404   * @throws { BusinessError } 401 - Parameter error.
405   * @throws { BusinessError } 8300001 - Invalid parameter value.
406   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
407   * @throws { BusinessError } 8300003 - System internal error.
408   * @throws { BusinessError } 8300999 - Unknown error code.
409   * @syscap SystemCapability.Telephony.CoreService
410   * @systemapi Hide this for inner system use.
411   * @since 6
412   */
413  function setNetworkSelectionMode(options: NetworkSelectionModeOptions): Promise<void>;
414
415  /**
416   * Get network search information.
417   *
418   * @permission ohos.permission.GET_TELEPHONY_STATE
419   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
420   * index number supported by the device.
421   * @param { AsyncCallback<NetworkSearchResult> } callback - Indicates the callback for getting
422   * the search results of the network.
423   * @throws { BusinessError } 201 - Permission denied.
424   * @throws { BusinessError } 202 - Non-system applications use system APIs.
425   * @throws { BusinessError } 401 - Parameter error.
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 } 8300999 - Unknown error code.
430   * @syscap SystemCapability.Telephony.CoreService
431   * @systemapi Hide this for inner system use.
432   * @since 6
433   */
434  function getNetworkSearchInformation(slotId: number, callback: AsyncCallback<NetworkSearchResult>): void;
435
436  /**
437   * Get network search information.
438   *
439   * @permission ohos.permission.GET_TELEPHONY_STATE
440   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
441   * index number supported by the device.
442   * @returns { Promise<NetworkSearchResult> } Returns the search results of the network.
443   * @throws { BusinessError } 201 - Permission denied.
444   * @throws { BusinessError } 202 - Non-system applications use system APIs.
445   * @throws { BusinessError } 401 - Parameter error.
446   * @throws { BusinessError } 8300001 - Invalid parameter value.
447   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
448   * @throws { BusinessError } 8300003 - System internal error.
449   * @throws { BusinessError } 8300999 - Unknown error code.
450   * @syscap SystemCapability.Telephony.CoreService
451   * @systemapi Hide this for inner system use.
452   * @since 6
453   */
454  function getNetworkSearchInformation(slotId: number): Promise<NetworkSearchResult>;
455
456  /**
457   * Obtains the ISO-defined country code of the country where the registered network is deployed.
458   *
459   * @param { number } slotId - Indicates the card slot index number,
460   * ranging from 0 to the maximum card slot index number supported by the device.
461   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the country code
462   * defined in ISO 3166-2; returns an empty string if the device is not registered with any network.
463   * @throws { BusinessError } 401 - Parameter error.
464   * @throws { BusinessError } 8300001 - Invalid parameter value.
465   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
466   * @throws { BusinessError } 8300003 - System internal error.
467   * @throws { BusinessError } 8300999 - Unknown error code.
468   * @syscap SystemCapability.Telephony.CoreService
469   * @since 7
470   */
471  function getISOCountryCodeForNetwork(slotId: number, callback: AsyncCallback<string>): void;
472
473  /**
474   * Obtains the ISO-defined country code of the country where the registered network is deployed.
475   *
476   * @param { number } slotId - Indicates the card slot index number,
477   * ranging from 0 to the maximum card slot index number supported by the device.
478   * @returns { Promise<string> } Returns the country code defined in ISO 3166-2.
479   * Returns an empty string if the device is not registered with any network.
480   * @throws { BusinessError } 401 - Parameter error.
481   * @throws { BusinessError } 8300001 - Invalid parameter value.
482   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
483   * @throws { BusinessError } 8300003 - System internal error.
484   * @throws { BusinessError } 8300999 - Unknown error code.
485   * @syscap SystemCapability.Telephony.CoreService
486   * @since 7
487   */
488  function getISOCountryCodeForNetwork(slotId: number): Promise<string>;
489
490  /**
491   * Obtains the ISO-defined country code of the country where the registered network is deployed.
492   *
493   * @param { number } slotId - Indicates the card slot index number,
494   * ranging from 0 to the maximum card slots supported by the device.
495   * @returns { string } Returns the country code defined in ISO 3166-2.
496   * Returns an empty string if the device is not registered with any network.
497   * @syscap SystemCapability.Telephony.CoreService
498   * @since 10
499   */
500  function getISOCountryCodeForNetworkSync(slotId: number): string;
501
502  /**
503   * Get the option mode of NR.
504   *
505   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
506   * index number supported by the device.
507   * @param { AsyncCallback<NrOptionMode> } callback - Indicates the callback for getting the selection mode of NR.
508   * @throws { BusinessError } 202 - Non-system applications use system APIs.
509   * @throws { BusinessError } 401 - Parameter error.
510   * @throws { BusinessError } 8300001 - Invalid parameter value.
511   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
512   * @throws { BusinessError } 8300003 - System internal error.
513   * @throws { BusinessError } 8300999 - Unknown error code.
514   * @syscap SystemCapability.Telephony.CoreService
515   * @systemapi Hide this for inner system use.
516   * @since 8
517   * @deprecated since 10
518   * @useinstead telephony.radio#getNROptionMode
519   */
520  function getNrOptionMode(slotId: number, callback: AsyncCallback<NrOptionMode>): void;
521
522  /**
523   * Get the option mode of NR.
524   *
525   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
526   * index number supported by the device.
527   * @returns { Promise<NrOptionMode> } Returns the selection mode of NR.
528   * @throws { BusinessError } 202 - Non-system applications use system APIs.
529   * @throws { BusinessError } 401 - Parameter error.
530   * @throws { BusinessError } 8300001 - Invalid parameter value.
531   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
532   * @throws { BusinessError } 8300003 - System internal error.
533   * @throws { BusinessError } 8300999 - Unknown error code.
534   * @syscap SystemCapability.Telephony.CoreService
535   * @systemapi Hide this for inner system use.
536   * @since 8
537   * @deprecated since 10
538   * @useinstead telephony.radio#getNROptionMode
539   */
540  function getNrOptionMode(slotId?: number): Promise<NrOptionMode>;
541
542  /**
543   * Get the option mode of NR.
544   *
545   * @param { AsyncCallback<NrOptionMode> } callback - Indicates the callback for getting the selection mode of NR.
546   * @throws { BusinessError } 202 - Non-system applications use system APIs.
547   * @throws { BusinessError } 401 - Parameter error.
548   * @throws { BusinessError } 8300001 - Invalid parameter value.
549   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
550   * @throws { BusinessError } 8300003 - System internal error.
551   * @throws { BusinessError } 8300999 - Unknown error code.
552   * @syscap SystemCapability.Telephony.CoreService
553   * @systemapi Hide this for inner system use.
554   * @since 8
555   * @deprecated since 10
556   * @useinstead telephony.radio#getNROptionMode
557   */
558  function getNrOptionMode(callback: AsyncCallback<NrOptionMode>): void;
559
560  /**
561   * Obtains the IMEI of a specified card slot of the device.
562   *
563   * @permission ohos.permission.GET_TELEPHONY_STATE
564   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
565   * index number supported by the device.
566   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the IMEI.
567   * Returns an empty string if the IMEI does not exist.
568   * @throws { BusinessError } 201 - Permission denied.
569   * @throws { BusinessError } 202 - Non-system applications use system APIs.
570   * @throws { BusinessError } 401 - Parameter error.
571   * @throws { BusinessError } 8300001 - Invalid parameter value.
572   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
573   * @throws { BusinessError } 8300003 - System internal error.
574   * @throws { BusinessError } 8300999 - Unknown error code.
575   * @syscap SystemCapability.Telephony.CoreService
576   * @systemapi Hide this for inner system use.
577   * @since 8
578   */
579  function getIMEI(slotId: number, callback: AsyncCallback<string>): void;
580
581  /**
582   * Obtains the IMEI of a specified card slot of the device.
583   *
584   * @permission ohos.permission.GET_TELEPHONY_STATE
585   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
586   * index number supported by the device.
587   * @returns { Promise<string> } Returns the IMEI. Returns an empty string if the IMEI does not exist.
588   * @throws { BusinessError } 201 - Permission denied.
589   * @throws { BusinessError } 202 - Non-system applications use system APIs.
590   * @throws { BusinessError } 401 - Parameter error.
591   * @throws { BusinessError } 8300001 - Invalid parameter value.
592   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
593   * @throws { BusinessError } 8300003 - System internal error.
594   * @throws { BusinessError } 8300999 - Unknown error code.
595   * @syscap SystemCapability.Telephony.CoreService
596   * @systemapi Hide this for inner system use.
597   * @since 8
598   */
599  function getIMEI(slotId?: number): Promise<string>;
600
601  /**
602   * Obtains the IMEI of a specified card slot of the device.
603   *
604   * @permission ohos.permission.GET_TELEPHONY_STATE
605   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the IMEI.
606   * Returns an empty string if the IMEI does not exist.
607   * @throws { BusinessError } 201 - Permission denied.
608   * @throws { BusinessError } 202 - Non-system applications use system APIs.
609   * @throws { BusinessError } 401 - Parameter error.
610   * @throws { BusinessError } 8300001 - Invalid parameter value.
611   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
612   * @throws { BusinessError } 8300003 - System internal error.
613   * @throws { BusinessError } 8300999 - Unknown error code.
614   * @syscap SystemCapability.Telephony.CoreService
615   * @systemapi Hide this for inner system use.
616   * @since 8
617   */
618  function getIMEI(callback: AsyncCallback<string>): void;
619
620  /**
621   * Obtains the MEID of a specified card slot of the device.
622   *
623   * @permission ohos.permission.GET_TELEPHONY_STATE
624   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
625   * index number supported by the device.
626   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the MEID.
627   * Returns an empty string if the MEID does not exist.
628   * @throws { BusinessError } 201 - Permission denied.
629   * @throws { BusinessError } 202 - Non-system applications use system APIs.
630   * @throws { BusinessError } 401 - Parameter error.
631   * @throws { BusinessError } 8300001 - Invalid parameter value.
632   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
633   * @throws { BusinessError } 8300003 - System internal error.
634   * @throws { BusinessError } 8300999 - Unknown error code.
635   * @syscap SystemCapability.Telephony.CoreService
636   * @systemapi Hide this for inner system use.
637   * @since 8
638   */
639  function getMEID(slotId: number, callback: AsyncCallback<string>): void;
640
641  /**
642   * Obtains the MEID of a specified card slot of the device.
643   *
644   * @permission ohos.permission.GET_TELEPHONY_STATE
645   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
646   * index number supported by the device.
647   * @returns { Promise<string> } Returns the MEID. Returns an empty string if the MEID does not exist.
648   * @throws { BusinessError } 201 - Permission denied.
649   * @throws { BusinessError } 202 - Non-system applications use system APIs.
650   * @throws { BusinessError } 401 - Parameter error.
651   * @throws { BusinessError } 8300001 - Invalid parameter value.
652   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
653   * @throws { BusinessError } 8300003 - System internal error.
654   * @throws { BusinessError } 8300999 - Unknown error code.
655   * @syscap SystemCapability.Telephony.CoreService
656   * @systemapi Hide this for inner system use.
657   * @since 8
658   */
659  function getMEID(slotId?: number): Promise<string>;
660
661  /**
662   * Obtains the MEID of a specified card slot of the device.
663   *
664   * @permission ohos.permission.GET_TELEPHONY_STATE
665   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the MEID.
666   * Returns an empty string if the MEID does not exist.
667   * @throws { BusinessError } 201 - Permission denied.
668   * @throws { BusinessError } 202 - Non-system applications use system APIs.
669   * @throws { BusinessError } 401 - Parameter error.
670   * @throws { BusinessError } 8300001 - Invalid parameter value.
671   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
672   * @throws { BusinessError } 8300003 - System internal error.
673   * @throws { BusinessError } 8300999 - Unknown error code.
674   * @syscap SystemCapability.Telephony.CoreService
675   * @systemapi Hide this for inner system use.
676   * @since 8
677   */
678  function getMEID(callback: AsyncCallback<string>): void;
679
680  /**
681   * Obtains the unique device ID of a specified card slot of the device.
682   *
683   * If the device is registered with a 3GPP-compliant network, the international mobile equipment identity
684   * (IMEI) is returned. If the device is registered with a 3GPP2-compliant network, the mobile equipment identifier
685   * (MEID) is returned.
686   *
687   * @permission ohos.permission.GET_TELEPHONY_STATE
688   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
689   * index number supported by the device.
690   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the unique device ID.
691   * Returns an empty string if the unique device ID does not exist.
692   * @throws { BusinessError } 201 - Permission denied.
693   * @throws { BusinessError } 202 - Non-system applications use system APIs.
694   * @throws { BusinessError } 401 - Parameter error.
695   * @throws { BusinessError } 8300001 - Invalid parameter value.
696   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
697   * @throws { BusinessError } 8300003 - System internal error.
698   * @throws { BusinessError } 8300999 - Unknown error code.
699   * @syscap SystemCapability.Telephony.CoreService
700   * @systemapi Hide this for inner system use.
701   * @since 8
702   */
703  function getUniqueDeviceId(slotId: number, callback: AsyncCallback<string>): void;
704
705  /**
706   * Obtains the unique device ID of a specified card slot of the device.
707   *
708   * If the device is registered with a 3GPP-compliant network, the international mobile equipment identity
709   * (IMEI) is returned. If the device is registered with a 3GPP2-compliant network, the mobile equipment identifier
710   * (MEID) is returned.
711   *
712   * @permission ohos.permission.GET_TELEPHONY_STATE
713   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
714   * index number supported by the device.
715   * @returns { Promise<string> } Returns the unique device ID.
716   * Returns an empty string if the unique device ID does not exist.
717   * @throws { BusinessError } 201 - Permission denied.
718   * @throws { BusinessError } 202 - Non-system applications use system APIs.
719   * @throws { BusinessError } 401 - Parameter error.
720   * @throws { BusinessError } 8300001 - Invalid parameter value.
721   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
722   * @throws { BusinessError } 8300003 - System internal error.
723   * @throws { BusinessError } 8300999 - Unknown error code.
724   * @syscap SystemCapability.Telephony.CoreService
725   * @systemapi Hide this for inner system use.
726   * @since 8
727   */
728  function getUniqueDeviceId(slotId?: number): Promise<string>;
729
730  /**
731   * Obtains the unique device ID of a specified card slot of the device.
732   *
733   * If the device is registered with a 3GPP-compliant network, the international mobile equipment identity
734   * (IMEI) is returned. If the device is registered with a 3GPP2-compliant network, the mobile equipment identifier
735   * (MEID) is returned.
736   *
737   * @permission ohos.permission.GET_TELEPHONY_STATE
738   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the unique device ID.
739   * Returns an empty string if the unique device ID does not exist.
740   * @throws { BusinessError } 201 - Permission denied.
741   * @throws { BusinessError } 202 - Non-system applications use system APIs.
742   * @throws { BusinessError } 401 - Parameter error.
743   * @throws { BusinessError } 8300001 - Invalid parameter value.
744   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
745   * @throws { BusinessError } 8300003 - System internal error.
746   * @throws { BusinessError } 8300999 - Unknown error code.
747   * @syscap SystemCapability.Telephony.CoreService
748   * @systemapi Hide this for inner system use.
749   * @since 8
750   */
751  function getUniqueDeviceId(callback: AsyncCallback<string>): void;
752
753  /**
754   * Obtains the index number of the card slot where the primary card is located if multiple SIM cards are inserted.
755   *
756   * The primary card is the SIM card inserted in the card slot that uses data services by default.
757   *
758   * @param { AsyncCallback<number> } callback - Indicates the callback for getting the index number of
759   * the primary card slot.
760   * @throws { BusinessError } 401 - Parameter error.
761   * @throws { BusinessError } 8300001 - Invalid parameter value.
762   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
763   * @throws { BusinessError } 8300003 - System internal error.
764   * @throws { BusinessError } 8300999 - Unknown error code.
765   * @syscap SystemCapability.Telephony.CoreService
766   * @since 7
767   */
768  function getPrimarySlotId(callback: AsyncCallback<number>): void;
769
770  /**
771   * Obtains the index number of the card slot where the primary card is located if multiple SIM cards are inserted.
772   *
773   * The primary card is the SIM card inserted in the card slot that uses data services by default.
774   *
775   * @returns { Promise<number> } Returns the index number of the primary card slot.
776   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
777   * @throws { BusinessError } 8300003 - System internal error.
778   * @throws { BusinessError } 8300999 - Unknown error code.
779   * @syscap SystemCapability.Telephony.CoreService
780   * @since 7
781   */
782  function getPrimarySlotId(): Promise<number>;
783
784  /**
785   * Set the index number of the main SIM card slot.
786   *
787   * @permission ohos.permission.SET_TELEPHONY_STATE
788   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
789   * index number supported by the device.
790   * @param { AsyncCallback<void> } callback - The callback of setPrimarySlotId.
791   * @throws { BusinessError } 201 - Permission denied.
792   * @throws { BusinessError } 202 - Non-system applications use system APIs.
793   * @throws { BusinessError } 401 - Parameter error.
794   * @throws { BusinessError } 8300001 - Invalid parameter value.
795   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
796   * @throws { BusinessError } 8300003 - System internal error.
797   * @throws { BusinessError } 8300004 - Do not have sim card.
798   * @throws { BusinessError } 8300999 - Unknown error code.
799   * @syscap SystemCapability.Telephony.CoreService
800   * @systemapi Hide this for inner system use.
801   * @since 8
802   */
803  function setPrimarySlotId(slotId: number, callback: AsyncCallback<void>): void;
804
805  /**
806   * Set the index number of the main SIM card slot.
807   *
808   * @permission ohos.permission.SET_TELEPHONY_STATE
809   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
810   * index number supported by the device.
811   * @returns { Promise<void> } The promise returned by the setPrimarySlotId.
812   * @throws { BusinessError } 201 - Permission denied.
813   * @throws { BusinessError } 202 - Non-system applications use system APIs.
814   * @throws { BusinessError } 401 - Parameter error.
815   * @throws { BusinessError } 8300001 - Invalid parameter value.
816   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
817   * @throws { BusinessError } 8300003 - System internal error.
818   * @throws { BusinessError } 8300004 - Do not have sim card.
819   * @throws { BusinessError } 8300999 - Unknown error code.
820   * @syscap SystemCapability.Telephony.CoreService
821   * @systemapi Hide this for inner system use.
822   * @since 8
823   */
824  function setPrimarySlotId(slotId: number): Promise<void>;
825
826  /**
827   * Obtains the list of signal strength information of the registered network corresponding to a specified SIM card.
828   *
829   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
830   * index number supported by the device.
831   * @param { AsyncCallback<Array<SignalInformation>> } callback - Indicates the callback for getting
832   * the instance list of the child classes derived from {@link SignalInformation}.
833   * @throws { BusinessError } 401 - Parameter error.
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 } 8300999 - Unknown error code.
838   * @syscap SystemCapability.Telephony.CoreService
839   * @since 7
840   */
841  function getSignalInformation(slotId: number, callback: AsyncCallback<Array<SignalInformation>>): void;
842
843  /**
844   * Obtains the list of signal strength information of the registered network corresponding to a specified SIM card.
845   *
846   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
847   * index number supported by the device.
848   * @returns { Promise<Array<SignalInformation>> } Returns the callback for getting the instance list of
849   * the child classes derived from {@link SignalInformation}.
850   * @throws { BusinessError } 401 - Parameter error.
851   * @throws { BusinessError } 8300001 - Invalid parameter value.
852   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
853   * @throws { BusinessError } 8300003 - System internal error.
854   * @throws { BusinessError } 8300999 - Unknown error code.
855   * @syscap SystemCapability.Telephony.CoreService
856   * @since 7
857   */
858  function getSignalInformation(slotId: number): Promise<Array<SignalInformation>>;
859
860  /**
861   * Obtains the list of signal strength information of the registered network corresponding to a specified SIM card.
862   *
863   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum
864   * card slots supported by the device.
865   * @returns { Array<SignalInformation> } Returns the callback for getting the instance list of
866   * the child classes derived from {@link SignalInformation}.
867   * @syscap SystemCapability.Telephony.CoreService
868   * @since 10
869   */
870  function getSignalInformationSync(slotId: number): Array<SignalInformation>;
871
872  /**
873   * Checks whether the device supports 5G New Radio (NR).
874   *
875   * @returns { boolean } Returns {@code true} if the device supports 5G NR; returns {@code false} otherwise.
876   * @syscap SystemCapability.Telephony.CoreService
877   * @since 7
878   * @deprecated since 9
879   * @useinstead telephony.radio#isNRSupported
880   */
881  function isNrSupported(): boolean;
882
883  /**
884   * Checks whether the device supports 5G New Radio (NR) by according card slot.
885   *
886   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
887   * index number supported by the device.
888   * @returns { boolean } Returns {@code true} if the device supports 5G NR; returns {@code false} otherwise.
889   * @syscap SystemCapability.Telephony.CoreService
890   * @since 8
891   * @deprecated since 9
892   * @useinstead telephony.radio#isNRSupported
893   */
894  function isNrSupported(slotId: number): boolean;
895
896  /**
897   * Checks whether the device supports 5G New Radio (NR).
898   *
899   * @returns { boolean } Returns {@code true} if the device supports 5G NR; returns {@code false} otherwise.
900   * @syscap SystemCapability.Telephony.CoreService
901   * @since 9
902   */
903  function isNRSupported(): boolean;
904
905  /**
906   * Checks whether the device supports 5G New Radio (NR) by according card slot.
907   *
908   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
909   * index number supported by the device.
910   * @returns { boolean } Returns {@code true} if the device supports 5G NR; returns {@code false} otherwise.
911   * @syscap SystemCapability.Telephony.CoreService
912   * @since 9
913   */
914  function isNRSupported(slotId: number): boolean;
915
916  /**
917   * Checks whether the radio service is enabled.
918   *
919   * @permission ohos.permission.GET_NETWORK_INFO
920   * @param { number } slotId - Indicates the card slot index number,
921   * ranging from 0 to the maximum card slot index number supported by the device.
922   * @param { AsyncCallback<boolean> } callback - Returns {@code true} If the radio service is enabled.
923   * Returns {@code false} otherwise.
924   * @throws { BusinessError } 201 - Permission denied.
925   * @throws { BusinessError } 401 - Parameter error.
926   * @throws { BusinessError } 8300001 - Invalid parameter value.
927   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
928   * @throws { BusinessError } 8300003 - System internal error.
929   * @throws { BusinessError } 8300999 - Unknown error code.
930   * @syscap SystemCapability.Telephony.CoreService
931   * @since 7
932   */
933  function isRadioOn(slotId: number, callback: AsyncCallback<boolean>): void;
934
935  /**
936   * Checks whether the radio service is enabled.
937   *
938   * @permission ohos.permission.GET_NETWORK_INFO
939   * @param { number } slotId - Indicates the card slot index number,
940   * ranging from 0 to the maximum card slot index number supported by the device.
941   * @returns { Promise<boolean> } Returns {@code true} If the radio service is enabled; returns {@code false} otherwise.
942   * @throws { BusinessError } 201 - Permission denied.
943   * @throws { BusinessError } 401 - Parameter error.
944   * @throws { BusinessError } 8300001 - Invalid parameter value.
945   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
946   * @throws { BusinessError } 8300003 - System internal error.
947   * @throws { BusinessError } 8300999 - Unknown error code.
948   * @syscap SystemCapability.Telephony.CoreService
949   * @since 7
950   */
951  function isRadioOn(slotId?: number): Promise<boolean>;
952
953  /**
954   * Checks whether the radio service is enabled.
955   *
956   * @permission ohos.permission.GET_NETWORK_INFO
957   * @param { AsyncCallback<boolean> } callback - Returns {@code true} If the radio service is enabled.
958   * Returns {@code false} otherwise.
959   * @throws { BusinessError } 201 - Permission denied.
960   * @throws { BusinessError } 401 - Parameter error.
961   * @throws { BusinessError } 8300001 - Invalid parameter value.
962   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
963   * @throws { BusinessError } 8300003 - System internal error.
964   * @throws { BusinessError } 8300999 - Unknown error code.
965   * @syscap SystemCapability.Telephony.CoreService
966   * @since 7
967   */
968  function isRadioOn(callback: AsyncCallback<boolean>): void;
969
970  /**
971   * Turn on the radio service.
972   *
973   * @permission ohos.permission.SET_TELEPHONY_STATE
974   * @param { number } slotId - Indicates the card slot index number,
975   * ranging from 0 to the maximum card slot index number supported by the device.
976   * @param { AsyncCallback<void> } callback - The callback of turnOnRadio.
977   * @throws { BusinessError } 201 - Permission denied.
978   * @throws { BusinessError } 202 - Non-system applications use system APIs.
979   * @throws { BusinessError } 401 - Parameter error.
980   * @throws { BusinessError } 8300001 - Invalid parameter value.
981   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
982   * @throws { BusinessError } 8300003 - System internal error.
983   * @throws { BusinessError } 8300999 - Unknown error code.
984   * @syscap SystemCapability.Telephony.CoreService
985   * @systemapi Hide this for inner system use.
986   * @since 7
987   */
988  function turnOnRadio(slotId: number, callback: AsyncCallback<void>): void;
989
990  /**
991   * Turn on the radio service.
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   * @returns { Promise<void> } The promise returned by the turnOnRadio.
997   * @throws { BusinessError } 201 - Permission denied.
998   * @throws { BusinessError } 202 - Non-system applications use system APIs.
999   * @throws { BusinessError } 401 - Parameter error.
1000   * @throws { BusinessError } 8300001 - Invalid parameter value.
1001   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1002   * @throws { BusinessError } 8300003 - System internal error.
1003   * @throws { BusinessError } 8300999 - Unknown error code.
1004   * @syscap SystemCapability.Telephony.CoreService
1005   * @systemapi Hide this for inner system use.
1006   * @since 7
1007   */
1008  function turnOnRadio(slotId?: number): Promise<void>;
1009
1010  /**
1011   * Turn on the radio service.
1012   *
1013   * @permission ohos.permission.SET_TELEPHONY_STATE
1014   * @param { AsyncCallback<void> } callback - The callback of turnOnRadio.
1015   * @throws { BusinessError } 201 - Permission denied.
1016   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1017   * @throws { BusinessError } 401 - Parameter error.
1018   * @throws { BusinessError } 8300001 - Invalid parameter value.
1019   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1020   * @throws { BusinessError } 8300003 - System internal error.
1021   * @throws { BusinessError } 8300999 - Unknown error code.
1022   * @syscap SystemCapability.Telephony.CoreService
1023   * @systemapi Hide this for inner system use.
1024   * @since 7
1025   */
1026  function turnOnRadio(callback: AsyncCallback<void>): void;
1027
1028  /**
1029   * Turn off the radio service.
1030   *
1031   * @permission ohos.permission.SET_TELEPHONY_STATE
1032   * @param { number } slotId - Indicates the card slot index number,
1033   * ranging from 0 to the maximum card slot index number supported by the device.
1034   * @param { AsyncCallback<void> } callback - The callback of turnOffRadio.
1035   * @throws { BusinessError } 201 - Permission denied.
1036   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1037   * @throws { BusinessError } 401 - Parameter error.
1038   * @throws { BusinessError } 8300001 - Invalid parameter value.
1039   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1040   * @throws { BusinessError } 8300003 - System internal error.
1041   * @throws { BusinessError } 8300999 - Unknown error code.
1042   * @syscap SystemCapability.Telephony.CoreService
1043   * @systemapi Hide this for inner system use.
1044   * @since 7
1045   */
1046  function turnOffRadio(slotId: number, callback: AsyncCallback<void>): void;
1047
1048  /**
1049   * Turn off the radio service.
1050   *
1051   * @permission ohos.permission.SET_TELEPHONY_STATE
1052   * @param { number } slotId - Indicates the card slot index number,
1053   * ranging from 0 to the maximum card slot index number supported by the device.
1054   * @returns { Promise<void> } The promise returned by the turnOffRadio.
1055   * @throws { BusinessError } 201 - Permission denied.
1056   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1057   * @throws { BusinessError } 401 - Parameter error.
1058   * @throws { BusinessError } 8300001 - Invalid parameter value.
1059   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1060   * @throws { BusinessError } 8300003 - System internal error.
1061   * @throws { BusinessError } 8300999 - Unknown error code.
1062   * @syscap SystemCapability.Telephony.CoreService
1063   * @systemapi Hide this for inner system use.
1064   * @since 7
1065   */
1066  function turnOffRadio(slotId?: number): Promise<void>;
1067
1068  /**
1069   * Turn off the radio service.
1070   *
1071   * @permission ohos.permission.SET_TELEPHONY_STATE
1072   * @param { AsyncCallback<void> } callback - The callback of turnOffRadio.
1073   * @throws { BusinessError } 201 - Permission denied.
1074   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1075   * @throws { BusinessError } 401 - Parameter error.
1076   * @throws { BusinessError } 8300001 - Invalid parameter value.
1077   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1078   * @throws { BusinessError } 8300003 - System internal error.
1079   * @throws { BusinessError } 8300999 - Unknown error code.
1080   * @syscap SystemCapability.Telephony.CoreService
1081   * @systemapi Hide this for inner system use.
1082   * @since 7
1083   */
1084  function turnOffRadio(callback: AsyncCallback<void>): void;
1085
1086  /**
1087   * Get the operator name of the specified SIM card slot.
1088   *
1089   * @param { number } slotId - Indicates the card slot index number,
1090   * ranging from 0 to the maximum card slot index number supported by the device.
1091   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the operator name.
1092   * @throws { BusinessError } 401 - Parameter error.
1093   * @throws { BusinessError } 8300001 - Invalid parameter value.
1094   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1095   * @throws { BusinessError } 8300003 - System internal error.
1096   * @throws { BusinessError } 8300999 - Unknown error code.
1097   * @syscap SystemCapability.Telephony.CoreService
1098   * @since 7
1099   */
1100  function getOperatorName(slotId: number, callback: AsyncCallback<string>): void;
1101
1102  /**
1103   * Get the operator name of the specified SIM card slot.
1104   *
1105   * @param { number } slotId - Indicates the card slot index number,
1106   * ranging from 0 to the maximum card slot index number supported by the device.
1107   * @returns { Promise<string> } Returns the operator name.
1108   * @throws { BusinessError } 401 - Parameter error.
1109   * @throws { BusinessError } 8300001 - Invalid parameter value.
1110   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1111   * @throws { BusinessError } 8300003 - System internal error.
1112   * @throws { BusinessError } 8300999 - Unknown error code.
1113   * @syscap SystemCapability.Telephony.CoreService
1114   * @since 7
1115   */
1116  function getOperatorName(slotId: number): Promise<string>;
1117
1118  /**
1119   * Get the operator name of the specified SIM card slot.
1120   *
1121   * @param { number } slotId - Indicates the card slot index number,
1122   * ranging from 0 to the maximum card slot index number supported by the device.
1123   * @returns { string } Returns the operator name.
1124   * @syscap SystemCapability.Telephony.CoreService
1125   * @since 10
1126   */
1127  function getOperatorNameSync(slotId: number): string;
1128
1129  /**
1130   * Set the preferred network for the specified SIM card slot.
1131   *
1132   * @permission ohos.permission.SET_TELEPHONY_STATE
1133   * @param { number } slotId - Indicates the card slot index number,
1134   * ranging from 0 to the maximum card slot index number supported by the device.
1135   * @param { PreferredNetworkMode } networkMode - Indicates that you want to set the preferred network mode.
1136   * @param { AsyncCallback<void> } callback - The callback of setPreferredNetwork.
1137   * @throws { BusinessError } 201 - Permission denied.
1138   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1139   * @throws { BusinessError } 401 - Parameter error.
1140   * @throws { BusinessError } 8300001 - Invalid parameter value.
1141   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1142   * @throws { BusinessError } 8300003 - System internal error.
1143   * @throws { BusinessError } 8300999 - Unknown error code.
1144   * @syscap SystemCapability.Telephony.CoreService
1145   * @systemapi Hide this for inner system use.
1146   * @since 8
1147   */
1148  function setPreferredNetwork(slotId: number, networkMode: PreferredNetworkMode, callback: AsyncCallback<void>): void;
1149
1150  /**
1151   * Set the preferred network for the specified SIM card slot.
1152   *
1153   * @permission ohos.permission.SET_TELEPHONY_STATE
1154   * @param { number } slotId - Indicates the card slot index number,
1155   * ranging from 0 to the maximum card slot index number supported by the device.
1156   * @param { PreferredNetworkMode } networkMode - Indicates that you want to set the preferred network mode.
1157   * @returns { Promise<void> } The promise returned by the setPreferredNetwork.
1158   * @throws { BusinessError } 201 - Permission denied.
1159   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1160   * @throws { BusinessError } 401 - Parameter error.
1161   * @throws { BusinessError } 8300001 - Invalid parameter value.
1162   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1163   * @throws { BusinessError } 8300003 - System internal error.
1164   * @throws { BusinessError } 8300999 - Unknown error code.
1165   * @syscap SystemCapability.Telephony.CoreService
1166   * @systemapi Hide this for inner system use.
1167   * @since 8
1168   */
1169  function setPreferredNetwork(slotId: number, networkMode: PreferredNetworkMode): Promise<void>;
1170
1171  /**
1172   * Get the preferred network for the specified SIM card slot.
1173   *
1174   * @permission ohos.permission.GET_TELEPHONY_STATE
1175   * @param { number } slotId - Indicates the card slot index number,
1176   * ranging from 0 to the maximum card slot index number supported by the device.
1177   * @param { AsyncCallback<PreferredNetworkMode> } callback - Indicates the callback for getting
1178   * the preferred network mode to obtain.
1179   * @throws { BusinessError } 201 - Permission denied.
1180   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1181   * @throws { BusinessError } 401 - Parameter error.
1182   * @throws { BusinessError } 8300001 - Invalid parameter value.
1183   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1184   * @throws { BusinessError } 8300003 - System internal error.
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 getPreferredNetwork(slotId: number, callback: AsyncCallback<PreferredNetworkMode>): void;
1191
1192  /**
1193   * Get the preferred network for the specified SIM 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<PreferredNetworkMode> } Returns the callback for getting the preferred network mode to obtain.
1199   * @throws { BusinessError } 201 - Permission denied.
1200   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1201   * @throws { BusinessError } 401 - Parameter error.
1202   * @throws { BusinessError } 8300001 - Invalid parameter value.
1203   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1204   * @throws { BusinessError } 8300003 - System internal error.
1205   * @throws { BusinessError } 8300999 - Unknown error code.
1206   * @syscap SystemCapability.Telephony.CoreService
1207   * @systemapi Hide this for inner system use.
1208   * @since 8
1209   */
1210  function getPreferredNetwork(slotId: number): Promise<PreferredNetworkMode>;
1211
1212  /**
1213   * Set network capability.
1214   *
1215   * @permission ohos.permission.SET_TELEPHONY_STATE
1216   * @param { number } slotId - Indicates the card slot index number,
1217   * ranging from 0 to the maximum card slot index number supported by the device.
1218   * @param { NetworkCapabilityType } type - Indicates the service type of the {@link NetworkCapabilityType}.
1219   * @param { NetworkCapabilityState } state - Indicates the service ability of the {@link NetworkCapabilityState}.
1220   * @param { AsyncCallback<void> } callback - The callback of setNetworkCapability.
1221   * @throws { BusinessError } 201 - Permission denied.
1222   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1223   * @throws { BusinessError } 401 - Parameter error.
1224   * @throws { BusinessError } 8300001 - Invalid parameter value.
1225   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1226   * @throws { BusinessError } 8300003 - System internal error.
1227   * @throws { BusinessError } 8300999 - Unknown error code.
1228   * @syscap SystemCapability.Telephony.CoreService
1229   * @systemapi Hide this for inner system use.
1230   * @since 10
1231   */
1232  function setNetworkCapability(slotId: number, type: NetworkCapabilityType, state: NetworkCapabilityState,
1233      callback: AsyncCallback<void>): void;
1234
1235  /**
1236   * Set network ability switch.
1237   *
1238   * @permission ohos.permission.SET_TELEPHONY_STATE
1239   * @param { number } slotId - Indicates the card slot index number,
1240   * ranging from 0 to the maximum card slot index number supported by the device.
1241   * @param { NetworkCapabilityType } type - Indicates the service type of the {@link NetworkCapabilityType}.
1242   * @param { NetworkCapabilityState } state - Indicates the service ability of the {@link NetworkCapabilityState}.
1243   * @returns { Promise<void> } The promise returned by the setNetworkCapability.
1244   * @throws { BusinessError } 201 - Permission denied.
1245   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1246   * @throws { BusinessError } 401 - Parameter error.
1247   * @throws { BusinessError } 8300001 - Invalid parameter value.
1248   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1249   * @throws { BusinessError } 8300003 - System internal error.
1250   * @throws { BusinessError } 8300999 - Unknown error code.
1251   * @syscap SystemCapability.Telephony.CoreService
1252   * @systemapi Hide this for inner system use.
1253   * @since 10
1254   */
1255  function setNetworkCapability(slotId: number, type: NetworkCapabilityType, state: NetworkCapabilityState): Promise<void>;
1256
1257  /**
1258   * Get network capability.
1259   *
1260   * @permission ohos.permission.GET_TELEPHONY_STATE
1261   * @param { number } slotId - Indicates the card slot index number,
1262   * ranging from 0 to the maximum card slot index number supported by the device.
1263   * @param { NetworkCapabilityType } type - Indicates the service type of the {@link NetworkCapabilityType}.
1264   * @param { AsyncCallback<NetworkCapabilityState> } callback - Indicates the callback for getting
1265   * the network capability state.
1266   * @throws { BusinessError } 201 - Permission denied.
1267   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1268   * @throws { BusinessError } 401 - Parameter error.
1269   * @throws { BusinessError } 8300001 - Invalid parameter value.
1270   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1271   * @throws { BusinessError } 8300003 - System internal error.
1272   * @throws { BusinessError } 8300999 - Unknown error code.
1273   * @syscap SystemCapability.Telephony.CoreService
1274   * @systemapi Hide this for inner system use.
1275   * @since 10
1276   */
1277  function getNetworkCapability(slotId: number, type: NetworkCapabilityType,
1278      callback: AsyncCallback<NetworkCapabilityState>): void;
1279
1280  /**
1281   * Get network capability.
1282   *
1283   * @permission ohos.permission.GET_TELEPHONY_STATE
1284   * @param { number } slotId - Indicates the card slot index number,
1285   * ranging from 0 to the maximum card slot index number supported by the device.
1286   * @param { NetworkCapabilityType } type - Indicates the service type of the {@link NetworkCapabilityType}.
1287   * @returns { Promise<NetworkCapabilityState> } Returns the callback for getting the network capability state.
1288   * @throws { BusinessError } 201 - Permission denied.
1289   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1290   * @throws { BusinessError } 401 - Parameter error.
1291   * @throws { BusinessError } 8300001 - Invalid parameter value.
1292   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1293   * @throws { BusinessError } 8300003 - System internal error.
1294   * @throws { BusinessError } 8300999 - Unknown error code.
1295   * @syscap SystemCapability.Telephony.CoreService
1296   * @systemapi Hide this for inner system use.
1297   * @since 10
1298   */
1299  function getNetworkCapability(slotId: number, type: NetworkCapabilityType): Promise<NetworkCapabilityState>;
1300
1301  /**
1302   * Get the IMS registration state info of specified IMS service type.
1303   *
1304   * @permission ohos.permission.GET_TELEPHONY_STATE
1305   * @param { number } slotId - Indicates the card slot index number,
1306   * ranging from 0 to the maximum card slot index number supported by the device.
1307   * @param { ImsServiceType } imsType - Indicates the ims service type of the {@link ImsServiceType}.
1308   * @param { AsyncCallback<ImsRegInfo> } callback - Indicates an instance of the {@link ImsRegInfo} class.
1309   * @throws { BusinessError } 201 - Permission denied.
1310   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1311   * @throws { BusinessError } 401 - Parameter error.
1312   * @throws { BusinessError } 8300001 - Invalid parameter value.
1313   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1314   * @throws { BusinessError } 8300003 - System internal error.
1315   * @throws { BusinessError } 8300999 - Unknown error code.
1316   * @syscap SystemCapability.Telephony.CoreService
1317   * @systemapi Hide this for inner system use.
1318   * @since 9
1319   */
1320  function getImsRegInfo(slotId: number, imsType: ImsServiceType, callback: AsyncCallback<ImsRegInfo>): void;
1321
1322  /**
1323   * Get the IMS registration state info of specified IMS service type.
1324   *
1325   * @permission ohos.permission.GET_TELEPHONY_STATE
1326   * @param { number } slotId - Indicates the card slot index number,
1327   * ranging from 0 to the maximum card slot index number supported by the device.
1328   * @param { ImsServiceType } imsType - Indicates the ims service type of the {@link ImsServiceType}.
1329   * @returns { Promise<ImsRegInfo> } Returns an instance of the {@link ImsRegInfo} class.
1330   * @throws { BusinessError } 201 - Permission denied.
1331   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1332   * @throws { BusinessError } 401 - Parameter error.
1333   * @throws { BusinessError } 8300001 - Invalid parameter value.
1334   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1335   * @throws { BusinessError } 8300003 - System internal error.
1336   * @throws { BusinessError } 8300999 - Unknown error code.
1337   * @syscap SystemCapability.Telephony.CoreService
1338   * @systemapi Hide this for inner system use.
1339   * @since 9
1340   */
1341  function getImsRegInfo(slotId: number, imsType: ImsServiceType): Promise<ImsRegInfo>;
1342
1343  /**
1344   * Called when the IMS registration state of specified IMS service type corresponding to
1345   * a monitored {@code slotId} updates.
1346   *
1347   * @permission ohos.permission.GET_TELEPHONY_STATE
1348   * @param { 'imsRegStateChange' } type - Event type. Indicates the imsRegStateChange event to be subscribed to.
1349   * @param { number } slotId - Indicates the card slot index number,
1350   * ranging from 0 to the maximum card slot index number supported by the device.
1351   * @param { ImsServiceType } imsType - Indicates the ims service type of the {@link ImsServiceType}.
1352   * @param { Callback<ImsRegInfo> } callback - Indicates the callback for getting an instance of
1353   * the {@link ImsRegInfo} class.
1354   * @throws { BusinessError } 201 - Permission denied.
1355   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1356   * @throws { BusinessError } 401 - Parameter error.
1357   * @throws { BusinessError } 8300001 - Invalid parameter value.
1358   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1359   * @throws { BusinessError } 8300003 - System internal error.
1360   * @throws { BusinessError } 8300999 - Unknown error code.
1361   * @syscap SystemCapability.Telephony.CoreService
1362   * @systemapi Hide this for inner system use.
1363   * @since 9
1364   */
1365  function on(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback: Callback<ImsRegInfo>): void;
1366
1367  /**
1368   * Unsubscribe from imsRegStateChange event.
1369   *
1370   * @permission ohos.permission.GET_TELEPHONY_STATE
1371   * @param { 'imsRegStateChange' } type - Event type. Indicates the imsRegStateChange event to unsubscribe from.
1372   * @param { number } slotId - Indicates the card slot index number,
1373   * ranging from 0 to the maximum card slot index number supported by the device.
1374   * @param { ImsServiceType } imsType - Indicates the ims service type of the {@link ImsServiceType}.
1375   * @param { Callback<ImsRegInfo> } callback - Indicates the callback for getting
1376   * an instance of the {@link ImsRegInfo} class.
1377   * @throws { BusinessError } 201 - Permission denied.
1378   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1379   * @throws { BusinessError } 401 - Parameter error.
1380   * @throws { BusinessError } 8300001 - Invalid parameter value.
1381   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1382   * @throws { BusinessError } 8300003 - System internal error.
1383   * @throws { BusinessError } 8300999 - Unknown error code.
1384   * @syscap SystemCapability.Telephony.CoreService
1385   * @systemapi Hide this for inner system use.
1386   * @since 9
1387   */
1388  function off(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback?: Callback<ImsRegInfo>): void;
1389
1390  /**
1391   * Get the version of Baseband.
1392   *
1393   * @permission ohos.permission.GET_TELEPHONY_STATE
1394   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot index number
1395   * supported by the device.
1396   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the baseband version.
1397   * @throws { BusinessError } 201 - Permission denied.
1398   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1399   * @throws { BusinessError } 401 - Parameter error.
1400   * @throws { BusinessError } 8300001 - Invalid parameter value.
1401   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1402   * @throws { BusinessError } 8300003 - System internal error.
1403   * @throws { BusinessError } 8300999 - Unknown error code.
1404   * @syscap SystemCapability.Telephony.CoreService
1405   * @systemapi Hide this for inner system use.
1406   * @since 10
1407   */
1408  function getBasebandVersion(slotId: number, callback: AsyncCallback<string>): void;
1409
1410  /**
1411   * Get the version of Baseband.
1412   *
1413   * @permission ohos.permission.GET_TELEPHONY_STATE
1414   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot index number
1415   * supported by the device.
1416   * @returns { Promise<string> } Returns the baseband version.
1417   * @throws { BusinessError } 201 - Permission denied.
1418   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1419   * @throws { BusinessError } 401 - Parameter error.
1420   * @throws { BusinessError } 8300001 - Invalid parameter value.
1421   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1422   * @throws { BusinessError } 8300003 - System internal error.
1423   * @throws { BusinessError } 8300999 - Unknown error code.
1424   * @syscap SystemCapability.Telephony.CoreService
1425   * @systemapi Hide this for inner system use.
1426   * @since 10
1427   */
1428  function getBasebandVersion(slotId: number): Promise<string>;
1429
1430  /**
1431   * Set the NR option mode.
1432   *
1433   * @permission ohos.permission.SET_TELEPHONY_STATE
1434   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot index
1435   * number supported by the device.
1436   * @param { NROptionMode } mode - Indicates the nr option mode to be set.
1437   * @param { AsyncCallback<void> } callback - Indicates the callback for getting the option result.
1438   * @throws { BusinessError } 201 - Permission denied.
1439   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1440   * @throws { BusinessError } 401 - Parameter error.
1441   * @throws { BusinessError } 8300001 - Invalid parameter value.
1442   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1443   * @throws { BusinessError } 8300003 - System internal error.
1444   * @throws { BusinessError } 8300999 - Unknown error code.
1445   * @syscap SystemCapability.Telephony.CoreService
1446   * @systemapi Hide this for inner system use.
1447   * @since 10
1448   */
1449  function setNROptionMode(slotId: number, mode: NROptionMode, callback: AsyncCallback<void>): void;
1450
1451  /**
1452   * Set the NR option mode.
1453   *
1454   * @permission ohos.permission.SET_TELEPHONY_STATE
1455   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot index
1456   * number supported by the device.
1457   * @param { NROptionMode } mode - Indicates the nr option mode to be set.
1458   * @returns { Promise<void> } Returns option result.
1459   * @throws { BusinessError } 201 - Permission denied.
1460   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1461   * @throws { BusinessError } 401 - Parameter error.
1462   * @throws { BusinessError } 8300001 - Invalid parameter value.
1463   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1464   * @throws { BusinessError } 8300003 - System internal error.
1465   * @throws { BusinessError } 8300999 - Unknown error code.
1466   * @syscap SystemCapability.Telephony.CoreService
1467   * @systemapi Hide this for inner system use.
1468   * @since 10
1469   */
1470  function setNROptionMode(slotId: number, mode: NROptionMode): Promise<void>;
1471
1472  /**
1473   * Get the option mode of NR.
1474   *
1475   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
1476   * index number supported by the device.
1477   * @param { AsyncCallback<NROptionMode> } callback - Indicates the callback for getting the selection mode of NR.
1478   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1479   * @throws { BusinessError } 401 - Parameter error.
1480   * @throws { BusinessError } 8300001 - Invalid parameter value.
1481   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1482   * @throws { BusinessError } 8300003 - System internal error.
1483   * @throws { BusinessError } 8300999 - Unknown error code.
1484   * @syscap SystemCapability.Telephony.CoreService
1485   * @systemapi Hide this for inner system use.
1486   * @since 10
1487   */
1488  function getNROptionMode(slotId: number, callback: AsyncCallback<NROptionMode>): void;
1489
1490  /**
1491   * Get the option mode of NR.
1492   *
1493   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
1494   * index number supported by the device.
1495   * @returns { Promise<NROptionMode> } Returns the selection mode of NR.
1496   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1497   * @throws { BusinessError } 401 - Parameter error.
1498   * @throws { BusinessError } 8300001 - Invalid parameter value.
1499   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1500   * @throws { BusinessError } 8300003 - System internal error.
1501   * @throws { BusinessError } 8300999 - Unknown error code.
1502   * @syscap SystemCapability.Telephony.CoreService
1503   * @systemapi Hide this for inner system use.
1504   * @since 10
1505   */
1506  function getNROptionMode(slotId: number): Promise<NROptionMode>;
1507
1508  /**
1509   * Reset all network settings of telephony.
1510   *
1511   * @permission ohos.permission.SET_TELEPHONY_STATE
1512   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot
1513   * index number supported by the device.
1514   * @returns { Promise<void> } The promise returned by the factoryReset.
1515   * @throws { BusinessError } 201 - Permission denied
1516   * @throws { BusinessError } 202 - Non-system applications use system APIs.
1517   * @throws { BusinessError } 401 - Parameter error.
1518   * @throws { BusinessError } 8300001 - Invalid parameter value.
1519   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
1520   * @throws { BusinessError } 8300003 - System internal error.
1521   * @throws { BusinessError } 8300999 - Unknown error code.
1522   * @syscap SystemCapability.Telephony.CoreService
1523   * @systemapi Hide this for inner system use.
1524   * @since 11
1525   */
1526  function factoryReset(slotId: number): Promise<void>;
1527
1528  /**
1529   * Indicates the preferred network.
1530   *
1531   * @enum { number }
1532   * @syscap SystemCapability.Telephony.CoreService
1533   * @systemapi Hide this for inner system use.
1534   * @since 8
1535   */
1536  export enum PreferredNetworkMode {
1537    /**
1538     * Preferred GSM network mode.
1539     *
1540     * @syscap SystemCapability.Telephony.CoreService
1541     * @systemapi Hide this for inner system use.
1542     * @since 8
1543     */
1544    PREFERRED_NETWORK_MODE_GSM = 1,
1545
1546    /**
1547     * Preferred WCDMA network mode.
1548     *
1549     * @syscap SystemCapability.Telephony.CoreService
1550     * @systemapi Hide this for inner system use.
1551     * @since 8
1552     */
1553    PREFERRED_NETWORK_MODE_WCDMA = 2,
1554
1555    /**
1556     * Preferred LTE mode.
1557     *
1558     * @syscap SystemCapability.Telephony.CoreService
1559     * @systemapi Hide this for inner system use.
1560     * @since 8
1561     */
1562    PREFERRED_NETWORK_MODE_LTE = 3,
1563
1564    /**
1565     * Preferred LTE/WCDMA network mode.
1566     *
1567     * @syscap SystemCapability.Telephony.CoreService
1568     * @systemapi Hide this for inner system use.
1569     * @since 8
1570     */
1571    PREFERRED_NETWORK_MODE_LTE_WCDMA = 4,
1572
1573    /**
1574     * Preferred LTE/WCDMA/GSM network mode.
1575     *
1576     * @syscap SystemCapability.Telephony.CoreService
1577     * @systemapi Hide this for inner system use.
1578     * @since 8
1579     */
1580    PREFERRED_NETWORK_MODE_LTE_WCDMA_GSM = 5,
1581
1582    /**
1583     * Preferred WCDMA/GSM network mode.
1584     *
1585     * @syscap SystemCapability.Telephony.CoreService
1586     * @systemapi Hide this for inner system use.
1587     * @since 8
1588     */
1589    PREFERRED_NETWORK_MODE_WCDMA_GSM = 6,
1590
1591    /**
1592     * Preferred CDMA network mode.
1593     *
1594     * @syscap SystemCapability.Telephony.CoreService
1595     * @systemapi Hide this for inner system use.
1596     * @since 8
1597     */
1598    PREFERRED_NETWORK_MODE_CDMA = 7,
1599
1600    /**
1601     * Preferred EVDO network mode.
1602     *
1603     * @syscap SystemCapability.Telephony.CoreService
1604     * @systemapi Hide this for inner system use.
1605     * @since 8
1606     */
1607    PREFERRED_NETWORK_MODE_EVDO = 8,
1608
1609    /**
1610     * Preferred EVDO/CDMA network mode.
1611     *
1612     * @syscap SystemCapability.Telephony.CoreService
1613     * @systemapi Hide this for inner system use.
1614     * @since 8
1615     */
1616    PREFERRED_NETWORK_MODE_EVDO_CDMA = 9,
1617
1618    /**
1619     * Preferred WCDMA/GSM/EVDO/CDMA network mode.
1620     *
1621     * @syscap SystemCapability.Telephony.CoreService
1622     * @systemapi Hide this for inner system use.
1623     * @since 8
1624     */
1625    PREFERRED_NETWORK_MODE_WCDMA_GSM_EVDO_CDMA = 10,
1626
1627    /**
1628     * Preferred LTE/EVDO/CDMA network mode.
1629     *
1630     * @syscap SystemCapability.Telephony.CoreService
1631     * @systemapi Hide this for inner system use.
1632     * @since 8
1633     */
1634    PREFERRED_NETWORK_MODE_LTE_EVDO_CDMA = 11,
1635
1636    /**
1637     * Preferred LTE/WCDMA/GSM/EVDO/CDMA network mode.
1638     *
1639     * @syscap SystemCapability.Telephony.CoreService
1640     * @systemapi Hide this for inner system use.
1641     * @since 8
1642     */
1643    PREFERRED_NETWORK_MODE_LTE_WCDMA_GSM_EVDO_CDMA = 12,
1644
1645    /**
1646     * Preferred TDSCDMA network mode.
1647     *
1648     * @syscap SystemCapability.Telephony.CoreService
1649     * @systemapi Hide this for inner system use.
1650     * @since 8
1651     */
1652    PREFERRED_NETWORK_MODE_TDSCDMA = 13,
1653
1654    /**
1655     * Preferred TDSCDMA/GSM network mode.
1656     *
1657     * @syscap SystemCapability.Telephony.CoreService
1658     * @systemapi Hide this for inner system use.
1659     * @since 8
1660     */
1661    PREFERRED_NETWORK_MODE_TDSCDMA_GSM = 14,
1662
1663    /**
1664     * Preferred TDSCDMA/WCDMA network mode.
1665     *
1666     * @syscap SystemCapability.Telephony.CoreService
1667     * @systemapi Hide this for inner system use.
1668     * @since 8
1669     */
1670    PREFERRED_NETWORK_MODE_TDSCDMA_WCDMA = 15,
1671
1672    /**
1673     * Preferred TDSCDMA/WCDMA/GSM network mode.
1674     *
1675     * @syscap SystemCapability.Telephony.CoreService
1676     * @systemapi Hide this for inner system use.
1677     * @since 8
1678     */
1679    PREFERRED_NETWORK_MODE_TDSCDMA_WCDMA_GSM = 16,
1680
1681    /**
1682     * Preferred LTE/TDSCDMA network mode.
1683     *
1684     * @syscap SystemCapability.Telephony.CoreService
1685     * @systemapi Hide this for inner system use.
1686     * @since 8
1687     */
1688    PREFERRED_NETWORK_MODE_LTE_TDSCDMA = 17,
1689
1690    /**
1691     * Preferred LTE/TDSCDMA/GSM network mode.
1692     *
1693     * @syscap SystemCapability.Telephony.CoreService
1694     * @systemapi Hide this for inner system use.
1695     * @since 8
1696     */
1697    PREFERRED_NETWORK_MODE_LTE_TDSCDMA_GSM = 18,
1698
1699    /**
1700     * Preferred LTE/TDSCDMA/WCDMA network mode.
1701     *
1702     * @syscap SystemCapability.Telephony.CoreService
1703     * @systemapi Hide this for inner system use.
1704     * @since 8
1705     */
1706    PREFERRED_NETWORK_MODE_LTE_TDSCDMA_WCDMA = 19,
1707
1708    /**
1709     * Preferred LTE/TDSCDMA/WCDMA/GSM network mode.
1710     *
1711     * @syscap SystemCapability.Telephony.CoreService
1712     * @systemapi Hide this for inner system use.
1713     * @since 8
1714     */
1715    PREFERRED_NETWORK_MODE_LTE_TDSCDMA_WCDMA_GSM = 20,
1716
1717    /**
1718     * Preferred TDSCDMA/WCDMA/GSM/EVDO/CDMA network mode.
1719     *
1720     * @syscap SystemCapability.Telephony.CoreService
1721     * @systemapi Hide this for inner system use.
1722     * @since 8
1723     */
1724    PREFERRED_NETWORK_MODE_TDSCDMA_WCDMA_GSM_EVDO_CDMA = 21,
1725
1726    /**
1727     * Preferred LTE/TDSCDMA/WCDMA/GSM/EVDO/CDMA network mode.
1728     *
1729     * @syscap SystemCapability.Telephony.CoreService
1730     * @systemapi Hide this for inner system use.
1731     * @since 8
1732     */
1733    PREFERRED_NETWORK_MODE_LTE_TDSCDMA_WCDMA_GSM_EVDO_CDMA = 22,
1734
1735    /**
1736     * Preferred NR network mode.
1737     *
1738     * @syscap SystemCapability.Telephony.CoreService
1739     * @systemapi Hide this for inner system use.
1740     * @since 8
1741     */
1742    PREFERRED_NETWORK_MODE_NR = 31,
1743
1744    /**
1745     * Preferred NR/LTE network mode.
1746     *
1747     * @syscap SystemCapability.Telephony.CoreService
1748     * @systemapi Hide this for inner system use.
1749     * @since 8
1750     */
1751    PREFERRED_NETWORK_MODE_NR_LTE = 32,
1752
1753    /**
1754     * Preferred NR/LTE/WCDMA network mode.
1755     *
1756     * @syscap SystemCapability.Telephony.CoreService
1757     * @systemapi Hide this for inner system use.
1758     * @since 8
1759     */
1760    PREFERRED_NETWORK_MODE_NR_LTE_WCDMA = 33,
1761
1762    /**
1763     * Preferred NR/LTE/WCDMA/GSM network mode.
1764     *
1765     * @syscap SystemCapability.Telephony.CoreService
1766     * @systemapi Hide this for inner system use.
1767     * @since 8
1768     */
1769    PREFERRED_NETWORK_MODE_NR_LTE_WCDMA_GSM = 34,
1770
1771    /**
1772     * Preferred NR/LTE/EVDO/CDMA network mode.
1773     *
1774     * @syscap SystemCapability.Telephony.CoreService
1775     * @systemapi Hide this for inner system use.
1776     * @since 8
1777     */
1778    PREFERRED_NETWORK_MODE_NR_LTE_EVDO_CDMA = 35,
1779
1780    /**
1781     * Preferred NR/LTE/WCDMA/GSM/EVDO/CDMA network mode.
1782     *
1783     * @syscap SystemCapability.Telephony.CoreService
1784     * @systemapi Hide this for inner system use.
1785     * @since 8
1786     */
1787    PREFERRED_NETWORK_MODE_NR_LTE_WCDMA_GSM_EVDO_CDMA = 36,
1788
1789    /**
1790     * Preferred NR/LTE/TDSCDMA network mode.
1791     *
1792     * @syscap SystemCapability.Telephony.CoreService
1793     * @systemapi Hide this for inner system use.
1794     * @since 8
1795     */
1796    PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA = 37,
1797
1798    /**
1799     * Preferred NR/LTE/TDSCDMA/GSM network mode.
1800     *
1801     * @syscap SystemCapability.Telephony.CoreService
1802     * @systemapi Hide this for inner system use.
1803     * @since 8
1804     */
1805    PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA_GSM = 38,
1806
1807    /**
1808     * Preferred NR/LTE/TDSCDMA/WCDMA network mode.
1809     *
1810     * @syscap SystemCapability.Telephony.CoreService
1811     * @systemapi Hide this for inner system use.
1812     * @since 8
1813     */
1814    PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA_WCDMA = 39,
1815
1816    /**
1817     * Preferred NR/LTE/TDSCDMA/WCDMA/GSM network mode.
1818     *
1819     * @syscap SystemCapability.Telephony.CoreService
1820     * @systemapi Hide this for inner system use.
1821     * @since 8
1822     */
1823    PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA_WCDMA_GSM = 40,
1824
1825    /**
1826     * Preferred NR/LTE/TDSCDMA/WCDMA/GSM/EVDO/CDMA network mode.
1827     *
1828     * @syscap SystemCapability.Telephony.CoreService
1829     * @systemapi Hide this for inner system use.
1830     * @since 8
1831     */
1832    PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA_WCDMA_GSM_EVDO_CDMA = 41,
1833
1834    /**
1835     * Preferred network mode Maximum.
1836     *
1837     * @syscap SystemCapability.Telephony.CoreService
1838     * @systemapi Hide this for inner system use.
1839     * @since 8
1840     */
1841    PREFERRED_NETWORK_MODE_MAX_VALUE = 99,
1842  }
1843
1844  /**
1845   * Describes the radio access technology (RAT) of registered network.
1846   *
1847   * @interface NetworkRadioTech
1848   * @syscap SystemCapability.Telephony.CoreService
1849   * @since 11
1850   */
1851  export interface NetworkRadioTech {
1852    /**
1853     * Indicates radio access technology (RAT) of packet service (PS) domain.
1854     *
1855     * @syscap SystemCapability.Telephony.CoreService
1856     * @since 11
1857     */
1858    psRadioTech: RadioTechnology;
1859
1860    /**
1861     * Indicates radio access technology (RAT) of circuit service (CS) domain.
1862     *
1863     * @syscap SystemCapability.Telephony.CoreService
1864     * @since 11
1865     */
1866    csRadioTech: RadioTechnology;
1867  }
1868
1869  /**
1870   * Describes the radio access technology.
1871   *
1872   * @enum { number }
1873   * @syscap SystemCapability.Telephony.CoreService
1874   * @since 6
1875   */
1876  export enum RadioTechnology {
1877    /**
1878     * Indicates unknown radio access technology (RAT).
1879     *
1880     * @syscap SystemCapability.Telephony.CoreService
1881     * @since 6
1882     */
1883    RADIO_TECHNOLOGY_UNKNOWN = 0,
1884
1885    /**
1886     * Indicates that RAT is global system for mobile communications (GSM), including GSM, general packet
1887     * radio system (GPRS), and enhanced data rates for GSM evolution (EDGE).
1888     *
1889     * @syscap SystemCapability.Telephony.CoreService
1890     * @since 6
1891     */
1892    RADIO_TECHNOLOGY_GSM = 1,
1893
1894    /**
1895     * Indicates that RAT is code division multiple access (CDMA), including Interim Standard 95 (IS95) and
1896     * Single-Carrier Radio Transmission Technology (1xRTT).
1897     *
1898     * @syscap SystemCapability.Telephony.CoreService
1899     * @since 6
1900     */
1901    RADIO_TECHNOLOGY_1XRTT = 2,
1902
1903    /**
1904     * Indicates that RAT is wideband code division multiple address (WCDMA).
1905     *
1906     * @syscap SystemCapability.Telephony.CoreService
1907     * @since 6
1908     */
1909    RADIO_TECHNOLOGY_WCDMA = 3,
1910
1911    /**
1912     * Indicates that RAT is high-speed packet access (HSPA), including HSPA, high-speed downlink packet
1913     * access (HSDPA), and high-speed uplink packet access (HSUPA).
1914     *
1915     * @syscap SystemCapability.Telephony.CoreService
1916     * @since 6
1917     */
1918    RADIO_TECHNOLOGY_HSPA = 4,
1919
1920    /**
1921     * Indicates that RAT is evolved high-speed packet access (HSPA+), including HSPA+ and dual-carrier
1922     * HSPA+ (DC-HSPA+).
1923     *
1924     * @syscap SystemCapability.Telephony.CoreService
1925     * @since 6
1926     */
1927    RADIO_TECHNOLOGY_HSPAP = 5,
1928
1929    /**
1930     * Indicates that RAT is time division-synchronous code division multiple access (TD-SCDMA).
1931     *
1932     * @syscap SystemCapability.Telephony.CoreService
1933     * @since 6
1934     */
1935    RADIO_TECHNOLOGY_TD_SCDMA = 6,
1936
1937    /**
1938     * Indicates that RAT is evolution data only (EVDO), including EVDO Rev.0, EVDO Rev.A, and EVDO Rev.B.
1939     *
1940     * @syscap SystemCapability.Telephony.CoreService
1941     * @since 6
1942     */
1943    RADIO_TECHNOLOGY_EVDO = 7,
1944
1945    /**
1946     * Indicates that RAT is evolved high rate packet data (EHRPD).
1947     *
1948     * @syscap SystemCapability.Telephony.CoreService
1949     * @since 6
1950     */
1951    RADIO_TECHNOLOGY_EHRPD = 8,
1952
1953    /**
1954     * Indicates that RAT is long term evolution (LTE).
1955     *
1956     * @syscap SystemCapability.Telephony.CoreService
1957     * @since 6
1958     */
1959    RADIO_TECHNOLOGY_LTE = 9,
1960
1961    /**
1962     * Indicates that RAT is LTE carrier aggregation (LTE-CA).
1963     *
1964     * @syscap SystemCapability.Telephony.CoreService
1965     * @since 6
1966     */
1967    RADIO_TECHNOLOGY_LTE_CA = 10,
1968
1969    /**
1970     * Indicates that RAT is interworking WLAN (I-WLAN).
1971     *
1972     * @syscap SystemCapability.Telephony.CoreService
1973     * @since 6
1974     */
1975    RADIO_TECHNOLOGY_IWLAN = 11,
1976
1977    /**
1978     * Indicates that RAT is 5G new radio (NR).
1979     *
1980     * @syscap SystemCapability.Telephony.CoreService
1981     * @since 6
1982     */
1983    RADIO_TECHNOLOGY_NR = 12
1984  }
1985
1986  /**
1987   * Returns child class objects specific to the network type.
1988   *
1989   * @interface SignalInformation
1990   * @syscap SystemCapability.Telephony.CoreService
1991   * @since 6
1992   */
1993  export interface SignalInformation {
1994    /**
1995     * Obtains the network type corresponding to the signal.
1996     *
1997     * @type { NetworkType }
1998     * @syscap SystemCapability.Telephony.CoreService
1999     * @since 6
2000     */
2001    signalType: NetworkType;
2002
2003    /**
2004     * Obtains the signal level of the current network.
2005     *
2006     * @type { number }
2007     * @syscap SystemCapability.Telephony.CoreService
2008     * @since 6
2009     */
2010    signalLevel: number;
2011
2012    /**
2013     * rsrp for LTE and NR; dbm for CDMA and EVDO; rscp for WCDMA; rssi for GSM.
2014     *
2015     * @type { number }
2016     * @syscap SystemCapability.Telephony.CoreService
2017     * @since 9
2018     */
2019    dBm: number;
2020  }
2021
2022  /**
2023   * Describes the network type.
2024   *
2025   * @enum { number }
2026   * @syscap SystemCapability.Telephony.CoreService
2027   * @since 6
2028   */
2029  export enum NetworkType {
2030    /**
2031     * Indicates unknown network type.
2032     *
2033     * @syscap SystemCapability.Telephony.CoreService
2034     * @since 6
2035     */
2036    NETWORK_TYPE_UNKNOWN,
2037
2038    /**
2039     * Indicates that the network type is GSM.
2040     *
2041     * @syscap SystemCapability.Telephony.CoreService
2042     * @since 6
2043     */
2044    NETWORK_TYPE_GSM,
2045
2046    /**
2047     * Indicates that the network type is CDMA.
2048     *
2049     * @syscap SystemCapability.Telephony.CoreService
2050     * @since 6
2051     */
2052    NETWORK_TYPE_CDMA,
2053
2054    /**
2055     * Indicates that the network type is WCDMA.
2056     *
2057     * @syscap SystemCapability.Telephony.CoreService
2058     * @since 6
2059     */
2060    NETWORK_TYPE_WCDMA,
2061
2062    /**
2063     * Indicates that the network type is TD-SCDMA.
2064     *
2065     * @syscap SystemCapability.Telephony.CoreService
2066     * @since 6
2067     */
2068    NETWORK_TYPE_TDSCDMA,
2069
2070    /**
2071     * Indicates that the network type is LTE.
2072     *
2073     * @syscap SystemCapability.Telephony.CoreService
2074     * @since 6
2075     */
2076    NETWORK_TYPE_LTE,
2077
2078    /**
2079     * Indicates that the network type is 5G NR.
2080     *
2081     * @syscap SystemCapability.Telephony.CoreService
2082     * @since 6
2083     */
2084    NETWORK_TYPE_NR
2085  }
2086
2087  /**
2088   * Describes the network registration state.
2089   *
2090   * @interface NetworkState
2091   * @syscap SystemCapability.Telephony.CoreService
2092   * @since 6
2093   */
2094  export interface NetworkState {
2095    /**
2096     * Obtains the operator name in the long alphanumeric format of the registered network.
2097     *
2098     * Returns the operator name in the long alphanumeric format as a string;
2099     * returns an empty string if no operator name is obtained.
2100     *
2101     * @type { string }
2102     * @syscap SystemCapability.Telephony.CoreService
2103     * @since 6
2104     */
2105    longOperatorName: string;
2106
2107    /**
2108     * Obtains the operator name in the short alphanumeric format of the registered network.
2109     *
2110     * Returns the operator name in the short alphanumeric format as a string;
2111     * returns an empty string if no operator name is obtained.
2112     *
2113     * @type { string }
2114     * @syscap SystemCapability.Telephony.CoreService
2115     * @since 6
2116     */
2117    shortOperatorName: string;
2118
2119    /**
2120     * Obtains the PLMN code of the registered network.
2121     *
2122     * Returns the PLMN code as a string; returns an empty string if no operator name is obtained.
2123     *
2124     * @type { string }
2125     * @syscap SystemCapability.Telephony.CoreService
2126     * @since 6
2127     */
2128    plmnNumeric: string;
2129
2130    /**
2131     * Checks whether the device is roaming.
2132     *
2133     * @type { boolean }
2134     * @syscap SystemCapability.Telephony.CoreService
2135     * @since 6
2136     */
2137    isRoaming: boolean;
2138
2139    /**
2140     * Obtains the network registration status of the device.
2141     *
2142     * @type { RegState }
2143     * @syscap SystemCapability.Telephony.CoreService
2144     * @since 6
2145     */
2146    regState: RegState;
2147
2148    /**
2149     * Obtains the radio Access technology after config conversion.
2150     *
2151     * @type { RadioTechnology }
2152     * @syscap SystemCapability.Telephony.CoreService
2153     * @since 8
2154     */
2155    cfgTech: RadioTechnology;
2156
2157    /**
2158     * Obtains the NSA network registration status of the device.
2159     *
2160     * Returns the NSA network registration status {@code NsaState}.
2161     *
2162     * @type { NsaState }
2163     * @syscap SystemCapability.Telephony.CoreService
2164     * @since 6
2165     */
2166    nsaState: NsaState;
2167
2168    /**
2169     * Obtains the status of CA.
2170     *
2171     * Returns {@code true} if CA is actived; returns {@code false} otherwise.
2172     *
2173     * @type { boolean }
2174     * @syscap SystemCapability.Telephony.CoreService
2175     * @since 6
2176     */
2177    isCaActive: boolean;
2178
2179    /**
2180     * Checks whether this device is allowed to make emergency calls only.
2181     *
2182     * Returns {@code true} if this device is allowed to make emergency calls only;
2183     * returns {@code false} otherwise.
2184     *
2185     * @type { boolean }
2186     * @syscap SystemCapability.Telephony.CoreService
2187     * @since 6
2188     */
2189    isEmergency: boolean;
2190  }
2191
2192  /**
2193   * Describes the network registration state.
2194   *
2195   * @enum { number }
2196   * @syscap SystemCapability.Telephony.CoreService
2197   * @since 6
2198   */
2199  export enum RegState {
2200    /**
2201     * Indicates a state in which a device cannot use any service.
2202     *
2203     * @syscap SystemCapability.Telephony.CoreService
2204     * @since 6
2205     */
2206    REG_STATE_NO_SERVICE = 0,
2207
2208    /**
2209     * Indicates a state in which a device can use services properly.
2210     *
2211     * @syscap SystemCapability.Telephony.CoreService
2212     * @since 6
2213     */
2214    REG_STATE_IN_SERVICE = 1,
2215
2216    /**
2217     * Indicates a state in which a device can use only the emergency call service.
2218     *
2219     * @syscap SystemCapability.Telephony.CoreService
2220     * @since 6
2221     */
2222    REG_STATE_EMERGENCY_CALL_ONLY = 2,
2223
2224    /**
2225     * Indicates that the cellular radio is powered off.
2226     *
2227     * @syscap SystemCapability.Telephony.CoreService
2228     * @since 6
2229     */
2230    REG_STATE_POWER_OFF = 3
2231  }
2232
2233  /**
2234   * Describes the nsa state.
2235   *
2236   * @enum { number }
2237   * @syscap SystemCapability.Telephony.CoreService
2238   * @since 6
2239   */
2240  export enum NsaState {
2241    /**
2242     * Indicates that a device is idle under or is connected to an LTE cell that does not support NSA.
2243     *
2244     * @syscap SystemCapability.Telephony.CoreService
2245     * @since 6
2246     */
2247    NSA_STATE_NOT_SUPPORT = 1,
2248
2249    /**
2250     * Indicates that a device is idle under an LTE cell supporting NSA but not NR coverage detection.
2251     *
2252     * @syscap SystemCapability.Telephony.CoreService
2253     * @since 6
2254     */
2255    NSA_STATE_NO_DETECT = 2,
2256
2257    /**
2258     * Indicates that a device is connected to an LTE network under an LTE cell
2259     * that supports NSA and NR coverage detection.
2260     *
2261     * @syscap SystemCapability.Telephony.CoreService
2262     * @since 6
2263     */
2264    NSA_STATE_CONNECTED_DETECT = 3,
2265
2266    /**
2267     * Indicates that a device is idle under an LTE cell supporting NSA and NR coverage detection.
2268     *
2269     * @syscap SystemCapability.Telephony.CoreService
2270     * @since 6
2271     */
2272    NSA_STATE_IDLE_DETECT = 4,
2273
2274    /**
2275     * Indicates that a device is connected to an LTE + NR network under an LTE cell that supports NSA.
2276     *
2277     * @syscap SystemCapability.Telephony.CoreService
2278     * @since 6
2279     */
2280    NSA_STATE_DUAL_CONNECTED = 5,
2281
2282    /**
2283     * Indicates that a device is idle under or is connected to an NG-RAN cell while being attached to 5GC.
2284     *
2285     * @syscap SystemCapability.Telephony.CoreService
2286     * @since 6
2287     */
2288    NSA_STATE_SA_ATTACHED = 6
2289  }
2290
2291  /**
2292   * Enum for network capability type.
2293   *
2294   * @syscap SystemCapability.Telephony.CoreService
2295   * @systemapi Hide this for inner system use.
2296   * @since 10
2297   */
2298  export enum NetworkCapabilityType {
2299    /**
2300     * Indicates LTE network switch type.
2301     *
2302     * @syscap SystemCapability.Telephony.CoreService
2303     * @since 10
2304     */
2305    SERVICE_TYPE_LTE,
2306
2307    /**
2308     * Indicates NR network switch type.
2309     *
2310     * @syscap SystemCapability.Telephony.CoreService
2311     * @since 10
2312     */
2313    SERVICE_TYPE_NR,
2314  }
2315
2316  /**
2317   * Enum for network capability state.
2318   *
2319   * @syscap SystemCapability.Telephony.CoreService
2320   * @systemapi Hide this for inner system use.
2321   * @since 10
2322   */
2323  export enum NetworkCapabilityState {
2324    /**
2325     * Indicates turn off network switch.
2326     *
2327     * @syscap SystemCapability.Telephony.CoreService
2328     * @since 10
2329     */
2330    SERVICE_CAPABILITY_OFF,
2331
2332    /**
2333     * Indicates turn on network switch.
2334     *
2335     * @syscap SystemCapability.Telephony.CoreService
2336     * @since 10
2337     */
2338    SERVICE_CAPABILITY_ON,
2339  }
2340
2341  /**
2342   * Obtains current cell information.
2343   *
2344   * @interface CellInformation
2345   * @syscap SystemCapability.Telephony.CoreService
2346   * @systemapi Hide this for inner system use.
2347   * @since 8
2348   */
2349  export interface CellInformation {
2350    /**
2351     * Obtains the network type of the serving cell.
2352     *
2353     * An application can call this method to determine the network type that the child class uses.
2354     *
2355     * @type { NetworkType }
2356     * @syscap SystemCapability.Telephony.CoreService
2357     * @since 8
2358     */
2359    networkType: NetworkType;
2360
2361    /**
2362     * Obtains the camp-on status of the serving cell.
2363     *
2364     * Returns {@code true} if the user equipment (UE) is camped on the cell; returns {@code false} otherwise.
2365     *
2366     * @type { boolean }
2367     * @syscap SystemCapability.Telephony.CoreService
2368     * @systemapi Hide this for inner system use.
2369     * @since 8
2370     */
2371    isCamped: boolean;
2372
2373    /**
2374     * Obtains the timestamp when the cell information is obtained.
2375     *
2376     * Returns a timestamp since boot, in nanoseconds.
2377     *
2378     * @type { number }
2379     * @syscap SystemCapability.Telephony.CoreService
2380     * @systemapi Hide this for inner system use.
2381     * @since 8
2382     */
2383    timeStamp: number;
2384
2385    /**
2386     * An abstract method of the parent class whose implementation depends on the child classes.
2387     * Returned child class objects vary according to the network type.
2388     * Returns child class objects specific to the network type.
2389     *
2390     * @type { SignalInformation }
2391     * @syscap SystemCapability.Telephony.CoreService
2392     * @since 8
2393     */
2394    signalInformation: SignalInformation;
2395
2396    /**
2397     * Obtains signal strength under different network formats.
2398     *
2399     * @type { CdmaCellInformation | GsmCellInformation | LteCellInformation | NrCellInformation
2400     * | TdscdmaCellInformation | WcdmaCellInformation }
2401     * @syscap SystemCapability.Telephony.CoreService
2402     * @systemapi Hide this for inner system use.
2403     * @since 8
2404     */
2405    data: CdmaCellInformation | GsmCellInformation | LteCellInformation | NrCellInformation | TdscdmaCellInformation
2406      | WcdmaCellInformation;
2407  }
2408
2409  /**
2410   * Obtains CDMA cell information.
2411   *
2412   * @interface CdmaCellInformation
2413   * @syscap SystemCapability.Telephony.CoreService
2414   * @systemapi Hide this for inner system use.
2415   * @since 8
2416   */
2417  export interface CdmaCellInformation {
2418    /**
2419     * Indicates the base station Id.
2420     *
2421     * @type { number }
2422     * @syscap SystemCapability.Telephony.CoreService
2423     * @systemapi Hide this for inner system use.
2424     * @since 8
2425     */
2426    baseId: number;
2427
2428    /**
2429     * Indicates the latitude.
2430     *
2431     * @type { number }
2432     * @syscap SystemCapability.Telephony.CoreService
2433     * @systemapi Hide this for inner system use.
2434     * @since 8
2435     */
2436    latitude: number;
2437
2438    /**
2439     * Indicates the longitude.
2440     *
2441     * @type { number }
2442     * @syscap SystemCapability.Telephony.CoreService
2443     * @systemapi Hide this for inner system use.
2444     * @since 8
2445     */
2446    longitude: number;
2447
2448    /**
2449     * Indicates the network identification code.
2450     *
2451     * @type { number }
2452     * @syscap SystemCapability.Telephony.CoreService
2453     * @systemapi Hide this for inner system use.
2454     * @since 8
2455     */
2456    nid: number;
2457
2458    /**
2459     * Indicates the system identification code.
2460     *
2461     * @type { number }
2462     * @syscap SystemCapability.Telephony.CoreService
2463     * @systemapi Hide this for inner system use.
2464     * @since 8
2465     */
2466    sid: number;
2467  }
2468
2469  /**
2470   * Obtains GSM cell information.
2471   *
2472   * @interface GsmCellInformation
2473   * @syscap SystemCapability.Telephony.CoreService
2474   * @systemapi Hide this for inner system use.
2475   * @since 8
2476   */
2477  export interface GsmCellInformation {
2478    /**
2479     * Indicates the location area code.
2480     *
2481     * @type { number }
2482     * @syscap SystemCapability.Telephony.CoreService
2483     * @systemapi Hide this for inner system use.
2484     * @since 8
2485     */
2486    lac: number;
2487
2488    /**
2489     * Indicates the cell identification.
2490     *
2491     * @type { number }
2492     * @syscap SystemCapability.Telephony.CoreService
2493     * @systemapi Hide this for inner system use.
2494     * @since 8
2495     */
2496    cellId: number;
2497
2498    /**
2499     * Indicates the ARFCN(absolute radio frequency channel number).
2500     *
2501     * @type { number }
2502     * @syscap SystemCapability.Telephony.CoreService
2503     * @systemapi Hide this for inner system use.
2504     * @since 8
2505     */
2506    arfcn: number;
2507
2508    /**
2509     * Indicates the base station identification code.
2510     *
2511     * @type { number }
2512     * @syscap SystemCapability.Telephony.CoreService
2513     * @systemapi Hide this for inner system use.
2514     * @since 8
2515     */
2516    bsic: number;
2517
2518    /**
2519     * Indicates the mobile country code.
2520     *
2521     * @type { string }
2522     * @syscap SystemCapability.Telephony.CoreService
2523     * @systemapi Hide this for inner system use.
2524     * @since 8
2525     */
2526    mcc: string;
2527
2528    /**
2529     * Indicates the mobile network code.
2530     *
2531     * @type { string }
2532     * @syscap SystemCapability.Telephony.CoreService
2533     * @systemapi Hide this for inner system use.
2534     * @since 8
2535     */
2536    mnc: string;
2537  }
2538
2539  /**
2540   * Obtains LTE cell information.
2541   *
2542   * @interface LteCellInformation
2543   * @syscap SystemCapability.Telephony.CoreService
2544   * @systemapi Hide this for inner system use.
2545   * @since 8
2546   */
2547  export interface LteCellInformation {
2548    /**
2549     * Indicates the cell global identification.
2550     *
2551     * @type { number }
2552     * @syscap SystemCapability.Telephony.CoreService
2553     * @systemapi Hide this for inner system use.
2554     * @since 8
2555     */
2556    cgi: number;
2557
2558    /**
2559     * Indicates the physical cell identification.
2560     *
2561     * @type { number }
2562     * @syscap SystemCapability.Telephony.CoreService
2563     * @systemapi Hide this for inner system use.
2564     * @since 8
2565     */
2566    pci: number;
2567
2568    /**
2569     * Indicates the tracking area code.
2570     *
2571     * @type { number }
2572     * @syscap SystemCapability.Telephony.CoreService
2573     * @systemapi Hide this for inner system use.
2574     * @since 8
2575     */
2576    tac: number;
2577
2578    /**
2579     * Indicates the E-UTRA Absolute Radio Frequency Channel Number.
2580     *
2581     * @type { number }
2582     * @syscap SystemCapability.Telephony.CoreService
2583     * @systemapi Hide this for inner system use.
2584     * @since 8
2585     */
2586    earfcn: number;
2587
2588    /**
2589     * Indicates the bandwidth.
2590     *
2591     * @type { number }
2592     * @syscap SystemCapability.Telephony.CoreService
2593     * @systemapi Hide this for inner system use.
2594     * @since 8
2595     */
2596    bandwidth: number;
2597
2598    /**
2599     * Indicates the mobile country code.
2600     *
2601     * @type { string }
2602     * @syscap SystemCapability.Telephony.CoreService
2603     * @systemapi Hide this for inner system use.
2604     * @since 8
2605     */
2606    mcc: string;
2607
2608    /**
2609     * Indicates the mobile network code.
2610     *
2611     * @type { string }
2612     * @syscap SystemCapability.Telephony.CoreService
2613     * @systemapi Hide this for inner system use.
2614     * @since 8
2615     */
2616    mnc: string;
2617
2618    /**
2619     * Support for New Radio_Dual Connectivity.
2620     *
2621     * @type { boolean }
2622     * @syscap SystemCapability.Telephony.CoreService
2623     * @systemapi Hide this for inner system use.
2624     * @since 8
2625     */
2626    isSupportEndc: boolean;
2627  }
2628
2629  /**
2630   * Obtains NR cell information.
2631   *
2632   * @interface NrCellInformation
2633   * @syscap SystemCapability.Telephony.CoreService
2634   * @systemapi Hide this for inner system use.
2635   * @since 8
2636   */
2637  export interface NrCellInformation {
2638    /**
2639     * Indicates the NR-ARFCN(NR Absolute Radio Frequency Channel Number).
2640     *
2641     * @type { number }
2642     * @syscap SystemCapability.Telephony.CoreService
2643     * @systemapi Hide this for inner system use.
2644     * @since 8
2645     */
2646    nrArfcn: number;
2647
2648    /**
2649     * Indicates the physical cell identification.
2650     *
2651     * @type { number }
2652     * @syscap SystemCapability.Telephony.CoreService
2653     * @systemapi Hide this for inner system use.
2654     * @since 8
2655     */
2656    pci: number;
2657
2658    /**
2659     * Indicates the tracking area code.
2660     *
2661     * @type { number }
2662     * @syscap SystemCapability.Telephony.CoreService
2663     * @systemapi Hide this for inner system use.
2664     * @since 8
2665     */
2666    tac: number;
2667
2668    /**
2669     * Indicates the 5G network cell ID.
2670     *
2671     * @type { number }
2672     * @syscap SystemCapability.Telephony.CoreService
2673     * @systemapi Hide this for inner system use.
2674     * @since 8
2675     */
2676    nci: number;
2677
2678    /**
2679     * Indicates the mobile country code.
2680     *
2681     * @type { string }
2682     * @syscap SystemCapability.Telephony.CoreService
2683     * @systemapi Hide this for inner system use.
2684     * @since 8
2685     */
2686    mcc: string;
2687
2688    /**
2689     * Indicates the mobile network code.
2690     *
2691     * @type { string }
2692     * @syscap SystemCapability.Telephony.CoreService
2693     * @systemapi Hide this for inner system use.
2694     * @since 8
2695     */
2696    mnc: string;
2697  }
2698
2699  /**
2700   * Obtains TDSCDMA cell information.
2701   *
2702   * @interface TdscdmaCellInformation
2703   * @syscap SystemCapability.Telephony.CoreService
2704   * @systemapi Hide this for inner system use.
2705   * @since 8
2706   */
2707  export interface TdscdmaCellInformation {
2708    /**
2709     * Indicates the location area code.
2710     *
2711     * @type { number }
2712     * @syscap SystemCapability.Telephony.CoreService
2713     * @systemapi Hide this for inner system use.
2714     * @since 8
2715     */
2716    lac: number;
2717
2718    /**
2719     * Indicates the cell ID.
2720     *
2721     * @type { number }
2722     * @syscap SystemCapability.Telephony.CoreService
2723     * @systemapi Hide this for inner system use.
2724     * @since 8
2725     */
2726    cellId: number;
2727
2728    /**
2729     * Indicates the cell parameter ID.
2730     *
2731     * @type { number }
2732     * @syscap SystemCapability.Telephony.CoreService
2733     * @systemapi Hide this for inner system use.
2734     * @since 8
2735     */
2736    cpid: number;
2737
2738    /**
2739     * Indicates the absolute radio frequency number.
2740     *
2741     * @type { number }
2742     * @syscap SystemCapability.Telephony.CoreService
2743     * @systemapi Hide this for inner system use.
2744     * @since 8
2745     */
2746    uarfcn: number;
2747
2748    /**
2749     * Indicates the mobile country code.
2750     *
2751     * @type { string }
2752     * @syscap SystemCapability.Telephony.CoreService
2753     * @systemapi Hide this for inner system use.
2754     * @since 8
2755     */
2756    mcc: string;
2757
2758    /**
2759     * Indicates the mobile network code.
2760     *
2761     * @type { string }
2762     * @syscap SystemCapability.Telephony.CoreService
2763     * @systemapi Hide this for inner system use.
2764     * @since 8
2765     */
2766    mnc: string;
2767  }
2768
2769  /**
2770   * Obtains WCDMA cell information.
2771   *
2772   * @interface WcdmaCellInformation
2773   * @syscap SystemCapability.Telephony.CoreService
2774   * @systemapi Hide this for inner system use.
2775   * @since 8
2776   */
2777  export interface WcdmaCellInformation {
2778    /**
2779     * Indicates the location area code.
2780     *
2781     * @type { number }
2782     * @syscap SystemCapability.Telephony.CoreService
2783     * @systemapi Hide this for inner system use.
2784     * @since 8
2785     */
2786    lac: number;
2787
2788    /**
2789     * Indicates the cell ID.
2790     *
2791     * @type { number }
2792     * @syscap SystemCapability.Telephony.CoreService
2793     * @systemapi Hide this for inner system use.
2794     * @since 8
2795     */
2796    cellId: number;
2797
2798    /**
2799     * Indicates the primary scrambling code.
2800     *
2801     * @type { number }
2802     * @syscap SystemCapability.Telephony.CoreService
2803     * @systemapi Hide this for inner system use.
2804     * @since 8
2805     */
2806    psc: number;
2807
2808    /**
2809     * Indicates the absolute radio frequency number.
2810     *
2811     * @type { number }
2812     * @syscap SystemCapability.Telephony.CoreService
2813     * @systemapi Hide this for inner system use.
2814     * @since 8
2815     */
2816    uarfcn: number;
2817
2818    /**
2819     * Indicates the mobile country code.
2820     *
2821     * @type { string }
2822     * @syscap SystemCapability.Telephony.CoreService
2823     * @systemapi Hide this for inner system use.
2824     * @since 8
2825     */
2826    mcc: string;
2827
2828    /**
2829     * Indicates the mobile network code.
2830     *
2831     * @type { string }
2832     * @syscap SystemCapability.Telephony.CoreService
2833     * @systemapi Hide this for inner system use.
2834     * @since 8
2835     */
2836    mnc: string;
2837  }
2838
2839  /**
2840   * Obtains the option mode of NR.
2841   *
2842   * @enum { number }
2843   * @syscap SystemCapability.Telephony.CoreService
2844   * @systemapi Hide this for inner system use.
2845   * @since 8
2846   * @deprecated since 10
2847   * @useinstead telephony.radio#NROptionMode
2848   */
2849  export enum NrOptionMode {
2850    /**
2851     * Indicates unknown NR networking mode.
2852     *
2853     * @syscap SystemCapability.Telephony.CoreService
2854     * @systemapi Hide this for inner system use.
2855     * @since 8
2856     */
2857    NR_OPTION_UNKNOWN,
2858
2859    /**
2860     * Indicates that the NR networking mode is NSA only.
2861     *
2862     * @syscap SystemCapability.Telephony.CoreService
2863     * @systemapi Hide this for inner system use.
2864     * @since 8
2865     */
2866    NR_OPTION_NSA_ONLY,
2867
2868    /**
2869     * Indicates that the NR networking mode is SA only.
2870     *
2871     * @syscap SystemCapability.Telephony.CoreService
2872     * @systemapi Hide this for inner system use.
2873     * @since 8
2874     */
2875    NR_OPTION_SA_ONLY,
2876
2877    /**
2878     * Indicates that the NR networking mode is NSA and SA.
2879     *
2880     * @syscap SystemCapability.Telephony.CoreService
2881     * @systemapi Hide this for inner system use.
2882     * @since 8
2883     */
2884    NR_OPTION_NSA_AND_SA,
2885  }
2886
2887  /**
2888   * Obtains the option mode of NR.
2889   *
2890   * @enum { number }
2891   * @syscap SystemCapability.Telephony.CoreService
2892   * @systemapi Hide this for inner system use.
2893   * @since 10
2894   */
2895  export enum NROptionMode {
2896    /**
2897     * Indicates unknown NR networking mode.
2898     *
2899     * @syscap SystemCapability.Telephony.CoreService
2900     * @systemapi Hide this for inner system use.
2901     * @since 10
2902     */
2903    NR_OPTION_UNKNOWN,
2904
2905    /**
2906     * Indicates that the NR networking mode is NSA only.
2907     *
2908     * @syscap SystemCapability.Telephony.CoreService
2909     * @systemapi Hide this for inner system use.
2910     * @since 10
2911     */
2912    NR_OPTION_NSA_ONLY,
2913
2914    /**
2915     * Indicates that the NR networking mode is SA only.
2916     *
2917     * @syscap SystemCapability.Telephony.CoreService
2918     * @systemapi Hide this for inner system use.
2919     * @since 10
2920     */
2921    NR_OPTION_SA_ONLY,
2922
2923    /**
2924     * Indicates that the NR networking mode is NSA and SA.
2925     *
2926     * @syscap SystemCapability.Telephony.CoreService
2927     * @systemapi Hide this for inner system use.
2928     * @since 10
2929     */
2930    NR_OPTION_NSA_AND_SA,
2931  }
2932
2933  /**
2934   * Obtains the network search results.
2935   *
2936   * @interface NetworkSearchResult
2937   * @syscap SystemCapability.Telephony.CoreService
2938   * @systemapi Hide this for inner system use.
2939   * @since 6
2940   */
2941  export interface NetworkSearchResult {
2942    /**
2943     * Indicates whether the network search was successful.
2944     *
2945     * @type { boolean }
2946     * @syscap SystemCapability.Telephony.CoreService
2947     * @systemapi Hide this for inner system use.
2948     * @since 6
2949     */
2950    isNetworkSearchSuccess: boolean;
2951
2952    /**
2953     * Obtains the network search results.
2954     *
2955     * @type { Array<NetworkInformation> }
2956     * @syscap SystemCapability.Telephony.CoreService
2957     * @systemapi Hide this for inner system use.
2958     * @since 6
2959     */
2960    networkSearchResult: Array<NetworkInformation>;
2961  }
2962
2963  /**
2964   * Obtains the network information.
2965   *
2966   * @interface NetworkInformation
2967   * @syscap SystemCapability.Telephony.CoreService
2968   * @systemapi Hide this for inner system use.
2969   * @since 6
2970   */
2971  export interface NetworkInformation {
2972    /**
2973     * Indicates the name of the operator.
2974     *
2975     * @type { string }
2976     * @syscap SystemCapability.Telephony.CoreService
2977     * @systemapi Hide this for inner system use.
2978     * @since 6
2979     */
2980    operatorName: string;
2981
2982    /**
2983     * Indicates the number of the operator.
2984     *
2985     * @type { string }
2986     * @syscap SystemCapability.Telephony.CoreService
2987     * @systemapi Hide this for inner system use.
2988     * @since 6
2989     */
2990    operatorNumeric: string;
2991
2992    /**
2993     * Indicates the status of network information.
2994     *
2995     * @type { NetworkInformationState }
2996     * @syscap SystemCapability.Telephony.CoreService
2997     * @systemapi Hide this for inner system use.
2998     * @since 6
2999     */
3000    state: NetworkInformationState;
3001
3002    /**
3003     * Indicates the radio Technology.
3004     *
3005     * @type { string }
3006     * @syscap SystemCapability.Telephony.CoreService
3007     * @systemapi Hide this for inner system use.
3008     * @since 6
3009     */
3010    radioTech: string;
3011  }
3012
3013  /**
3014   * Obtains network information status.
3015   *
3016   * @enum { number }
3017   * @syscap SystemCapability.Telephony.CoreService
3018   * @systemapi Hide this for inner system use.
3019   * @since 6
3020   */
3021  export enum NetworkInformationState {
3022    /**
3023     * Indicates that the network state is unknown.
3024     *
3025     * @syscap SystemCapability.Telephony.CoreService
3026     * @systemapi Hide this for inner system use.
3027     * @since 6
3028     */
3029    NETWORK_UNKNOWN,
3030
3031    /**
3032     * Indicates that the network is available for registration.
3033     *
3034     * @syscap SystemCapability.Telephony.CoreService
3035     * @systemapi Hide this for inner system use.
3036     * @since 6
3037     */
3038    NETWORK_AVAILABLE,
3039
3040    /**
3041     * Indicates that you have already registered with the network.
3042     *
3043     * @syscap SystemCapability.Telephony.CoreService
3044     * @systemapi Hide this for inner system use.
3045     * @since 6
3046     */
3047    NETWORK_CURRENT,
3048
3049    /**
3050     * Indicates that the network is unavailable for registration.
3051     *
3052     * @syscap SystemCapability.Telephony.CoreService
3053     * @systemapi Hide this for inner system use.
3054     * @since 6
3055     */
3056    NETWORK_FORBIDDEN
3057  }
3058
3059  /**
3060   * Obtains the network selection mode option.
3061   *
3062   * @interface NetworkSelectionModeOptions
3063   * @syscap SystemCapability.Telephony.CoreService
3064   * @systemapi Hide this for inner system use.
3065   * @since 6
3066   */
3067  export interface NetworkSelectionModeOptions {
3068    /**
3069     * Indicates the card slot index number, ranging from 0 to
3070     * the maximum card slot index number supported by the device.
3071     *
3072     * @type { number }
3073     * @syscap SystemCapability.Telephony.CoreService
3074     * @systemapi Hide this for inner system use.
3075     * @since 6
3076     */
3077    slotId: number;
3078
3079    /**
3080     * Indicates the network search mode of the SIM card.
3081     *
3082     * @type { NetworkSelectionMode }
3083     * @syscap SystemCapability.Telephony.CoreService
3084     * @systemapi Hide this for inner system use.
3085     * @since 6
3086     */
3087    selectMode: NetworkSelectionMode;
3088
3089    /**
3090     * Indicates the network information.
3091     *
3092     * @type { NetworkInformation }
3093     * @syscap SystemCapability.Telephony.CoreService
3094     * @systemapi Hide this for inner system use.
3095     * @since 6
3096     */
3097    networkInformation: NetworkInformation;
3098
3099    /**
3100     * Indicates whether to continue selecting the network selection mode.
3101     *
3102     * @type { boolean }
3103     * @syscap SystemCapability.Telephony.CoreService
3104     * @systemapi Hide this for inner system use.
3105     * @since 6
3106     */
3107    resumeSelection: boolean;
3108  }
3109
3110  /**
3111   * Obtains the network selection mode.
3112   *
3113   * @enum { number }
3114   * @syscap SystemCapability.Telephony.CoreService
3115   * @since 6
3116   */
3117  export enum NetworkSelectionMode {
3118    /**
3119     * Indicates that the network is unavailable for registration.
3120     *
3121     * @syscap SystemCapability.Telephony.CoreService
3122     * @since 6
3123     */
3124    NETWORK_SELECTION_UNKNOWN,
3125
3126    /**
3127     * Indicates that the network is unavailable for registration.
3128     *
3129     * @syscap SystemCapability.Telephony.CoreService
3130     * @since 6
3131     */
3132    NETWORK_SELECTION_AUTOMATIC,
3133
3134    /**
3135     * Manual network selection modes.
3136     *
3137     * @syscap SystemCapability.Telephony.CoreService
3138     * @since 6
3139     */
3140    NETWORK_SELECTION_MANUAL
3141  }
3142
3143  /**
3144   * Obtains IMS registration status.
3145   *
3146   * @enum { number }
3147   * @syscap SystemCapability.Telephony.CoreService
3148   * @systemapi Hide this for inner system use.
3149   * @since 9
3150   */
3151  export enum ImsRegState {
3152    /**
3153     * Indicates that the ims service is not registered.
3154     *
3155     * @syscap SystemCapability.Telephony.CoreService
3156     * @systemapi Hide this for inner system use.
3157     * @since 9
3158     */
3159    IMS_UNREGISTERED,
3160
3161    /**
3162     * Indicates that the ims service has been registered.
3163     *
3164     * @syscap SystemCapability.Telephony.CoreService
3165     * @systemapi Hide this for inner system use.
3166     * @since 9
3167     */
3168    IMS_REGISTERED,
3169  }
3170
3171  /**
3172   * Indicates IMS registration technology.
3173   *
3174   * @enum { number }
3175   * @syscap SystemCapability.Telephony.CoreService
3176   * @systemapi Hide this for inner system use.
3177   * @since 9
3178   */
3179  export enum ImsRegTech {
3180    /**
3181     * Indicates that ims has no registered technology.
3182     *
3183     * @syscap SystemCapability.Telephony.CoreService
3184     * @systemapi Hide this for inner system use.
3185     * @since 9
3186     */
3187    REGISTRATION_TECH_NONE,
3188
3189    /**
3190     * Indicates that ims registers LTE technology.
3191     *
3192     * @syscap SystemCapability.Telephony.CoreService
3193     * @systemapi Hide this for inner system use.
3194     * @since 9
3195     */
3196    REGISTRATION_TECH_LTE,
3197
3198    /**
3199     * Indicates that ims registers IWLAN technology.
3200     *
3201     * @syscap SystemCapability.Telephony.CoreService
3202     * @systemapi Hide this for inner system use.
3203     * @since 9
3204     */
3205    REGISTRATION_TECH_IWLAN,
3206
3207    /**
3208     * Indicates that ims registers NR technology.
3209     *
3210     * @syscap SystemCapability.Telephony.CoreService
3211     * @systemapi Hide this for inner system use.
3212     * @since 9
3213     */
3214    REGISTRATION_TECH_NR,
3215  }
3216
3217  /**
3218   * Indicates IMS registration information.
3219   *
3220   * @interface ImsRegInfo
3221   * @syscap SystemCapability.Telephony.CoreService
3222   * @systemapi Hide this for inner system use.
3223   * @since 9
3224   */
3225  export interface ImsRegInfo {
3226    /**
3227     * Indicates the registration status of the ims service.
3228     *
3229     * @type { ImsRegState }
3230     * @syscap SystemCapability.Telephony.CoreService
3231     * @systemapi Hide this for inner system use.
3232     * @since 9
3233     */
3234    imsRegState: ImsRegState;
3235
3236    /**
3237     * Indicates the mode of ims radio technology.
3238     *
3239     * @type { ImsRegTech }
3240     * @syscap SystemCapability.Telephony.CoreService
3241     * @systemapi Hide this for inner system use.
3242     * @since 9
3243     */
3244    imsRegTech: ImsRegTech;
3245  }
3246
3247  /**
3248   * Indicates the type of IMS service.
3249   *
3250   * @enum { number }
3251   * @syscap SystemCapability.Telephony.CoreService
3252   * @systemapi Hide this for inner system use.
3253   * @since 9
3254   */
3255  export enum ImsServiceType {
3256    /**
3257     * Indicates voice service.
3258     *
3259     * @syscap SystemCapability.Telephony.CoreService
3260     * @systemapi Hide this for inner system use.
3261     * @since 9
3262     */
3263    TYPE_VOICE,
3264
3265    /**
3266     * Indicates video service.
3267     *
3268     * @syscap SystemCapability.Telephony.CoreService
3269     * @systemapi Hide this for inner system use.
3270     * @since 9
3271     */
3272    TYPE_VIDEO,
3273
3274    /**
3275     * Indicates UT service.
3276     *
3277     * @syscap SystemCapability.Telephony.CoreService
3278     * @systemapi Hide this for inner system use.
3279     * @since 9
3280     */
3281    TYPE_UT,
3282
3283    /**
3284     * Indicates SMS service.
3285     *
3286     * @syscap SystemCapability.Telephony.CoreService
3287     * @systemapi Hide this for inner system use.
3288     * @since 9
3289     */
3290    TYPE_SMS,
3291  }
3292}
3293
3294export default radio;
3295