1 #ifndef ANDROID_THERMALSERVICE_AIDL_ANDROID_OS_TEMPERATURE_H
2 #define ANDROID_THERMALSERVICE_AIDL_ANDROID_OS_TEMPERATURE_H
3 
4 #include <binder/Parcelable.h>
5 
6 namespace android {
7 namespace os {
8 
9 class Temperature : public Parcelable {
10  public:
11 
12   Temperature();
13   Temperature(const float value, const int type);
14   ~Temperature() override;
15 
getValue()16   float getValue() const {return value_;};
getType()17   float getType() const {return type_;};
18 
19   status_t writeToParcel(Parcel* parcel) const override;
20   status_t readFromParcel(const Parcel* parcel) override;
21 
22  private:
23   // The value of the temperature as a float, or NAN if unknown.
24   float value_;
25   // The type of the temperature, an enum temperature_type from
26   // hardware/thermal.h
27   int type_;
28 };
29 
30 }  // namespace os
31 }  // namespace android
32 
33 #endif   // ANDROID_THERMALSERVICE_AIDL_ANDROID_OS_TEMPERATURE_H
34