1 // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. 2 3 #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_VIEW_INSETSCONTROLLER_PROTO_H_ 4 #define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_VIEW_INSETSCONTROLLER_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 InsetsAnimationControlImplProto; 19 class InsetsStateProto; 20 } // Namespace pbzero. 21 } // Namespace protos. 22 } // Namespace perfetto. 23 24 namespace perfetto { 25 namespace protos { 26 namespace pbzero { 27 28 class InsetsControllerProto_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/2, /*HAS_NONPACKED_REPEATED_FIELDS=*/true> { 29 public: InsetsControllerProto_Decoder(const uint8_t * data,size_t len)30 InsetsControllerProto_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} InsetsControllerProto_Decoder(const std::string & raw)31 explicit InsetsControllerProto_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {} InsetsControllerProto_Decoder(const::protozero::ConstBytes & raw)32 explicit InsetsControllerProto_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} has_state()33 bool has_state() const { return at<1>().valid(); } state()34 ::protozero::ConstBytes state() const { return at<1>().as_bytes(); } has_control()35 bool has_control() const { return at<2>().valid(); } control()36 ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> control() const { return GetRepeated<::protozero::ConstBytes>(2); } 37 }; 38 39 class InsetsControllerProto : public ::protozero::Message { 40 public: 41 using Decoder = InsetsControllerProto_Decoder; 42 enum : int32_t { 43 kStateFieldNumber = 1, 44 kControlFieldNumber = 2, 45 }; GetName()46 static constexpr const char* GetName() { return ".perfetto.protos.InsetsControllerProto"; } 47 48 49 using FieldMetadata_State = 50 ::protozero::proto_utils::FieldMetadata< 51 1, 52 ::protozero::proto_utils::RepetitionType::kNotRepeated, 53 ::protozero::proto_utils::ProtoSchemaType::kMessage, 54 InsetsStateProto, 55 InsetsControllerProto>; 56 57 static constexpr FieldMetadata_State kState{}; set_state()58 template <typename T = InsetsStateProto> T* set_state() { 59 return BeginNestedMessage<T>(1); 60 } 61 62 63 using FieldMetadata_Control = 64 ::protozero::proto_utils::FieldMetadata< 65 2, 66 ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked, 67 ::protozero::proto_utils::ProtoSchemaType::kMessage, 68 InsetsAnimationControlImplProto, 69 InsetsControllerProto>; 70 71 static constexpr FieldMetadata_Control kControl{}; add_control()72 template <typename T = InsetsAnimationControlImplProto> T* add_control() { 73 return BeginNestedMessage<T>(2); 74 } 75 76 }; 77 78 } // Namespace. 79 } // Namespace. 80 } // Namespace. 81 #endif // Include guard. 82