blob: 2e062893ff8399d0b863fba5d4135773473ae1d2 [file] [log] [blame]
Steven Moreland9f8b5c72016-11-29 15:03:38 -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 */
Steven Morelandd6e4f032016-11-28 18:37:07 -080016#ifndef ANDROID_HARDWARE_THERMAL_V1_0_THERMAL_H
17#define ANDROID_HARDWARE_THERMAL_V1_0_THERMAL_H
Polina Bondarenko254e2fe2016-10-11 16:39:23 +020018
19#include <android/hardware/thermal/1.0/IThermal.h>
20#include <hidl/Status.h>
21#include <hardware/thermal.h>
22
23#include <hidl/MQDescriptor.h>
24
25namespace android {
26namespace hardware {
27namespace thermal {
28namespace V1_0 {
29namespace implementation {
30
31using ::android::hardware::thermal::V1_0::CoolingDevice;
32using ::android::hardware::thermal::V1_0::CpuUsage;
33using ::android::hardware::thermal::V1_0::IThermal;
34using ::android::hardware::thermal::V1_0::Temperature;
35using ::android::hardware::thermal::V1_0::ThermalStatus;
36using ::android::hardware::Return;
37using ::android::hardware::Void;
38using ::android::hardware::hidl_vec;
39using ::android::hardware::hidl_string;
40using ::android::sp;
41
42struct Thermal : public IThermal {
43 Thermal(thermal_module_t* module);
44 // Methods from ::android::hardware::thermal::V1_0::IThermal follow.
45 Return<void> getTemperatures(getTemperatures_cb _hidl_cb) override;
46 Return<void> getCpuUsages(getCpuUsages_cb _hidl_cb) override;
47 Return<void> getCoolingDevices(getCoolingDevices_cb _hidl_cb) override;
48 private:
49 thermal_module_t* mModule;
50};
51
52extern "C" IThermal* HIDL_FETCH_IThermal(const char* name);
53
54} // namespace implementation
55} // namespace V1_0
56} // namespace thermal
57} // namespace hardware
58} // namespace android
59
Steven Morelandd6e4f032016-11-28 18:37:07 -080060#endif // ANDROID_HARDWARE_THERMAL_V1_0_THERMAL_H