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 16/** 17 * @addtogroup power 18 * @{ 19 * 20 * @brief Provides APIs for subscribing to the suspend/wakeup state with a tag. 21 * and managing running locks. 22 * 23 * After obtaining an object or proxy of this module, the power service can invoke related APIs to subscribe to the 24 * suspend/wakeup state. 25 * 26 * @since 6.0 27 * @version 1.0 28 */ 29 30 /** 31 * @file IPowerHdiCallbackExt.idl 32 * 33 * @brief Provides the callbacks of the suspend/wakeup state with a tag. 34 * 35 * The power module provides callbacks for the power service to obtain the suspend/wakeup state with a tag. 36 * 37 * @since 6.0 38 * @version 1.0 39 */ 40 41package ohos.hdi.power.v1_3; 42 43/** 44 * @brief Represents the callbacks of the suspend/wakeup state with a tag. 45 * 46 * After creating a callback object, the power service can call {@link IPowerInterface} to subscribe to the 47 * suspend/wakeup state changes. 48 * 49 * This callback must be registered via RegisterPowerCallbackExt and unregistered via UnRegisterRunningLockCallback 50 * at {@link IPowerInterface}. 51 * 52 * @since 6.0 53 * @version 1.0 54 */ 55[callback] interface IPowerHdiCallbackExt { 56 /** 57 * @brief Callback of the suspend state with a tag. 58 * 59 * This callback is used to notify the power service when the device enters the suspend state with a tag, and is 60 * an enhancement to old version interface OnSuspend. 61 * 62 * @param tag The suspend tag 63 * 64 * @since 6.0 65 * @version 1.0 66 */ 67 OnSuspendWithTag([in] String tag); 68 69 /** 70 * @brief Callback of the wakeup state with a tag. 71 * 72 * This callback is used to notify the power service when the device enters the wakeup state with a tag, and is. 73 * an enhancement to old version interface OnWakeup. 74 * 75 * @param tag The wakeup tag 76 * 77 * @since 6.0 78 * @version 1.0 79 */ 80 OnWakeupWithTag([in] String tag); 81} 82/** @} */ 83