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 16/** 17 * @addtogroup power 18 * @{ 19 * 20 * @brief Provides APIs for performing hibernation/wakeup operations, subscribing to the hibernation/wakeup status, 21 * and managing running locks. 22 * 23 * After obtaining an object or proxy of this module, the power service can invoke related APIs to perform 24 * hibernation/wakeup operations, subscribe to the hibernation/wakeup status, and manage running locks. 25 * 26 * @since 3.1 27 * @version 1.0 28 */ 29 30/** 31 * @file PowerTypes.idl 32 * 33 * @brief Enumerates data types related to power management. 34 * 35 * Such data types include command parameters, callback parameters, and system status. 36 * 37 * @since 3.1 38 * @version 1.0 39 */ 40 41package ohos.hdi.power.v1_2; 42 43/** 44 * @brief Enumerates command parameters for power management. 45 * 46 * @since 3.1 47 * @deprecated 48 */ 49enum PowerHdfCmd { 50 /** Command parameter for registering a callback of the power status */ 51 CMD_REGISTER_CALLBCK = 0, 52 /** Command parameter for hibernating the device */ 53 CMD_START_SUSPEND, 54 /** Command parameter for waking up the device */ 55 CMD_STOP_SUSPEND, 56 /** Command parameter for forcibly hibernating the device */ 57 CMD_FORCE_SUSPEND, 58 /** Command parameter for opening the running lock */ 59 CMD_SUSPEND_BLOCK, 60 /** Command parameter for closing the running lock*/ 61 CMD_SUSPEND_UNBLOCK, 62 /** Command parameter for dumping */ 63 CMD_DUMP, 64}; 65 66/** 67 * @brief Enumerates command parameters for the power status callback. 68 * 69 * @since 3.1 70 * @deprecated 71 */ 72enum PowerHdfCallbackCmd { 73 /** Command parameter for the hibernation callback */ 74 CMD_ON_SUSPEND = 0, 75 /** Command parameter for the wakeup callback */ 76 CMD_ON_WAKEUP, 77}; 78 79/** 80 * @brief Enumerates the power status. 81 * 82 * @since 3.1 83 */ 84enum PowerHdfState { 85 /** Awake state */ 86 AWAKE = 0, 87 /** Inactive state */ 88 INACTIVE, 89 /** Sleep state */ 90 SLEEP, 91}; 92/** @} */ 93