新增接口

Signed-off-by: lipengfei <lipengfei53@huawei.com>
This commit is contained in:
lipengfei 2023-09-27 14:30:26 +00:00 committed by Gitee
parent dd9fb9a516
commit 5bd560c25f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -222,10 +222,24 @@ declare namespace workScheduler {
* @throws { BusinessError } 9700003 - System service operation failed.
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @StageModelOnly
* @since 9
* @since 10
*/
function obtainAllWorks(callback: AsyncCallback<void>): Array<WorkInfo>;
/**
* Get all works of the calling application.
*
* @param { AsyncCallback<void> } callback - The callback of the function.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 9700001 - Memory operation failed.
* @throws { BusinessError } 9700002 - Parcel operation failed.
* @throws { BusinessError } 9700003 - System service operation failed.
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @StageModelOnly
* @since 10
*/
function obtainAllWorks(callback: AsyncCallback<Array<WorkInfo>>): void;
/**
* Get all works of the calling application.
*
@ -270,6 +284,22 @@ declare namespace workScheduler {
*/
function isLastWorkTimeOut(workId: number, callback: AsyncCallback<void>): boolean;
/**
* Check whether last work running is timeout. The interface is for repeating work.
*
* @param { number } workId - The id of work.
* @param { AsyncCallback<void> } callback - The callback of the function.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 9700001 - Memory operation failed.
* @throws { BusinessError } 9700002 - Parcel operation failed.
* @throws { BusinessError } 9700003 - System service operation failed.
* @throws { BusinessError } 9700004 - Check workInfo failed.
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @StageModelOnly
* @since 10
*/
function isLastWorkTimeOut(workId: number, callback: AsyncCallback<boolean>): void;
/**
* Check whether last work running is timeout. The interface is for repeating work.
*