• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 //
3 // Copyright 2015 gRPC authors.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 //
18 
19 #ifndef GRPCPP_IMPL_CODEGEN_CONFIG_PROTOBUF_H
20 #define GRPCPP_IMPL_CODEGEN_CONFIG_PROTOBUF_H
21 
22 // IWYU pragma: private
23 
24 #define GRPC_OPEN_SOURCE_PROTO
25 
26 #define GRPC_PROTOBUF_CORD_SUPPORT_ENABLED
27 
28 #ifndef GRPC_CUSTOM_MESSAGE
29 #ifdef GRPC_USE_PROTO_LITE
30 #include <google/protobuf/message_lite.h>
31 #define GRPC_CUSTOM_MESSAGE ::google::protobuf::MessageLite
32 #define GRPC_CUSTOM_MESSAGELITE ::google::protobuf::MessageLite
33 #else
34 #include <google/protobuf/message.h>
35 #define GRPC_CUSTOM_MESSAGE ::google::protobuf::Message
36 #define GRPC_CUSTOM_MESSAGELITE ::google::protobuf::MessageLite
37 #endif
38 #endif
39 
40 #ifndef GRPC_CUSTOM_DESCRIPTOR
41 #include <google/protobuf/descriptor.h>
42 #include <google/protobuf/descriptor.pb.h>
43 #define GRPC_CUSTOM_DESCRIPTOR ::google::protobuf::Descriptor
44 #define GRPC_CUSTOM_DESCRIPTORPOOL ::google::protobuf::DescriptorPool
45 #define GRPC_CUSTOM_FIELDDESCRIPTOR ::google::protobuf::FieldDescriptor
46 #define GRPC_CUSTOM_FILEDESCRIPTOR ::google::protobuf::FileDescriptor
47 #define GRPC_CUSTOM_FILEDESCRIPTORPROTO ::google::protobuf::FileDescriptorProto
48 #define GRPC_CUSTOM_METHODDESCRIPTOR ::google::protobuf::MethodDescriptor
49 #define GRPC_CUSTOM_SERVICEDESCRIPTOR ::google::protobuf::ServiceDescriptor
50 #define GRPC_CUSTOM_SOURCELOCATION ::google::protobuf::SourceLocation
51 #endif
52 
53 #ifndef GRPC_CUSTOM_DESCRIPTORDATABASE
54 #include <google/protobuf/descriptor_database.h>
55 #define GRPC_CUSTOM_DESCRIPTORDATABASE ::google::protobuf::DescriptorDatabase
56 #define GRPC_CUSTOM_SIMPLEDESCRIPTORDATABASE \
57   ::google::protobuf::SimpleDescriptorDatabase
58 #endif
59 
60 #ifndef GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM
61 #include <google/protobuf/io/coded_stream.h>
62 #include <google/protobuf/io/zero_copy_stream.h>
63 #define GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM \
64   ::google::protobuf::io::ZeroCopyOutputStream
65 #define GRPC_CUSTOM_ZEROCOPYINPUTSTREAM \
66   ::google::protobuf::io::ZeroCopyInputStream
67 #define GRPC_CUSTOM_CODEDINPUTSTREAM ::google::protobuf::io::CodedInputStream
68 #endif
69 
70 #ifndef GRPC_CUSTOM_JSONUTIL
71 #include <google/protobuf/util/json_util.h>
72 #include <google/protobuf/util/type_resolver_util.h>
73 
74 #include "absl/status/status.h"
75 #define GRPC_CUSTOM_JSONUTIL ::google::protobuf::util
76 #define GRPC_CUSTOM_UTIL_STATUS ::absl::Status
77 #endif
78 
79 namespace grpc {
80 namespace protobuf {
81 
82 typedef GRPC_CUSTOM_MESSAGE Message;
83 typedef GRPC_CUSTOM_MESSAGELITE MessageLite;
84 
85 typedef GRPC_CUSTOM_DESCRIPTOR Descriptor;
86 typedef GRPC_CUSTOM_DESCRIPTORPOOL DescriptorPool;
87 typedef GRPC_CUSTOM_DESCRIPTORDATABASE DescriptorDatabase;
88 typedef GRPC_CUSTOM_FIELDDESCRIPTOR FieldDescriptor;
89 typedef GRPC_CUSTOM_FILEDESCRIPTOR FileDescriptor;
90 typedef GRPC_CUSTOM_FILEDESCRIPTORPROTO FileDescriptorProto;
91 typedef GRPC_CUSTOM_METHODDESCRIPTOR MethodDescriptor;
92 typedef GRPC_CUSTOM_SERVICEDESCRIPTOR ServiceDescriptor;
93 typedef GRPC_CUSTOM_SIMPLEDESCRIPTORDATABASE SimpleDescriptorDatabase;
94 typedef GRPC_CUSTOM_SOURCELOCATION SourceLocation;
95 
96 namespace util {
97 typedef GRPC_CUSTOM_UTIL_STATUS Status;
98 }  // namespace util
99 
100 // NOLINTNEXTLINE(misc-unused-alias-decls)
101 namespace json = GRPC_CUSTOM_JSONUTIL;
102 
103 namespace io {
104 typedef GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM ZeroCopyOutputStream;
105 typedef GRPC_CUSTOM_ZEROCOPYINPUTSTREAM ZeroCopyInputStream;
106 typedef GRPC_CUSTOM_CODEDINPUTSTREAM CodedInputStream;
107 }  // namespace io
108 
109 }  // namespace protobuf
110 }  // namespace grpc
111 
112 #endif  // GRPCPP_IMPL_CODEGEN_CONFIG_PROTOBUF_H
113