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/EndpointInfo.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/EndpointInfo.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/EndpointId.h>
22 #include <aidl/android/hardware/contexthub/EndpointInfo.h>
23 #include <aidl/android/hardware/contexthub/Service.h>
24 #ifdef BINDER_STABILITY_SUPPORT
25 #include <android/binder_stability.h>
26 #endif  // BINDER_STABILITY_SUPPORT
27 
28 namespace aidl::android::hardware::contexthub {
29 class EndpointId;
30 class Service;
31 }  // namespace aidl::android::hardware::contexthub
32 namespace aidl {
33 namespace android {
34 namespace hardware {
35 namespace contexthub {
36 class EndpointInfo {
37 public:
38   typedef std::false_type fixed_size;
39   static const char* descriptor;
40 
41   enum class EndpointType : int32_t {
42     FRAMEWORK = 1,
43     APP = 2,
44     NATIVE = 3,
45     NANOAPP = 4,
46     GENERIC = 5,
47   };
48 
49   ::aidl::android::hardware::contexthub::EndpointId id;
50   ::aidl::android::hardware::contexthub::EndpointInfo::EndpointType type = ::aidl::android::hardware::contexthub::EndpointInfo::EndpointType(0);
51   std::string name;
52   int32_t version = 0;
53   std::optional<std::string> tag;
54   std::vector<std::string> requiredPermissions;
55   std::vector<::aidl::android::hardware::contexthub::Service> services;
56 
57   binder_status_t readFromParcel(const AParcel* parcel);
58   binder_status_t writeToParcel(AParcel* parcel) const;
59 
60   inline bool operator==(const EndpointInfo& _rhs) const {
61     return std::tie(id, type, name, version, tag, requiredPermissions, services) == std::tie(_rhs.id, _rhs.type, _rhs.name, _rhs.version, _rhs.tag, _rhs.requiredPermissions, _rhs.services);
62   }
63   inline bool operator<(const EndpointInfo& _rhs) const {
64     return std::tie(id, type, name, version, tag, requiredPermissions, services) < std::tie(_rhs.id, _rhs.type, _rhs.name, _rhs.version, _rhs.tag, _rhs.requiredPermissions, _rhs.services);
65   }
66   inline bool operator!=(const EndpointInfo& _rhs) const {
67     return !(*this == _rhs);
68   }
69   inline bool operator>(const EndpointInfo& _rhs) const {
70     return _rhs < *this;
71   }
72   inline bool operator>=(const EndpointInfo& _rhs) const {
73     return !(*this < _rhs);
74   }
75   inline bool operator<=(const EndpointInfo& _rhs) const {
76     return !(_rhs < *this);
77   }
78 
79   static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()80   inline std::string toString() const {
81     std::ostringstream _aidl_os;
82     _aidl_os << "EndpointInfo{";
83     _aidl_os << "id: " << ::android::internal::ToString(id);
84     _aidl_os << ", type: " << ::android::internal::ToString(type);
85     _aidl_os << ", name: " << ::android::internal::ToString(name);
86     _aidl_os << ", version: " << ::android::internal::ToString(version);
87     _aidl_os << ", tag: " << ::android::internal::ToString(tag);
88     _aidl_os << ", requiredPermissions: " << ::android::internal::ToString(requiredPermissions);
89     _aidl_os << ", services: " << ::android::internal::ToString(services);
90     _aidl_os << "}";
91     return _aidl_os.str();
92   }
93 };
94 }  // namespace contexthub
95 }  // namespace hardware
96 }  // namespace android
97 }  // namespace aidl
98 namespace aidl {
99 namespace android {
100 namespace hardware {
101 namespace contexthub {
toString(EndpointInfo::EndpointType val)102 [[nodiscard]] static inline std::string toString(EndpointInfo::EndpointType val) {
103   switch(val) {
104   case EndpointInfo::EndpointType::FRAMEWORK:
105     return "FRAMEWORK";
106   case EndpointInfo::EndpointType::APP:
107     return "APP";
108   case EndpointInfo::EndpointType::NATIVE:
109     return "NATIVE";
110   case EndpointInfo::EndpointType::NANOAPP:
111     return "NANOAPP";
112   case EndpointInfo::EndpointType::GENERIC:
113     return "GENERIC";
114   default:
115     return std::to_string(static_cast<int32_t>(val));
116   }
117 }
118 }  // namespace contexthub
119 }  // namespace hardware
120 }  // namespace android
121 }  // namespace aidl
122 namespace ndk {
123 namespace internal {
124 #pragma clang diagnostic push
125 #pragma clang diagnostic ignored "-Wc++17-extensions"
126 template <>
127 constexpr inline std::array<aidl::android::hardware::contexthub::EndpointInfo::EndpointType, 5> enum_values<aidl::android::hardware::contexthub::EndpointInfo::EndpointType> = {
128   aidl::android::hardware::contexthub::EndpointInfo::EndpointType::FRAMEWORK,
129   aidl::android::hardware::contexthub::EndpointInfo::EndpointType::APP,
130   aidl::android::hardware::contexthub::EndpointInfo::EndpointType::NATIVE,
131   aidl::android::hardware::contexthub::EndpointInfo::EndpointType::NANOAPP,
132   aidl::android::hardware::contexthub::EndpointInfo::EndpointType::GENERIC,
133 };
134 #pragma clang diagnostic pop
135 }  // namespace internal
136 }  // namespace ndk
137