1 // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT.
2 
3 #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_VIEW_INSETSSTATE_PROTO_H_
4 #define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_VIEW_INSETSSTATE_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 namespace perfetto {
16 namespace protos {
17 namespace pbzero {
18 class DisplayCutoutProto;
19 class InsetsSourceProto;
20 class RectProto;
21 } // Namespace pbzero.
22 } // Namespace protos.
23 } // Namespace perfetto.
24 
25 namespace perfetto {
26 namespace protos {
27 namespace pbzero {
28 
29 class InsetsStateProto_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/3, /*HAS_NONPACKED_REPEATED_FIELDS=*/true> {
30  public:
InsetsStateProto_Decoder(const uint8_t * data,size_t len)31   InsetsStateProto_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {}
InsetsStateProto_Decoder(const std::string & raw)32   explicit InsetsStateProto_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {}
InsetsStateProto_Decoder(const::protozero::ConstBytes & raw)33   explicit InsetsStateProto_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {}
has_sources()34   bool has_sources() const { return at<1>().valid(); }
sources()35   ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> sources() const { return GetRepeated<::protozero::ConstBytes>(1); }
has_display_frame()36   bool has_display_frame() const { return at<2>().valid(); }
display_frame()37   ::protozero::ConstBytes display_frame() const { return at<2>().as_bytes(); }
has_display_cutout()38   bool has_display_cutout() const { return at<3>().valid(); }
display_cutout()39   ::protozero::ConstBytes display_cutout() const { return at<3>().as_bytes(); }
40 };
41 
42 class InsetsStateProto : public ::protozero::Message {
43  public:
44   using Decoder = InsetsStateProto_Decoder;
45   enum : int32_t {
46     kSourcesFieldNumber = 1,
47     kDisplayFrameFieldNumber = 2,
48     kDisplayCutoutFieldNumber = 3,
49   };
GetName()50   static constexpr const char* GetName() { return ".perfetto.protos.InsetsStateProto"; }
51 
52 
53   using FieldMetadata_Sources =
54     ::protozero::proto_utils::FieldMetadata<
55       1,
56       ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked,
57       ::protozero::proto_utils::ProtoSchemaType::kMessage,
58       InsetsSourceProto,
59       InsetsStateProto>;
60 
61   static constexpr FieldMetadata_Sources kSources{};
add_sources()62   template <typename T = InsetsSourceProto> T* add_sources() {
63     return BeginNestedMessage<T>(1);
64   }
65 
66 
67   using FieldMetadata_DisplayFrame =
68     ::protozero::proto_utils::FieldMetadata<
69       2,
70       ::protozero::proto_utils::RepetitionType::kNotRepeated,
71       ::protozero::proto_utils::ProtoSchemaType::kMessage,
72       RectProto,
73       InsetsStateProto>;
74 
75   static constexpr FieldMetadata_DisplayFrame kDisplayFrame{};
set_display_frame()76   template <typename T = RectProto> T* set_display_frame() {
77     return BeginNestedMessage<T>(2);
78   }
79 
80 
81   using FieldMetadata_DisplayCutout =
82     ::protozero::proto_utils::FieldMetadata<
83       3,
84       ::protozero::proto_utils::RepetitionType::kNotRepeated,
85       ::protozero::proto_utils::ProtoSchemaType::kMessage,
86       DisplayCutoutProto,
87       InsetsStateProto>;
88 
89   static constexpr FieldMetadata_DisplayCutout kDisplayCutout{};
set_display_cutout()90   template <typename T = DisplayCutoutProto> T* set_display_cutout() {
91     return BeginNestedMessage<T>(3);
92   }
93 
94 };
95 
96 } // Namespace.
97 } // Namespace.
98 } // Namespace.
99 #endif  // Include guard.
100