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 4 --hash notfrozen -t --stability vintf --min_sdk_version 33 --previous_api_dir=hardware/interfaces/contexthub/aidl/aidl_api/android.hardware.contexthub/3 --previous_hash 03f1982c8e20e58494a4ff8c9736b1c257dfeb6c --ninja -d out/soong/.intermediates/hardware/interfaces/contexthub/aidl/android.hardware.contexthub-V4-ndk-source/gen/staging/android/hardware/contexthub/Service.cpp.d -h out/soong/.intermediates/hardware/interfaces/contexthub/aidl/android.hardware.contexthub-V4-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/contexthub/aidl/android.hardware.contexthub-V4-ndk-source/gen/staging -Nhardware/interfaces/contexthub/aidl hardware/interfaces/contexthub/aidl/android/hardware/contexthub/Service.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/contexthub/Service.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 contexthub {
30 class Service {
31 public:
32   typedef std::false_type fixed_size;
33   static const char* descriptor;
34 
35   enum class RpcFormat : int32_t {
36     CUSTOM = 0,
37     AIDL = 1,
38     PW_RPC_PROTOBUF = 2,
39   };
40 
41   ::aidl::android::hardware::contexthub::Service::RpcFormat format = ::aidl::android::hardware::contexthub::Service::RpcFormat(0);
42   std::string serviceDescriptor;
43   int32_t majorVersion = 0;
44   int32_t minorVersion = 0;
45   ::ndk::AParcelableHolder extendedInfo{::ndk::STABILITY_VINTF};
46 
47   binder_status_t readFromParcel(const AParcel* parcel);
48   binder_status_t writeToParcel(AParcel* parcel) const;
49 
50   inline bool operator==(const Service& _rhs) const {
51     return std::tie(format, serviceDescriptor, majorVersion, minorVersion, extendedInfo) == std::tie(_rhs.format, _rhs.serviceDescriptor, _rhs.majorVersion, _rhs.minorVersion, _rhs.extendedInfo);
52   }
53   inline bool operator<(const Service& _rhs) const {
54     return std::tie(format, serviceDescriptor, majorVersion, minorVersion, extendedInfo) < std::tie(_rhs.format, _rhs.serviceDescriptor, _rhs.majorVersion, _rhs.minorVersion, _rhs.extendedInfo);
55   }
56   inline bool operator!=(const Service& _rhs) const {
57     return !(*this == _rhs);
58   }
59   inline bool operator>(const Service& _rhs) const {
60     return _rhs < *this;
61   }
62   inline bool operator>=(const Service& _rhs) const {
63     return !(*this < _rhs);
64   }
65   inline bool operator<=(const Service& _rhs) const {
66     return !(_rhs < *this);
67   }
68 
69   static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()70   inline std::string toString() const {
71     std::ostringstream _aidl_os;
72     _aidl_os << "Service{";
73     _aidl_os << "format: " << ::android::internal::ToString(format);
74     _aidl_os << ", serviceDescriptor: " << ::android::internal::ToString(serviceDescriptor);
75     _aidl_os << ", majorVersion: " << ::android::internal::ToString(majorVersion);
76     _aidl_os << ", minorVersion: " << ::android::internal::ToString(minorVersion);
77     _aidl_os << ", extendedInfo: " << ::android::internal::ToString(extendedInfo);
78     _aidl_os << "}";
79     return _aidl_os.str();
80   }
81 };
82 }  // namespace contexthub
83 }  // namespace hardware
84 }  // namespace android
85 }  // namespace aidl
86 namespace aidl {
87 namespace android {
88 namespace hardware {
89 namespace contexthub {
toString(Service::RpcFormat val)90 [[nodiscard]] static inline std::string toString(Service::RpcFormat val) {
91   switch(val) {
92   case Service::RpcFormat::CUSTOM:
93     return "CUSTOM";
94   case Service::RpcFormat::AIDL:
95     return "AIDL";
96   case Service::RpcFormat::PW_RPC_PROTOBUF:
97     return "PW_RPC_PROTOBUF";
98   default:
99     return std::to_string(static_cast<int32_t>(val));
100   }
101 }
102 }  // namespace contexthub
103 }  // namespace hardware
104 }  // namespace android
105 }  // namespace aidl
106 namespace ndk {
107 namespace internal {
108 #pragma clang diagnostic push
109 #pragma clang diagnostic ignored "-Wc++17-extensions"
110 template <>
111 constexpr inline std::array<aidl::android::hardware::contexthub::Service::RpcFormat, 3> enum_values<aidl::android::hardware::contexthub::Service::RpcFormat> = {
112   aidl::android::hardware::contexthub::Service::RpcFormat::CUSTOM,
113   aidl::android::hardware::contexthub::Service::RpcFormat::AIDL,
114   aidl::android::hardware::contexthub::Service::RpcFormat::PW_RPC_PROTOBUF,
115 };
116 #pragma clang diagnostic pop
117 }  // namespace internal
118 }  // namespace ndk
119