1 /*
2  * Copyright (c) 2009-2021, Google LLC
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *     * Redistributions of source code must retain the above copyright
8  *       notice, this list of conditions and the following disclaimer.
9  *     * Redistributions in binary form must reproduce the above copyright
10  *       notice, this list of conditions and the following disclaimer in the
11  *       documentation and/or other materials provided with the distribution.
12  *     * Neither the name of Google LLC nor the
13  *       names of its contributors may be used to endorse or promote products
14  *       derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED. IN NO EVENT SHALL Google LLC BE LIABLE FOR ANY DIRECT,
20  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 // IWYU pragma: private, include "upb/reflection/def.h"
29 
30 // Declarations common to all public def types.
31 
32 #ifndef UPB_REFLECTION_COMMON_H_
33 #define UPB_REFLECTION_COMMON_H_
34 
35 // begin:google_only
36 // #ifndef UPB_BOOTSTRAP_STAGE0
37 // #include "net/proto2/proto/descriptor.upb.h"
38 // #else
39 // #include "google/protobuf/descriptor.upb.h"
40 // #endif
41 // end:google_only
42 
43 // begin:github_only
44 #include "google/protobuf/descriptor.upb.h"
45 // end:github_only
46 
47 typedef enum { kUpb_Syntax_Proto2 = 2, kUpb_Syntax_Proto3 = 3 } upb_Syntax;
48 
49 // Forward declarations for circular references.
50 typedef struct upb_DefPool upb_DefPool;
51 typedef struct upb_EnumDef upb_EnumDef;
52 typedef struct upb_EnumReservedRange upb_EnumReservedRange;
53 typedef struct upb_EnumValueDef upb_EnumValueDef;
54 typedef struct upb_ExtensionRange upb_ExtensionRange;
55 typedef struct upb_FieldDef upb_FieldDef;
56 typedef struct upb_FileDef upb_FileDef;
57 typedef struct upb_MessageDef upb_MessageDef;
58 typedef struct upb_MessageReservedRange upb_MessageReservedRange;
59 typedef struct upb_MethodDef upb_MethodDef;
60 typedef struct upb_OneofDef upb_OneofDef;
61 typedef struct upb_ServiceDef upb_ServiceDef;
62 
63 // EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE /////////////////////////
64 
65 typedef struct upb_DefBuilder upb_DefBuilder;
66 
67 #endif /* UPB_REFLECTION_COMMON_H_ */
68