1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/common/android_log_constants.proto
3 
4 #include "protos/perfetto/common/android_log_constants.pb.h"
5 
6 #include <algorithm>
7 #include <cstdint>
8 
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 // @@protoc_insertion_point(includes)
13 #include <google/protobuf/port_def.inc>
14 
15 PROTOBUF_PRAGMA_INIT_SEG
16 
17 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
18 namespace _pbi = _pb::internal;
19 
20 namespace perfetto {
21 namespace protos {
22 }  // namespace protos
23 }  // namespace perfetto
24 namespace perfetto {
25 namespace protos {
AndroidLogId_IsValid(int value)26 bool AndroidLogId_IsValid(int value) {
27   switch (value) {
28     case 0:
29     case 1:
30     case 2:
31     case 3:
32     case 4:
33     case 5:
34     case 6:
35     case 7:
36       return true;
37     default:
38       return false;
39   }
40 }
41 
42 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> AndroidLogId_strings[8] = {};
43 
44 static const char AndroidLogId_names[] =
45   "LID_CRASH"
46   "LID_DEFAULT"
47   "LID_EVENTS"
48   "LID_KERNEL"
49   "LID_RADIO"
50   "LID_SECURITY"
51   "LID_STATS"
52   "LID_SYSTEM";
53 
54 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry AndroidLogId_entries[] = {
55   { {AndroidLogId_names + 0, 9}, 4 },
56   { {AndroidLogId_names + 9, 11}, 0 },
57   { {AndroidLogId_names + 20, 10}, 2 },
58   { {AndroidLogId_names + 30, 10}, 7 },
59   { {AndroidLogId_names + 40, 9}, 1 },
60   { {AndroidLogId_names + 49, 12}, 6 },
61   { {AndroidLogId_names + 61, 9}, 5 },
62   { {AndroidLogId_names + 70, 10}, 3 },
63 };
64 
65 static const int AndroidLogId_entries_by_number[] = {
66   1, // 0 -> LID_DEFAULT
67   4, // 1 -> LID_RADIO
68   2, // 2 -> LID_EVENTS
69   7, // 3 -> LID_SYSTEM
70   0, // 4 -> LID_CRASH
71   6, // 5 -> LID_STATS
72   5, // 6 -> LID_SECURITY
73   3, // 7 -> LID_KERNEL
74 };
75 
AndroidLogId_Name(AndroidLogId value)76 const std::string& AndroidLogId_Name(
77     AndroidLogId value) {
78   static const bool dummy =
79       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
80           AndroidLogId_entries,
81           AndroidLogId_entries_by_number,
82           8, AndroidLogId_strings);
83   (void) dummy;
84   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
85       AndroidLogId_entries,
86       AndroidLogId_entries_by_number,
87       8, value);
88   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
89                      AndroidLogId_strings[idx].get();
90 }
AndroidLogId_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,AndroidLogId * value)91 bool AndroidLogId_Parse(
92     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AndroidLogId* value) {
93   int int_value;
94   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
95       AndroidLogId_entries, 8, name, &int_value);
96   if (success) {
97     *value = static_cast<AndroidLogId>(int_value);
98   }
99   return success;
100 }
AndroidLogPriority_IsValid(int value)101 bool AndroidLogPriority_IsValid(int value) {
102   switch (value) {
103     case 0:
104     case 1:
105     case 2:
106     case 3:
107     case 4:
108     case 5:
109     case 6:
110     case 7:
111       return true;
112     default:
113       return false;
114   }
115 }
116 
117 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> AndroidLogPriority_strings[8] = {};
118 
119 static const char AndroidLogPriority_names[] =
120   "PRIO_DEBUG"
121   "PRIO_ERROR"
122   "PRIO_FATAL"
123   "PRIO_INFO"
124   "PRIO_UNSPECIFIED"
125   "PRIO_UNUSED"
126   "PRIO_VERBOSE"
127   "PRIO_WARN";
128 
129 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry AndroidLogPriority_entries[] = {
130   { {AndroidLogPriority_names + 0, 10}, 3 },
131   { {AndroidLogPriority_names + 10, 10}, 6 },
132   { {AndroidLogPriority_names + 20, 10}, 7 },
133   { {AndroidLogPriority_names + 30, 9}, 4 },
134   { {AndroidLogPriority_names + 39, 16}, 0 },
135   { {AndroidLogPriority_names + 55, 11}, 1 },
136   { {AndroidLogPriority_names + 66, 12}, 2 },
137   { {AndroidLogPriority_names + 78, 9}, 5 },
138 };
139 
140 static const int AndroidLogPriority_entries_by_number[] = {
141   4, // 0 -> PRIO_UNSPECIFIED
142   5, // 1 -> PRIO_UNUSED
143   6, // 2 -> PRIO_VERBOSE
144   0, // 3 -> PRIO_DEBUG
145   3, // 4 -> PRIO_INFO
146   7, // 5 -> PRIO_WARN
147   1, // 6 -> PRIO_ERROR
148   2, // 7 -> PRIO_FATAL
149 };
150 
AndroidLogPriority_Name(AndroidLogPriority value)151 const std::string& AndroidLogPriority_Name(
152     AndroidLogPriority value) {
153   static const bool dummy =
154       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
155           AndroidLogPriority_entries,
156           AndroidLogPriority_entries_by_number,
157           8, AndroidLogPriority_strings);
158   (void) dummy;
159   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
160       AndroidLogPriority_entries,
161       AndroidLogPriority_entries_by_number,
162       8, value);
163   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
164                      AndroidLogPriority_strings[idx].get();
165 }
AndroidLogPriority_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,AndroidLogPriority * value)166 bool AndroidLogPriority_Parse(
167     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AndroidLogPriority* value) {
168   int int_value;
169   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
170       AndroidLogPriority_entries, 8, name, &int_value);
171   if (success) {
172     *value = static_cast<AndroidLogPriority>(int_value);
173   }
174   return success;
175 }
176 
177 // @@protoc_insertion_point(namespace_scope)
178 }  // namespace protos
179 }  // namespace perfetto
180 PROTOBUF_NAMESPACE_OPEN
181 PROTOBUF_NAMESPACE_CLOSE
182 
183 // @@protoc_insertion_point(global_scope)
184 #include <google/protobuf/port_undef.inc>
185