Signed-off-by: qian-nan-xu <xuqiannan@huawei.com>
This commit is contained in:
qian-nan-xu 2022-09-21 11:08:05 +08:00
parent 5dc4e5e779
commit 08c477d842
2 changed files with 78 additions and 2 deletions

View File

@ -297,6 +297,42 @@ declare namespace radio {
function getPreferredNetwork(slotId: number, callback: AsyncCallback<PreferredNetworkMode>): void;
function getPreferredNetwork(slotId: number): Promise<PreferredNetworkMode>;
/**
* Get the IMS registration state info of specificed IMS service type.
*
* @param slotId Indicates the card slot index number,
* ranging from 0 to the maximum card slot index number supported by the device.
* @param imsType Indicates the ims service type of the {@link ImsServiceType}.
* @param callback including an instance of the {@link ImsRegInfo} class.
* @permission ohos.permission.GET_TELEPHONY_STATE
* @systemapi Hide this for inner system use.
* @since 9
*/
function getImsRegInfo(slotId: number, imsType: ImsServiceType, callback: AsyncCallback<ImsRegInfo>): void;
function getImsRegInfo(slotId: number, imsType: ImsServiceType): Promise<ImsRegInfo>;
/**
* Called when the IMS registration state of specificed IMS service type corresponding
* to a monitored {@code slotId} updates.
*
* @param slotId Indicates the card slot index number,
* ranging from 0 to the maximum card slot index number supported by the device.
* @param imsType Indicates the ims service type of the {@link ImsServiceType}.
* @param callback including an instance of the {@link ImsRegInfo} class.
* @permission ohos.permission.GET_TELEPHONY_STATE
* @systemapi Hide this for inner system use.
* @since 9
*/
function on(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback: Callback<ImsRegInfo>): void;
/**
* @permission ohos.permission.GET_TELEPHONY_STATE
* @systemapi Hide this for inner system use.
* @since 9
*/
function off(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback?: Callback<ImsRegInfo>): void;
/**
* @systemapi Hide this for inner system use.
* @since 8
@ -790,6 +826,46 @@ declare namespace radio {
/** Manual network selection modes. */
NETWORK_SELECTION_MANUAL
}
/**
* @systemapi Hide this for inner system use.
* @since 9
*/
export enum ImsRegState {
IMS_UNREGISTERED,
IMS_REGISTERED,
}
/**
* @systemapi Hide this for inner system use.
* @since 9
*/
export enum ImsRegTech {
REGISTRATION_TECH_NONE,
REGISTRATION_TECH_LTE,
REGISTRATION_TECH_IWLAN,
REGISTRATION_TECH_NR,
}
/**
* @systemapi Hide this for inner system use.
* @since 9
*/
export interface ImsRegInfo {
imsRegState: ImsRegState;
imsRegTech: ImsRegTech;
}
/**
* @systemapi Hide this for inner system use.
* @since 9
*/
export enum ImsServiceType {
TYPE_VOICE,
TYPE_VIDEO,
TYPE_UT,
TYPE_SMS,
}
}
export default radio;

View File

@ -434,7 +434,7 @@ declare namespace sim {
*
* @param slotId Indicates the card slot index number,
* ranging from 0 to the maximum card slot index number supported by the device.
* @return Returns the opkey; returns "-1" if no SIM card is inserted or
* @return Returns the opkey; returns an empty string if no SIM card is inserted or
* no opkey matched.
* @since 9
*/
@ -446,7 +446,7 @@ declare namespace sim {
*
* @param slotId Indicates the card slot index number,
* ranging from 0 to the maximum card slot index number supported by the device.
* @return Returns the opname; returns null if no SIM card is inserted or
* @return Returns the opname; returns an empty string if no SIM card is inserted or
* no opname matched.
* @since 9
*/