blob: 2f366be5442064fab4f8414cedada0d9d5de8089 [file] [log] [blame]
Chris Ye1a5a8882020-01-15 10:51:47 -08001/*
2 * Copyright (C) 2020 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
17#ifndef ANDROID_OS_COOLINGDEVICE_H
18#define ANDROID_OS_COOLINGDEVICE_H
19
20#include <binder/Parcelable.h>
21#include <utils/RefBase.h>
22
23namespace android {
24namespace os {
25
26/**
27 * CoolingDevice is a structure to encapsulate cooling device status.
28 */
29struct CoolingDevice : public android::Parcelable {
30 /** Current throttle state of the cooling device. */
31 float mValue;
32 /** A cooling device type from ThermalHAL */
33 uint32_t mType;
34 /** Name of this cooling device */
35 String16 mName;
36
37 CoolingDevice()
38 : mValue(0.0f),
39 mType(0),
40 mName("") {
41 }
42 virtual status_t readFromParcel(const android::Parcel* parcel) override;
43 virtual status_t writeToParcel(android::Parcel* parcel) const override;
44};
45
46} // namespace os
47} // namespace android
48
49#endif /* ANDROID_OS_COOLINGDEVICE_H */