mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-27 01:11:35 +00:00
新增接口
Signed-off-by: lipengfei <lipengfei53@huawei.com>
This commit is contained in:
parent
dd9fb9a516
commit
5bd560c25f
32
api/@ohos.resourceschedule.workScheduler.d.ts
vendored
32
api/@ohos.resourceschedule.workScheduler.d.ts
vendored
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user