From 5ba730f1e82a36376de366f5c8a3372ed1326ce0 Mon Sep 17 00:00:00 2001 From: w00636648 Date: Tue, 21 Mar 2023 21:58:30 +0800 Subject: [PATCH] fix Signed-off-by: w00636648 --- api/@ohos.telephony.call.d.ts | 102 ++++++++++++++++++++++++++++++++-- 1 file changed, 97 insertions(+), 5 deletions(-) diff --git a/api/@ohos.telephony.call.d.ts b/api/@ohos.telephony.call.d.ts index 21a1908b8..98b6efb0a 100644 --- a/api/@ohos.telephony.call.d.ts +++ b/api/@ohos.telephony.call.d.ts @@ -1040,6 +1040,7 @@ declare namespace call { * * @param slotId Indicates the card slot index number, * ranging from 0 to the maximum card slot index number supported by the device. + * @param {AsyncCallback } callback - void * @permission ohos.permission.SET_TELEPHONY_STATE * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 401 - Parameter error. @@ -1051,6 +1052,23 @@ declare namespace call { * @since 10 */ function closeUnFinishedUssd(slotId: number, callback: AsyncCallback): void; + + /** + * Close Unfinished ussd. + * + * @param slotId Indicates the card slot index number, + * ranging from 0 to the maximum card slot index number supported by the device. + * @returns {Promise } + * @permission ohos.permission.SET_TELEPHONY_STATE + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 8300001 - Invalid parameter value. + * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service. + * @throws {BusinessError} 8300003 - System internal error. + * @throws {BusinessError} 8300999 - Unknown error code. + * @systemapi Hide this for inner system use. + * @since 10 + */ function closeUnFinishedUssd(slotId: number): Promise; /** @@ -1059,6 +1077,7 @@ declare namespace call { * @param slotId Indicates the card slot index number, * ranging from 0 to the maximum card slot index number supported by the device. * @param state Indicates the voNR state. + * @param {AsyncCallback } callback - if set was successful or not * @permission ohos.permission.SET_TELEPHONY_STATE * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 401 - Parameter error. @@ -1069,8 +1088,26 @@ declare namespace call { * @systemapi Hide this for inner system use. * @since 10 */ - function setVoNRState(slotId: number, state: number, callback: AsyncCallback): void; - function setVoNRState(slotId: number, state: number): Promise; + function setVoNRState(slotId: number, state: number, callback: AsyncCallback): void; + + /** + * set voNR switch state + * + * @param slotId Indicates the card slot index number, + * ranging from 0 to the maximum card slot index number supported by the device. + * @param state Indicates the voNR state. + * @returns {Promise } - if set was successful or not + * @permission ohos.permission.SET_TELEPHONY_STATE + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 8300001 - Invalid parameter value. + * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service. + * @throws {BusinessError} 8300003 - System internal error. + * @throws {BusinessError} 8300999 - Unknown error code. + * @systemapi Hide this for inner system use. + * @since 10 + */ + function setVoNRState(slotId: number, state: number): Promise; /** * get voNR switch state @@ -1078,6 +1115,7 @@ declare namespace call { * @param slotId Indicates the card slot index number, * ranging from 0 to the maximum card slot index number supported by the device. * @param state Indicates the voNR state. + * @param {AsyncCallback } callback - VoNR state * @permission ohos.permission.SET_TELEPHONY_STATE * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 401 - Parameter error. @@ -1088,15 +1126,60 @@ declare namespace call { * @systemapi Hide this for inner system use. * @since 10 */ - function getVoNRState(slotId: number, callback: AsyncCallback): void; - function getVoNRState(slotId: number): Promise; + function getVoNRState(slotId: number, callback: AsyncCallback): void; /** - * @permission ohos.permission.GET_TELEPHONY_STATE + * get voNR switch state + * + * @param slotId Indicates the card slot index number, + * ranging from 0 to the maximum card slot index number supported by the device. + * @returns {Promise } the voNR state. + * @permission ohos.permission.SET_TELEPHONY_STATE + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 8300001 - Invalid parameter value. + * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service. + * @throws {BusinessError} 8300003 - System internal error. + * @throws {BusinessError} 8300999 - Unknown error code. + * @systemapi Hide this for inner system use. + * @since 10 + */ + function getVoNRState(slotId: number): Promise; + + /** + * if user can set CallTransfer with Time + * + * @param slotId Indicates the card slot index number, + * ranging from 0 to the maximum card slot index number supported by the device. + * @param {AsyncCallback } callback - if user can set + * @permission ohos.permission.SET_TELEPHONY_STATE + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 8300001 - Invalid parameter value. + * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service. + * @throws {BusinessError} 8300003 - System internal error. + * @throws {BusinessError} 8300999 - Unknown error code. * @systemapi Hide this for inner system use. * @since 10 */ function canSetCallTransferTime(slotId: number, callback: AsyncCallback): void; + + /** + * if user can set CallTransfer with Time + * + * @param slotId Indicates the card slot index number, + * ranging from 0 to the maximum card slot index number supported by the device. + * @returns {Promise } - if user can set + * @permission ohos.permission.SET_TELEPHONY_STATE + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 8300001 - Invalid parameter value. + * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service. + * @throws {BusinessError} 8300003 - System internal error. + * @throws {BusinessError} 8300999 - Unknown error code. + * @systemapi Hide this for inner system use. + * @since 10 + */ function canSetCallTransferTime(slotId: number): Promise; /** @@ -1111,6 +1194,15 @@ declare namespace call { CALL_MODE_VIDEO_PAUSED, } + /** + * @systemapi Hide this for inner system use. + * @since 10 + */ + export enum VoNRState { + VONR_STATE_ON = 0, + VORN_STATE_OFF, + } + /** * @systemapi Hide this for inner system use. * @since 8