xref: /aosp_15_r20/external/grpc-grpc/third_party/upb/upb/reflection/oneof_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 // IWYU pragma: private, include "upb/reflection/def.h"
9 
10 #ifndef UPB_REFLECTION_ONEOF_DEF_H_
11 #define UPB_REFLECTION_ONEOF_DEF_H_
12 
13 #include "upb/reflection/common.h"
14 
15 // Must be last.
16 #include "upb/port/def.inc"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 UPB_API const upb_MessageDef* upb_OneofDef_ContainingType(
23     const upb_OneofDef* o);
24 UPB_API const upb_FieldDef* upb_OneofDef_Field(const upb_OneofDef* o, int i);
25 UPB_API int upb_OneofDef_FieldCount(const upb_OneofDef* o);
26 const char* upb_OneofDef_FullName(const upb_OneofDef* o);
27 bool upb_OneofDef_HasOptions(const upb_OneofDef* o);
28 uint32_t upb_OneofDef_Index(const upb_OneofDef* o);
29 bool upb_OneofDef_IsSynthetic(const upb_OneofDef* o);
30 const upb_FieldDef* upb_OneofDef_LookupName(const upb_OneofDef* o,
31                                             const char* name);
32 const upb_FieldDef* upb_OneofDef_LookupNameWithSize(const upb_OneofDef* o,
33                                                     const char* name,
34                                                     size_t size);
35 const upb_FieldDef* upb_OneofDef_LookupNumber(const upb_OneofDef* o,
36                                               uint32_t num);
37 UPB_API const char* upb_OneofDef_Name(const upb_OneofDef* o);
38 int upb_OneofDef_numfields(const upb_OneofDef* o);
39 const UPB_DESC(OneofOptions*) upb_OneofDef_Options(const upb_OneofDef* o);
40 const UPB_DESC(FeatureSet*)
41     upb_OneofDef_ResolvedFeatures(const upb_OneofDef* o);
42 
43 #ifdef __cplusplus
44 } /* extern "C" */
45 #endif
46 
47 #include "upb/port/undef.inc"
48 
49 #endif /* UPB_REFLECTION_ONEOF_DEF_H_ */
50