1 /*
2  * This file is auto-generated.  DO NOT MODIFY.
3  * Using: out/host/linux-x86/bin/aidl --lang=ndk --structured --version 1 --hash d4c3897135ef9475dee2021ac39a41ae79c7690e -t --stability vintf --min_sdk_version 30 -pout/soong/.intermediates/hardware/interfaces/common/aidl/android.hardware.common_interface/2/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/media/bufferpool/aidl/android.hardware.media.bufferpool2_interface/2/preprocessed.aidl --ninja -d out/soong/.intermediates/hardware/interfaces/media/c2/aidl/android.hardware.media.c2-V1-ndk-source/gen/staging/android/hardware/media/c2/FieldDescriptor.cpp.d -h out/soong/.intermediates/hardware/interfaces/media/c2/aidl/android.hardware.media.c2-V1-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/media/c2/aidl/android.hardware.media.c2-V1-ndk-source/gen/staging -Iframeworks/native/aidl/gui -Iframeworks/base/core/java -Nhardware/interfaces/media/c2/aidl/aidl_api/android.hardware.media.c2/1 hardware/interfaces/media/c2/aidl/aidl_api/android.hardware.media.c2/1/android/hardware/media/c2/FieldDescriptor.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/media/c2/FieldDescriptor.h>
22 #include <aidl/android/hardware/media/c2/FieldId.h>
23 #ifdef BINDER_STABILITY_SUPPORT
24 #include <android/binder_stability.h>
25 #endif  // BINDER_STABILITY_SUPPORT
26 
27 namespace aidl::android::hardware::media::c2 {
28 class FieldId;
29 }  // namespace aidl::android::hardware::media::c2
30 namespace aidl {
31 namespace android {
32 namespace hardware {
33 namespace media {
34 namespace c2 {
35 class FieldDescriptor {
36 public:
37   typedef std::false_type fixed_size;
38   static const char* descriptor;
39 
40   enum class Type : int32_t {
41     NO_INIT = 0,
42     INT32 = 1,
43     UINT32 = 2,
44     CNTR32 = 3,
45     INT64 = 4,
46     UINT64 = 5,
47     CNTR64 = 6,
48     FLOAT = 7,
49     STRING = 256,
50     BLOB = 257,
51     STRUCT = 131072,
52   };
53 
54   class NamedValue {
55   public:
56     typedef std::false_type fixed_size;
57     static const char* descriptor;
58 
59     std::string name;
60     int64_t value = 0L;
61 
62     binder_status_t readFromParcel(const AParcel* parcel);
63     binder_status_t writeToParcel(AParcel* parcel) const;
64 
65     inline bool operator==(const NamedValue& _rhs) const {
66       return std::tie(name, value) == std::tie(_rhs.name, _rhs.value);
67     }
68     inline bool operator<(const NamedValue& _rhs) const {
69       return std::tie(name, value) < std::tie(_rhs.name, _rhs.value);
70     }
71     inline bool operator!=(const NamedValue& _rhs) const {
72       return !(*this == _rhs);
73     }
74     inline bool operator>(const NamedValue& _rhs) const {
75       return _rhs < *this;
76     }
77     inline bool operator>=(const NamedValue& _rhs) const {
78       return !(*this < _rhs);
79     }
80     inline bool operator<=(const NamedValue& _rhs) const {
81       return !(_rhs < *this);
82     }
83 
84     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()85     inline std::string toString() const {
86       std::ostringstream _aidl_os;
87       _aidl_os << "NamedValue{";
88       _aidl_os << "name: " << ::android::internal::ToString(name);
89       _aidl_os << ", value: " << ::android::internal::ToString(value);
90       _aidl_os << "}";
91       return _aidl_os.str();
92     }
93   };
94   ::aidl::android::hardware::media::c2::FieldId fieldId;
95   ::aidl::android::hardware::media::c2::FieldDescriptor::Type type = ::aidl::android::hardware::media::c2::FieldDescriptor::Type(0);
96   int32_t structIndex = 0;
97   int32_t extent = 0;
98   std::string name;
99   std::vector<::aidl::android::hardware::media::c2::FieldDescriptor::NamedValue> namedValues;
100 
101   binder_status_t readFromParcel(const AParcel* parcel);
102   binder_status_t writeToParcel(AParcel* parcel) const;
103 
104   inline bool operator==(const FieldDescriptor& _rhs) const {
105     return std::tie(fieldId, type, structIndex, extent, name, namedValues) == std::tie(_rhs.fieldId, _rhs.type, _rhs.structIndex, _rhs.extent, _rhs.name, _rhs.namedValues);
106   }
107   inline bool operator<(const FieldDescriptor& _rhs) const {
108     return std::tie(fieldId, type, structIndex, extent, name, namedValues) < std::tie(_rhs.fieldId, _rhs.type, _rhs.structIndex, _rhs.extent, _rhs.name, _rhs.namedValues);
109   }
110   inline bool operator!=(const FieldDescriptor& _rhs) const {
111     return !(*this == _rhs);
112   }
113   inline bool operator>(const FieldDescriptor& _rhs) const {
114     return _rhs < *this;
115   }
116   inline bool operator>=(const FieldDescriptor& _rhs) const {
117     return !(*this < _rhs);
118   }
119   inline bool operator<=(const FieldDescriptor& _rhs) const {
120     return !(_rhs < *this);
121   }
122 
123   static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()124   inline std::string toString() const {
125     std::ostringstream _aidl_os;
126     _aidl_os << "FieldDescriptor{";
127     _aidl_os << "fieldId: " << ::android::internal::ToString(fieldId);
128     _aidl_os << ", type: " << ::android::internal::ToString(type);
129     _aidl_os << ", structIndex: " << ::android::internal::ToString(structIndex);
130     _aidl_os << ", extent: " << ::android::internal::ToString(extent);
131     _aidl_os << ", name: " << ::android::internal::ToString(name);
132     _aidl_os << ", namedValues: " << ::android::internal::ToString(namedValues);
133     _aidl_os << "}";
134     return _aidl_os.str();
135   }
136 };
137 }  // namespace c2
138 }  // namespace media
139 }  // namespace hardware
140 }  // namespace android
141 }  // namespace aidl
142 namespace aidl {
143 namespace android {
144 namespace hardware {
145 namespace media {
146 namespace c2 {
toString(FieldDescriptor::Type val)147 [[nodiscard]] static inline std::string toString(FieldDescriptor::Type val) {
148   switch(val) {
149   case FieldDescriptor::Type::NO_INIT:
150     return "NO_INIT";
151   case FieldDescriptor::Type::INT32:
152     return "INT32";
153   case FieldDescriptor::Type::UINT32:
154     return "UINT32";
155   case FieldDescriptor::Type::CNTR32:
156     return "CNTR32";
157   case FieldDescriptor::Type::INT64:
158     return "INT64";
159   case FieldDescriptor::Type::UINT64:
160     return "UINT64";
161   case FieldDescriptor::Type::CNTR64:
162     return "CNTR64";
163   case FieldDescriptor::Type::FLOAT:
164     return "FLOAT";
165   case FieldDescriptor::Type::STRING:
166     return "STRING";
167   case FieldDescriptor::Type::BLOB:
168     return "BLOB";
169   case FieldDescriptor::Type::STRUCT:
170     return "STRUCT";
171   default:
172     return std::to_string(static_cast<int32_t>(val));
173   }
174 }
175 }  // namespace c2
176 }  // namespace media
177 }  // namespace hardware
178 }  // namespace android
179 }  // namespace aidl
180 namespace ndk {
181 namespace internal {
182 #pragma clang diagnostic push
183 #pragma clang diagnostic ignored "-Wc++17-extensions"
184 template <>
185 constexpr inline std::array<aidl::android::hardware::media::c2::FieldDescriptor::Type, 11> enum_values<aidl::android::hardware::media::c2::FieldDescriptor::Type> = {
186   aidl::android::hardware::media::c2::FieldDescriptor::Type::NO_INIT,
187   aidl::android::hardware::media::c2::FieldDescriptor::Type::INT32,
188   aidl::android::hardware::media::c2::FieldDescriptor::Type::UINT32,
189   aidl::android::hardware::media::c2::FieldDescriptor::Type::CNTR32,
190   aidl::android::hardware::media::c2::FieldDescriptor::Type::INT64,
191   aidl::android::hardware::media::c2::FieldDescriptor::Type::UINT64,
192   aidl::android::hardware::media::c2::FieldDescriptor::Type::CNTR64,
193   aidl::android::hardware::media::c2::FieldDescriptor::Type::FLOAT,
194   aidl::android::hardware::media::c2::FieldDescriptor::Type::STRING,
195   aidl::android::hardware::media::c2::FieldDescriptor::Type::BLOB,
196   aidl::android::hardware::media::c2::FieldDescriptor::Type::STRUCT,
197 };
198 #pragma clang diagnostic pop
199 }  // namespace internal
200 }  // namespace ndk
201