1 // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT.
2 
3 #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_VIEW_INPUTMETHOD_INPUTMETHODMANAGER_PROTO_H_
4 #define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_VIEW_INPUTMETHOD_INPUTMETHODMANAGER_PROTO_H_
5 
6 #include <stddef.h>
7 #include <stdint.h>
8 
9 #include "perfetto/protozero/field_writer.h"
10 #include "perfetto/protozero/message.h"
11 #include "perfetto/protozero/packed_repeated_fields.h"
12 #include "perfetto/protozero/proto_decoder.h"
13 #include "perfetto/protozero/proto_utils.h"
14 
15 
16 namespace perfetto {
17 namespace protos {
18 namespace pbzero {
19 
20 class InputMethodManagerProto_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/7, /*HAS_NONPACKED_REPEATED_FIELDS=*/false> {
21  public:
InputMethodManagerProto_Decoder(const uint8_t * data,size_t len)22   InputMethodManagerProto_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {}
InputMethodManagerProto_Decoder(const std::string & raw)23   explicit InputMethodManagerProto_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {}
InputMethodManagerProto_Decoder(const::protozero::ConstBytes & raw)24   explicit InputMethodManagerProto_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {}
has_cur_id()25   bool has_cur_id() const { return at<1>().valid(); }
cur_id()26   ::protozero::ConstChars cur_id() const { return at<1>().as_string(); }
has_fullscreen_mode()27   bool has_fullscreen_mode() const { return at<2>().valid(); }
fullscreen_mode()28   bool fullscreen_mode() const { return at<2>().as_bool(); }
has_display_id()29   bool has_display_id() const { return at<3>().valid(); }
display_id()30   int32_t display_id() const { return at<3>().as_int32(); }
has_active()31   bool has_active() const { return at<4>().valid(); }
active()32   bool active() const { return at<4>().as_bool(); }
has_served_connecting()33   bool has_served_connecting() const { return at<5>().valid(); }
served_connecting()34   bool served_connecting() const { return at<5>().as_bool(); }
has_served_view()35   bool has_served_view() const { return at<6>().valid(); }
served_view()36   ::protozero::ConstChars served_view() const { return at<6>().as_string(); }
has_next_served_view()37   bool has_next_served_view() const { return at<7>().valid(); }
next_served_view()38   ::protozero::ConstChars next_served_view() const { return at<7>().as_string(); }
39 };
40 
41 class InputMethodManagerProto : public ::protozero::Message {
42  public:
43   using Decoder = InputMethodManagerProto_Decoder;
44   enum : int32_t {
45     kCurIdFieldNumber = 1,
46     kFullscreenModeFieldNumber = 2,
47     kDisplayIdFieldNumber = 3,
48     kActiveFieldNumber = 4,
49     kServedConnectingFieldNumber = 5,
50     kServedViewFieldNumber = 6,
51     kNextServedViewFieldNumber = 7,
52   };
GetName()53   static constexpr const char* GetName() { return ".perfetto.protos.InputMethodManagerProto"; }
54 
55 
56   using FieldMetadata_CurId =
57     ::protozero::proto_utils::FieldMetadata<
58       1,
59       ::protozero::proto_utils::RepetitionType::kNotRepeated,
60       ::protozero::proto_utils::ProtoSchemaType::kString,
61       std::string,
62       InputMethodManagerProto>;
63 
64   static constexpr FieldMetadata_CurId kCurId{};
set_cur_id(const char * data,size_t size)65   void set_cur_id(const char* data, size_t size) {
66     AppendBytes(FieldMetadata_CurId::kFieldId, data, size);
67   }
set_cur_id(::protozero::ConstChars chars)68   void set_cur_id(::protozero::ConstChars chars) {
69     AppendBytes(FieldMetadata_CurId::kFieldId, chars.data, chars.size);
70   }
set_cur_id(std::string value)71   void set_cur_id(std::string value) {
72     static constexpr uint32_t field_id = FieldMetadata_CurId::kFieldId;
73     // Call the appropriate protozero::Message::Append(field_id, ...)
74     // method based on the type of the field.
75     ::protozero::internal::FieldWriter<
76       ::protozero::proto_utils::ProtoSchemaType::kString>
77         ::Append(*this, field_id, value);
78   }
79 
80   using FieldMetadata_FullscreenMode =
81     ::protozero::proto_utils::FieldMetadata<
82       2,
83       ::protozero::proto_utils::RepetitionType::kNotRepeated,
84       ::protozero::proto_utils::ProtoSchemaType::kBool,
85       bool,
86       InputMethodManagerProto>;
87 
88   static constexpr FieldMetadata_FullscreenMode kFullscreenMode{};
set_fullscreen_mode(bool value)89   void set_fullscreen_mode(bool value) {
90     static constexpr uint32_t field_id = FieldMetadata_FullscreenMode::kFieldId;
91     // Call the appropriate protozero::Message::Append(field_id, ...)
92     // method based on the type of the field.
93     ::protozero::internal::FieldWriter<
94       ::protozero::proto_utils::ProtoSchemaType::kBool>
95         ::Append(*this, field_id, value);
96   }
97 
98   using FieldMetadata_DisplayId =
99     ::protozero::proto_utils::FieldMetadata<
100       3,
101       ::protozero::proto_utils::RepetitionType::kNotRepeated,
102       ::protozero::proto_utils::ProtoSchemaType::kInt32,
103       int32_t,
104       InputMethodManagerProto>;
105 
106   static constexpr FieldMetadata_DisplayId kDisplayId{};
set_display_id(int32_t value)107   void set_display_id(int32_t value) {
108     static constexpr uint32_t field_id = FieldMetadata_DisplayId::kFieldId;
109     // Call the appropriate protozero::Message::Append(field_id, ...)
110     // method based on the type of the field.
111     ::protozero::internal::FieldWriter<
112       ::protozero::proto_utils::ProtoSchemaType::kInt32>
113         ::Append(*this, field_id, value);
114   }
115 
116   using FieldMetadata_Active =
117     ::protozero::proto_utils::FieldMetadata<
118       4,
119       ::protozero::proto_utils::RepetitionType::kNotRepeated,
120       ::protozero::proto_utils::ProtoSchemaType::kBool,
121       bool,
122       InputMethodManagerProto>;
123 
124   static constexpr FieldMetadata_Active kActive{};
set_active(bool value)125   void set_active(bool value) {
126     static constexpr uint32_t field_id = FieldMetadata_Active::kFieldId;
127     // Call the appropriate protozero::Message::Append(field_id, ...)
128     // method based on the type of the field.
129     ::protozero::internal::FieldWriter<
130       ::protozero::proto_utils::ProtoSchemaType::kBool>
131         ::Append(*this, field_id, value);
132   }
133 
134   using FieldMetadata_ServedConnecting =
135     ::protozero::proto_utils::FieldMetadata<
136       5,
137       ::protozero::proto_utils::RepetitionType::kNotRepeated,
138       ::protozero::proto_utils::ProtoSchemaType::kBool,
139       bool,
140       InputMethodManagerProto>;
141 
142   static constexpr FieldMetadata_ServedConnecting kServedConnecting{};
set_served_connecting(bool value)143   void set_served_connecting(bool value) {
144     static constexpr uint32_t field_id = FieldMetadata_ServedConnecting::kFieldId;
145     // Call the appropriate protozero::Message::Append(field_id, ...)
146     // method based on the type of the field.
147     ::protozero::internal::FieldWriter<
148       ::protozero::proto_utils::ProtoSchemaType::kBool>
149         ::Append(*this, field_id, value);
150   }
151 
152   using FieldMetadata_ServedView =
153     ::protozero::proto_utils::FieldMetadata<
154       6,
155       ::protozero::proto_utils::RepetitionType::kNotRepeated,
156       ::protozero::proto_utils::ProtoSchemaType::kString,
157       std::string,
158       InputMethodManagerProto>;
159 
160   static constexpr FieldMetadata_ServedView kServedView{};
set_served_view(const char * data,size_t size)161   void set_served_view(const char* data, size_t size) {
162     AppendBytes(FieldMetadata_ServedView::kFieldId, data, size);
163   }
set_served_view(::protozero::ConstChars chars)164   void set_served_view(::protozero::ConstChars chars) {
165     AppendBytes(FieldMetadata_ServedView::kFieldId, chars.data, chars.size);
166   }
set_served_view(std::string value)167   void set_served_view(std::string value) {
168     static constexpr uint32_t field_id = FieldMetadata_ServedView::kFieldId;
169     // Call the appropriate protozero::Message::Append(field_id, ...)
170     // method based on the type of the field.
171     ::protozero::internal::FieldWriter<
172       ::protozero::proto_utils::ProtoSchemaType::kString>
173         ::Append(*this, field_id, value);
174   }
175 
176   using FieldMetadata_NextServedView =
177     ::protozero::proto_utils::FieldMetadata<
178       7,
179       ::protozero::proto_utils::RepetitionType::kNotRepeated,
180       ::protozero::proto_utils::ProtoSchemaType::kString,
181       std::string,
182       InputMethodManagerProto>;
183 
184   static constexpr FieldMetadata_NextServedView kNextServedView{};
set_next_served_view(const char * data,size_t size)185   void set_next_served_view(const char* data, size_t size) {
186     AppendBytes(FieldMetadata_NextServedView::kFieldId, data, size);
187   }
set_next_served_view(::protozero::ConstChars chars)188   void set_next_served_view(::protozero::ConstChars chars) {
189     AppendBytes(FieldMetadata_NextServedView::kFieldId, chars.data, chars.size);
190   }
set_next_served_view(std::string value)191   void set_next_served_view(std::string value) {
192     static constexpr uint32_t field_id = FieldMetadata_NextServedView::kFieldId;
193     // Call the appropriate protozero::Message::Append(field_id, ...)
194     // method based on the type of the field.
195     ::protozero::internal::FieldWriter<
196       ::protozero::proto_utils::ProtoSchemaType::kString>
197         ::Append(*this, field_id, value);
198   }
199 };
200 
201 } // Namespace.
202 } // Namespace.
203 } // Namespace.
204 #endif  // Include guard.
205