• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 performing suspend/wakeup operations, subscribing to the suspend/wakeup state,
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 * suspend/wakeup operations, subscribe to the suspend/wakeup state, and manage running locks.
25 *
26 * @since 3.1
27 * @version 1.1
28 */
29
30/**
31 * @file IPowerInterface.idl
32 *
33 * @brief Provides APIs for performing suspend/wakeup operations, subscribing to the suspend/wakeup state,
34 * and managing running locks.
35 *
36 *
37 *
38 * @since 3.1
39 * @version 1.1
40 */
41
42package ohos.hdi.power.v1_3;
43
44import ohos.hdi.power.v1_2.IPowerInterface;
45import ohos.hdi.power.v1_3.IPowerHdiCallbackExt;
46
47/**
48 * @brief Represents APIs for performing suspend/wakeup operations, subscribing to the suspend/wakeup state,
49 * and managing running locks.
50 *
51 *
52 *
53 * @since 3.1
54 * @version 1.1
55 */
56interface IPowerInterface extends ohos.hdi.power.v1_2.IPowerInterface {
57    /**
58     * @brief Registers the power callback of the suspend/wakeup state with a tag.
59     *
60     * @param ipowerHdiCallback Callback to register.
61     *
62     * @return Returns <b>HDF_SUCCESS</b> if the operation is successful.
63     * @see IPowerHdiCallbackExt
64     *
65     * @since 6.0
66     * @version 1.0
67     */
68    RegisterPowerCallbackExt([in] IPowerHdiCallbackExt ipowerHdiCallback);
69
70    /**
71     * @brief Unregisters the power callback of the suspend/wakeup state with a tag.
72     *
73     * @param ipowerHdiCallback Callback to unregister.
74     *
75     * @return Returns <b>HDF_SUCCESS</b> if the operation is successful.
76     * @see IPowerHdiCallbackExt
77     *
78     * @since 6.0
79     * @version 1.0
80     */
81    UnRegisterPowerCallbackExt([in] IPowerHdiCallbackExt ipowerHdiCallback);
82}
83/** @} */