161847f8eSopenharmony_ci/* 261847f8eSopenharmony_ci * Copyright (C) 2021-2024 Huawei Device Co., Ltd. 361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 461847f8eSopenharmony_ci * you may not use this file except in compliance with the License. 561847f8eSopenharmony_ci * You may obtain a copy of the License at 661847f8eSopenharmony_ci * 761847f8eSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 861847f8eSopenharmony_ci * 961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and 1361847f8eSopenharmony_ci * limitations under the License. 1461847f8eSopenharmony_ci */ 1561847f8eSopenharmony_ci 1661847f8eSopenharmony_ci/** 1761847f8eSopenharmony_ci * @file 1861847f8eSopenharmony_ci * @kit TelephonyKit 1961847f8eSopenharmony_ci */ 2061847f8eSopenharmony_ci 2161847f8eSopenharmony_ciimport type { AsyncCallback } from './@ohos.base'; 2261847f8eSopenharmony_ci 2361847f8eSopenharmony_ci/** 2461847f8eSopenharmony_ci * Provides applications with APIs for obtaining SIM card status, card file information, and card specifications. 2561847f8eSopenharmony_ci * SIM cards include SIM, USIM, and CSIM cards. 2661847f8eSopenharmony_ci * 2761847f8eSopenharmony_ci * @namespace sim 2861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 2961847f8eSopenharmony_ci * @since 6 3061847f8eSopenharmony_ci */ 3161847f8eSopenharmony_cideclare namespace sim { 3261847f8eSopenharmony_ci /** 3361847f8eSopenharmony_ci * Checks whether the SIM card in a specified slot is activated. 3461847f8eSopenharmony_ci * 3561847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 3661847f8eSopenharmony_ci * ranging from {@code 0} to the maximum card slot index number supported by the device. 3761847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - Indicates the callback for checking 3861847f8eSopenharmony_ci * whether the SIM card in a specified slot is activated. 3961847f8eSopenharmony_ci * Returns {@code true} if the SIM card is activated; returns {@code false} otherwise. 4061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 4161847f8eSopenharmony_ci * @since 7 4261847f8eSopenharmony_ci */ 4361847f8eSopenharmony_ci function isSimActive(slotId: number, callback: AsyncCallback<boolean>): void; 4461847f8eSopenharmony_ci 4561847f8eSopenharmony_ci /** 4661847f8eSopenharmony_ci * Checks whether the SIM card in a specified slot is activated. 4761847f8eSopenharmony_ci * 4861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 4961847f8eSopenharmony_ci * ranging from {@code 0} to the maximum card slot index number supported by the device. 5061847f8eSopenharmony_ci * @returns { Promise<boolean> } Returns {@code true} if the SIM card is activated; returns {@code false} otherwise. 5161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 5261847f8eSopenharmony_ci * @since 7 5361847f8eSopenharmony_ci */ 5461847f8eSopenharmony_ci function isSimActive(slotId: number): Promise<boolean>; 5561847f8eSopenharmony_ci 5661847f8eSopenharmony_ci /** 5761847f8eSopenharmony_ci * Checks whether the SIM card in a specified slot is activated. 5861847f8eSopenharmony_ci * 5961847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 6061847f8eSopenharmony_ci * ranging from 0 to the maximum card slots supported by the device. 6161847f8eSopenharmony_ci * @returns { boolean } Returns {@code true} if the SIM card is activated; returns {@code false} otherwise. 6261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 6361847f8eSopenharmony_ci * @since 10 6461847f8eSopenharmony_ci */ 6561847f8eSopenharmony_ci function isSimActiveSync(slotId: number): boolean; 6661847f8eSopenharmony_ci 6761847f8eSopenharmony_ci /** 6861847f8eSopenharmony_ci * Obtains the default card slot for the voice service. 6961847f8eSopenharmony_ci * 7061847f8eSopenharmony_ci * @param { AsyncCallback<number> } callback - Indicates the callback for getting 7161847f8eSopenharmony_ci * the default card slot for the voice service. 7261847f8eSopenharmony_ci * Returns {@code 0} if card 1 is used as the default card slot for the voice service; 7361847f8eSopenharmony_ci * returns {@code 1} if card 2 is used as the default card slot for the voice service; 7461847f8eSopenharmony_ci * returns {@code -1} if no card is available for the voice service. 7561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 7661847f8eSopenharmony_ci * @since 7 7761847f8eSopenharmony_ci */ 7861847f8eSopenharmony_ci function getDefaultVoiceSlotId(callback: AsyncCallback<number>): void; 7961847f8eSopenharmony_ci 8061847f8eSopenharmony_ci /** 8161847f8eSopenharmony_ci * Obtains the default card slot for the voice service. 8261847f8eSopenharmony_ci * 8361847f8eSopenharmony_ci * @returns { Promise<number> } Returns {@code 0} if card 1 is used as the default card slot for the voice service; 8461847f8eSopenharmony_ci * returns {@code 1} if card 2 is used as the default card slot for the voice service; 8561847f8eSopenharmony_ci * returns {@code -1} if no card is available for the voice service. 8661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 8761847f8eSopenharmony_ci * @since 7 8861847f8eSopenharmony_ci */ 8961847f8eSopenharmony_ci function getDefaultVoiceSlotId(): Promise<number>; 9061847f8eSopenharmony_ci 9161847f8eSopenharmony_ci /** 9261847f8eSopenharmony_ci * Checks whether your application (the caller) has been granted the operator permissions. 9361847f8eSopenharmony_ci * 9461847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 9561847f8eSopenharmony_ci * ranging from {@code 0} to the maximum card slot index number supported by the device. 9661847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - Indicates the callback of hasOperatorPrivileges. 9761847f8eSopenharmony_ci * Returns {@code true} if your application has been granted the operator permissions; returns {@code false} otherwise. 9861847f8eSopenharmony_ci * If no SIM card is inserted or the SIM card is deactivated will be return {@code false}. 9961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 10061847f8eSopenharmony_ci * 2. Incorrect parameter types. 10161847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 10261847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 10361847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 10461847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 10561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 10661847f8eSopenharmony_ci * @since 7 10761847f8eSopenharmony_ci */ 10861847f8eSopenharmony_ci function hasOperatorPrivileges(slotId: number, callback: AsyncCallback<boolean>): void; 10961847f8eSopenharmony_ci 11061847f8eSopenharmony_ci /** 11161847f8eSopenharmony_ci * Checks whether your application (the caller) has been granted the operator permissions. 11261847f8eSopenharmony_ci * 11361847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 11461847f8eSopenharmony_ci * ranging from {@code 0} to the maximum card slot index number supported by the device. 11561847f8eSopenharmony_ci * @returns { Promise<boolean> } Returns {@code true} if your application has been granted the operator permissions; 11661847f8eSopenharmony_ci * returns {@code false} otherwise. If no SIM card is inserted or the SIM card is deactivated will be 11761847f8eSopenharmony_ci * return {@code false}. 11861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 11961847f8eSopenharmony_ci * 2. Incorrect parameter types. 12061847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 12161847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 12261847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 12361847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 12461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 12561847f8eSopenharmony_ci * @since 7 12661847f8eSopenharmony_ci */ 12761847f8eSopenharmony_ci function hasOperatorPrivileges(slotId: number): Promise<boolean>; 12861847f8eSopenharmony_ci 12961847f8eSopenharmony_ci /** 13061847f8eSopenharmony_ci * Obtains the ISO country code of the SIM card in a specified slot. 13161847f8eSopenharmony_ci * 13261847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 13361847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 13461847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the callback for getting the country code defined 13561847f8eSopenharmony_ci * in ISO 3166-2; returns an empty string if no SIM card is inserted. 13661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 13761847f8eSopenharmony_ci * 2. Incorrect parameter types. 13861847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 13961847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 14061847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 14161847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 14261847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 14361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 14461847f8eSopenharmony_ci * @since 6 14561847f8eSopenharmony_ci */ 14661847f8eSopenharmony_ci function getISOCountryCodeForSim(slotId: number, callback: AsyncCallback<string>): void; 14761847f8eSopenharmony_ci 14861847f8eSopenharmony_ci /** 14961847f8eSopenharmony_ci * Obtains the ISO country code of the SIM card in a specified slot. 15061847f8eSopenharmony_ci * 15161847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 15261847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 15361847f8eSopenharmony_ci * @returns { Promise<string> } Returns the country code defined in ISO 3166-2; 15461847f8eSopenharmony_ci * returns an empty string if no SIM card is inserted. 15561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 15661847f8eSopenharmony_ci * 2. Incorrect parameter types. 15761847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 15861847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 15961847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 16061847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 16161847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 16261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 16361847f8eSopenharmony_ci * @since 6 16461847f8eSopenharmony_ci */ 16561847f8eSopenharmony_ci function getISOCountryCodeForSim(slotId: number): Promise<string>; 16661847f8eSopenharmony_ci 16761847f8eSopenharmony_ci /** 16861847f8eSopenharmony_ci * Obtains the ISO country code of the SIM card in a specified slot. 16961847f8eSopenharmony_ci * 17061847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 17161847f8eSopenharmony_ci * ranging from 0 to the maximum card slots supported by the device. 17261847f8eSopenharmony_ci * @returns { string } Returns the country code defined in ISO 3166-2; returns an empty string if no SIM card 17361847f8eSopenharmony_ci * is inserted. 17461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 17561847f8eSopenharmony_ci * @since 10 17661847f8eSopenharmony_ci */ 17761847f8eSopenharmony_ci function getISOCountryCodeForSimSync(slotId: number): string; 17861847f8eSopenharmony_ci 17961847f8eSopenharmony_ci /** 18061847f8eSopenharmony_ci * Obtains the home PLMN number of the SIM card in a specified slot. 18161847f8eSopenharmony_ci * 18261847f8eSopenharmony_ci * <p>The value is recorded in the SIM card and is irrelevant to the network 18361847f8eSopenharmony_ci * with which the SIM card is currently registered. 18461847f8eSopenharmony_ci * 18561847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 18661847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 18761847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the callback for getting the PLMN number; 18861847f8eSopenharmony_ci * returns an empty string if no SIM card is inserted. 18961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 19061847f8eSopenharmony_ci * 2. Incorrect parameter types. 19161847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 19261847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 19361847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 19461847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 19561847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 19661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 19761847f8eSopenharmony_ci * @since 6 19861847f8eSopenharmony_ci */ 19961847f8eSopenharmony_ci function getSimOperatorNumeric(slotId: number, callback: AsyncCallback<string>): void; 20061847f8eSopenharmony_ci 20161847f8eSopenharmony_ci /** 20261847f8eSopenharmony_ci * Obtains the home PLMN number of the SIM card in a specified slot. 20361847f8eSopenharmony_ci * 20461847f8eSopenharmony_ci * <p>The value is recorded in the SIM card and is irrelevant to the network 20561847f8eSopenharmony_ci * with which the SIM card is currently registered. 20661847f8eSopenharmony_ci * 20761847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 20861847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 20961847f8eSopenharmony_ci * @returns { Promise<string> } Returns the PLMN number; returns an empty string if no SIM card is inserted. 21061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 21161847f8eSopenharmony_ci * 2. Incorrect parameter types. 21261847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 21361847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 21461847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 21561847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 21661847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 21761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 21861847f8eSopenharmony_ci * @since 6 21961847f8eSopenharmony_ci */ 22061847f8eSopenharmony_ci function getSimOperatorNumeric(slotId: number): Promise<string>; 22161847f8eSopenharmony_ci 22261847f8eSopenharmony_ci /** 22361847f8eSopenharmony_ci * Obtains the home PLMN number of the SIM card in a specified slot. 22461847f8eSopenharmony_ci * 22561847f8eSopenharmony_ci * <p>The value is recorded in the SIM card and is irrelevant to the network 22661847f8eSopenharmony_ci * with which the SIM card is currently registered. 22761847f8eSopenharmony_ci * 22861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 22961847f8eSopenharmony_ci * ranging from 0 to the maximum card slots supported by the device. 23061847f8eSopenharmony_ci * @returns { string } Returns the PLMN number; returns an empty string if no SIM card is inserted. 23161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 23261847f8eSopenharmony_ci * @since 10 23361847f8eSopenharmony_ci */ 23461847f8eSopenharmony_ci function getSimOperatorNumericSync(slotId: number): string; 23561847f8eSopenharmony_ci 23661847f8eSopenharmony_ci /** 23761847f8eSopenharmony_ci * Obtains the service provider name (SPN) of the SIM card in a specified slot. 23861847f8eSopenharmony_ci * 23961847f8eSopenharmony_ci * <p>The value is recorded in the EFSPN file of the SIM card and is irrelevant to the network 24061847f8eSopenharmony_ci * with which the SIM card is currently registered. 24161847f8eSopenharmony_ci * 24261847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 24361847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 24461847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the callback for getting the SPN; 24561847f8eSopenharmony_ci * returns an empty string if no SIM card is inserted or no EFSPN file in the SIM card. 24661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 24761847f8eSopenharmony_ci * 2. Incorrect parameter types. 24861847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 24961847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 25061847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 25161847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 25261847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 25361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 25461847f8eSopenharmony_ci * @since 6 25561847f8eSopenharmony_ci */ 25661847f8eSopenharmony_ci function getSimSpn(slotId: number, callback: AsyncCallback<string>): void; 25761847f8eSopenharmony_ci 25861847f8eSopenharmony_ci /** 25961847f8eSopenharmony_ci * Obtains the service provider name (SPN) of the SIM card in a specified slot. 26061847f8eSopenharmony_ci * 26161847f8eSopenharmony_ci * <p>The value is recorded in the EFSPN file of the SIM card and is irrelevant to the network 26261847f8eSopenharmony_ci * with which the SIM card is currently registered. 26361847f8eSopenharmony_ci * 26461847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 26561847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 26661847f8eSopenharmony_ci * @returns { Promise<string> } Returns the SPN; returns an empty string if no SIM card is inserted or 26761847f8eSopenharmony_ci * no EFSPN file in the SIM card. 26861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 26961847f8eSopenharmony_ci * 2. Incorrect parameter types. 27061847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 27161847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 27261847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 27361847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 27461847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 27561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 27661847f8eSopenharmony_ci * @since 6 27761847f8eSopenharmony_ci */ 27861847f8eSopenharmony_ci function getSimSpn(slotId: number): Promise<string>; 27961847f8eSopenharmony_ci 28061847f8eSopenharmony_ci /** 28161847f8eSopenharmony_ci * Obtains the service provider name (SPN) of the SIM card in a specified slot. 28261847f8eSopenharmony_ci * 28361847f8eSopenharmony_ci * <p>The value is recorded in the EFSPN file of the SIM card and is irrelevant to the network 28461847f8eSopenharmony_ci * with which the SIM card is currently registered. 28561847f8eSopenharmony_ci * 28661847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 28761847f8eSopenharmony_ci * ranging from 0 to the maximum card slots supported by the device. 28861847f8eSopenharmony_ci * @returns { string } Returns the SPN; returns an empty string if no EFSPN file is configured for the SIM card. 28961847f8eSopenharmony_ci * in the SIM card. 29061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 29161847f8eSopenharmony_ci * @since 10 29261847f8eSopenharmony_ci */ 29361847f8eSopenharmony_ci function getSimSpnSync(slotId: number): string; 29461847f8eSopenharmony_ci 29561847f8eSopenharmony_ci /** 29661847f8eSopenharmony_ci * Obtains the state of the SIM card in a specified slot. 29761847f8eSopenharmony_ci * 29861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 29961847f8eSopenharmony_ci * ranging from {@code 0} to the maximum card slot index number supported by the device. 30061847f8eSopenharmony_ci * @param { AsyncCallback<SimState> } callback - Indicates the callback for getting one of the following SIM card states: 30161847f8eSopenharmony_ci * <ul> 30261847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_UNKNOWN} 30361847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_NOT_PRESENT} 30461847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_LOCKED} 30561847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_NOT_READY} 30661847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_READY} 30761847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_LOADED} 30861847f8eSopenharmony_ci * </ul> 30961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 31061847f8eSopenharmony_ci * 2. Incorrect parameter types. 31161847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 31261847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 31361847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 31461847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 31561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 31661847f8eSopenharmony_ci * @since 6 31761847f8eSopenharmony_ci */ 31861847f8eSopenharmony_ci function getSimState(slotId: number, callback: AsyncCallback<SimState>): void; 31961847f8eSopenharmony_ci 32061847f8eSopenharmony_ci /** 32161847f8eSopenharmony_ci * Obtains the state of the SIM card in a specified slot. 32261847f8eSopenharmony_ci * 32361847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 32461847f8eSopenharmony_ci * ranging from {@code 0} to the maximum card slot index number supported by the device. 32561847f8eSopenharmony_ci * @returns { Promise<SimState> } Returns one of the following SIM card states: 32661847f8eSopenharmony_ci * <ul> 32761847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_UNKNOWN} 32861847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_NOT_PRESENT} 32961847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_LOCKED} 33061847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_NOT_READY} 33161847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_READY} 33261847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_LOADED} 33361847f8eSopenharmony_ci * </ul> 33461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 33561847f8eSopenharmony_ci * 2. Incorrect parameter types. 33661847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 33761847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 33861847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 33961847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 34061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 34161847f8eSopenharmony_ci * @since 6 34261847f8eSopenharmony_ci */ 34361847f8eSopenharmony_ci function getSimState(slotId: number): Promise<SimState>; 34461847f8eSopenharmony_ci 34561847f8eSopenharmony_ci /** 34661847f8eSopenharmony_ci * Obtains the state of the SIM card in a specified slot. 34761847f8eSopenharmony_ci * 34861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 34961847f8eSopenharmony_ci * ranging from 0 to the maximum card slots supported by the device. 35061847f8eSopenharmony_ci * @returns { SimState } Returns one of the following SIM card states: 35161847f8eSopenharmony_ci * <ul> 35261847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_UNKNOWN} 35361847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_NOT_PRESENT} 35461847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_LOCKED} 35561847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_NOT_READY} 35661847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_READY} 35761847f8eSopenharmony_ci * <li>{@code SimState#SIM_STATE_LOADED} 35861847f8eSopenharmony_ci * </ul> 35961847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 36061847f8eSopenharmony_ci * @since 10 36161847f8eSopenharmony_ci */ 36261847f8eSopenharmony_ci function getSimStateSync(slotId: number): SimState; 36361847f8eSopenharmony_ci 36461847f8eSopenharmony_ci /** 36561847f8eSopenharmony_ci * Obtains the type of the SIM card installed in a specified slot. 36661847f8eSopenharmony_ci * 36761847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 36861847f8eSopenharmony_ci * ranging from {@code 0} to the maximum card slot index number supported by the device. 36961847f8eSopenharmony_ci * @param { AsyncCallback<CardType> } callback - Indicates the callback for getting the SIM card type. 37061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 37161847f8eSopenharmony_ci * 2. Incorrect parameter types. 37261847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 37361847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 37461847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 37561847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 37661847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 37761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 37861847f8eSopenharmony_ci * @since 7 37961847f8eSopenharmony_ci */ 38061847f8eSopenharmony_ci function getCardType(slotId: number, callback: AsyncCallback<CardType>): void; 38161847f8eSopenharmony_ci 38261847f8eSopenharmony_ci /** 38361847f8eSopenharmony_ci * Obtains the type of the SIM card installed in a specified slot. 38461847f8eSopenharmony_ci * 38561847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 38661847f8eSopenharmony_ci * ranging from {@code 0} to the maximum card slot index number supported by the device. 38761847f8eSopenharmony_ci * @returns { Promise<CardType> } Returns the SIM card type. 38861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 38961847f8eSopenharmony_ci * 2. Incorrect parameter types. 39061847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 39161847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 39261847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 39361847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 39461847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 39561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 39661847f8eSopenharmony_ci * @since 7 39761847f8eSopenharmony_ci */ 39861847f8eSopenharmony_ci function getCardType(slotId: number): Promise<CardType>; 39961847f8eSopenharmony_ci 40061847f8eSopenharmony_ci /** 40161847f8eSopenharmony_ci * Obtains the type of the SIM card inserted in a specified slot. 40261847f8eSopenharmony_ci * 40361847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 40461847f8eSopenharmony_ci * ranging from 0 to the maximum card slots supported by the device. 40561847f8eSopenharmony_ci * @returns { CardType } Returns the SIM card type. 40661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 40761847f8eSopenharmony_ci * @since 10 40861847f8eSopenharmony_ci */ 40961847f8eSopenharmony_ci function getCardTypeSync(slotId: number): CardType; 41061847f8eSopenharmony_ci 41161847f8eSopenharmony_ci /** 41261847f8eSopenharmony_ci * Obtains the ICCID of the SIM card in a specified slot. 41361847f8eSopenharmony_ci * 41461847f8eSopenharmony_ci * <p>The ICCID is a unique identifier of a SIM card. It consists of 20 digits 41561847f8eSopenharmony_ci * and is recorded in the EFICCID file of the SIM card. 41661847f8eSopenharmony_ci * 41761847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 41861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 41961847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 42061847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the callback for getting the ICCID; 42161847f8eSopenharmony_ci * returns an empty string if no SIM card is inserted. 42261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 42361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 42461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 42561847f8eSopenharmony_ci * 2. Incorrect parameter types. 42661847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 42761847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 42861847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 42961847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 43061847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 43161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 43261847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 43361847f8eSopenharmony_ci * @since 7 43461847f8eSopenharmony_ci */ 43561847f8eSopenharmony_ci function getSimIccId(slotId: number, callback: AsyncCallback<string>): void; 43661847f8eSopenharmony_ci 43761847f8eSopenharmony_ci /** 43861847f8eSopenharmony_ci * Obtains the ICCID of the SIM card in a specified slot. 43961847f8eSopenharmony_ci * 44061847f8eSopenharmony_ci * <p>The ICCID is a unique identifier of a SIM card. It consists of 20 digits 44161847f8eSopenharmony_ci * and is recorded in the EFICCID file of the SIM card. 44261847f8eSopenharmony_ci * 44361847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 44461847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 44561847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 44661847f8eSopenharmony_ci * @returns { Promise<string> } Returns the ICCID; returns an empty string if no SIM card is inserted. 44761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 44861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 44961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 45061847f8eSopenharmony_ci * 2. Incorrect parameter types. 45161847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 45261847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 45361847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 45461847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 45561847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 45661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 45761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 45861847f8eSopenharmony_ci * @since 7 45961847f8eSopenharmony_ci */ 46061847f8eSopenharmony_ci function getSimIccId(slotId: number): Promise<string>; 46161847f8eSopenharmony_ci 46261847f8eSopenharmony_ci /** 46361847f8eSopenharmony_ci * Obtains the alpha identifier of the voice mailbox of the SIM card in a specified slot. 46461847f8eSopenharmony_ci * 46561847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 46661847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 46761847f8eSopenharmony_ci * ranging from {@code 0} to the maximum card slot index number supported by the device. 46861847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the callback for getting the voice mailbox alpha identifier; 46961847f8eSopenharmony_ci * returns an empty string if no voice mailbox alpha identifier is written into the SIM card. 47061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 47161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 47261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 47361847f8eSopenharmony_ci * 2. Incorrect parameter types. 47461847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 47561847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 47661847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 47761847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 47861847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 47961847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 48061847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 48161847f8eSopenharmony_ci * @since 8 48261847f8eSopenharmony_ci */ 48361847f8eSopenharmony_ci function getVoiceMailIdentifier(slotId: number, callback: AsyncCallback<string>): void; 48461847f8eSopenharmony_ci 48561847f8eSopenharmony_ci /** 48661847f8eSopenharmony_ci * Obtains the alpha identifier of the voice mailbox of the SIM card in a specified slot. 48761847f8eSopenharmony_ci * 48861847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 48961847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 49061847f8eSopenharmony_ci * ranging from {@code 0} to the maximum card slot index number supported by the device. 49161847f8eSopenharmony_ci * @returns { Promise<string> } Returns the voice mailbox alpha identifier; 49261847f8eSopenharmony_ci * returns an empty string if no voice mailbox alpha identifier is written into the SIM card. 49361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 49461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 49561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 49661847f8eSopenharmony_ci * 2. Incorrect parameter types. 49761847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 49861847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 49961847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 50061847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 50161847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 50261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 50361847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 50461847f8eSopenharmony_ci * @since 8 50561847f8eSopenharmony_ci */ 50661847f8eSopenharmony_ci function getVoiceMailIdentifier(slotId: number): Promise<string>; 50761847f8eSopenharmony_ci 50861847f8eSopenharmony_ci /** 50961847f8eSopenharmony_ci * Obtains the voice mailbox number of the SIM card in a specified slot. 51061847f8eSopenharmony_ci * 51161847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 51261847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 51361847f8eSopenharmony_ci * ranging from {@code 0} to the maximum card slot index number supported by the device. 51461847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the callback for getting the voice mailbox number; 51561847f8eSopenharmony_ci * returns an empty string if no voice mailbox number is written into the SIM card. 51661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 51761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 51861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 51961847f8eSopenharmony_ci * 2. Incorrect parameter types. 52061847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 52161847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 52261847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 52361847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 52461847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 52561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 52661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 52761847f8eSopenharmony_ci * @since 8 52861847f8eSopenharmony_ci */ 52961847f8eSopenharmony_ci function getVoiceMailNumber(slotId: number, callback: AsyncCallback<string>): void; 53061847f8eSopenharmony_ci 53161847f8eSopenharmony_ci /** 53261847f8eSopenharmony_ci * Obtains the voice mailbox number of the SIM card in a specified slot. 53361847f8eSopenharmony_ci * 53461847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 53561847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 53661847f8eSopenharmony_ci * ranging from {@code 0} to the maximum card slot index number supported by the device. 53761847f8eSopenharmony_ci * @returns { Promise<string> } Returns the voice mailbox number. 53861847f8eSopenharmony_ci * returns an empty string if no voice mailbox number is written into the SIM card. 53961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 54061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 54161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 54261847f8eSopenharmony_ci * 2. Incorrect parameter types. 54361847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 54461847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 54561847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 54661847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 54761847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 54861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 54961847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 55061847f8eSopenharmony_ci * @since 8 55161847f8eSopenharmony_ci */ 55261847f8eSopenharmony_ci function getVoiceMailNumber(slotId: number): Promise<string>; 55361847f8eSopenharmony_ci 55461847f8eSopenharmony_ci /** 55561847f8eSopenharmony_ci * Sets the voice mail information. 55661847f8eSopenharmony_ci * 55761847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 55861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 55961847f8eSopenharmony_ci * ranging from {@code 0} to the maximum card slot index number supported by the device. 56061847f8eSopenharmony_ci * @param { string } mailName - Indicates the name of voice mail. 56161847f8eSopenharmony_ci * @param { string } mailNumber - Indicates the number of voice mail. 56261847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setVoiceMailInfo. 56361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 56461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 56561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 56661847f8eSopenharmony_ci * 2. Incorrect parameter types. 56761847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 56861847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 56961847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 57061847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 57161847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 57261847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 57361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 57461847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 57561847f8eSopenharmony_ci * @since 8 57661847f8eSopenharmony_ci */ 57761847f8eSopenharmony_ci function setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string, callback: AsyncCallback<void>): void; 57861847f8eSopenharmony_ci 57961847f8eSopenharmony_ci /** 58061847f8eSopenharmony_ci * Sets the voice mail information. 58161847f8eSopenharmony_ci * 58261847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 58361847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 58461847f8eSopenharmony_ci * ranging from {@code 0} to the maximum card slot index number supported by the device. 58561847f8eSopenharmony_ci * @param { string } mailName - Indicates the name of voice mail. 58661847f8eSopenharmony_ci * @param { string } mailNumber - Indicates the number of voice mail. 58761847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the setVoiceMailInfo. 58861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 58961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 59061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 59161847f8eSopenharmony_ci * 2. Incorrect parameter types. 59261847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 59361847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 59461847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 59561847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 59661847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 59761847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 59861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 59961847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 60061847f8eSopenharmony_ci * @since 8 60161847f8eSopenharmony_ci */ 60261847f8eSopenharmony_ci function setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string): Promise<void>; 60361847f8eSopenharmony_ci 60461847f8eSopenharmony_ci /** 60561847f8eSopenharmony_ci * Obtains the MSISDN of the SIM card in a specified slot. 60661847f8eSopenharmony_ci * The MSISDN is recorded in the EFMSISDN file of the SIM card. 60761847f8eSopenharmony_ci * 60861847f8eSopenharmony_ci * @permission ohos.permission.GET_PHONE_NUMBERS 60961847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 61061847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 61161847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the callback for getting the MSISDN; 61261847f8eSopenharmony_ci * Returns an empty string if no SIM card is inserted or 61361847f8eSopenharmony_ci * no MSISDN is recorded in the EFMSISDN file. 61461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 61561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 61661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 61761847f8eSopenharmony_ci * 2. Incorrect parameter types. 61861847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 61961847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 62061847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 62161847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 62261847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 62361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 62461847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 62561847f8eSopenharmony_ci * @since 8 62661847f8eSopenharmony_ci */ 62761847f8eSopenharmony_ci function getSimTelephoneNumber(slotId: number, callback: AsyncCallback<string>): void; 62861847f8eSopenharmony_ci 62961847f8eSopenharmony_ci /** 63061847f8eSopenharmony_ci * Obtains the MSISDN of the SIM card in a specified slot. 63161847f8eSopenharmony_ci * The MSISDN is recorded in the EFMSISDN file of the SIM card. 63261847f8eSopenharmony_ci * 63361847f8eSopenharmony_ci * @permission ohos.permission.GET_PHONE_NUMBERS 63461847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 63561847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 63661847f8eSopenharmony_ci * @returns { Promise<string> } Returns the MSISDN; returns an empty string if no SIM card is inserted or 63761847f8eSopenharmony_ci * no MSISDN is recorded in the EFMSISDN file. 63861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 63961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 64061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 64161847f8eSopenharmony_ci * 2. Incorrect parameter types. 64261847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 64361847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 64461847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 64561847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 64661847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 64761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 64861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 64961847f8eSopenharmony_ci * @since 8 65061847f8eSopenharmony_ci */ 65161847f8eSopenharmony_ci function getSimTelephoneNumber(slotId: number): Promise<string>; 65261847f8eSopenharmony_ci 65361847f8eSopenharmony_ci /** 65461847f8eSopenharmony_ci * Obtains the Group Identifier Level 1 (GID1) of the SIM card in a specified slot. 65561847f8eSopenharmony_ci * The GID1 is recorded in the EFGID1 file of the SIM card. 65661847f8eSopenharmony_ci * 65761847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 65861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 65961847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 66061847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the callback for getting the GID1; 66161847f8eSopenharmony_ci * Returns an empty string if no SIM card is inserted or no GID1 in the SIM card. 66261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 66361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 66461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 66561847f8eSopenharmony_ci * 2. Incorrect parameter types. 66661847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 66761847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 66861847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 66961847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 67061847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 67161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 67261847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 67361847f8eSopenharmony_ci * @since 7 67461847f8eSopenharmony_ci */ 67561847f8eSopenharmony_ci function getSimGid1(slotId: number, callback: AsyncCallback<string>): void; 67661847f8eSopenharmony_ci 67761847f8eSopenharmony_ci /** 67861847f8eSopenharmony_ci * Obtains the Group Identifier Level 1 (GID1) of the SIM card in a specified slot. 67961847f8eSopenharmony_ci * The GID1 is recorded in the EFGID1 file of the SIM card. 68061847f8eSopenharmony_ci * 68161847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 68261847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 68361847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 68461847f8eSopenharmony_ci * @returns { Promise<string> } Returns the GID1; returns an empty string if no SIM card is inserted or 68561847f8eSopenharmony_ci * no GID1 in the SIM card. 68661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 68761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 68861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 68961847f8eSopenharmony_ci * 2. Incorrect parameter types. 69061847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 69161847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 69261847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 69361847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 69461847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 69561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 69661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 69761847f8eSopenharmony_ci * @since 7 69861847f8eSopenharmony_ci */ 69961847f8eSopenharmony_ci function getSimGid1(slotId: number): Promise<string>; 70061847f8eSopenharmony_ci 70161847f8eSopenharmony_ci /** 70261847f8eSopenharmony_ci * Obtains the maximum number of SIM cards that can be used simultaneously on the device, 70361847f8eSopenharmony_ci * that is, the maximum number of SIM card slots. 70461847f8eSopenharmony_ci * 70561847f8eSopenharmony_ci * @returns { number } Returns the maximum number of SIM card slots. 70661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 70761847f8eSopenharmony_ci * @since 7 70861847f8eSopenharmony_ci */ 70961847f8eSopenharmony_ci function getMaxSimCount(): number; 71061847f8eSopenharmony_ci 71161847f8eSopenharmony_ci /** 71261847f8eSopenharmony_ci * Get the international mobile subscriber ID. 71361847f8eSopenharmony_ci * 71461847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 71561847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 71661847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 71761847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the callback for getting 71861847f8eSopenharmony_ci * the international mobile subscriber ID. 71961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 72061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 72161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 72261847f8eSopenharmony_ci * 2. Incorrect parameter types. 72361847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 72461847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 72561847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 72661847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 72761847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 72861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 72961847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 73061847f8eSopenharmony_ci * @since 6 73161847f8eSopenharmony_ci */ 73261847f8eSopenharmony_ci function getIMSI(slotId: number, callback: AsyncCallback<string>): void; 73361847f8eSopenharmony_ci 73461847f8eSopenharmony_ci /** 73561847f8eSopenharmony_ci * Get the international mobile subscriber ID. 73661847f8eSopenharmony_ci * 73761847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 73861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 73961847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 74061847f8eSopenharmony_ci * @returns { Promise<string> } Returns the international mobile subscriber ID. 74161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 74261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 74361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 74461847f8eSopenharmony_ci * 2. Incorrect parameter types. 74561847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 74661847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 74761847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 74861847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 74961847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 75061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 75161847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 75261847f8eSopenharmony_ci * @since 6 75361847f8eSopenharmony_ci */ 75461847f8eSopenharmony_ci function getIMSI(slotId: number): Promise<string>; 75561847f8eSopenharmony_ci 75661847f8eSopenharmony_ci /** 75761847f8eSopenharmony_ci * Indicates whether the SIM card in a specified slot is a specified operator. 75861847f8eSopenharmony_ci * 75961847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 76061847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 76161847f8eSopenharmony_ci * @param { OperatorSimCard } operator - Indicates the operator of sim. 76261847f8eSopenharmony_ci * @returns { boolean } Returns {@code true} if the SIM card is specified operator; return {@code false} otherwise. 76361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 76461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 76561847f8eSopenharmony_ci * 2. Incorrect parameter types. 76661847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 76761847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 76861847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 76961847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 77061847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 77161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 77261847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 77361847f8eSopenharmony_ci * @since 11 77461847f8eSopenharmony_ci */ 77561847f8eSopenharmony_ci function isOperatorSimCard(slotId: number, operator: OperatorSimCard): boolean; 77661847f8eSopenharmony_ci 77761847f8eSopenharmony_ci /** 77861847f8eSopenharmony_ci * Checks whether a SIM card is inserted in a specified slot. 77961847f8eSopenharmony_ci * 78061847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 78161847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 78261847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - Indicates the callback for hasSimCard. 78361847f8eSopenharmony_ci * Returns {@code true} if a SIM card is inserted; return {@code false} otherwise. 78461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 78561847f8eSopenharmony_ci * 2. Incorrect parameter types. 78661847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 78761847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 78861847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 78961847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 79061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 79161847f8eSopenharmony_ci * @since 7 79261847f8eSopenharmony_ci */ 79361847f8eSopenharmony_ci function hasSimCard(slotId: number, callback: AsyncCallback<boolean>): void; 79461847f8eSopenharmony_ci 79561847f8eSopenharmony_ci /** 79661847f8eSopenharmony_ci * Checks whether a SIM card is inserted in a specified slot. 79761847f8eSopenharmony_ci * 79861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 79961847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 80061847f8eSopenharmony_ci * @returns { Promise<boolean> } Returns {@code true} if a SIM card is inserted; return {@code false} otherwise. 80161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 80261847f8eSopenharmony_ci * 2. Incorrect parameter types. 80361847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 80461847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 80561847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 80661847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 80761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 80861847f8eSopenharmony_ci * @since 7 80961847f8eSopenharmony_ci */ 81061847f8eSopenharmony_ci function hasSimCard(slotId: number): Promise<boolean>; 81161847f8eSopenharmony_ci 81261847f8eSopenharmony_ci /** 81361847f8eSopenharmony_ci * Checks whether a SIM card is inserted in a specified slot. 81461847f8eSopenharmony_ci * 81561847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 81661847f8eSopenharmony_ci * ranging from 0 to the maximum card slots supported by the device. 81761847f8eSopenharmony_ci * @returns { boolean } Returns {@code true} if a SIM card is inserted; return {@code false} otherwise. 81861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 81961847f8eSopenharmony_ci * @since 10 82061847f8eSopenharmony_ci */ 82161847f8eSopenharmony_ci function hasSimCardSync(slotId: number): boolean; 82261847f8eSopenharmony_ci 82361847f8eSopenharmony_ci /** 82461847f8eSopenharmony_ci * Get account information of SIM card. 82561847f8eSopenharmony_ci * 82661847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 82761847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 82861847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 82961847f8eSopenharmony_ci * @param { AsyncCallback<IccAccountInfo> } callback - Indicates the callback for 83061847f8eSopenharmony_ci * getting a {@code IccAccountInfo} object. The ICCID and phone number will be null 83161847f8eSopenharmony_ci * if has no ohos.permission.GET_TELEPHONY_STATE. 83261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 83361847f8eSopenharmony_ci * 2. Incorrect parameter types. 83461847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 83561847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 83661847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 83761847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 83861847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 83961847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 84061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 84161847f8eSopenharmony_ci * @since 10 84261847f8eSopenharmony_ci */ 84361847f8eSopenharmony_ci function getSimAccountInfo(slotId: number, callback: AsyncCallback<IccAccountInfo>): void; 84461847f8eSopenharmony_ci 84561847f8eSopenharmony_ci /** 84661847f8eSopenharmony_ci * Get account information of SIM card. 84761847f8eSopenharmony_ci * 84861847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 84961847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 85061847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 85161847f8eSopenharmony_ci * @returns { Promise<IccAccountInfo> } Returns a {@code IccAccountInfo} object. The ICCID and phone number 85261847f8eSopenharmony_ci * will be null if has no ohos.permission.GET_TELEPHONY_STATE. 85361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 85461847f8eSopenharmony_ci * 2. Incorrect parameter types. 85561847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 85661847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 85761847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 85861847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 85961847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 86061847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 86161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 86261847f8eSopenharmony_ci * @since 10 86361847f8eSopenharmony_ci */ 86461847f8eSopenharmony_ci function getSimAccountInfo(slotId: number): Promise<IccAccountInfo>; 86561847f8eSopenharmony_ci 86661847f8eSopenharmony_ci /** 86761847f8eSopenharmony_ci * Get the list of active SIM card account information. 86861847f8eSopenharmony_ci * 86961847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 87061847f8eSopenharmony_ci * @param { AsyncCallback<Array<IccAccountInfo>> } callback - The callback is used to 87161847f8eSopenharmony_ci * return the array of {@link IccAccountInfo}. The ICCID and phone number will be null 87261847f8eSopenharmony_ci * if has no ohos.permission.GET_TELEPHONY_STATE. 87361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 87461847f8eSopenharmony_ci * 2. Incorrect parameter types. 87561847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 87661847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 87761847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 87861847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 87961847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 88061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 88161847f8eSopenharmony_ci * @since 10 88261847f8eSopenharmony_ci */ 88361847f8eSopenharmony_ci function getActiveSimAccountInfoList(callback: AsyncCallback<Array<IccAccountInfo>>): void; 88461847f8eSopenharmony_ci 88561847f8eSopenharmony_ci /** 88661847f8eSopenharmony_ci * Get the list of active SIM card account information. 88761847f8eSopenharmony_ci * 88861847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 88961847f8eSopenharmony_ci * @returns { Promise<Array<IccAccountInfo>> } Returns the array of {@link IccAccountInfo}. The ICCID 89061847f8eSopenharmony_ci * and phone number will be null if has no ohos.permission.GET_TELEPHONY_STATE. 89161847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 89261847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 89361847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 89461847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 89561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 89661847f8eSopenharmony_ci * @since 10 89761847f8eSopenharmony_ci */ 89861847f8eSopenharmony_ci function getActiveSimAccountInfoList(): Promise<Array<IccAccountInfo>>; 89961847f8eSopenharmony_ci 90061847f8eSopenharmony_ci /** 90161847f8eSopenharmony_ci * Set the card slot ID of the default voice service. 90261847f8eSopenharmony_ci * 90361847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 90461847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 90561847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 90661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setDefaultVoiceSlotId. 90761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 90861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 90961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 91061847f8eSopenharmony_ci * 2. Incorrect parameter types. 91161847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 91261847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 91361847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 91461847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 91561847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 91661847f8eSopenharmony_ci * @throws { BusinessError } 8301001 - SIM card is not activated. 91761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 91861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 91961847f8eSopenharmony_ci * @since 7 92061847f8eSopenharmony_ci */ 92161847f8eSopenharmony_ci function setDefaultVoiceSlotId(slotId: number, callback: AsyncCallback<void>): void; 92261847f8eSopenharmony_ci 92361847f8eSopenharmony_ci /** 92461847f8eSopenharmony_ci * Set the card slot ID of the default voice service. 92561847f8eSopenharmony_ci * 92661847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 92761847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 92861847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 92961847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the setVoiceMailInfo. 93061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 93161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 93261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 93361847f8eSopenharmony_ci * 2. Incorrect parameter types. 93461847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 93561847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 93661847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 93761847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 93861847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 93961847f8eSopenharmony_ci * @throws { BusinessError } 8301001 - SIM card is not activated. 94061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 94161847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 94261847f8eSopenharmony_ci * @since 7 94361847f8eSopenharmony_ci */ 94461847f8eSopenharmony_ci function setDefaultVoiceSlotId(slotId: number): Promise<void>; 94561847f8eSopenharmony_ci 94661847f8eSopenharmony_ci /** 94761847f8eSopenharmony_ci * Activate the SIM card in the specified slot. 94861847f8eSopenharmony_ci * 94961847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 95061847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 95161847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 95261847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of activateSim. 95361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 95461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 95561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 95661847f8eSopenharmony_ci * 2. Incorrect parameter types. 95761847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 95861847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 95961847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 96061847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 96161847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 96261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 96361847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 96461847f8eSopenharmony_ci * @since 8 96561847f8eSopenharmony_ci */ 96661847f8eSopenharmony_ci function activateSim(slotId: number, callback: AsyncCallback<void>): void; 96761847f8eSopenharmony_ci 96861847f8eSopenharmony_ci /** 96961847f8eSopenharmony_ci * Activate the SIM card in the specified slot. 97061847f8eSopenharmony_ci * 97161847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 97261847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 97361847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 97461847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the activateSim. 97561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 97661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 97761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 97861847f8eSopenharmony_ci * 2. Incorrect parameter types. 97961847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 98061847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 98161847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 98261847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 98361847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 98461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 98561847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 98661847f8eSopenharmony_ci * @since 8 98761847f8eSopenharmony_ci */ 98861847f8eSopenharmony_ci function activateSim(slotId: number): Promise<void>; 98961847f8eSopenharmony_ci 99061847f8eSopenharmony_ci /** 99161847f8eSopenharmony_ci * Disable SIM card in specified slot. 99261847f8eSopenharmony_ci * 99361847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 99461847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 99561847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 99661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of deactivateSim. 99761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 99861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 99961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 100061847f8eSopenharmony_ci * 2. Incorrect parameter types. 100161847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 100261847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 100361847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 100461847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 100561847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 100661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 100761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 100861847f8eSopenharmony_ci * @since 8 100961847f8eSopenharmony_ci */ 101061847f8eSopenharmony_ci function deactivateSim(slotId: number, callback: AsyncCallback<void>): void; 101161847f8eSopenharmony_ci 101261847f8eSopenharmony_ci /** 101361847f8eSopenharmony_ci * Disable SIM card in specified slot. 101461847f8eSopenharmony_ci * 101561847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 101661847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 101761847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 101861847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the deactivateSim. 101961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 102061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 102161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 102261847f8eSopenharmony_ci * 2. Incorrect parameter types. 102361847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 102461847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 102561847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 102661847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 102761847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 102861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 102961847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 103061847f8eSopenharmony_ci * @since 8 103161847f8eSopenharmony_ci */ 103261847f8eSopenharmony_ci function deactivateSim(slotId: number): Promise<void>; 103361847f8eSopenharmony_ci 103461847f8eSopenharmony_ci /** 103561847f8eSopenharmony_ci * Set the SIM card display name of the specified card slot. 103661847f8eSopenharmony_ci * 103761847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 103861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 103961847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 104061847f8eSopenharmony_ci * @param { string } name - Indicates SIM card name. 104161847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setShowName. 104261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 104361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 104461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 104561847f8eSopenharmony_ci * 2. Incorrect parameter types. 104661847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 104761847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 104861847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 104961847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 105061847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 105161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 105261847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 105361847f8eSopenharmony_ci * @since 8 105461847f8eSopenharmony_ci */ 105561847f8eSopenharmony_ci function setShowName(slotId: number, name: string, callback: AsyncCallback<void>): void; 105661847f8eSopenharmony_ci 105761847f8eSopenharmony_ci /** 105861847f8eSopenharmony_ci * Set the SIM card display name of the specified card slot. 105961847f8eSopenharmony_ci * 106061847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 106161847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 106261847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 106361847f8eSopenharmony_ci * @param { string } name - Indicates SIM card name. 106461847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the setShowName. 106561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 106661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 106761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 106861847f8eSopenharmony_ci * 2. Incorrect parameter types. 106961847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 107061847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 107161847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 107261847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 107361847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 107461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 107561847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 107661847f8eSopenharmony_ci * @since 8 107761847f8eSopenharmony_ci */ 107861847f8eSopenharmony_ci function setShowName(slotId: number, name: string): Promise<void>; 107961847f8eSopenharmony_ci 108061847f8eSopenharmony_ci /** 108161847f8eSopenharmony_ci * Gets the name of the SIM card in the specified slot. 108261847f8eSopenharmony_ci * 108361847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 108461847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 108561847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 108661847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the callback for getting the SIM card name. 108761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 108861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 108961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 109061847f8eSopenharmony_ci * 2. Incorrect parameter types. 109161847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 109261847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 109361847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 109461847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 109561847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 109661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 109761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 109861847f8eSopenharmony_ci * @since 8 109961847f8eSopenharmony_ci */ 110061847f8eSopenharmony_ci function getShowName(slotId: number, callback: AsyncCallback<string>): void; 110161847f8eSopenharmony_ci 110261847f8eSopenharmony_ci /** 110361847f8eSopenharmony_ci * Gets the name of the SIM card in the specified slot. 110461847f8eSopenharmony_ci * 110561847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 110661847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 110761847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 110861847f8eSopenharmony_ci * @returns { Promise<string> } Returns the SIM card name. 110961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 111061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 111161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 111261847f8eSopenharmony_ci * 2. Incorrect parameter types. 111361847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 111461847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 111561847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 111661847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 111761847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 111861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 111961847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 112061847f8eSopenharmony_ci * @since 8 112161847f8eSopenharmony_ci */ 112261847f8eSopenharmony_ci function getShowName(slotId: number): Promise<string>; 112361847f8eSopenharmony_ci 112461847f8eSopenharmony_ci /** 112561847f8eSopenharmony_ci * Set the SIM card number in the specified slot. 112661847f8eSopenharmony_ci * 112761847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 112861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 112961847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 113061847f8eSopenharmony_ci * @param { string } number - Indicates SIM card number. 113161847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setShowNumber. 113261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 113361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 113461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 113561847f8eSopenharmony_ci * 2. Incorrect parameter types. 113661847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 113761847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 113861847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 113961847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 114061847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 114161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 114261847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 114361847f8eSopenharmony_ci * @since 8 114461847f8eSopenharmony_ci */ 114561847f8eSopenharmony_ci function setShowNumber(slotId: number, number: string, callback: AsyncCallback<void>): void; 114661847f8eSopenharmony_ci 114761847f8eSopenharmony_ci /** 114861847f8eSopenharmony_ci * Set the SIM card number in the specified slot. 114961847f8eSopenharmony_ci * 115061847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 115161847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 115261847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 115361847f8eSopenharmony_ci * @param { string } number - Indicates SIM card number. 115461847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the setShowNumber. 115561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 115661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 115761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 115861847f8eSopenharmony_ci * 2. Incorrect parameter types. 115961847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 116061847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 116161847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 116261847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 116361847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 116461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 116561847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 116661847f8eSopenharmony_ci * @since 8 116761847f8eSopenharmony_ci */ 116861847f8eSopenharmony_ci function setShowNumber(slotId: number, number: string): Promise<void>; 116961847f8eSopenharmony_ci 117061847f8eSopenharmony_ci /** 117161847f8eSopenharmony_ci * Get the SIM card number of the specified card slot. 117261847f8eSopenharmony_ci * 117361847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 117461847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 117561847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 117661847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the callback for getting the SIM card number. 117761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 117861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 117961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 118061847f8eSopenharmony_ci * 2. Incorrect parameter types. 118161847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 118261847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 118361847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 118461847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 118561847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 118661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 118761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 118861847f8eSopenharmony_ci * @since 8 118961847f8eSopenharmony_ci */ 119061847f8eSopenharmony_ci function getShowNumber(slotId: number, callback: AsyncCallback<string>): void; 119161847f8eSopenharmony_ci 119261847f8eSopenharmony_ci /** 119361847f8eSopenharmony_ci * Get the SIM card number of the specified card slot. 119461847f8eSopenharmony_ci * 119561847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 119661847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 119761847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 119861847f8eSopenharmony_ci * @returns { Promise<string> } Returns the SIM card number. 119961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 120061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 120161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 120261847f8eSopenharmony_ci * 2. Incorrect parameter types. 120361847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 120461847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 120561847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 120661847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 120761847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 120861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 120961847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 121061847f8eSopenharmony_ci * @since 8 121161847f8eSopenharmony_ci */ 121261847f8eSopenharmony_ci function getShowNumber(slotId: number): Promise<string>; 121361847f8eSopenharmony_ci 121461847f8eSopenharmony_ci /** 121561847f8eSopenharmony_ci * Obtains the operatorconfigs of the SIM card in a specified slot. 121661847f8eSopenharmony_ci * 121761847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 121861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 121961847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 122061847f8eSopenharmony_ci * @param { AsyncCallback<Array<OperatorConfig>> } callback - Indicates the callback for 122161847f8eSopenharmony_ci * getting the operatorconfigs in a specified slot; 122261847f8eSopenharmony_ci * returns empty OperatorConfig if no SIM card is inserted. 122361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 122461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 122561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 122661847f8eSopenharmony_ci * 2. Incorrect parameter types. 122761847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 122861847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 122961847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 123061847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 123161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 123261847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 123361847f8eSopenharmony_ci * @since 8 123461847f8eSopenharmony_ci */ 123561847f8eSopenharmony_ci function getOperatorConfigs(slotId: number, callback: AsyncCallback<Array<OperatorConfig>>): void; 123661847f8eSopenharmony_ci 123761847f8eSopenharmony_ci /** 123861847f8eSopenharmony_ci * Obtains the operatorconfigs of the SIM card in a specified slot. 123961847f8eSopenharmony_ci * 124061847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 124161847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 124261847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 124361847f8eSopenharmony_ci * @returns { Promise<Array<OperatorConfig>> } Returns the operatorconfigs in a specified slot; 124461847f8eSopenharmony_ci * returns empty OperatorConfig if no SIM card is inserted. 124561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 124661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 124761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 124861847f8eSopenharmony_ci * 2. Incorrect parameter types. 124961847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 125061847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 125161847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 125261847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 125361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 125461847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 125561847f8eSopenharmony_ci * @since 8 125661847f8eSopenharmony_ci */ 125761847f8eSopenharmony_ci function getOperatorConfigs(slotId: number): Promise<Array<OperatorConfig>>; 125861847f8eSopenharmony_ci 125961847f8eSopenharmony_ci /** 126061847f8eSopenharmony_ci * Unlock the SIM card password of the specified card slot. 126161847f8eSopenharmony_ci * 126261847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 126361847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 126461847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 126561847f8eSopenharmony_ci * @param { string } pin - Indicates the password of the SIM card. 126661847f8eSopenharmony_ci * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback for getting 126761847f8eSopenharmony_ci * the response to obtain the SIM card lock status of the specified card slot. 126861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 126961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 127061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 127161847f8eSopenharmony_ci * 2. Incorrect parameter types. 127261847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 127361847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 127461847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 127561847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 127661847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 127761847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 127861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 127961847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 128061847f8eSopenharmony_ci * @since 7 128161847f8eSopenharmony_ci */ 128261847f8eSopenharmony_ci function unlockPin(slotId: number, pin: string, callback: AsyncCallback<LockStatusResponse>): void; 128361847f8eSopenharmony_ci 128461847f8eSopenharmony_ci /** 128561847f8eSopenharmony_ci * Unlock the SIM card password of the specified card slot. 128661847f8eSopenharmony_ci * 128761847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 128861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 128961847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 129061847f8eSopenharmony_ci * @param { string } pin - Indicates the password of the SIM card. 129161847f8eSopenharmony_ci * @returns { Promise<LockStatusResponse> } Returns the response to obtain 129261847f8eSopenharmony_ci * the SIM card lock status of the specified card slot. 129361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 129461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 129561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 129661847f8eSopenharmony_ci * 2. Incorrect parameter types. 129761847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 129861847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 129961847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 130061847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 130161847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 130261847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 130361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 130461847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 130561847f8eSopenharmony_ci * @since 7 130661847f8eSopenharmony_ci */ 130761847f8eSopenharmony_ci function unlockPin(slotId: number, pin: string): Promise<LockStatusResponse>; 130861847f8eSopenharmony_ci 130961847f8eSopenharmony_ci /** 131061847f8eSopenharmony_ci * Unlock the SIM card password in the specified card slot. 131161847f8eSopenharmony_ci * 131261847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 131361847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 131461847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 131561847f8eSopenharmony_ci * @param { string } newPin - Indicates to reset the SIM card password. 131661847f8eSopenharmony_ci * @param { string } puk - Indicates the unlock password of the SIM card password. 131761847f8eSopenharmony_ci * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback for getting 131861847f8eSopenharmony_ci * the response to obtain the SIM card lock status of the specified card slot. 131961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 132061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 132161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 132261847f8eSopenharmony_ci * 2. Incorrect parameter types. 132361847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 132461847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 132561847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 132661847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 132761847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 132861847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 132961847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 133061847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 133161847f8eSopenharmony_ci * @since 7 133261847f8eSopenharmony_ci */ 133361847f8eSopenharmony_ci function unlockPuk(slotId: number, newPin: string, puk: string, callback: AsyncCallback<LockStatusResponse>): void; 133461847f8eSopenharmony_ci 133561847f8eSopenharmony_ci /** 133661847f8eSopenharmony_ci * Unlock the SIM card password in the specified card slot. 133761847f8eSopenharmony_ci * 133861847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 133961847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 134061847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 134161847f8eSopenharmony_ci * @param { string } newPin - Indicates to reset the SIM card password. 134261847f8eSopenharmony_ci * @param { string } puk - Indicates the unlock password of the SIM card password. 134361847f8eSopenharmony_ci * @returns { Promise<LockStatusResponse> } Returns the response to obtain 134461847f8eSopenharmony_ci * the SIM card lock status of the specified card slot. 134561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 134661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 134761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 134861847f8eSopenharmony_ci * 2. Incorrect parameter types. 134961847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 135061847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 135161847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 135261847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 135361847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 135461847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 135561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 135661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 135761847f8eSopenharmony_ci * @since 7 135861847f8eSopenharmony_ci */ 135961847f8eSopenharmony_ci function unlockPuk(slotId: number, newPin: string, puk: string): Promise<LockStatusResponse>; 136061847f8eSopenharmony_ci 136161847f8eSopenharmony_ci /** 136261847f8eSopenharmony_ci * Change Pin Password. 136361847f8eSopenharmony_ci * 136461847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 136561847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 136661847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 136761847f8eSopenharmony_ci * @param { string } newPin - Indicates a new password. 136861847f8eSopenharmony_ci * @param { string } oldPin - Indicates old password. 136961847f8eSopenharmony_ci * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback for getting 137061847f8eSopenharmony_ci * the response to obtain the SIM card lock status of the specified card slot. 137161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 137261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 137361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 137461847f8eSopenharmony_ci * 2. Incorrect parameter types. 137561847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 137661847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 137761847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 137861847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 137961847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 138061847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 138161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 138261847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 138361847f8eSopenharmony_ci * @since 7 138461847f8eSopenharmony_ci */ 138561847f8eSopenharmony_ci function alterPin(slotId: number, newPin: string, oldPin: string, callback: AsyncCallback<LockStatusResponse>): void; 138661847f8eSopenharmony_ci 138761847f8eSopenharmony_ci /** 138861847f8eSopenharmony_ci * Change Pin Password. 138961847f8eSopenharmony_ci * 139061847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 139161847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 139261847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 139361847f8eSopenharmony_ci * @param { string } newPin - Indicates a new password. 139461847f8eSopenharmony_ci * @param { string } oldPin - Indicates old password. 139561847f8eSopenharmony_ci * @returns { Promise<LockStatusResponse> } Returns the response to obtain 139661847f8eSopenharmony_ci * the SIM card lock status of the specified card slot. 139761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 139861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 139961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 140061847f8eSopenharmony_ci * 2. Incorrect parameter types. 140161847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 140261847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 140361847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 140461847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 140561847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 140661847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 140761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 140861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 140961847f8eSopenharmony_ci * @since 7 141061847f8eSopenharmony_ci */ 141161847f8eSopenharmony_ci function alterPin(slotId: number, newPin: string, oldPin: string): Promise<LockStatusResponse>; 141261847f8eSopenharmony_ci 141361847f8eSopenharmony_ci /** 141461847f8eSopenharmony_ci * Set the lock status of the SIM card in the specified slot. 141561847f8eSopenharmony_ci * 141661847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 141761847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 141861847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 141961847f8eSopenharmony_ci * @param { LockInfo } options - Indicates lock information. 142061847f8eSopenharmony_ci * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback for getting 142161847f8eSopenharmony_ci * the response to obtain the SIM card lock status of the specified card slot. 142261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 142361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 142461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 142561847f8eSopenharmony_ci * 2. Incorrect parameter types. 142661847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 142761847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 142861847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 142961847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 143061847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 143161847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 143261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 143361847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 143461847f8eSopenharmony_ci * @since 7 143561847f8eSopenharmony_ci */ 143661847f8eSopenharmony_ci function setLockState(slotId: number, options: LockInfo, callback: AsyncCallback<LockStatusResponse>): void; 143761847f8eSopenharmony_ci 143861847f8eSopenharmony_ci /** 143961847f8eSopenharmony_ci * Set the lock status of the SIM card in the specified slot. 144061847f8eSopenharmony_ci * 144161847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 144261847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 144361847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 144461847f8eSopenharmony_ci * @param { LockInfo } options - Indicates lock information. 144561847f8eSopenharmony_ci * @returns { Promise<LockStatusResponse> } Returns the response to obtain 144661847f8eSopenharmony_ci * the SIM card lock status of the specified card slot. 144761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 144861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 144961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 145061847f8eSopenharmony_ci * 2. Incorrect parameter types. 145161847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 145261847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 145361847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 145461847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 145561847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 145661847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 145761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 145861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 145961847f8eSopenharmony_ci * @since 7 146061847f8eSopenharmony_ci */ 146161847f8eSopenharmony_ci function setLockState(slotId: number, options: LockInfo): Promise<LockStatusResponse>; 146261847f8eSopenharmony_ci 146361847f8eSopenharmony_ci /** 146461847f8eSopenharmony_ci * Unlock the SIM card password of the specified card slot. 146561847f8eSopenharmony_ci * 146661847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 146761847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 146861847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 146961847f8eSopenharmony_ci * @param { string } pin2 - Indicates the password of the SIM card. 147061847f8eSopenharmony_ci * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback for getting 147161847f8eSopenharmony_ci * the response to obtain the SIM card lock status of the specified card slot. 147261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 147361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 147461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 147561847f8eSopenharmony_ci * 2. Incorrect parameter types. 147661847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 147761847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 147861847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 147961847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 148061847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 148161847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 148261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 148361847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 148461847f8eSopenharmony_ci * @since 8 148561847f8eSopenharmony_ci */ 148661847f8eSopenharmony_ci function unlockPin2(slotId: number, pin2: string, callback: AsyncCallback<LockStatusResponse>): void; 148761847f8eSopenharmony_ci 148861847f8eSopenharmony_ci /** 148961847f8eSopenharmony_ci * Unlock the SIM card password of the specified card slot. 149061847f8eSopenharmony_ci * 149161847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 149261847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 149361847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 149461847f8eSopenharmony_ci * @param { string } pin2 - Indicates the password of the SIM card. 149561847f8eSopenharmony_ci * @returns { Promise<LockStatusResponse> } Returns the response to obtain 149661847f8eSopenharmony_ci * the SIM card lock status of the specified card slot. 149761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 149861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 149961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 150061847f8eSopenharmony_ci * 2. Incorrect parameter types. 150161847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 150261847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 150361847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 150461847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 150561847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 150661847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 150761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 150861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 150961847f8eSopenharmony_ci * @since 8 151061847f8eSopenharmony_ci */ 151161847f8eSopenharmony_ci function unlockPin2(slotId: number, pin2: string): Promise<LockStatusResponse>; 151261847f8eSopenharmony_ci 151361847f8eSopenharmony_ci /** 151461847f8eSopenharmony_ci * Unlock the SIM card password in the specified card slot. 151561847f8eSopenharmony_ci * 151661847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 151761847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 151861847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 151961847f8eSopenharmony_ci * @param { string } newPin2 - Indicates to reset the SIM card password. 152061847f8eSopenharmony_ci * @param { string } puk2 - Indicates the unlock password of the SIM card password. 152161847f8eSopenharmony_ci * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback for getting 152261847f8eSopenharmony_ci * the response to obtain the SIM card lock status of the specified card slot. 152361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 152461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 152561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 152661847f8eSopenharmony_ci * 2. Incorrect parameter types. 152761847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 152861847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 152961847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 153061847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 153161847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 153261847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 153361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 153461847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 153561847f8eSopenharmony_ci * @since 8 153661847f8eSopenharmony_ci */ 153761847f8eSopenharmony_ci function unlockPuk2(slotId: number, newPin2: string, puk2: string, callback: AsyncCallback<LockStatusResponse>): void; 153861847f8eSopenharmony_ci 153961847f8eSopenharmony_ci /** 154061847f8eSopenharmony_ci * Unlock the SIM card password in the specified card slot. 154161847f8eSopenharmony_ci * 154261847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 154361847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 154461847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 154561847f8eSopenharmony_ci * @param { string } newPin2 - Indicates to reset the SIM card password. 154661847f8eSopenharmony_ci * @param { string } puk2 - Indicates the unlock password of the SIM card password. 154761847f8eSopenharmony_ci * @returns { Promise<LockStatusResponse> } Returns the response to obtain 154861847f8eSopenharmony_ci * the SIM card lock status of the specified card slot. 154961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 155061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 155161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 155261847f8eSopenharmony_ci * 2. Incorrect parameter types. 155361847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 155461847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 155561847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 155661847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 155761847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 155861847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 155961847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 156061847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 156161847f8eSopenharmony_ci * @since 8 156261847f8eSopenharmony_ci */ 156361847f8eSopenharmony_ci function unlockPuk2(slotId: number, newPin2: string, puk2: string): Promise<LockStatusResponse>; 156461847f8eSopenharmony_ci 156561847f8eSopenharmony_ci /** 156661847f8eSopenharmony_ci * Change Pin2 password. 156761847f8eSopenharmony_ci * 156861847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 156961847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 157061847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 157161847f8eSopenharmony_ci * @param { string } newPin2 - Indicates a new password. 157261847f8eSopenharmony_ci * @param { string } oldPin2 - Indicates old password. 157361847f8eSopenharmony_ci * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback for getting 157461847f8eSopenharmony_ci * the response to obtain the SIM card lock status of the specified card slot. 157561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 157661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 157761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 157861847f8eSopenharmony_ci * 2. Incorrect parameter types. 157961847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 158061847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 158161847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 158261847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 158361847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 158461847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 158561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 158661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 158761847f8eSopenharmony_ci * @since 8 158861847f8eSopenharmony_ci */ 158961847f8eSopenharmony_ci function alterPin2(slotId: number, newPin2: string, oldPin2: string, callback: AsyncCallback<LockStatusResponse>): void; 159061847f8eSopenharmony_ci 159161847f8eSopenharmony_ci /** 159261847f8eSopenharmony_ci * Change Pin2 password. 159361847f8eSopenharmony_ci * 159461847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 159561847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 159661847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 159761847f8eSopenharmony_ci * @param { string } newPin2 - Indicates a new password. 159861847f8eSopenharmony_ci * @param { string } oldPin2 - Indicates old password. 159961847f8eSopenharmony_ci * @returns { Promise<LockStatusResponse> } Returns the response to obtain 160061847f8eSopenharmony_ci * the SIM card lock status of the specified card slot. 160161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 160261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 160361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 160461847f8eSopenharmony_ci * 2. Incorrect parameter types. 160561847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 160661847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 160761847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 160861847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 160961847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 161061847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 161161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 161261847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 161361847f8eSopenharmony_ci * @since 8 161461847f8eSopenharmony_ci */ 161561847f8eSopenharmony_ci function alterPin2(slotId: number, newPin2: string, oldPin2: string): Promise<LockStatusResponse>; 161661847f8eSopenharmony_ci 161761847f8eSopenharmony_ci /** 161861847f8eSopenharmony_ci * Query dialing number information on SIM card. 161961847f8eSopenharmony_ci * 162061847f8eSopenharmony_ci * @permission ohos.permission.READ_CONTACTS 162161847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 162261847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 162361847f8eSopenharmony_ci * @param { ContactType } type - Indicates contact type. 162461847f8eSopenharmony_ci * @param { AsyncCallback<Array<DiallingNumbersInfo>> } callback - Indicates the callback for 162561847f8eSopenharmony_ci * getting the dialing number information. 162661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 162761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 162861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 162961847f8eSopenharmony_ci * 2. Incorrect parameter types. 163061847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 163161847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 163261847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 163361847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 163461847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 163561847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 163661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 163761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 163861847f8eSopenharmony_ci * @since 8 163961847f8eSopenharmony_ci */ 164061847f8eSopenharmony_ci function queryIccDiallingNumbers(slotId: number, type: ContactType, callback: AsyncCallback<Array<DiallingNumbersInfo>>): void; 164161847f8eSopenharmony_ci 164261847f8eSopenharmony_ci /** 164361847f8eSopenharmony_ci * Query dialing number information on SIM card. 164461847f8eSopenharmony_ci * 164561847f8eSopenharmony_ci * @permission ohos.permission.READ_CONTACTS 164661847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 164761847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 164861847f8eSopenharmony_ci * @param { ContactType } type - Indicates contact type. 164961847f8eSopenharmony_ci * @returns { Promise<Array<DiallingNumbersInfo>> } Returns the dialing number information. 165061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 165161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 165261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 165361847f8eSopenharmony_ci * 2. Incorrect parameter types. 165461847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 165561847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 165661847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 165761847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 165861847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 165961847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 166061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 166161847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 166261847f8eSopenharmony_ci * @since 8 166361847f8eSopenharmony_ci */ 166461847f8eSopenharmony_ci function queryIccDiallingNumbers(slotId: number, type: ContactType): Promise<Array<DiallingNumbersInfo>>; 166561847f8eSopenharmony_ci 166661847f8eSopenharmony_ci /** 166761847f8eSopenharmony_ci * Add dialing number information to SIM card. 166861847f8eSopenharmony_ci * 166961847f8eSopenharmony_ci * @permission ohos.permission.WRITE_CONTACTS 167061847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 167161847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 167261847f8eSopenharmony_ci * @param { ContactType } type - Indicates contact type. 167361847f8eSopenharmony_ci * @param { DiallingNumbersInfo } diallingNumbers - Indicates dialing number information. 167461847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of addIccDiallingNumbers. 167561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 167661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 167761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 167861847f8eSopenharmony_ci * 2. Incorrect parameter types. 167961847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 168061847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 168161847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 168261847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 168361847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 168461847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 168561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 168661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 168761847f8eSopenharmony_ci * @since 8 168861847f8eSopenharmony_ci */ 168961847f8eSopenharmony_ci function addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo, callback: AsyncCallback<void>): void; 169061847f8eSopenharmony_ci 169161847f8eSopenharmony_ci /** 169261847f8eSopenharmony_ci * Add dialing number information to SIM card. 169361847f8eSopenharmony_ci * 169461847f8eSopenharmony_ci * @permission ohos.permission.WRITE_CONTACTS 169561847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 169661847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 169761847f8eSopenharmony_ci * @param { ContactType } type - Indicates contact type. 169861847f8eSopenharmony_ci * @param { DiallingNumbersInfo } diallingNumbers - Indicates dialing number information. 169961847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the addIccDiallingNumbers. 170061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 170161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 170261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 170361847f8eSopenharmony_ci * 2. Incorrect parameter types. 170461847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 170561847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 170661847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 170761847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 170861847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 170961847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 171061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 171161847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 171261847f8eSopenharmony_ci * @since 8 171361847f8eSopenharmony_ci */ 171461847f8eSopenharmony_ci function addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo): Promise<void>; 171561847f8eSopenharmony_ci 171661847f8eSopenharmony_ci /** 171761847f8eSopenharmony_ci * Delete dialing number information on SIM card. 171861847f8eSopenharmony_ci * 171961847f8eSopenharmony_ci * @permission ohos.permission.WRITE_CONTACTS 172061847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 172161847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 172261847f8eSopenharmony_ci * @param { ContactType } type - Indicates contact type. 172361847f8eSopenharmony_ci * @param { DiallingNumbersInfo } diallingNumbers - Indicates dialing number information. 172461847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of delIccDiallingNumbers. 172561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 172661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 172761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 172861847f8eSopenharmony_ci * 2. Incorrect parameter types. 172961847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 173061847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 173161847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 173261847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 173361847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 173461847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 173561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 173661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 173761847f8eSopenharmony_ci * @since 8 173861847f8eSopenharmony_ci */ 173961847f8eSopenharmony_ci function delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo, callback: AsyncCallback<void>): void; 174061847f8eSopenharmony_ci 174161847f8eSopenharmony_ci /** 174261847f8eSopenharmony_ci * Delete dialing number information on SIM card. 174361847f8eSopenharmony_ci * 174461847f8eSopenharmony_ci * @permission ohos.permission.WRITE_CONTACTS 174561847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 174661847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 174761847f8eSopenharmony_ci * @param { ContactType } type - Indicates contact type. 174861847f8eSopenharmony_ci * @param { DiallingNumbersInfo } diallingNumbers - Indicates dialing number information. 174961847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the delIccDiallingNumbers. 175061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 175161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 175261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 175361847f8eSopenharmony_ci * 2. Incorrect parameter types. 175461847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 175561847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 175661847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 175761847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 175861847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 175961847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 176061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 176161847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 176261847f8eSopenharmony_ci * @since 8 176361847f8eSopenharmony_ci */ 176461847f8eSopenharmony_ci function delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo): Promise<void>; 176561847f8eSopenharmony_ci 176661847f8eSopenharmony_ci /** 176761847f8eSopenharmony_ci * Update dialing number information on SIM card. 176861847f8eSopenharmony_ci * 176961847f8eSopenharmony_ci * @permission ohos.permission.WRITE_CONTACTS 177061847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 177161847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 177261847f8eSopenharmony_ci * @param { ContactType } type - Indicates contact type. 177361847f8eSopenharmony_ci * @param { DiallingNumbersInfo } diallingNumbers - Indicates dialing number information. 177461847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of updateIccDiallingNumbers. 177561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 177661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 177761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 177861847f8eSopenharmony_ci * 2. Incorrect parameter types. 177961847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 178061847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 178161847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 178261847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 178361847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 178461847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 178561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 178661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 178761847f8eSopenharmony_ci * @since 8 178861847f8eSopenharmony_ci */ 178961847f8eSopenharmony_ci function updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo, callback: AsyncCallback<void>): void; 179061847f8eSopenharmony_ci 179161847f8eSopenharmony_ci /** 179261847f8eSopenharmony_ci * Update dialing number information on SIM card. 179361847f8eSopenharmony_ci * 179461847f8eSopenharmony_ci * @permission ohos.permission.WRITE_CONTACTS 179561847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 179661847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 179761847f8eSopenharmony_ci * @param { ContactType } type - Indicates contact type. 179861847f8eSopenharmony_ci * @param { DiallingNumbersInfo } diallingNumbers - Indicates dialing number information. 179961847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the updateIccDiallingNumbers. 180061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 180161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 180261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 180361847f8eSopenharmony_ci * 2. Incorrect parameter types. 180461847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 180561847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 180661847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 180761847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 180861847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 180961847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 181061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 181161847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 181261847f8eSopenharmony_ci * @since 8 181361847f8eSopenharmony_ci */ 181461847f8eSopenharmony_ci function updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo): Promise<void>; 181561847f8eSopenharmony_ci 181661847f8eSopenharmony_ci /** 181761847f8eSopenharmony_ci * Get the lock status of the SIM card in the specified slot. 181861847f8eSopenharmony_ci * 181961847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 182061847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 182161847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 182261847f8eSopenharmony_ci * @param { LockType } lockType - Indicates the lock type. 182361847f8eSopenharmony_ci * @param { AsyncCallback<LockState> } callback - Indicates the callback for getting the sim card lock status. 182461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 182561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 182661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 182761847f8eSopenharmony_ci * 2. Incorrect parameter types. 182861847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 182961847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 183061847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 183161847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 183261847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 183361847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 183461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 183561847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 183661847f8eSopenharmony_ci * @since 8 183761847f8eSopenharmony_ci */ 183861847f8eSopenharmony_ci function getLockState(slotId: number, lockType: LockType, callback: AsyncCallback<LockState>): void; 183961847f8eSopenharmony_ci 184061847f8eSopenharmony_ci /** 184161847f8eSopenharmony_ci * Get the lock status of the SIM card in the specified slot. 184261847f8eSopenharmony_ci * 184361847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 184461847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 184561847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 184661847f8eSopenharmony_ci * @param { LockType } lockType - Indicates the lock type. 184761847f8eSopenharmony_ci * @returns { Promise<LockState> } Returns the sim card lock status. 184861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 184961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 185061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 185161847f8eSopenharmony_ci * 2. Incorrect parameter types. 185261847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 185361847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 185461847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 185561847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 185661847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 185761847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 185861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 185961847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 186061847f8eSopenharmony_ci * @since 8 186161847f8eSopenharmony_ci */ 186261847f8eSopenharmony_ci function getLockState(slotId: number, lockType: LockType): Promise<LockState>; 186361847f8eSopenharmony_ci 186461847f8eSopenharmony_ci /** 186561847f8eSopenharmony_ci * Send envelope command to SIM card. 186661847f8eSopenharmony_ci * 186761847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 186861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 186961847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 187061847f8eSopenharmony_ci * @param { string } cmd - Indicates sending command. 187161847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of sendEnvelopeCmd. 187261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 187361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 187461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 187561847f8eSopenharmony_ci * 2. Incorrect parameter types. 187661847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 187761847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 187861847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 187961847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 188061847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 188161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 188261847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 188361847f8eSopenharmony_ci * @since 8 188461847f8eSopenharmony_ci */ 188561847f8eSopenharmony_ci function sendEnvelopeCmd(slotId: number, cmd: string, callback: AsyncCallback<void>): void; 188661847f8eSopenharmony_ci 188761847f8eSopenharmony_ci /** 188861847f8eSopenharmony_ci * Send envelope command to SIM card. 188961847f8eSopenharmony_ci * 189061847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 189161847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 189261847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 189361847f8eSopenharmony_ci * @param { string } cmd - Indicates sending command. 189461847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the sendEnvelopeCmd. 189561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 189661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 189761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 189861847f8eSopenharmony_ci * 2. Incorrect parameter types. 189961847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 190061847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 190161847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 190261847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 190361847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 190461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 190561847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 190661847f8eSopenharmony_ci * @since 8 190761847f8eSopenharmony_ci */ 190861847f8eSopenharmony_ci function sendEnvelopeCmd(slotId: number, cmd: string): Promise<void>; 190961847f8eSopenharmony_ci 191061847f8eSopenharmony_ci /** 191161847f8eSopenharmony_ci * Send terminal response command to SIM card. 191261847f8eSopenharmony_ci * 191361847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 191461847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 191561847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 191661847f8eSopenharmony_ci * @param { string } cmd - Indicates sending command. 191761847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of sendTerminalResponseCmd. 191861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 191961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 192061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 192161847f8eSopenharmony_ci * 2. Incorrect parameter types. 192261847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 192361847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 192461847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 192561847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 192661847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 192761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 192861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 192961847f8eSopenharmony_ci * @since 8 193061847f8eSopenharmony_ci */ 193161847f8eSopenharmony_ci function sendTerminalResponseCmd(slotId: number, cmd: string, callback: AsyncCallback<void>): void; 193261847f8eSopenharmony_ci 193361847f8eSopenharmony_ci /** 193461847f8eSopenharmony_ci * Send terminal response command to SIM card. 193561847f8eSopenharmony_ci * 193661847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 193761847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 193861847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 193961847f8eSopenharmony_ci * @param { string } cmd - Indicates sending command. 194061847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the sendTerminalResponseCmd. 194161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 194261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 194361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 194461847f8eSopenharmony_ci * 2. Incorrect parameter types. 194561847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 194661847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 194761847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 194861847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 194961847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 195061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 195161847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 195261847f8eSopenharmony_ci * @since 8 195361847f8eSopenharmony_ci */ 195461847f8eSopenharmony_ci function sendTerminalResponseCmd(slotId: number, cmd: string): Promise<void>; 195561847f8eSopenharmony_ci 195661847f8eSopenharmony_ci 195761847f8eSopenharmony_ci /** 195861847f8eSopenharmony_ci * Unlock SIM card. 195961847f8eSopenharmony_ci * 196061847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 196161847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 196261847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 196361847f8eSopenharmony_ci * @param { PersoLockInfo } lockInfo - Indicates customized lock type information. 196461847f8eSopenharmony_ci * @param { AsyncCallback<LockStatusResponse> } callback - Indicates the callback used to obtain a response 196561847f8eSopenharmony_ci * to obtain the SIM card lock status for the specified card slot. 196661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 196761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 196861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 196961847f8eSopenharmony_ci * 2. Incorrect parameter types. 197061847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 197161847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 197261847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 197361847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 197461847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 197561847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 197661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 197761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 197861847f8eSopenharmony_ci * @since 8 197961847f8eSopenharmony_ci */ 198061847f8eSopenharmony_ci function unlockSimLock(slotId: number, lockInfo: PersoLockInfo, callback: AsyncCallback<LockStatusResponse>): void; 198161847f8eSopenharmony_ci 198261847f8eSopenharmony_ci /** 198361847f8eSopenharmony_ci * Unlock SIM card. 198461847f8eSopenharmony_ci * 198561847f8eSopenharmony_ci * @permission ohos.permission.SET_TELEPHONY_STATE 198661847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 198761847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 198861847f8eSopenharmony_ci * @param { PersoLockInfo } lockInfo - Indicates customized lock type information. 198961847f8eSopenharmony_ci * @returns { Promise<LockStatusResponse> } Returns the response to obtain 199061847f8eSopenharmony_ci * the SIM card lock status of the specified card slot. 199161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 199261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 199361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 199461847f8eSopenharmony_ci * 2. Incorrect parameter types. 199561847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 199661847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 199761847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 199861847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 199961847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 200061847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - The SIM card failed to read or update data. 200161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 200261847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 200361847f8eSopenharmony_ci * @since 8 200461847f8eSopenharmony_ci */ 200561847f8eSopenharmony_ci function unlockSimLock(slotId: number, lockInfo: PersoLockInfo): Promise<LockStatusResponse>; 200661847f8eSopenharmony_ci 200761847f8eSopenharmony_ci /** 200861847f8eSopenharmony_ci * Obtains the operator key of the SIM card in a specified slot. 200961847f8eSopenharmony_ci * 201061847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 201161847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 201261847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the callback for getting the operator key; 201361847f8eSopenharmony_ci * Returns an empty string if no SIM card is inserted or no operator key matched. 201461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 201561847f8eSopenharmony_ci * 2. Incorrect parameter types. 201661847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 201761847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 201861847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 201961847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 202061847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 202161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 202261847f8eSopenharmony_ci * @since 9 202361847f8eSopenharmony_ci */ 202461847f8eSopenharmony_ci function getOpKey(slotId: number, callback: AsyncCallback<string>): void; 202561847f8eSopenharmony_ci 202661847f8eSopenharmony_ci /** 202761847f8eSopenharmony_ci * Obtains the operator key of the SIM card in a specified slot. 202861847f8eSopenharmony_ci * 202961847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 203061847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 203161847f8eSopenharmony_ci * @returns { Promise<string> } Returns the operator key; 203261847f8eSopenharmony_ci * Returns an empty string if no SIM card is inserted or no operator key matched. 203361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 203461847f8eSopenharmony_ci * 2. Incorrect parameter types. 203561847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 203661847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 203761847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 203861847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 203961847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 204061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 204161847f8eSopenharmony_ci * @since 9 204261847f8eSopenharmony_ci */ 204361847f8eSopenharmony_ci function getOpKey(slotId: number): Promise<string>; 204461847f8eSopenharmony_ci 204561847f8eSopenharmony_ci /** 204661847f8eSopenharmony_ci * Obtains the operator key of the SIM card in a specified slot. 204761847f8eSopenharmony_ci * 204861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 204961847f8eSopenharmony_ci * ranging from 0 to the maximum card slots supported by the device. 205061847f8eSopenharmony_ci * @returns { string } Returns the operator key; returns an empty string if no SIM card is inserted or 205161847f8eSopenharmony_ci * no operator key is matched. 205261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 205361847f8eSopenharmony_ci * @since 10 205461847f8eSopenharmony_ci */ 205561847f8eSopenharmony_ci function getOpKeySync(slotId: number): string; 205661847f8eSopenharmony_ci 205761847f8eSopenharmony_ci /** 205861847f8eSopenharmony_ci * Obtains the operator name of the SIM card in a specified slot. 205961847f8eSopenharmony_ci * 206061847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 206161847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 206261847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the callback for getting the operator name; 206361847f8eSopenharmony_ci * Returns an empty string if no SIM card is inserted or no operator name matched. 206461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 206561847f8eSopenharmony_ci * 2. Incorrect parameter types. 206661847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 206761847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 206861847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 206961847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 207061847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 207161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 207261847f8eSopenharmony_ci * @since 9 207361847f8eSopenharmony_ci */ 207461847f8eSopenharmony_ci function getOpName(slotId: number, callback: AsyncCallback<string>): void; 207561847f8eSopenharmony_ci 207661847f8eSopenharmony_ci /** 207761847f8eSopenharmony_ci * Obtains the operator name of the SIM card in a specified slot. 207861847f8eSopenharmony_ci * 207961847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 208061847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 208161847f8eSopenharmony_ci * @returns { Promise<string> } Returns the operator name; returns an empty string if no SIM card is inserted or 208261847f8eSopenharmony_ci * no operator name matched. 208361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 208461847f8eSopenharmony_ci * 2. Incorrect parameter types. 208561847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 208661847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 208761847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 208861847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 208961847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 209061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 209161847f8eSopenharmony_ci * @since 9 209261847f8eSopenharmony_ci */ 209361847f8eSopenharmony_ci function getOpName(slotId: number): Promise<string>; 209461847f8eSopenharmony_ci 209561847f8eSopenharmony_ci /** 209661847f8eSopenharmony_ci * Obtains the operator name of the SIM card in a specified slot. 209761847f8eSopenharmony_ci * 209861847f8eSopenharmony_ci * @param { number } slotId - Indicates the card slot index number, 209961847f8eSopenharmony_ci * ranging from 0 to the maximum card slots supported by the device. 210061847f8eSopenharmony_ci * @returns { string } Returns the operator name; returns an empty string if no SIM card is inserted or 210161847f8eSopenharmony_ci * no operator name is matched. 210261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 210361847f8eSopenharmony_ci * @since 10 210461847f8eSopenharmony_ci */ 210561847f8eSopenharmony_ci function getOpNameSync(slotId: number): string; 210661847f8eSopenharmony_ci 210761847f8eSopenharmony_ci /** 210861847f8eSopenharmony_ci * Obtains the default SIM ID for the voice service. 210961847f8eSopenharmony_ci * 211061847f8eSopenharmony_ci * @param { AsyncCallback<number> } callback - Returns the SIM ID of the default voice sim 211161847f8eSopenharmony_ci * and SIM ID will increase from 1. 211261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 211361847f8eSopenharmony_ci * 2. Incorrect parameter types. 211461847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 211561847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 211661847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 211761847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 211861847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 211961847f8eSopenharmony_ci * @throws { BusinessError } 8301001 - SIM card is not activated. 212061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 212161847f8eSopenharmony_ci * @since 10 212261847f8eSopenharmony_ci */ 212361847f8eSopenharmony_ci function getDefaultVoiceSimId(callback: AsyncCallback<number>): void; 212461847f8eSopenharmony_ci 212561847f8eSopenharmony_ci /** 212661847f8eSopenharmony_ci * Obtains the default SIM ID for the voice service. 212761847f8eSopenharmony_ci * 212861847f8eSopenharmony_ci * @returns { Promise<number> } Returns the SIM ID of the default voice sim 212961847f8eSopenharmony_ci * and SIM ID will increase from 1. 213061847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 213161847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 213261847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 213361847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card found. 213461847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 213561847f8eSopenharmony_ci * @throws { BusinessError } 8301001 - SIM card is not activated. 213661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 213761847f8eSopenharmony_ci * @since 10 213861847f8eSopenharmony_ci */ 213961847f8eSopenharmony_ci function getDefaultVoiceSimId(): Promise<number>; 214061847f8eSopenharmony_ci 214161847f8eSopenharmony_ci /** 214261847f8eSopenharmony_ci * Obtains the value of dsds mode. 214361847f8eSopenharmony_ci * 214461847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 214561847f8eSopenharmony_ci * @param { AsyncCallback<DsdsMode> } callback - Indicates the callback for 214661847f8eSopenharmony_ci * getting one of the following dsds mode states: 214761847f8eSopenharmony_ci * <ul> 214861847f8eSopenharmony_ci * <li>{@code DsdsMode#DSDS_MODE_V2} 214961847f8eSopenharmony_ci * <li>{@code DsdsMode#DSDS_MODE_V3} 215061847f8eSopenharmony_ci * <li>{@code DsdsMode#DSDS_MODE_V5_TDM} 215161847f8eSopenharmony_ci * <li>{@code DsdsMode#DSDS_MODE_V5_DSDA} 215261847f8eSopenharmony_ci * </ul> 215361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 215461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 215561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 215661847f8eSopenharmony_ci * 2. Incorrect parameter types. 215761847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to 215861847f8eSopenharmony_ci * service. 215961847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 216061847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 216161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 216261847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 216361847f8eSopenharmony_ci * @since 11 216461847f8eSopenharmony_ci */ 216561847f8eSopenharmony_ci function getDsdsMode(callback: AsyncCallback<DsdsMode>): void; 216661847f8eSopenharmony_ci 216761847f8eSopenharmony_ci /** 216861847f8eSopenharmony_ci * Obtains the value of dsds mode. 216961847f8eSopenharmony_ci * 217061847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 217161847f8eSopenharmony_ci * @returns { Promise<DsdsMode> } Returns one of the following dsds mode 217261847f8eSopenharmony_ci * states: 217361847f8eSopenharmony_ci * <ul> 217461847f8eSopenharmony_ci * <li>{@code DsdsMode#DSDS_MODE_V2} 217561847f8eSopenharmony_ci * <li>{@code DsdsMode#DSDS_MODE_V3} 217661847f8eSopenharmony_ci * <li>{@code DsdsMode#DSDS_MODE_V5_TDM} 217761847f8eSopenharmony_ci * <li>{@code DsdsMode#DSDS_MODE_V5_DSDA} 217861847f8eSopenharmony_ci * </ul> 217961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 218061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 218161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 218261847f8eSopenharmony_ci * 2. Incorrect parameter types. 218361847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to 218461847f8eSopenharmony_ci * service. 218561847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 218661847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 218761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 218861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 218961847f8eSopenharmony_ci * @since 11 219061847f8eSopenharmony_ci */ 219161847f8eSopenharmony_ci function getDsdsMode(): Promise<DsdsMode>; 219261847f8eSopenharmony_ci 219361847f8eSopenharmony_ci /** 219461847f8eSopenharmony_ci * Performs SIM card authentication. 219561847f8eSopenharmony_ci * 219661847f8eSopenharmony_ci * @permission ohos.permission.GET_TELEPHONY_STATE 219761847f8eSopenharmony_ci * @param { number } slotId - Sim slot id. 219861847f8eSopenharmony_ci * @param { AuthType } authType - The authentication type. 219961847f8eSopenharmony_ci * @param { string } authData - Ser password or other authentication information. 220061847f8eSopenharmony_ci * @returns { Promise<SimAuthenticationResponse> } A string the response of authentication.This value will be null in 220161847f8eSopenharmony_ci * the following cases: Authentication error, incorrect MAC Authentication error, security context not supported Key 220261847f8eSopenharmony_ci * freshness failure Authentication error, no memory space available Authentication error, no memory space available 220361847f8eSopenharmony_ci * in EFMUK. 220461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 220561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 220661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 220761847f8eSopenharmony_ci * 2. Incorrect parameter types. 220861847f8eSopenharmony_ci * @throws { BusinessError } 8300001 - Invalid parameter value. 220961847f8eSopenharmony_ci * @throws { BusinessError } 8300002 - Service connection failed. 221061847f8eSopenharmony_ci * @throws { BusinessError } 8300003 - System internal error. 221161847f8eSopenharmony_ci * @throws { BusinessError } 8300004 - No SIM card. 221261847f8eSopenharmony_ci * @throws { BusinessError } 8300999 - Unknown error. 221361847f8eSopenharmony_ci * @throws { BusinessError } 8301002 - An error occurred when operating the SIM card. 221461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService. 221561847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 221661847f8eSopenharmony_ci * @since 14 221761847f8eSopenharmony_ci */ 221861847f8eSopenharmony_ci function getSimAuthentication(slotId: number, authType: AuthType, authData: string): Promise<SimAuthenticationResponse> 221961847f8eSopenharmony_ci 222061847f8eSopenharmony_ci /** 222161847f8eSopenharmony_ci * Defines the carrier configuration. 222261847f8eSopenharmony_ci * 222361847f8eSopenharmony_ci * @interface OperatorConfig 222461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 222561847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 222661847f8eSopenharmony_ci * @since 8 222761847f8eSopenharmony_ci */ 222861847f8eSopenharmony_ci export interface OperatorConfig { 222961847f8eSopenharmony_ci /** 223061847f8eSopenharmony_ci * Indicates the field. 223161847f8eSopenharmony_ci * 223261847f8eSopenharmony_ci * @type { string } 223361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 223461847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 223561847f8eSopenharmony_ci * @since 8 223661847f8eSopenharmony_ci */ 223761847f8eSopenharmony_ci field: string; 223861847f8eSopenharmony_ci 223961847f8eSopenharmony_ci /** 224061847f8eSopenharmony_ci * Indicates the value. 224161847f8eSopenharmony_ci * 224261847f8eSopenharmony_ci * @type { string } 224361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 224461847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 224561847f8eSopenharmony_ci * @since 8 224661847f8eSopenharmony_ci */ 224761847f8eSopenharmony_ci value: string; 224861847f8eSopenharmony_ci } 224961847f8eSopenharmony_ci 225061847f8eSopenharmony_ci /** 225161847f8eSopenharmony_ci * Defines the ICC account information. 225261847f8eSopenharmony_ci * 225361847f8eSopenharmony_ci * @interface IccAccountInfo 225461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 225561847f8eSopenharmony_ci * @since 10 225661847f8eSopenharmony_ci */ 225761847f8eSopenharmony_ci export interface IccAccountInfo { 225861847f8eSopenharmony_ci /** 225961847f8eSopenharmony_ci * Indicates the sim Id for card. 226061847f8eSopenharmony_ci * 226161847f8eSopenharmony_ci * @type { number } 226261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 226361847f8eSopenharmony_ci * @since 10 226461847f8eSopenharmony_ci */ 226561847f8eSopenharmony_ci simId: number; 226661847f8eSopenharmony_ci 226761847f8eSopenharmony_ci /** 226861847f8eSopenharmony_ci * Indicates the card slot index number, 226961847f8eSopenharmony_ci * ranging from 0 to the maximum card slot index number supported by the device. 227061847f8eSopenharmony_ci * 227161847f8eSopenharmony_ci * @type { number } 227261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 227361847f8eSopenharmony_ci * @since 10 227461847f8eSopenharmony_ci */ 227561847f8eSopenharmony_ci slotIndex: number; 227661847f8eSopenharmony_ci 227761847f8eSopenharmony_ci /** 227861847f8eSopenharmony_ci * Indicates the mark card is eSim or not. 227961847f8eSopenharmony_ci * 228061847f8eSopenharmony_ci * @type { boolean } 228161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 228261847f8eSopenharmony_ci * @since 10 228361847f8eSopenharmony_ci */ 228461847f8eSopenharmony_ci isEsim: boolean; 228561847f8eSopenharmony_ci 228661847f8eSopenharmony_ci /** 228761847f8eSopenharmony_ci * Indicates the active status for card. 228861847f8eSopenharmony_ci * 228961847f8eSopenharmony_ci * @type { boolean } 229061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 229161847f8eSopenharmony_ci * @since 10 229261847f8eSopenharmony_ci */ 229361847f8eSopenharmony_ci isActive: boolean; 229461847f8eSopenharmony_ci 229561847f8eSopenharmony_ci /** 229661847f8eSopenharmony_ci * Indicates the iccId for card. 229761847f8eSopenharmony_ci * 229861847f8eSopenharmony_ci * @type { string } 229961847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 230061847f8eSopenharmony_ci * @since 10 230161847f8eSopenharmony_ci */ 230261847f8eSopenharmony_ci iccId: string; 230361847f8eSopenharmony_ci 230461847f8eSopenharmony_ci /** 230561847f8eSopenharmony_ci * Indicates the display name for card. 230661847f8eSopenharmony_ci * 230761847f8eSopenharmony_ci * @type { string } 230861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 230961847f8eSopenharmony_ci * @since 10 231061847f8eSopenharmony_ci */ 231161847f8eSopenharmony_ci showName: string; 231261847f8eSopenharmony_ci 231361847f8eSopenharmony_ci /** 231461847f8eSopenharmony_ci * Indicates the display number for card. 231561847f8eSopenharmony_ci * 231661847f8eSopenharmony_ci * @type { string } 231761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 231861847f8eSopenharmony_ci * @since 10 231961847f8eSopenharmony_ci */ 232061847f8eSopenharmony_ci showNumber: string; 232161847f8eSopenharmony_ci } 232261847f8eSopenharmony_ci 232361847f8eSopenharmony_ci /** 232461847f8eSopenharmony_ci * Defines the personalized lock information. 232561847f8eSopenharmony_ci * 232661847f8eSopenharmony_ci * @interface LockStatusResponse 232761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 232861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 232961847f8eSopenharmony_ci * @since 7 233061847f8eSopenharmony_ci */ 233161847f8eSopenharmony_ci export interface LockStatusResponse { 233261847f8eSopenharmony_ci /** 233361847f8eSopenharmony_ci * Indicates the current operation result. 233461847f8eSopenharmony_ci * 233561847f8eSopenharmony_ci * @type { number } 233661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 233761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 233861847f8eSopenharmony_ci * @since 7 233961847f8eSopenharmony_ci */ 234061847f8eSopenharmony_ci result: number; 234161847f8eSopenharmony_ci 234261847f8eSopenharmony_ci /** 234361847f8eSopenharmony_ci * Indicates the operations remaining. 234461847f8eSopenharmony_ci * 234561847f8eSopenharmony_ci * @type { ?number } 234661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 234761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 234861847f8eSopenharmony_ci * @since 7 234961847f8eSopenharmony_ci */ 235061847f8eSopenharmony_ci remain?: number; 235161847f8eSopenharmony_ci } 235261847f8eSopenharmony_ci 235361847f8eSopenharmony_ci /** 235461847f8eSopenharmony_ci * Defines the contact number information. 235561847f8eSopenharmony_ci * 235661847f8eSopenharmony_ci * @interface DiallingNumbersInfo 235761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 235861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 235961847f8eSopenharmony_ci * @since 8 236061847f8eSopenharmony_ci */ 236161847f8eSopenharmony_ci export interface DiallingNumbersInfo { 236261847f8eSopenharmony_ci /** 236361847f8eSopenharmony_ci * Indicates the tag. 236461847f8eSopenharmony_ci * 236561847f8eSopenharmony_ci * @type { string } 236661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 236761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 236861847f8eSopenharmony_ci * @since 8 236961847f8eSopenharmony_ci */ 237061847f8eSopenharmony_ci alphaTag: string; 237161847f8eSopenharmony_ci 237261847f8eSopenharmony_ci /** 237361847f8eSopenharmony_ci * Indicates the call transfer number. 237461847f8eSopenharmony_ci * 237561847f8eSopenharmony_ci * @type { string } 237661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 237761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 237861847f8eSopenharmony_ci * @since 8 237961847f8eSopenharmony_ci */ 238061847f8eSopenharmony_ci number: string; 238161847f8eSopenharmony_ci 238261847f8eSopenharmony_ci /** 238361847f8eSopenharmony_ci * Indicates the record number. 238461847f8eSopenharmony_ci * 238561847f8eSopenharmony_ci * @type { ?number } 238661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 238761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 238861847f8eSopenharmony_ci * @since 8 238961847f8eSopenharmony_ci */ 239061847f8eSopenharmony_ci recordNumber?: number; 239161847f8eSopenharmony_ci 239261847f8eSopenharmony_ci /** 239361847f8eSopenharmony_ci * Indicates the PIN 2. 239461847f8eSopenharmony_ci * 239561847f8eSopenharmony_ci * @type { ?string } 239661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 239761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 239861847f8eSopenharmony_ci * @since 8 239961847f8eSopenharmony_ci */ 240061847f8eSopenharmony_ci pin2?: string; 240161847f8eSopenharmony_ci } 240261847f8eSopenharmony_ci 240361847f8eSopenharmony_ci /** 240461847f8eSopenharmony_ci * Defines the personalized lock information. 240561847f8eSopenharmony_ci * 240661847f8eSopenharmony_ci * @interface LockInfo 240761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 240861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 240961847f8eSopenharmony_ci * @since 8 241061847f8eSopenharmony_ci */ 241161847f8eSopenharmony_ci export interface LockInfo { 241261847f8eSopenharmony_ci /** 241361847f8eSopenharmony_ci * Indicates the lock type. 241461847f8eSopenharmony_ci * 241561847f8eSopenharmony_ci * @type { LockType } 241661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 241761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 241861847f8eSopenharmony_ci * @since 8 241961847f8eSopenharmony_ci */ 242061847f8eSopenharmony_ci lockType: LockType; 242161847f8eSopenharmony_ci 242261847f8eSopenharmony_ci /** 242361847f8eSopenharmony_ci * Indicates the password. 242461847f8eSopenharmony_ci * 242561847f8eSopenharmony_ci * @type { string } 242661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 242761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 242861847f8eSopenharmony_ci * @since 8 242961847f8eSopenharmony_ci */ 243061847f8eSopenharmony_ci password: string; 243161847f8eSopenharmony_ci 243261847f8eSopenharmony_ci /** 243361847f8eSopenharmony_ci * Indicates the lock state. 243461847f8eSopenharmony_ci * 243561847f8eSopenharmony_ci * @type { LockState } 243661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 243761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 243861847f8eSopenharmony_ci * @since 8 243961847f8eSopenharmony_ci */ 244061847f8eSopenharmony_ci state: LockState; 244161847f8eSopenharmony_ci } 244261847f8eSopenharmony_ci 244361847f8eSopenharmony_ci /** 244461847f8eSopenharmony_ci * Defines the personalized lock information. 244561847f8eSopenharmony_ci * 244661847f8eSopenharmony_ci * @interface PersoLockInfo 244761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 244861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 244961847f8eSopenharmony_ci * @since 8 245061847f8eSopenharmony_ci */ 245161847f8eSopenharmony_ci export interface PersoLockInfo { 245261847f8eSopenharmony_ci /** 245361847f8eSopenharmony_ci * Indicates the personalized lock type. 245461847f8eSopenharmony_ci * 245561847f8eSopenharmony_ci * @type { PersoLockType } 245661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 245761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 245861847f8eSopenharmony_ci * @since 8 245961847f8eSopenharmony_ci */ 246061847f8eSopenharmony_ci lockType: PersoLockType; 246161847f8eSopenharmony_ci 246261847f8eSopenharmony_ci /** 246361847f8eSopenharmony_ci * Indicates the password. 246461847f8eSopenharmony_ci * 246561847f8eSopenharmony_ci * @type { string } 246661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 246761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 246861847f8eSopenharmony_ci * @since 8 246961847f8eSopenharmony_ci */ 247061847f8eSopenharmony_ci password: string; 247161847f8eSopenharmony_ci } 247261847f8eSopenharmony_ci 247361847f8eSopenharmony_ci /** 247461847f8eSopenharmony_ci * Indicates the lock types. 247561847f8eSopenharmony_ci * 247661847f8eSopenharmony_ci * @enum { number } 247761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 247861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 247961847f8eSopenharmony_ci * @since 8 248061847f8eSopenharmony_ci */ 248161847f8eSopenharmony_ci export enum LockType { 248261847f8eSopenharmony_ci /** 248361847f8eSopenharmony_ci * Indicates the SIM card password lock. 248461847f8eSopenharmony_ci * 248561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 248661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 248761847f8eSopenharmony_ci * @since 8 248861847f8eSopenharmony_ci */ 248961847f8eSopenharmony_ci PIN_LOCK = 1, 249061847f8eSopenharmony_ci 249161847f8eSopenharmony_ci /** 249261847f8eSopenharmony_ci * Indicates the fixed dialing lock. 249361847f8eSopenharmony_ci * 249461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 249561847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 249661847f8eSopenharmony_ci * @since 8 249761847f8eSopenharmony_ci */ 249861847f8eSopenharmony_ci FDN_LOCK = 2, 249961847f8eSopenharmony_ci } 250061847f8eSopenharmony_ci 250161847f8eSopenharmony_ci /** 250261847f8eSopenharmony_ci * Indicates the SIM card types. 250361847f8eSopenharmony_ci * 250461847f8eSopenharmony_ci * @enum { number } 250561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 250661847f8eSopenharmony_ci * @since 7 250761847f8eSopenharmony_ci */ 250861847f8eSopenharmony_ci export enum CardType { 250961847f8eSopenharmony_ci /** 251061847f8eSopenharmony_ci * Icc card type: unknown type Card. 251161847f8eSopenharmony_ci * 251261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 251361847f8eSopenharmony_ci * @since 7 251461847f8eSopenharmony_ci */ 251561847f8eSopenharmony_ci UNKNOWN_CARD = -1, 251661847f8eSopenharmony_ci 251761847f8eSopenharmony_ci /** 251861847f8eSopenharmony_ci * Icc card type: Single sim card type. 251961847f8eSopenharmony_ci * 252061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 252161847f8eSopenharmony_ci * @since 7 252261847f8eSopenharmony_ci */ 252361847f8eSopenharmony_ci SINGLE_MODE_SIM_CARD = 10, 252461847f8eSopenharmony_ci 252561847f8eSopenharmony_ci /** 252661847f8eSopenharmony_ci * Icc card type: Single usim card type. 252761847f8eSopenharmony_ci * 252861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 252961847f8eSopenharmony_ci * @since 7 253061847f8eSopenharmony_ci */ 253161847f8eSopenharmony_ci SINGLE_MODE_USIM_CARD = 20, 253261847f8eSopenharmony_ci 253361847f8eSopenharmony_ci /** 253461847f8eSopenharmony_ci * Icc card type: Single ruim card type. 253561847f8eSopenharmony_ci * 253661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 253761847f8eSopenharmony_ci * @since 7 253861847f8eSopenharmony_ci */ 253961847f8eSopenharmony_ci SINGLE_MODE_RUIM_CARD = 30, 254061847f8eSopenharmony_ci 254161847f8eSopenharmony_ci /** 254261847f8eSopenharmony_ci * Icc card type: Double card C+G. 254361847f8eSopenharmony_ci * 254461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 254561847f8eSopenharmony_ci * @since 7 254661847f8eSopenharmony_ci */ 254761847f8eSopenharmony_ci DUAL_MODE_CG_CARD = 40, 254861847f8eSopenharmony_ci 254961847f8eSopenharmony_ci /** 255061847f8eSopenharmony_ci * Icc card type: China Telecom Internal Roaming Card (Dual Mode). 255161847f8eSopenharmony_ci * 255261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 255361847f8eSopenharmony_ci * @since 7 255461847f8eSopenharmony_ci */ 255561847f8eSopenharmony_ci CT_NATIONAL_ROAMING_CARD = 41, 255661847f8eSopenharmony_ci 255761847f8eSopenharmony_ci /** 255861847f8eSopenharmony_ci * Icc card type: China Unicom Dual Mode Card. 255961847f8eSopenharmony_ci * 256061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 256161847f8eSopenharmony_ci * @since 7 256261847f8eSopenharmony_ci */ 256361847f8eSopenharmony_ci CU_DUAL_MODE_CARD = 42, 256461847f8eSopenharmony_ci 256561847f8eSopenharmony_ci /** 256661847f8eSopenharmony_ci * Icc card type: China Telecom LTE Card (Dual Mode). 256761847f8eSopenharmony_ci * 256861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 256961847f8eSopenharmony_ci * @since 7 257061847f8eSopenharmony_ci */ 257161847f8eSopenharmony_ci DUAL_MODE_TELECOM_LTE_CARD = 43, 257261847f8eSopenharmony_ci 257361847f8eSopenharmony_ci /** 257461847f8eSopenharmony_ci * Icc card type: Double card U+G. 257561847f8eSopenharmony_ci * 257661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 257761847f8eSopenharmony_ci * @since 7 257861847f8eSopenharmony_ci */ 257961847f8eSopenharmony_ci DUAL_MODE_UG_CARD = 50, 258061847f8eSopenharmony_ci 258161847f8eSopenharmony_ci /** 258261847f8eSopenharmony_ci * Icc card type: Single isim card type. 258361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 258461847f8eSopenharmony_ci * @since 8 258561847f8eSopenharmony_ci */ 258661847f8eSopenharmony_ci SINGLE_MODE_ISIM_CARD = 60 258761847f8eSopenharmony_ci } 258861847f8eSopenharmony_ci 258961847f8eSopenharmony_ci /** 259061847f8eSopenharmony_ci * Indicates the SIM card states. 259161847f8eSopenharmony_ci * 259261847f8eSopenharmony_ci * @enum { number } 259361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 259461847f8eSopenharmony_ci * @since 6 259561847f8eSopenharmony_ci */ 259661847f8eSopenharmony_ci export enum SimState { 259761847f8eSopenharmony_ci /** 259861847f8eSopenharmony_ci * Indicates unknown SIM card state, that is, the accurate status cannot be 259961847f8eSopenharmony_ci * obtained. 260061847f8eSopenharmony_ci * 260161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 260261847f8eSopenharmony_ci * @since 6 260361847f8eSopenharmony_ci */ 260461847f8eSopenharmony_ci SIM_STATE_UNKNOWN, 260561847f8eSopenharmony_ci 260661847f8eSopenharmony_ci /** 260761847f8eSopenharmony_ci * Indicates that the SIM card is in the <b>not present</b> state, that is, 260861847f8eSopenharmony_ci * no SIM card is inserted into the card slot. 260961847f8eSopenharmony_ci * 261061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 261161847f8eSopenharmony_ci * @since 6 261261847f8eSopenharmony_ci */ 261361847f8eSopenharmony_ci SIM_STATE_NOT_PRESENT, 261461847f8eSopenharmony_ci 261561847f8eSopenharmony_ci /** 261661847f8eSopenharmony_ci * Indicates that the SIM card is in the <b>locked</b> state, that is, the 261761847f8eSopenharmony_ci * SIM card is locked by the personal identification number (PIN)/PIN 261861847f8eSopenharmony_ci * unblocking key (PUK) or network. 261961847f8eSopenharmony_ci * 262061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 262161847f8eSopenharmony_ci * @since 6 262261847f8eSopenharmony_ci */ 262361847f8eSopenharmony_ci SIM_STATE_LOCKED, 262461847f8eSopenharmony_ci 262561847f8eSopenharmony_ci /** 262661847f8eSopenharmony_ci * Indicates that the SIM card is in the <b>not ready</b> state, that is, 262761847f8eSopenharmony_ci * the SIM card is in position but cannot work properly. 262861847f8eSopenharmony_ci * 262961847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 263061847f8eSopenharmony_ci * @since 6 263161847f8eSopenharmony_ci */ 263261847f8eSopenharmony_ci SIM_STATE_NOT_READY, 263361847f8eSopenharmony_ci 263461847f8eSopenharmony_ci /** 263561847f8eSopenharmony_ci * Indicates that the SIM card is in the <b>ready</b> state, that is, the 263661847f8eSopenharmony_ci * SIM card is in position and is working properly. 263761847f8eSopenharmony_ci * 263861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 263961847f8eSopenharmony_ci * @since 6 264061847f8eSopenharmony_ci */ 264161847f8eSopenharmony_ci SIM_STATE_READY, 264261847f8eSopenharmony_ci 264361847f8eSopenharmony_ci /** 264461847f8eSopenharmony_ci * Indicates that the SIM card is in the <b>loaded</b> state, that is, the 264561847f8eSopenharmony_ci * SIM card is in position and is working properly. 264661847f8eSopenharmony_ci * 264761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 264861847f8eSopenharmony_ci * @since 6 264961847f8eSopenharmony_ci */ 265061847f8eSopenharmony_ci SIM_STATE_LOADED 265161847f8eSopenharmony_ci } 265261847f8eSopenharmony_ci 265361847f8eSopenharmony_ci /** 265461847f8eSopenharmony_ci * Indicates the lock states. 265561847f8eSopenharmony_ci * 265661847f8eSopenharmony_ci * @enum { number } 265761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 265861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 265961847f8eSopenharmony_ci * @since 8 266061847f8eSopenharmony_ci */ 266161847f8eSopenharmony_ci export enum LockState { 266261847f8eSopenharmony_ci /** 266361847f8eSopenharmony_ci * Indicates that the lock state card is in the <b>off</b> state. 266461847f8eSopenharmony_ci * 266561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 266661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 266761847f8eSopenharmony_ci * @since 8 266861847f8eSopenharmony_ci */ 266961847f8eSopenharmony_ci LOCK_OFF = 0, 267061847f8eSopenharmony_ci 267161847f8eSopenharmony_ci /** 267261847f8eSopenharmony_ci * Indicates that the lock state card is in the <b>on</b> state. 267361847f8eSopenharmony_ci * 267461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 267561847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 267661847f8eSopenharmony_ci * @since 8 267761847f8eSopenharmony_ci */ 267861847f8eSopenharmony_ci LOCK_ON = 1, 267961847f8eSopenharmony_ci } 268061847f8eSopenharmony_ci 268161847f8eSopenharmony_ci /** 268261847f8eSopenharmony_ci * Indicates the contact types. 268361847f8eSopenharmony_ci * 268461847f8eSopenharmony_ci * @enum { number } 268561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 268661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 268761847f8eSopenharmony_ci * @since 8 268861847f8eSopenharmony_ci */ 268961847f8eSopenharmony_ci export enum ContactType { 269061847f8eSopenharmony_ci /** 269161847f8eSopenharmony_ci * Indicates the common contact number. 269261847f8eSopenharmony_ci * 269361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 269461847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 269561847f8eSopenharmony_ci * @since 8 269661847f8eSopenharmony_ci */ 269761847f8eSopenharmony_ci GENERAL_CONTACT = 1, 269861847f8eSopenharmony_ci 269961847f8eSopenharmony_ci /** 270061847f8eSopenharmony_ci * Indicates the fixed dialing number. 270161847f8eSopenharmony_ci * 270261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 270361847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 270461847f8eSopenharmony_ci * @since 8 270561847f8eSopenharmony_ci */ 270661847f8eSopenharmony_ci FIXED_DIALING = 2, 270761847f8eSopenharmony_ci } 270861847f8eSopenharmony_ci 270961847f8eSopenharmony_ci /** 271061847f8eSopenharmony_ci * Indicates the personalized lock types. 271161847f8eSopenharmony_ci * 271261847f8eSopenharmony_ci * @enum { number } 271361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 271461847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 271561847f8eSopenharmony_ci * @since 8 271661847f8eSopenharmony_ci */ 271761847f8eSopenharmony_ci export enum PersoLockType { 271861847f8eSopenharmony_ci /** 271961847f8eSopenharmony_ci * Indicates network personalization of PIN lock(refer 3GPP TS 22.022 [33]). 272061847f8eSopenharmony_ci * 272161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 272261847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 272361847f8eSopenharmony_ci * @since 8 272461847f8eSopenharmony_ci */ 272561847f8eSopenharmony_ci PN_PIN_LOCK, 272661847f8eSopenharmony_ci 272761847f8eSopenharmony_ci /** 272861847f8eSopenharmony_ci * Indicates network personalization of PUK lock(refer 3GPP TS 22.022 [33]). 272961847f8eSopenharmony_ci * 273061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 273161847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 273261847f8eSopenharmony_ci * @since 8 273361847f8eSopenharmony_ci */ 273461847f8eSopenharmony_ci PN_PUK_LOCK, 273561847f8eSopenharmony_ci 273661847f8eSopenharmony_ci /** 273761847f8eSopenharmony_ci * Indicates network subset personalization of PIN lock(refer 3GPP TS 22.022 [33]). 273861847f8eSopenharmony_ci * 273961847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 274061847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 274161847f8eSopenharmony_ci * @since 8 274261847f8eSopenharmony_ci */ 274361847f8eSopenharmony_ci PU_PIN_LOCK, 274461847f8eSopenharmony_ci 274561847f8eSopenharmony_ci /** 274661847f8eSopenharmony_ci * Indicates network subset personalization of PUK lock(refer 3GPP TS 22.022 [33]). 274761847f8eSopenharmony_ci * 274861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 274961847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 275061847f8eSopenharmony_ci * @since 8 275161847f8eSopenharmony_ci */ 275261847f8eSopenharmony_ci PU_PUK_LOCK, 275361847f8eSopenharmony_ci 275461847f8eSopenharmony_ci /** 275561847f8eSopenharmony_ci * Indicates service provider personalization of PIN lock(refer 3GPP TS 22.022 [33]). 275661847f8eSopenharmony_ci * 275761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 275861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 275961847f8eSopenharmony_ci * @since 8 276061847f8eSopenharmony_ci */ 276161847f8eSopenharmony_ci PP_PIN_LOCK, 276261847f8eSopenharmony_ci 276361847f8eSopenharmony_ci /** 276461847f8eSopenharmony_ci * Indicates service provider personalization of PUK lock(refer 3GPP TS 22.022 [33]). 276561847f8eSopenharmony_ci * 276661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 276761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 276861847f8eSopenharmony_ci * @since 8 276961847f8eSopenharmony_ci */ 277061847f8eSopenharmony_ci PP_PUK_LOCK, 277161847f8eSopenharmony_ci 277261847f8eSopenharmony_ci /** 277361847f8eSopenharmony_ci * Indicates corporate personalization of PIN lock(refer 3GPP TS 22.022 [33]). 277461847f8eSopenharmony_ci * 277561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 277661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 277761847f8eSopenharmony_ci * @since 8 277861847f8eSopenharmony_ci */ 277961847f8eSopenharmony_ci PC_PIN_LOCK, 278061847f8eSopenharmony_ci 278161847f8eSopenharmony_ci /** 278261847f8eSopenharmony_ci * Indicates corporate personalization of PUK lock(refer 3GPP TS 22.022 [33]). 278361847f8eSopenharmony_ci * 278461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 278561847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 278661847f8eSopenharmony_ci * @since 8 278761847f8eSopenharmony_ci */ 278861847f8eSopenharmony_ci PC_PUK_LOCK, 278961847f8eSopenharmony_ci 279061847f8eSopenharmony_ci /** 279161847f8eSopenharmony_ci * Indicates SIM/USIM personalization of PIN lock(refer 3GPP TS 22.022 [33]). 279261847f8eSopenharmony_ci * 279361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 279461847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 279561847f8eSopenharmony_ci * @since 8 279661847f8eSopenharmony_ci */ 279761847f8eSopenharmony_ci SIM_PIN_LOCK, 279861847f8eSopenharmony_ci 279961847f8eSopenharmony_ci /** 280061847f8eSopenharmony_ci * Indicates SIM/USIM personalization of PUK lock(refer 3GPP TS 22.022 [33]). 280161847f8eSopenharmony_ci * 280261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 280361847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 280461847f8eSopenharmony_ci * @since 8 280561847f8eSopenharmony_ci */ 280661847f8eSopenharmony_ci SIM_PUK_LOCK, 280761847f8eSopenharmony_ci } 280861847f8eSopenharmony_ci 280961847f8eSopenharmony_ci /** 281061847f8eSopenharmony_ci * Indicates the carrier configuration keys. 281161847f8eSopenharmony_ci * 281261847f8eSopenharmony_ci * @enum { string } 281361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 281461847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 281561847f8eSopenharmony_ci * @since 9 281661847f8eSopenharmony_ci */ 281761847f8eSopenharmony_ci export enum OperatorConfigKey { 281861847f8eSopenharmony_ci /** 281961847f8eSopenharmony_ci * Indicates the voice mail number. 282061847f8eSopenharmony_ci * 282161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 282261847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 282361847f8eSopenharmony_ci * @since 9 282461847f8eSopenharmony_ci */ 282561847f8eSopenharmony_ci KEY_VOICE_MAIL_NUMBER_STRING = 'voice_mail_number_string', 282661847f8eSopenharmony_ci 282761847f8eSopenharmony_ci /** 282861847f8eSopenharmony_ci * Indicates the status of ims switch. 282961847f8eSopenharmony_ci * 283061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 283161847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 283261847f8eSopenharmony_ci * @since 9 283361847f8eSopenharmony_ci */ 283461847f8eSopenharmony_ci KEY_IMS_SWITCH_ON_BY_DEFAULT_BOOL = 'ims_switch_on_by_default_bool', 283561847f8eSopenharmony_ci 283661847f8eSopenharmony_ci /** 283761847f8eSopenharmony_ci * Indicates whether the ims switch status is hidden. 283861847f8eSopenharmony_ci * 283961847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 284061847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 284161847f8eSopenharmony_ci * @since 9 284261847f8eSopenharmony_ci */ 284361847f8eSopenharmony_ci KEY_HIDE_IMS_SWITCH_BOOL = 'hide_ims_switch_bool', 284461847f8eSopenharmony_ci 284561847f8eSopenharmony_ci /** 284661847f8eSopenharmony_ci * Indicates whether volte mode is supported. 284761847f8eSopenharmony_ci * 284861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 284961847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 285061847f8eSopenharmony_ci * @since 9 285161847f8eSopenharmony_ci */ 285261847f8eSopenharmony_ci KEY_VOLTE_SUPPORTED_BOOL = 'volte_supported_bool', 285361847f8eSopenharmony_ci 285461847f8eSopenharmony_ci /** 285561847f8eSopenharmony_ci * Indicates the list supported by nr mode. 285661847f8eSopenharmony_ci * 285761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 285861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 285961847f8eSopenharmony_ci * @since 9 286061847f8eSopenharmony_ci */ 286161847f8eSopenharmony_ci KEY_NR_MODE_SUPPORTED_LIST_INT_ARRAY = 'nr_mode_supported_list_int_array', 286261847f8eSopenharmony_ci 286361847f8eSopenharmony_ci /** 286461847f8eSopenharmony_ci * Indicates whether VOLTE supports configuration. 286561847f8eSopenharmony_ci * 286661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 286761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 286861847f8eSopenharmony_ci * @since 9 286961847f8eSopenharmony_ci */ 287061847f8eSopenharmony_ci KEY_VOLTE_PROVISIONING_SUPPORTED_BOOL = 'volte_provisioning_supported_bool', 287161847f8eSopenharmony_ci 287261847f8eSopenharmony_ci /** 287361847f8eSopenharmony_ci * Indicates whether SS service supports UT. 287461847f8eSopenharmony_ci * 287561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 287661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 287761847f8eSopenharmony_ci * @since 9 287861847f8eSopenharmony_ci */ 287961847f8eSopenharmony_ci KEY_SS_OVER_UT_SUPPORTED_BOOL = 'ss_over_ut_supported_bool', 288061847f8eSopenharmony_ci 288161847f8eSopenharmony_ci /** 288261847f8eSopenharmony_ci * Indicates whether the IMS requires GBA. 288361847f8eSopenharmony_ci * 288461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 288561847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 288661847f8eSopenharmony_ci * @since 9 288761847f8eSopenharmony_ci */ 288861847f8eSopenharmony_ci KEY_IMS_GBA_REQUIRED_BOOL = 'ims_gba_required_bool', 288961847f8eSopenharmony_ci 289061847f8eSopenharmony_ci /** 289161847f8eSopenharmony_ci * Indicates whether UT configuration is supported. 289261847f8eSopenharmony_ci * 289361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 289461847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 289561847f8eSopenharmony_ci * @since 9 289661847f8eSopenharmony_ci */ 289761847f8eSopenharmony_ci KEY_UT_PROVISIONING_SUPPORTED_BOOL = 'ut_provisioning_supported_bool', 289861847f8eSopenharmony_ci 289961847f8eSopenharmony_ci /** 290061847f8eSopenharmony_ci * Indicates the ims emergency preference. 290161847f8eSopenharmony_ci * 290261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 290361847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 290461847f8eSopenharmony_ci * @since 9 290561847f8eSopenharmony_ci */ 290661847f8eSopenharmony_ci KEY_IMS_PREFER_FOR_EMERGENCY_BOOL = 'ims_prefer_for_emergency_bool', 290761847f8eSopenharmony_ci 290861847f8eSopenharmony_ci /** 290961847f8eSopenharmony_ci * Indicates call waiting service. 291061847f8eSopenharmony_ci * 291161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 291261847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 291361847f8eSopenharmony_ci * @since 9 291461847f8eSopenharmony_ci */ 291561847f8eSopenharmony_ci KEY_CALL_WAITING_SERVICE_CLASS_INT = 'call_waiting_service_class_int', 291661847f8eSopenharmony_ci 291761847f8eSopenharmony_ci /** 291861847f8eSopenharmony_ci * Indicates call forwarding visibility. 291961847f8eSopenharmony_ci * 292061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 292161847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 292261847f8eSopenharmony_ci * @since 9 292361847f8eSopenharmony_ci */ 292461847f8eSopenharmony_ci KEY_CALL_TRANSFER_VISIBILITY_BOOL = 'call_transfer_visibility_bool', 292561847f8eSopenharmony_ci 292661847f8eSopenharmony_ci /** 292761847f8eSopenharmony_ci * Indicates the list of ims call end reasons. 292861847f8eSopenharmony_ci * 292961847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 293061847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 293161847f8eSopenharmony_ci * @since 9 293261847f8eSopenharmony_ci */ 293361847f8eSopenharmony_ci KEY_IMS_CALL_DISCONNECT_REASON_INFO_MAPPING_STRING_ARRAY = 293461847f8eSopenharmony_ci 'ims_call_disconnect_reason_info_mapping_string_array', 293561847f8eSopenharmony_ci 293661847f8eSopenharmony_ci /** 293761847f8eSopenharmony_ci * Indicates the forced Volte switch on state. 293861847f8eSopenharmony_ci * 293961847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 294061847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 294161847f8eSopenharmony_ci * @since 9 294261847f8eSopenharmony_ci */ 294361847f8eSopenharmony_ci KEY_FORCE_VOLTE_SWITCH_ON_BOOL = 'force_volte_switch_on_bool', 294461847f8eSopenharmony_ci 294561847f8eSopenharmony_ci /** 294661847f8eSopenharmony_ci * Indicates whether the operator name is displayed. 294761847f8eSopenharmony_ci * 294861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 294961847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 295061847f8eSopenharmony_ci * @since 9 295161847f8eSopenharmony_ci */ 295261847f8eSopenharmony_ci KEY_ENABLE_OPERATOR_NAME_CUST_BOOL = 'enable_operator_name_cust_bool', 295361847f8eSopenharmony_ci 295461847f8eSopenharmony_ci /** 295561847f8eSopenharmony_ci * Indicates the name of the operator. 295661847f8eSopenharmony_ci * 295761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 295861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 295961847f8eSopenharmony_ci * @since 9 296061847f8eSopenharmony_ci */ 296161847f8eSopenharmony_ci KEY_OPERATOR_NAME_CUST_STRING = 'operator_name_cust_string', 296261847f8eSopenharmony_ci 296361847f8eSopenharmony_ci /** 296461847f8eSopenharmony_ci * Indicates the spn display rule. 296561847f8eSopenharmony_ci * 296661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 296761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 296861847f8eSopenharmony_ci * @since 9 296961847f8eSopenharmony_ci */ 297061847f8eSopenharmony_ci KEY_SPN_DISPLAY_CONDITION_CUST_INT = 'spn_display_condition_cust_int', 297161847f8eSopenharmony_ci 297261847f8eSopenharmony_ci /** 297361847f8eSopenharmony_ci * Indicates the PLMN name. 297461847f8eSopenharmony_ci * 297561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 297661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 297761847f8eSopenharmony_ci * @since 9 297861847f8eSopenharmony_ci */ 297961847f8eSopenharmony_ci KEY_PNN_CUST_STRING_ARRAY = 'pnn_cust_string_array', 298061847f8eSopenharmony_ci 298161847f8eSopenharmony_ci /** 298261847f8eSopenharmony_ci * Indicates operator PLMN information. 298361847f8eSopenharmony_ci * 298461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 298561847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 298661847f8eSopenharmony_ci * @since 9 298761847f8eSopenharmony_ci */ 298861847f8eSopenharmony_ci KEY_OPL_CUST_STRING_ARRAY = 'opl_cust_string_array', 298961847f8eSopenharmony_ci 299061847f8eSopenharmony_ci /** 299161847f8eSopenharmony_ci * Indicates the emergency call list. 299261847f8eSopenharmony_ci * 299361847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 299461847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 299561847f8eSopenharmony_ci * @since 9 299661847f8eSopenharmony_ci */ 299761847f8eSopenharmony_ci KEY_EMERGENCY_CALL_STRING_ARRAY = 'emergency_call_string_array', 299861847f8eSopenharmony_ci } 299961847f8eSopenharmony_ci 300061847f8eSopenharmony_ci /** 300161847f8eSopenharmony_ci * Indicates the Dsds Mode. 300261847f8eSopenharmony_ci * 300361847f8eSopenharmony_ci * @enum { number } 300461847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 300561847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 300661847f8eSopenharmony_ci * @since 11 300761847f8eSopenharmony_ci */ 300861847f8eSopenharmony_ci export enum DsdsMode { 300961847f8eSopenharmony_ci /** 301061847f8eSopenharmony_ci * Indicates the DSDS 2.0 Mode. 301161847f8eSopenharmony_ci * 301261847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 301361847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 301461847f8eSopenharmony_ci * @since 11 301561847f8eSopenharmony_ci */ 301661847f8eSopenharmony_ci DSDS_MODE_V2 = 0, 301761847f8eSopenharmony_ci 301861847f8eSopenharmony_ci /** 301961847f8eSopenharmony_ci * Indicates the DSDS 3.0 Mode. 302061847f8eSopenharmony_ci * 302161847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 302261847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 302361847f8eSopenharmony_ci * @since 11 302461847f8eSopenharmony_ci */ 302561847f8eSopenharmony_ci DSDS_MODE_V3 = 1, 302661847f8eSopenharmony_ci 302761847f8eSopenharmony_ci /** 302861847f8eSopenharmony_ci * Indicates the DSDS 5.0 TDM Mode. 302961847f8eSopenharmony_ci * 303061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 303161847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 303261847f8eSopenharmony_ci * @since 11 303361847f8eSopenharmony_ci */ 303461847f8eSopenharmony_ci DSDS_MODE_V5_TDM = 2, 303561847f8eSopenharmony_ci 303661847f8eSopenharmony_ci /** 303761847f8eSopenharmony_ci * Indicates the DSDS 5.0 DSDA Mode. 303861847f8eSopenharmony_ci * 303961847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 304061847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 304161847f8eSopenharmony_ci * @since 11 304261847f8eSopenharmony_ci */ 304361847f8eSopenharmony_ci DSDS_MODE_V5_DSDA = 3, 304461847f8eSopenharmony_ci } 304561847f8eSopenharmony_ci 304661847f8eSopenharmony_ci /** 304761847f8eSopenharmony_ci * Indicates the operator of SIM. 304861847f8eSopenharmony_ci * 304961847f8eSopenharmony_ci * @enum { string } 305061847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 305161847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 305261847f8eSopenharmony_ci * @since 11 305361847f8eSopenharmony_ci */ 305461847f8eSopenharmony_ci export enum OperatorSimCard { 305561847f8eSopenharmony_ci /** 305661847f8eSopenharmony_ci * Indicates the China Telecom card. 305761847f8eSopenharmony_ci * 305861847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 305961847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 306061847f8eSopenharmony_ci * @since 11 306161847f8eSopenharmony_ci */ 306261847f8eSopenharmony_ci CHINA_TELECOM_CARD = 'china_telecom_card', 306361847f8eSopenharmony_ci } 306461847f8eSopenharmony_ci 306561847f8eSopenharmony_ci /** 306661847f8eSopenharmony_ci * Indicates the Authentication type 306761847f8eSopenharmony_ci * 306861847f8eSopenharmony_ci * @enum { number } 306961847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 307061847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 307161847f8eSopenharmony_ci * @since 14 307261847f8eSopenharmony_ci */ 307361847f8eSopenharmony_ci export enum AuthType { 307461847f8eSopenharmony_ci /** 307561847f8eSopenharmony_ci * Authentication type is EAP-SIM. See RFC 4186 307661847f8eSopenharmony_ci * 307761847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 307861847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 307961847f8eSopenharmony_ci * @since 14 308061847f8eSopenharmony_ci */ 308161847f8eSopenharmony_ci SIM_AUTH_EAP_SIM_TYPE = 128, 308261847f8eSopenharmony_ci /** 308361847f8eSopenharmony_ci * Authentication type is EAP-AKA. See RFC 4187 308461847f8eSopenharmony_ci * 308561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 308661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 308761847f8eSopenharmony_ci * @since 14 308861847f8eSopenharmony_ci */ 308961847f8eSopenharmony_ci SIM_AUTH_EAP_AKA_TYPE = 129, 309061847f8eSopenharmony_ci } 309161847f8eSopenharmony_ci 309261847f8eSopenharmony_ci /** 309361847f8eSopenharmony_ci * Defines the SIM card authentication response. 309461847f8eSopenharmony_ci * 309561847f8eSopenharmony_ci * @interface SimAuthenticationResponse 309661847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 309761847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 309861847f8eSopenharmony_ci * @since 14 309961847f8eSopenharmony_ci */ 310061847f8eSopenharmony_ci export interface SimAuthenticationResponse { 310161847f8eSopenharmony_ci /** 310261847f8eSopenharmony_ci * Status word 1 of the SIM card, which is returned by the SIM card after command execution. 310361847f8eSopenharmony_ci * 310461847f8eSopenharmony_ci * @type { number } 310561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 310661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 310761847f8eSopenharmony_ci * @since 14 310861847f8eSopenharmony_ci */ 310961847f8eSopenharmony_ci simStatusWord1: number; 311061847f8eSopenharmony_ci 311161847f8eSopenharmony_ci /** 311261847f8eSopenharmony_ci * Status word 2 of the SIM card, which is returned by the SIM card after command execution. 311361847f8eSopenharmony_ci * 311461847f8eSopenharmony_ci * @type { number } 311561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 311661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 311761847f8eSopenharmony_ci * @since 14 311861847f8eSopenharmony_ci */ 311961847f8eSopenharmony_ci simStatusWord2: number; 312061847f8eSopenharmony_ci 312161847f8eSopenharmony_ci /** 312261847f8eSopenharmony_ci * Indicates the response of authentication. 312361847f8eSopenharmony_ci * 312461847f8eSopenharmony_ci * @type { string } 312561847f8eSopenharmony_ci * @syscap SystemCapability.Telephony.CoreService 312661847f8eSopenharmony_ci * @systemapi Hide this for inner system use. 312761847f8eSopenharmony_ci * @since 14 312861847f8eSopenharmony_ci */ 312961847f8eSopenharmony_ci response: string; 313061847f8eSopenharmony_ci } 313161847f8eSopenharmony_ci} 313261847f8eSopenharmony_ci 313361847f8eSopenharmony_ciexport default sim; 3134