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/GpuHeadroomParams.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/GpuHeadroomParams.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/GpuHeadroomParams.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 GpuHeadroomParams {
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::GpuHeadroomParams::CalculationType calculationType = ::aidl::android::hardware::power::GpuHeadroomParams::CalculationType::MIN;
41   int32_t calculationWindowMillis = 1000;
42 
43   binder_status_t readFromParcel(const AParcel* parcel);
44   binder_status_t writeToParcel(AParcel* parcel) const;
45 
46   inline bool operator==(const GpuHeadroomParams& _rhs) const {
47     return std::tie(calculationType, calculationWindowMillis) == std::tie(_rhs.calculationType, _rhs.calculationWindowMillis);
48   }
49   inline bool operator<(const GpuHeadroomParams& _rhs) const {
50     return std::tie(calculationType, calculationWindowMillis) < std::tie(_rhs.calculationType, _rhs.calculationWindowMillis);
51   }
52   inline bool operator!=(const GpuHeadroomParams& _rhs) const {
53     return !(*this == _rhs);
54   }
55   inline bool operator>(const GpuHeadroomParams& _rhs) const {
56     return _rhs < *this;
57   }
58   inline bool operator>=(const GpuHeadroomParams& _rhs) const {
59     return !(*this < _rhs);
60   }
61   inline bool operator<=(const GpuHeadroomParams& _rhs) const {
62     return !(_rhs < *this);
63   }
64 
65   static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()66   inline std::string toString() const {
67     std::ostringstream _aidl_os;
68     _aidl_os << "GpuHeadroomParams{";
69     _aidl_os << "calculationType: " << ::android::internal::ToString(calculationType);
70     _aidl_os << ", calculationWindowMillis: " << ::android::internal::ToString(calculationWindowMillis);
71     _aidl_os << "}";
72     return _aidl_os.str();
73   }
74 };
75 }  // namespace power
76 }  // namespace hardware
77 }  // namespace android
78 }  // namespace aidl
79 namespace aidl {
80 namespace android {
81 namespace hardware {
82 namespace power {
toString(GpuHeadroomParams::CalculationType val)83 [[nodiscard]] static inline std::string toString(GpuHeadroomParams::CalculationType val) {
84   switch(val) {
85   case GpuHeadroomParams::CalculationType::MIN:
86     return "MIN";
87   case GpuHeadroomParams::CalculationType::AVERAGE:
88     return "AVERAGE";
89   default:
90     return std::to_string(static_cast<int8_t>(val));
91   }
92 }
93 }  // namespace power
94 }  // namespace hardware
95 }  // namespace android
96 }  // namespace aidl
97 namespace ndk {
98 namespace internal {
99 #pragma clang diagnostic push
100 #pragma clang diagnostic ignored "-Wc++17-extensions"
101 template <>
102 constexpr inline std::array<aidl::android::hardware::power::GpuHeadroomParams::CalculationType, 2> enum_values<aidl::android::hardware::power::GpuHeadroomParams::CalculationType> = {
103   aidl::android::hardware::power::GpuHeadroomParams::CalculationType::MIN,
104   aidl::android::hardware::power::GpuHeadroomParams::CalculationType::AVERAGE,
105 };
106 #pragma clang diagnostic pop
107 }  // namespace internal
108 }  // namespace ndk
109