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