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