Home | History | Annotate | Download | only in default
      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 
     25 namespace android {
     26 namespace hardware {
     27 namespace thermal {
     28 namespace V1_0 {
     29 namespace implementation {
     30 
     31 using ::android::hardware::thermal::V1_0::CoolingDevice;
     32 using ::android::hardware::thermal::V1_0::CpuUsage;
     33 using ::android::hardware::thermal::V1_0::IThermal;
     34 using ::android::hardware::thermal::V1_0::Temperature;
     35 using ::android::hardware::thermal::V1_0::ThermalStatus;
     36 using ::android::hardware::Return;
     37 using ::android::hardware::Void;
     38 using ::android::hardware::hidl_vec;
     39 using ::android::hardware::hidl_string;
     40 using ::android::sp;
     41 
     42 struct 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 
     52 extern "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