1 /* 2 * Copyright (C) 2017 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_1_WAHOO_THERMAL_H 17 #define ANDROID_HARDWARE_THERMAL_V1_1_WAHOO_THERMAL_H 18 19 #include <android/hardware/thermal/1.1/IThermal.h> 20 #include <android/hardware/thermal/1.1/IThermalCallback.h> 21 #include <hidl/Status.h> 22 #include <hidl/MQDescriptor.h> 23 24 namespace android { 25 namespace hardware { 26 namespace thermal { 27 namespace V1_1 { 28 namespace implementation { 29 30 using ::android::hardware::thermal::V1_0::CoolingDevice; 31 using ::android::hardware::thermal::V1_0::CpuUsage; 32 using ::android::hardware::thermal::V1_0::Temperature; 33 using ::android::hardware::thermal::V1_0::ThermalStatus; 34 using ::android::hardware::thermal::V1_0::ThermalStatusCode; 35 using ::android::hardware::thermal::V1_1::IThermal; 36 using ::android::hardware::thermal::V1_1::IThermalCallback; 37 using ::android::hardware::Return; 38 using ::android::hardware::Void; 39 using ::android::hardware::hidl_vec; 40 using ::android::hardware::hidl_string; 41 using ::android::hardware::hidl_death_recipient; 42 using ::android::hidl::base::V1_0::IBase; 43 using ::android::sp; 44 45 struct Thermal : public IThermal { 46 // Local functions used internally by thermal-engine follow. 47 std::string getSkinSensorType(); 48 void notifyThrottling(bool isThrottling, const Temperature& temperature); 49 Thermal(); 50 // Methods from ::android::hardware::thermal::V1_0::IThermal follow. 51 Return<void> getTemperatures(getTemperatures_cb _hidl_cb) override; 52 Return<void> getCpuUsages(getCpuUsages_cb _hidl_cb) override; 53 Return<void> getCoolingDevices(getCoolingDevices_cb _hidl_cb) override; 54 // Methods from ::android::hardware::thermal::V1_1::IThermal follow. 55 Return<void> registerThermalCallback( 56 const sp<IThermalCallback>& callback) override; 57 // Methods from ::android::hidl::base::V1_0::IBase follow. 58 Return<void> debug(const hidl_handle& fd, const hidl_vec<hidl_string>& args) override; 59 private: 60 bool enabled; 61 }; 62 63 } // namespace implementation 64 } // namespace V1_1 65 } // namespace thermal 66 } // namespace hardware 67 } // namespace android 68 69 #endif // ANDROID_HARDWARE_THERMAL_V1_1_WAHOO_THERMAL_H 70