blob: 3d72c680b4ab864e6a7c70a54f6015b0d5ec7a50 [file] [log] [blame]
Todd Poynor46f388c2017-06-22 18:13:56 -07001#ifndef ANDROID_HARDWARE_THERMAL_V1_1_THERMALCALLBACK_H
2#define ANDROID_HARDWARE_THERMAL_V1_1_THERMALCALLBACK_H
3
4#include <android/hardware/thermal/1.1/IThermalCallback.h>
5#include <android/hardware/thermal/1.0/types.h>
6#include <android/os/Temperature.h>
7#include <hidl/MQDescriptor.h>
8#include <hidl/Status.h>
9#include "services/thermalservice/ThermalService.h"
10
11namespace android {
12namespace hardware {
13namespace thermal {
14namespace V1_1 {
15namespace implementation {
16
17using ::android::hardware::Return;
18using ::android::hardware::Void;
19using ::android::os::ThermalService;
20
21class ThermalCallback : public IThermalCallback {
22 public:
23 // Register a binder ThermalService object for sending events
24 void registerThermalService(sp<ThermalService> thermalService);
25
26 // Methods from IThermalCallback::V1_1 follow.
27 Return<void> notifyThrottling(
28 bool isThrottling,
29 const android::hardware::thermal::V1_0::Temperature& temperature)
30 override;
31
32 private:
33 // Our registered binder ThermalService object to use for sending events
34 sp<android::os::ThermalService> mThermalService;
35};
36
37} // namespace implementation
38} // namespace V1_1
39} // namespace thermal
40} // namespace hardware
41} // namespace android
42
43#endif // ANDROID_HARDWARE_THERMAL_V1_1_THERMALCALLBACK_H