1 /*
2  * This file is auto-generated.  DO NOT MODIFY.
3  * Using: out/host/linux-x86/bin/aidl --lang=ndk -Weverything -Wno-missing-permission-annotation --structured --version 6 --hash notfrozen -t --stability vintf --min_sdk_version current -pout/soong/.intermediates/hardware/interfaces/common/fmq/aidl/android.hardware.common.fmq_interface/1/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/common/aidl/android.hardware.common_interface/2/preprocessed.aidl --previous_api_dir=hardware/interfaces/power/aidl/aidl_api/android.hardware.power/5 --previous_hash d111735ed2b89b6c32443aac9b162b1afbbea3f2 --ninja -d out/soong/.intermediates/hardware/interfaces/power/aidl/android.hardware.power-V6-ndk-source/gen/staging/android/hardware/power/CpuHeadroomParams.cpp.d -h out/soong/.intermediates/hardware/interfaces/power/aidl/android.hardware.power-V6-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/power/aidl/android.hardware.power-V6-ndk-source/gen/staging -Nhardware/interfaces/power/aidl hardware/interfaces/power/aidl/android/hardware/power/CpuHeadroomParams.aidl
4  *
5  * DO NOT CHECK THIS FILE INTO A CODE TREE (e.g. git, etc..).
6  * ALWAYS GENERATE THIS FILE FROM UPDATED AIDL COMPILER
7  * AS A BUILD INTERMEDIATE ONLY. THIS IS NOT SOURCE CODE.
8  */
9 #pragma once
10 
11 #include <array>
12 #include <cstdint>
13 #include <memory>
14 #include <optional>
15 #include <string>
16 #include <vector>
17 #include <android/binder_enums.h>
18 #include <android/binder_interface_utils.h>
19 #include <android/binder_parcelable_utils.h>
20 #include <android/binder_to_string.h>
21 #include <aidl/android/hardware/power/CpuHeadroomParams.h>
22 #ifdef BINDER_STABILITY_SUPPORT
23 #include <android/binder_stability.h>
24 #endif  // BINDER_STABILITY_SUPPORT
25 
26 namespace aidl {
27 namespace android {
28 namespace hardware {
29 namespace power {
30 class CpuHeadroomParams {
31 public:
32   typedef std::false_type fixed_size;
33   static const char* descriptor;
34 
35   enum class CalculationType : int8_t {
36     MIN = 0,
37     AVERAGE = 1,
38   };
39 
40   ::aidl::android::hardware::power::CpuHeadroomParams::CalculationType calculationType = ::aidl::android::hardware::power::CpuHeadroomParams::CalculationType::MIN;
41   int32_t calculationWindowMillis = 1000;
42   std::vector<int32_t> tids;
43 
44   binder_status_t readFromParcel(const AParcel* parcel);
45   binder_status_t writeToParcel(AParcel* parcel) const;
46 
47   inline bool operator==(const CpuHeadroomParams& _rhs) const {
48     return std::tie(calculationType, calculationWindowMillis, tids) == std::tie(_rhs.calculationType, _rhs.calculationWindowMillis, _rhs.tids);
49   }
50   inline bool operator<(const CpuHeadroomParams& _rhs) const {
51     return std::tie(calculationType, calculationWindowMillis, tids) < std::tie(_rhs.calculationType, _rhs.calculationWindowMillis, _rhs.tids);
52   }
53   inline bool operator!=(const CpuHeadroomParams& _rhs) const {
54     return !(*this == _rhs);
55   }
56   inline bool operator>(const CpuHeadroomParams& _rhs) const {
57     return _rhs < *this;
58   }
59   inline bool operator>=(const CpuHeadroomParams& _rhs) const {
60     return !(*this < _rhs);
61   }
62   inline bool operator<=(const CpuHeadroomParams& _rhs) const {
63     return !(_rhs < *this);
64   }
65 
66   static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()67   inline std::string toString() const {
68     std::ostringstream _aidl_os;
69     _aidl_os << "CpuHeadroomParams{";
70     _aidl_os << "calculationType: " << ::android::internal::ToString(calculationType);
71     _aidl_os << ", calculationWindowMillis: " << ::android::internal::ToString(calculationWindowMillis);
72     _aidl_os << ", tids: " << ::android::internal::ToString(tids);
73     _aidl_os << "}";
74     return _aidl_os.str();
75   }
76 };
77 }  // namespace power
78 }  // namespace hardware
79 }  // namespace android
80 }  // namespace aidl
81 namespace aidl {
82 namespace android {
83 namespace hardware {
84 namespace power {
toString(CpuHeadroomParams::CalculationType val)85 [[nodiscard]] static inline std::string toString(CpuHeadroomParams::CalculationType val) {
86   switch(val) {
87   case CpuHeadroomParams::CalculationType::MIN:
88     return "MIN";
89   case CpuHeadroomParams::CalculationType::AVERAGE:
90     return "AVERAGE";
91   default:
92     return std::to_string(static_cast<int8_t>(val));
93   }
94 }
95 }  // namespace power
96 }  // namespace hardware
97 }  // namespace android
98 }  // namespace aidl
99 namespace ndk {
100 namespace internal {
101 #pragma clang diagnostic push
102 #pragma clang diagnostic ignored "-Wc++17-extensions"
103 template <>
104 constexpr inline std::array<aidl::android::hardware::power::CpuHeadroomParams::CalculationType, 2> enum_values<aidl::android::hardware::power::CpuHeadroomParams::CalculationType> = {
105   aidl::android::hardware::power::CpuHeadroomParams::CalculationType::MIN,
106   aidl::android::hardware::power::CpuHeadroomParams::CalculationType::AVERAGE,
107 };
108 #pragma clang diagnostic pop
109 }  // namespace internal
110 }  // namespace ndk
111