1/*
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#ifndef ANDROID_HARDWARE_THERMAL_V1_0_THERMAL_H
17#define ANDROID_HARDWARE_THERMAL_V1_0_THERMAL_H
18
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
60#endif  // ANDROID_HARDWARE_THERMAL_V1_0_THERMAL_H
61