blob: eec0ff5016bae33d7de97722f7cff5554de6604a [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;
Polina Bondarenko3c053c62017-01-12 22:32:57 +010048 Return<void> getUndefinedTemperature(getUndefinedTemperature_cb _hidl_cb) override;
Polina Bondarenko254e2fe2016-10-11 16:39:23 +020049 private:
50 thermal_module_t* mModule;
51};
52
53extern "C" IThermal* HIDL_FETCH_IThermal(const char* name);
54
55} // namespace implementation
56} // namespace V1_0
57} // namespace thermal
58} // namespace hardware
59} // namespace android
60
Steven Morelandd6e4f032016-11-28 18:37:07 -080061#endif // ANDROID_HARDWARE_THERMAL_V1_0_THERMAL_H