1/* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16sequenceable continuous_task_callback_info..OHOS.BackgroundTaskMgr.ContinuousTaskCallbackInfo; 17sequenceable continuous_task_param..OHOS.BackgroundTaskMgr.ContinuousTaskParam; 18sequenceable continuous_task_param..OHOS.BackgroundTaskMgr.ContinuousTaskParamForInner; 19sequenceable delay_suspend_info..OHOS.BackgroundTaskMgr.DelaySuspendInfo; 20sequenceable efficiency_resource_info..OHOS.BackgroundTaskMgr.EfficiencyResourceInfo; 21sequenceable resource_callback_info..OHOS.BackgroundTaskMgr.ResourceCallbackInfo; 22sequenceable OHOS.IRemoteObject; 23sequenceable transient_task_app_info..OHOS.BackgroundTaskMgr.TransientTaskAppInfo; 24 25interface OHOS.BackgroundTaskMgr.IBackgroundTaskSubscriber; 26interface OHOS.BackgroundTaskMgr.IExpiredCallback; 27interface OHOS.BackgroundTaskMgr.IBackgroundTaskMgr { 28 void RequestSuspendDelay([in] String reason, [in] IExpiredCallback expiredCallback, [out] DelaySuspendInfo delayInfo); 29 void CancelSuspendDelay([in] int requestId); 30 void GetRemainingDelayTime([in] int requestId, [out] int delayTime); 31 void StartBackgroundRunning([in] ContinuousTaskParam taskParam, [out] int notificationId, [out] int continuousTaskId); 32 void UpdateBackgroundRunning([in] ContinuousTaskParam taskParam, [out] int notificationId, [out] int continuousTaskId); 33 void StopBackgroundRunning([in] String abilityName, [in] IRemoteObject abilityToken, [in] int abilityId); 34 void SubscribeBackgroundTask([in] IBackgroundTaskSubscriber subscriber); 35 void UnsubscribeBackgroundTask([in] IBackgroundTaskSubscriber subscriber); 36 void GetTransientTaskApps([out] TransientTaskAppInfo[] list); 37 void GetContinuousTaskApps([out] ContinuousTaskCallbackInfo[] list); 38 void ApplyEfficiencyResources([in] EfficiencyResourceInfo resourceInfo); 39 void ResetAllEfficiencyResources(); 40 void GetEfficiencyResourcesInfos([out] ResourceCallbackInfo[] appList, [out] ResourceCallbackInfo[] procList); 41 void StopContinuousTask([in] int uid, [in] int pid, [in] unsigned int taskType, [in] String key); 42 void RequestBackgroundRunningForInner([in] ContinuousTaskParamForInner taskParam); 43 void PauseTransientTaskTimeForInner([in] int uid); 44 void StartTransientTaskTimeForInner([in] int uid); 45 void SetBgTaskConfig([in] String configData, [in] int sourceType); 46} 47