xref: /aosp_15_r20/external/grpc-grpc/third_party/upb/upb/reflection/internal/enum_def.h (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2023 Google LLC.  All rights reserved.
3 //
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file or at
6 // https://developers.google.com/open-source/licenses/bsd
7 
8 #ifndef UPB_REFLECTION_ENUM_DEF_INTERNAL_H_
9 #define UPB_REFLECTION_ENUM_DEF_INTERNAL_H_
10 
11 #include "upb/reflection/enum_def.h"
12 
13 // Must be last.
14 #include "upb/port/def.inc"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 upb_EnumDef* _upb_EnumDef_At(const upb_EnumDef* e, int i);
21 bool _upb_EnumDef_Insert(upb_EnumDef* e, upb_EnumValueDef* v, upb_Arena* a);
22 const upb_MiniTableEnum* _upb_EnumDef_MiniTable(const upb_EnumDef* e);
23 
24 // Allocate and initialize an array of |n| enum defs.
25 upb_EnumDef* _upb_EnumDefs_New(upb_DefBuilder* ctx, int n,
26                                const UPB_DESC(EnumDescriptorProto*)
27                                    const* protos,
28                                const UPB_DESC(FeatureSet*) parent_features,
29                                const upb_MessageDef* containing_type);
30 
31 #ifdef __cplusplus
32 } /* extern "C" */
33 #endif
34 
35 #include "upb/port/undef.inc"
36 
37 #endif /* UPB_REFLECTION_ENUM_DEF_INTERNAL_H_ */
38