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/ErrorCode.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/ErrorCode.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 #ifdef BINDER_STABILITY_SUPPORT
19 #include <android/binder_stability.h>
20 #endif  // BINDER_STABILITY_SUPPORT
21 
22 namespace aidl {
23 namespace android {
24 namespace hardware {
25 namespace contexthub {
26 enum class ErrorCode : int8_t {
27   OK = 0,
28   TRANSIENT_ERROR = 1,
29   PERMANENT_ERROR = 2,
30   PERMISSION_DENIED = 3,
31   DESTINATION_NOT_FOUND = 4,
32 };
33 
34 }  // namespace contexthub
35 }  // namespace hardware
36 }  // namespace android
37 }  // namespace aidl
38 namespace aidl {
39 namespace android {
40 namespace hardware {
41 namespace contexthub {
toString(ErrorCode val)42 [[nodiscard]] static inline std::string toString(ErrorCode val) {
43   switch(val) {
44   case ErrorCode::OK:
45     return "OK";
46   case ErrorCode::TRANSIENT_ERROR:
47     return "TRANSIENT_ERROR";
48   case ErrorCode::PERMANENT_ERROR:
49     return "PERMANENT_ERROR";
50   case ErrorCode::PERMISSION_DENIED:
51     return "PERMISSION_DENIED";
52   case ErrorCode::DESTINATION_NOT_FOUND:
53     return "DESTINATION_NOT_FOUND";
54   default:
55     return std::to_string(static_cast<int8_t>(val));
56   }
57 }
58 }  // namespace contexthub
59 }  // namespace hardware
60 }  // namespace android
61 }  // namespace aidl
62 namespace ndk {
63 namespace internal {
64 #pragma clang diagnostic push
65 #pragma clang diagnostic ignored "-Wc++17-extensions"
66 template <>
67 constexpr inline std::array<aidl::android::hardware::contexthub::ErrorCode, 5> enum_values<aidl::android::hardware::contexthub::ErrorCode> = {
68   aidl::android::hardware::contexthub::ErrorCode::OK,
69   aidl::android::hardware::contexthub::ErrorCode::TRANSIENT_ERROR,
70   aidl::android::hardware::contexthub::ErrorCode::PERMANENT_ERROR,
71   aidl::android::hardware::contexthub::ErrorCode::PERMISSION_DENIED,
72   aidl::android::hardware::contexthub::ErrorCode::DESTINATION_NOT_FOUND,
73 };
74 #pragma clang diagnostic pop
75 }  // namespace internal
76 }  // namespace ndk
77