sdk仓修改d.ts文件内容,通过工具检查

Signed-off-by: cxcxfan <fancunxiao@huawei.com>
This commit is contained in:
cxcxfan 2023-05-08 17:49:00 +08:00
parent fce10d7663
commit d6091eed85
5 changed files with 312 additions and 28 deletions

View File

@ -30,6 +30,7 @@ declare namespace backgroundTaskManager {
* The info of delay suspend.
*
* @name DelaySuspendInfo
* @interface DelaySuspendInfo
* @since 7
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
* @deprecated since 9
@ -38,10 +39,20 @@ declare namespace backgroundTaskManager {
interface DelaySuspendInfo {
/**
* The unique identifier of the delay request.
*
* @since 7
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
* @deprecated since 9
* @useinstead ohos.resourceschedule.backgroundTaskManager.DelaySuspendInfo
*/
requestId: number;
/**
* The actual delay duration (ms).
*
* @since 7
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
* @deprecated since 9
* @useinstead ohos.resourceschedule.backgroundTaskManager.DelaySuspendInfo
*/
actualDelayTime: number;
}
@ -51,7 +62,7 @@ declare namespace backgroundTaskManager {
*
* @since 7
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
* @param requestId Indicates the identifier of the delay request.
* @param { number } requestId Indicates the identifier of the delay request.
* @deprecated since 9
* @useinstead ohos.resourceschedule.backgroundTaskManager.cancelSuspendDelay
*/
@ -60,14 +71,24 @@ declare namespace backgroundTaskManager {
/**
* Obtains the remaining time before an application enters the suspended state.
*
* @since 7
* @param { number } requestId Indicates the identifier of the delay request.
* @param { AsyncCallback<number> } callback - The callback of the remaining delay time.
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
* @param requestId Indicates the identifier of the delay request.
* @returns The remaining delay time
* @since 7
* @deprecated since 9
* @useinstead ohos.resourceschedule.backgroundTaskManager.getRemainingDelayTime
*/
function getRemainingDelayTime(requestId: number, callback: AsyncCallback<number>): void;
/**
* Obtains the remaining time before an application enters the suspended state.
*
* @param { number } requestId Indicates the identifier of the delay request.
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
* @since 7
* @deprecated since 9
* @useinstead ohos.resourceschedule.backgroundTaskManager.getRemainingDelayTime
*/
function getRemainingDelayTime(requestId: number): Promise<number>;
/**
@ -75,9 +96,9 @@ declare namespace backgroundTaskManager {
*
* @since 7
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
* @param reason Indicates the reason for delayed transition to the suspended state.
* @param callback The callback delay time expired.
* @returns Info of delay request
* @param { string } reason Indicates the reason for delayed transition to the suspended state.
* @param { Callback<void> } callback The callback delay time expired.
* @returns { DelaySuspendInfo } Info of delay request
* @deprecated since 9
* @useinstead ohos.resourceschedule.backgroundTaskManager.requestSuspendDelay
*/
@ -87,33 +108,60 @@ declare namespace backgroundTaskManager {
* Service ability uses this method to request start running in background.
* system will publish a notification related to the this service.
*
* @since 8
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
* @permission ohos.permission.KEEP_BACKGROUND_RUNNING
* @param context app running context.
* @param bgMode Indicates which background mode to request.
* @param wantAgent Indicates which ability to start when user click the notification bar.
* @param { Context } context app running context.
* @param { BackgroundMode } bgMode Indicates which background mode to request.
* @param { WantAgent } wantAgent Indicates which ability to start when user click the notification bar.
* @param { AsyncCallback<void> } callback - The callback of the function.
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
* @since 8
* @deprecated since 9
* @useinstead ohos.resourceschedule.backgroundTaskManager.startBackgroundRunning
*/
function startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: WantAgent, callback: AsyncCallback<void>): void;
/**
* Service ability uses this method to request start running in background.
* system will publish a notification related to the this service.
*
* @permission ohos.permission.KEEP_BACKGROUND_RUNNING
* @param { Context } context app running context.
* @param { BackgroundMode } bgMode Indicates which background mode to request.
* @param { WantAgent } wantAgent Indicates which ability to start when user click the notification bar.
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
* @since 8
* @deprecated since 9
* @useinstead ohos.resourceschedule.backgroundTaskManager.startBackgroundRunning
*/
function startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: WantAgent): Promise<void>;
/**
* Service ability uses this method to request stop running in background.
*
* @since 8
* @param { Context } context - App running context.
* @param { AsyncCallback<void> } callback - The callback of the function.
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
* @param context app running context.
* @since 8
* @deprecated since 9
* @useinstead ohos.resourceschedule.backgroundTaskManager.stopBackgroundRunning
*/
function stopBackgroundRunning(context: Context, callback: AsyncCallback<void>): void;
/**
* Service ability uses this method to request stop running in background.
*
* @param { Context } context - App running context.
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
* @since 8
* @deprecated since 9
* @useinstead ohos.resourceschedule.backgroundTaskManager.stopBackgroundRunning
*/
function stopBackgroundRunning(context: Context): Promise<void>;
/**
* Supported background mode.
*
* @enum { number }
* @since 8
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
* @deprecated since 9

View File

@ -33,13 +33,24 @@ declare namespace reminderAgent {
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @permission ohos.permission.PUBLISH_AGENT_REMINDER
* @param reminderReq Indicates the reminder instance to publish.
* @param callback Indicates the callback function.
* @returns reminder id.
* @param { ReminderRequest } reminderReq Indicates the reminder instance to publish.
* @param { AsyncCallback<number> } callback Indicates the callback function.
* @deprecated since 9
* @useinstead reminderAgentManager.publishReminder
*/
function publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback<number>): void;
/**
* Publishes a scheduled reminder.
*
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @permission ohos.permission.PUBLISH_AGENT_REMINDER
* @param { ReminderRequest } reminderReq Indicates the reminder instance to publish.
* @returns { Promise<number> } reminder id.
* @deprecated since 9
* @useinstead reminderAgentManager.publishReminder
*/
function publishReminder(reminderReq: ReminderRequest): Promise<number>;
/**
@ -47,12 +58,22 @@ declare namespace reminderAgent {
*
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @param reminderId Indicates the reminder id.
* @param callback Indicates the callback function.
* @param { number } reminderId Indicates the reminder id.
* @param { AsyncCallback<void> } callback Indicates the callback function.
* @deprecated since 9
* @useinstead reminderAgentManager.cancelReminder
*/
function cancelReminder(reminderId: number, callback: AsyncCallback<void>): void;
/**
* Cancels a reminder.
*
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @param { number } reminderId Indicates the reminder id.
* @deprecated since 9
* @useinstead reminderAgentManager.cancelReminder
*/
function cancelReminder(reminderId: number): Promise<void>;
/**
@ -60,11 +81,20 @@ declare namespace reminderAgent {
*
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @param callback Indicates the callback function.
* @param { AsyncCallback<Array<ReminderRequest>> } callback Indicates the callback function.
* @deprecated since 9
* @useinstead reminderAgentManager.getValidReminders
*/
function getValidReminders(callback: AsyncCallback<Array<ReminderRequest>>): void;
/**
* Obtains all the valid reminders of current application.
*
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @deprecated since 9
* @useinstead reminderAgentManager.getValidReminders
*/
function getValidReminders(): Promise<Array<ReminderRequest>>;
/**
@ -72,11 +102,20 @@ declare namespace reminderAgent {
*
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @param callback Indicates the callback function.
* @param { AsyncCallback<void> } callback Indicates the callback function.
* @deprecated since 9
* @useinstead reminderAgentManager.cancelAllReminders
*/
function cancelAllReminders(callback: AsyncCallback<void>): void;
/**
* Cancels all the reminders of current application.
*
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @deprecated since 9
* @useinstead reminderAgentManager.cancelAllReminders
*/
function cancelAllReminders(): Promise<void>;
/**
@ -84,12 +123,22 @@ declare namespace reminderAgent {
*
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @param slot Indicates the slot.
* @param callback Indicates the callback function.
* @param { NotificationSlot } slot Indicates the slot.
* @param { AsyncCallback<void> } callback Indicates the callback function.
* @deprecated since 9
* @useinstead reminderAgentManager.addNotificationSlot
*/
function addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback<void>): void;
/**
* Add notification slot.
*
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @param { NotificationSlot } slot Indicates the slot.
* @deprecated since 9
* @useinstead reminderAgentManager.addNotificationSlot
*/
function addNotificationSlot(slot: NotificationSlot): Promise<void>;
/**
@ -97,17 +146,28 @@ declare namespace reminderAgent {
*
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @param slotType Indicates the type of the slot.
* @param callback Indicates the callback function.
* @param { notification.SlotType } slotType Indicates the type of the slot.
* @param { AsyncCallback<void> } callback Indicates the callback function.
* @deprecated since 9
* @useinstead reminderAgentManager.removeNotificationSlot
*/
function removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback<void>): void;
/**
* Deletes a created notification slot based on the slot type.
*
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @param { notification.SlotType } slotType Indicates the type of the slot.
* @deprecated since 9
* @useinstead reminderAgentManager.removeNotificationSlot
*/
function removeNotificationSlot(slotType: notification.SlotType): Promise<void>;
/**
* Declares action button type.
*
* @enum { number }
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @deprecated since 9
@ -136,6 +196,7 @@ declare namespace reminderAgent {
/**
* Declares reminder type.
*
* @enum { number }
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @deprecated since 9
@ -173,6 +234,7 @@ declare namespace reminderAgent {
/**
* Action button information. The button will show on displayed reminder.
*
* @interface ActionButton
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @deprecated since 9
@ -202,6 +264,7 @@ declare namespace reminderAgent {
* Want agent information.
* It will switch to target ability when you click the displayed reminder.
*
* @interface WantAgent
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @deprecated since 9
@ -230,6 +293,7 @@ declare namespace reminderAgent {
/**
* Max screen want agent information.
*
* @interface MaxScreenWantAgent
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @deprecated since 9
@ -258,6 +322,7 @@ declare namespace reminderAgent {
/**
* Reminder Common information.
*
* @interface ReminderRequest
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @deprecated since 9
@ -385,6 +450,8 @@ declare namespace reminderAgent {
}
/**
* @interface ReminderRequestCalendar
* @since 7
* @deprecated since 9
* @useinstead reminderAgentManager.ReminderRequestCalendar
*/
@ -420,6 +487,7 @@ declare namespace reminderAgent {
/**
* Alarm reminder information.
*
* @interface ReminderRequestAlarm
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @deprecated since 9
@ -457,6 +525,7 @@ declare namespace reminderAgent {
/**
* CountDown reminder information.
*
* @interface ReminderRequestTimer
* @since 7
* @syscap SystemCapability.Notification.ReminderAgent
* @deprecated since 9

View File

@ -158,6 +158,7 @@ declare namespace reminderAgentManager {
/**
* Declares action button type.
*
* @enum { number }
* @since 9
* @syscap SystemCapability.Notification.ReminderAgent
*/
@ -188,6 +189,7 @@ declare namespace reminderAgentManager {
/**
* Declares reminder type.
*
* @enum { number }
* @since 9
* @syscap SystemCapability.Notification.ReminderAgent
*/
@ -217,6 +219,7 @@ declare namespace reminderAgentManager {
/**
* Action button information. The button will show on displayed reminder.
*
* @interface ActionButton
* @since 9
* @syscap SystemCapability.Notification.ReminderAgent
*/
@ -248,6 +251,7 @@ declare namespace reminderAgentManager {
* Want agent information.
* It will switch to target ability when you click the displayed reminder.
*
* @interface WantAgent
* @since 9
* @syscap SystemCapability.Notification.ReminderAgent
*/
@ -278,6 +282,7 @@ declare namespace reminderAgentManager {
/**
* Max screen want agent information.
*
* @interface MaxScreenWantAgent
* @since 9
* @syscap SystemCapability.Notification.ReminderAgent
*/
@ -300,6 +305,7 @@ declare namespace reminderAgentManager {
/**
* Reminder Common information.
*
* @interface ReminderRequest
* @since 9
* @syscap SystemCapability.Notification.ReminderAgent
*/
@ -444,6 +450,7 @@ declare namespace reminderAgentManager {
/**
* Alarm reminder information.
*
* @interface ReminderRequestAlarm
* @since 9
* @syscap SystemCapability.Notification.ReminderAgent
*/
@ -473,6 +480,7 @@ declare namespace reminderAgentManager {
/**
* CountDown reminder information.
*
* @interface ReminderRequestTimer
* @since 9
* @syscap SystemCapability.Notification.ReminderAgent
*/

View File

@ -34,10 +34,16 @@ declare namespace backgroundTaskManager {
interface DelaySuspendInfo {
/**
* The unique identifier of the delay request.
*
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
* @since 9
*/
requestId: number;
/**
* The actual delay duration (ms).
*
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
* @since 9
*/
actualDelayTime: number;
}
@ -78,7 +84,6 @@ declare namespace backgroundTaskManager {
/**
* Obtains the remaining time before an application enters the suspended state.
*
* @since 9
* @param { number } requestId - The identifier of the delay request.
* @returns { Promise<number> } The promise returns the remaining delay time.
* @throws { BusinessError } 401 - Parameter error.
@ -89,7 +94,8 @@ declare namespace backgroundTaskManager {
* @throws { BusinessError } 9900001 - Caller information verification failed.
* @throws { BusinessError } 9900002 - Background task verification failed.
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
*/
* @since 9
*/
function getRemainingDelayTime(requestId: number): Promise<number>;
/**
@ -199,6 +205,7 @@ declare namespace backgroundTaskManager {
/**
* Apply or unapply efficiency resources.
*
* @param { EfficiencyResourcesRequest } request - The request of apply or unapply efficiency resources.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not System App.
* @throws { BusinessError } 401 - Parameter error.
@ -325,36 +332,64 @@ declare namespace backgroundTaskManager {
export enum ResourceType {
/**
* The cpu resource for not being suspended.
*
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply
* @systemapi Hide this for inner system use.
* @since 9
*/
CPU = 1,
/**
* The resource for not being proxyed common_event.
*
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply
* @systemapi Hide this for inner system use.
* @since 9
*/
COMMON_EVENT = 1 << 1,
/**
* The resource for not being proxyed timer.
*
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply
* @systemapi Hide this for inner system use.
* @since 9
*/
TIMER = 1 << 2,
/**
* The resource for not being proxyed workscheduler.
*
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply
* @systemapi Hide this for inner system use.
* @since 9
*/
WORK_SCHEDULER = 1 << 3,
/**
* The resource for not being proxyed bluetooth.
*
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply
* @systemapi Hide this for inner system use.
* @since 9
*/
BLUETOOTH = 1 << 4,
/**
* The resource for not being proxyed gps.
*
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply
* @systemapi Hide this for inner system use.
* @since 9
*/
GPS = 1 << 5,
/**
* The resource for not being proxyed audio.
*
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply
* @systemapi Hide this for inner system use.
* @since 9
*/
AUDIO = 1 << 6
}
@ -370,31 +405,55 @@ declare namespace backgroundTaskManager {
export interface EfficiencyResourcesRequest {
/**
* The set of resource types that app wants to apply.
*
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply
* @systemapi Hide this for inner system use.
* @since 9
*/
resourceTypes: number;
/**
* True if the app begin to use, else false.
*
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply
* @systemapi Hide this for inner system use.
* @since 9
*/
isApply: boolean;
/**
* The duration that the resource can be used most.
*
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply
* @systemapi Hide this for inner system use.
* @since 9
*/
timeOut: number;
/**
* True if the apply action is persist, else false. Default value is false.
*
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply
* @systemapi Hide this for inner system use.
* @since 9
*/
isPersist?: boolean;
/**
* True if apply action is for process, false is for package. Default value is false.
*
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply
* @systemapi Hide this for inner system use.
* @since 9
*/
isProcess?: boolean;
/**
* The apply reason.
* The apply reason.
*
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply
* @systemapi Hide this for inner system use.
* @since 9
*/
reason: string;
}

View File

@ -34,66 +34,114 @@ declare namespace workScheduler {
export interface WorkInfo {
/**
* The id of the current work.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
workId: number;
/**
* The bundle name of the current work.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
bundleName: string;
/**
* The ability name of the current work.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
abilityName: string;
/**
* Whether the current work will be saved.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
isPersisted?: boolean;
/**
* The network type of the current work.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
networkType?: NetworkType;
/**
* Whether a charging state has been set for triggering the work.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
isCharging?: boolean;
/**
* The charger type based on which the work is triggered.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
chargerType?: ChargingType;
/**
* The battery level for triggering a work.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
batteryLevel?: number;
/**
* The battery status for triggering a work.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
batteryStatus?: BatteryStatus;
/**
* Whether a storage state has been set for triggering the work.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
storageRequest?: StorageRequest;
/**
* The interval at which the work is repeated.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
repeatCycleTime?: number;
/**
* Whether the work has been set to repeat at the specified interval.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
isRepeat?: boolean;
/**
* The repeat of the current work.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
repeatCount?: number;
/**
* Whether the device deep idle state has been set for triggering the work.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
isDeepIdle?: boolean;
/**
* The idle wait time based on which the work is triggered.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
idleWaitTime?: number;
/**
* The parameters of the work. The value is only supported basic type(Number, String, Boolean).
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
parameters?: { [key: string]: number | string | boolean };
}
@ -242,6 +290,7 @@ declare namespace workScheduler {
* Describes network type.
*
* @name NetworkType
* @enum { number }
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @StageModelOnly
* @since 9
@ -249,26 +298,44 @@ declare namespace workScheduler {
export enum NetworkType {
/**
* Describes any network connection.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
NETWORK_TYPE_ANY = 0,
/**
* Describes a mobile network connection.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
NETWORK_TYPE_MOBILE,
/**
* Describes a wifi network connection.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
NETWORK_TYPE_WIFI,
/**
* Describes a bluetooth network connection.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
NETWORK_TYPE_BLUETOOTH,
/**
* Describes a wifi p2p network connection.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
NETWORK_TYPE_WIFI_P2P,
/**
* Describes a wifi wire network connection.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
NETWORK_TYPE_ETHERNET
}
@ -277,6 +344,7 @@ declare namespace workScheduler {
* Describes charging type.
*
* @name ChargingType
* @enum { number }
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @StageModelOnly
* @since 9
@ -284,18 +352,30 @@ declare namespace workScheduler {
export enum ChargingType {
/**
* Describes any charger is connected.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
CHARGING_PLUGGED_ANY = 0,
/**
* Describes ac charger is connected.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
CHARGING_PLUGGED_AC,
/**
* Describes usb charger is connected.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
CHARGING_PLUGGED_USB,
/**
* Describes wireless charger is connected.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
CHARGING_PLUGGED_WIRELESS
}
@ -304,6 +384,7 @@ declare namespace workScheduler {
* Describes the battery status.
*
* @name BatteryStatus
* @enum { number }
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @StageModelOnly
* @since 9
@ -311,14 +392,23 @@ declare namespace workScheduler {
export enum BatteryStatus {
/**
* Describes battery status is to low.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
BATTERY_STATUS_LOW = 0,
/**
* Describes battery status is to ok.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
BATTERY_STATUS_OKAY,
/**
* Describes battery status is to low or ok.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
BATTERY_STATUS_LOW_OR_OKAY
}
@ -327,6 +417,7 @@ declare namespace workScheduler {
* Describes the storage request.
*
* @name StorageRequest
* @enum { number }
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @StageModelOnly
* @since 9
@ -334,14 +425,23 @@ declare namespace workScheduler {
export enum StorageRequest {
/**
* Describes storage is to low.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
STORAGE_LEVEL_LOW = 0,
/**
* Describes storage is to ok.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
STORAGE_LEVEL_OKAY,
/**
* Describes storage is to low or ok.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @since 9
*/
STORAGE_LEVEL_LOW_OR_OKAY
}