1/* 2 * Copyright (c) 2024 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 allow_info..OHOS.DevStandbyMgr.AllowInfo; 17sequenceable resource_request..OHOS.DevStandbyMgr.ResourceRequest; 18interface OHOS.DevStandbyMgr.IStandbyServiceSubscriber; 19interface OHOS.DevStandbyMgr.IStandbyService { 20 void SubscribeStandbyCallback([in] IStandbyServiceSubscriber subscriber, [in] String subscriberName, [in] String moduleName); 21 void UnsubscribeStandbyCallback([in] IStandbyServiceSubscriber subscriber); 22 void ApplyAllowResource([in] ResourceRequest resourceRequest); 23 void UnapplyAllowResource([in] ResourceRequest resourceRequest); 24 void GetAllowList([in] unsigned int allowType, [out] AllowInfo[] allowInfoList, [in] unsigned int reasonCode); 25 void GetRestrictList([in] unsigned int restrictType, [out] AllowInfo[] restrictInfoList, [in] unsigned int reasonCode); 26 void ReportWorkSchedulerStatus([in] boolean started, [in] int uid, [in] String bundleName); 27 void IsStrategyEnabled([in] String strategyName, [out] boolean isEnabled); 28 void ReportDeviceStateChanged([in] int type, [in] boolean enabled); 29 void IsDeviceInStandby([out] boolean isStandby); 30 void SetNatInterval([in] unsigned int type, [in] boolean enable, [in] unsigned int interval); 31 void HandleEvent([in] unsigned int resType, [in] long value, [in] String sceneInfo); 32 void ReportPowerOverused([in] String module, [in] unsigned int level); 33 void DelayHeartBeat([in] long timestamp); 34} 35