• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 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 IPowerHdiCallback.idl
32 *
33 * @brief Provides the callbacks of the hibernation/wakeup status.
34 *
35 * The power module provides callbacks for the power service to obtain the hibernation/wakeup status.
36 *
37 * @since 3.1
38 * @version 1.0
39 */
40
41package ohos.hdi.power.v1_0;
42
43/**
44 * @brief Represents the callbacks of the hibernation/wakeup status.
45 *
46 * After creating a callback object, the power service can call {@link IPowerInterface} to register a callback to
47 * subscribe to hibernation/wakeup status changes.
48 *
49 * @since 3.1
50 */
51[callback] interface IPowerHdiCallback {
52    /**
53     * @brief Callback of the hibernation state.
54     *
55     * This callback is used to notify the power service when the device enters the hibernation state.
56     *
57     * @since 3.1
58     */
59    OnSuspend();
60
61    /**
62     * @brief Callback of the wakeup state.
63     *
64     * This callback is used to notify the power service when the device enters the wakeup state.
65     *
66     * @since 3.1
67     */
68    OnWakeup();
69}
70/** @} */
71