Benjamin Schwartz | 817521b | 2020-10-05 09:20:16 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2020 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 | #pragma once |
| 18 | |
Benjamin Schwartz | 18a3fb5 | 2020-10-05 15:44:19 -0700 | [diff] [blame] | 19 | #include <aidl/android/hardware/power/stats/BnPowerStats.h> |
Benjamin Schwartz | 817521b | 2020-10-05 09:20:16 -0700 | [diff] [blame] | 20 | |
| 21 | namespace aidl { |
| 22 | namespace android { |
| 23 | namespace hardware { |
Benjamin Schwartz | 18a3fb5 | 2020-10-05 15:44:19 -0700 | [diff] [blame] | 24 | namespace power { |
| 25 | namespace stats { |
Benjamin Schwartz | 817521b | 2020-10-05 09:20:16 -0700 | [diff] [blame] | 26 | |
| 27 | class PowerStats : public BnPowerStats { |
| 28 | public: |
| 29 | PowerStats() = default; |
Benjamin Schwartz | 18a3fb5 | 2020-10-05 15:44:19 -0700 | [diff] [blame] | 30 | // Methods from aidl::android::hardware::power::stats::IPowerStats |
Benjamin Schwartz | 74e09c7 | 2020-12-21 14:57:45 -0800 | [diff] [blame] | 31 | ndk::ScopedAStatus getPowerEntityInfo(std::vector<PowerEntity>* _aidl_return) override; |
Benjamin Schwartz | 817521b | 2020-10-05 09:20:16 -0700 | [diff] [blame] | 32 | ndk::ScopedAStatus getStateResidency(const std::vector<int32_t>& in_powerEntityIds, |
| 33 | std::vector<StateResidencyResult>* _aidl_return) override; |
Benjamin Schwartz | 74e09c7 | 2020-12-21 14:57:45 -0800 | [diff] [blame] | 34 | ndk::ScopedAStatus getEnergyConsumerInfo(std::vector<EnergyConsumer>* _aidl_return) override; |
| 35 | ndk::ScopedAStatus getEnergyConsumed(const std::vector<int32_t>& in_energyConsumerIds, |
Benjamin Schwartz | 817521b | 2020-10-05 09:20:16 -0700 | [diff] [blame] | 36 | std::vector<EnergyConsumerResult>* _aidl_return) override; |
Benjamin Schwartz | 74e09c7 | 2020-12-21 14:57:45 -0800 | [diff] [blame] | 37 | ndk::ScopedAStatus getEnergyMeterInfo(std::vector<Channel>* _aidl_return) override; |
Benjamin Schwartz | eef94f8 | 2021-02-03 12:55:39 -0800 | [diff] [blame^] | 38 | ndk::ScopedAStatus readEnergyMeter(const std::vector<int32_t>& in_channelIds, |
| 39 | std::vector<EnergyMeasurement>* _aidl_return) override; |
Benjamin Schwartz | 817521b | 2020-10-05 09:20:16 -0700 | [diff] [blame] | 40 | }; |
| 41 | |
Benjamin Schwartz | 18a3fb5 | 2020-10-05 15:44:19 -0700 | [diff] [blame] | 42 | } // namespace stats |
| 43 | } // namespace power |
Benjamin Schwartz | 817521b | 2020-10-05 09:20:16 -0700 | [diff] [blame] | 44 | } // namespace hardware |
| 45 | } // namespace android |
| 46 | } // namespace aidl |