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