blob: e779d64d37dbe202b038354b8a3875ff5b2a24d9 [file] [log] [blame]
Kumar Anandfc72a8d2017-01-26 12:23:09 -08001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_HARDWARE_POWER_V1_1_POWER_H
18#define ANDROID_HARDWARE_POWER_V1_1_POWER_H
19
20#include <android/hardware/power/1.1/IPower.h>
21#include <hidl/MQDescriptor.h>
22#include <hidl/Status.h>
23#include <hardware/power.h>
24
25namespace android {
26namespace hardware {
27namespace power {
28namespace V1_1 {
29namespace implementation {
30
31using ::android::hardware::power::V1_0::Feature;
32using ::android::hardware::power::V1_0::PowerHint;
33using ::android::hardware::power::V1_1::IPower;
34using ::android::hardware::Return;
35using ::android::hardware::Void;
36
37struct Power : public IPower {
38 Power(power_module_t* module);
39 ~Power();
40
41 // Methods from ::android::hardware::power::V1_0::IPower follow
42 Return<void> setInteractive(bool interactive) override;
43 Return<void> powerHint(PowerHint hint, int32_t data) override;
44 Return<void> setFeature(Feature feature, bool activate) override;
45 Return<void> getPlatformLowPowerStats(getPlatformLowPowerStats_cb _hidl_cb) override;
46
47 // Methods from ::android::hardware::power::V1_1::IPower follow.
48 Return<void> getSubsystemLowPowerStats(getSubsystemLowPowerStats_cb _hidl_cb) override;
Philip Cuadra48750dc2017-07-11 15:26:53 -070049 Return<void> powerHintAsync(PowerHint hint, int32_t data) override;
Kumar Anandfc72a8d2017-01-26 12:23:09 -080050
51 // Methods from ::android::hidl::base::V1_0::IBase follow.
52
53 private:
54 power_module_t* mModule;
55};
56
57} // namespace implementation
58} // namespace V1_1
59} // namespace power
60} // namespace hardware
61} // namespace android
62
63#endif // ANDROID_HARDWARE_POWER_V1_1_POWER_H