1c5e268c6Sopenharmony_ci/*
2c5e268c6Sopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
3c5e268c6Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4c5e268c6Sopenharmony_ci * you may not use this file except in compliance with the License.
5c5e268c6Sopenharmony_ci * You may obtain a copy of the License at
6c5e268c6Sopenharmony_ci *
7c5e268c6Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8c5e268c6Sopenharmony_ci *
9c5e268c6Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10c5e268c6Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11c5e268c6Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12c5e268c6Sopenharmony_ci * See the License for the specific language governing permissions and
13c5e268c6Sopenharmony_ci * limitations under the License.
14c5e268c6Sopenharmony_ci */
15c5e268c6Sopenharmony_ci
16c5e268c6Sopenharmony_ci/**
17c5e268c6Sopenharmony_ci * @addtogroup power
18c5e268c6Sopenharmony_ci * @{
19c5e268c6Sopenharmony_ci *
20c5e268c6Sopenharmony_ci * @brief Provides APIs for performing hibernation/wakeup operations, subscribing to the hibernation/wakeup status,
21c5e268c6Sopenharmony_ci * and managing running locks.
22c5e268c6Sopenharmony_ci * 
23c5e268c6Sopenharmony_ci * After obtaining an object or proxy of this module, the power service can invoke related APIs to perform
24c5e268c6Sopenharmony_ci * hibernation/wakeup operations, subscribe to the hibernation/wakeup status, and manage running locks.
25c5e268c6Sopenharmony_ci *
26c5e268c6Sopenharmony_ci * @since 3.1
27c5e268c6Sopenharmony_ci * @version 1.0
28c5e268c6Sopenharmony_ci */
29c5e268c6Sopenharmony_ci
30c5e268c6Sopenharmony_ci /**
31c5e268c6Sopenharmony_ci * @file IPowerHdiCallback.idl
32c5e268c6Sopenharmony_ci *
33c5e268c6Sopenharmony_ci * @brief Provides the callbacks of the hibernation/wakeup status.
34c5e268c6Sopenharmony_ci *
35c5e268c6Sopenharmony_ci * The power module provides callbacks for the power service to obtain the hibernation/wakeup status.
36c5e268c6Sopenharmony_ci *
37c5e268c6Sopenharmony_ci * @since 3.1
38c5e268c6Sopenharmony_ci * @version 1.0
39c5e268c6Sopenharmony_ci */
40c5e268c6Sopenharmony_ci
41c5e268c6Sopenharmony_cipackage ohos.hdi.power.v1_0;
42c5e268c6Sopenharmony_ci
43c5e268c6Sopenharmony_ci/**
44c5e268c6Sopenharmony_ci * @brief Represents the callbacks of the hibernation/wakeup status.
45c5e268c6Sopenharmony_ci *
46c5e268c6Sopenharmony_ci * After creating a callback object, the power service can call {@link IPowerInterface} to register a callback to
47c5e268c6Sopenharmony_ci * subscribe to hibernation/wakeup status changes.
48c5e268c6Sopenharmony_ci *
49c5e268c6Sopenharmony_ci * @since 3.1
50c5e268c6Sopenharmony_ci */
51c5e268c6Sopenharmony_ci[callback] interface IPowerHdiCallback {
52c5e268c6Sopenharmony_ci    /**
53c5e268c6Sopenharmony_ci     * @brief Callback of the hibernation state.
54c5e268c6Sopenharmony_ci     *
55c5e268c6Sopenharmony_ci     * This callback is used to notify the power service when the device enters the hibernation state.
56c5e268c6Sopenharmony_ci     *
57c5e268c6Sopenharmony_ci     * @since 3.1
58c5e268c6Sopenharmony_ci     */
59c5e268c6Sopenharmony_ci    OnSuspend();
60c5e268c6Sopenharmony_ci
61c5e268c6Sopenharmony_ci    /**
62c5e268c6Sopenharmony_ci     * @brief Callback of the wakeup state.
63c5e268c6Sopenharmony_ci     *
64c5e268c6Sopenharmony_ci     * This callback is used to notify the power service when the device enters the wakeup state.
65c5e268c6Sopenharmony_ci     *
66c5e268c6Sopenharmony_ci     * @since 3.1
67c5e268c6Sopenharmony_ci     */
68c5e268c6Sopenharmony_ci    OnWakeup();
69c5e268c6Sopenharmony_ci}
70c5e268c6Sopenharmony_ci/** @} */
71