3 * Copyright 2015 gRPC authors.
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #ifndef GRPCPP_IMPL_CODEGEN_CONFIG_PROTOBUF_H
20 #define GRPCPP_IMPL_CODEGEN_CONFIG_PROTOBUF_H
22 #define GRPC_OPEN_SOURCE_PROTO
24 #ifndef GRPC_CUSTOM_PROTOBUF_INT64
25 #include <google/protobuf/stubs/common.h>
26 #define GRPC_CUSTOM_PROTOBUF_INT64 ::google::protobuf::int64
29 #ifndef GRPC_CUSTOM_MESSAGE
30 #ifdef GRPC_USE_PROTO_LITE
31 #include <google/protobuf/message_lite.h>
32 #define GRPC_CUSTOM_MESSAGE ::google::protobuf::MessageLite
33 #define GRPC_CUSTOM_MESSAGELITE ::google::protobuf::MessageLite
35 #include <google/protobuf/message.h>
36 #define GRPC_CUSTOM_MESSAGE ::google::protobuf::Message
37 #define GRPC_CUSTOM_MESSAGELITE ::google::protobuf::MessageLite
41 #ifndef GRPC_CUSTOM_DESCRIPTOR
42 #include <google/protobuf/descriptor.h>
43 #include <google/protobuf/descriptor.pb.h>
44 #define GRPC_CUSTOM_DESCRIPTOR ::google::protobuf::Descriptor
45 #define GRPC_CUSTOM_DESCRIPTORPOOL ::google::protobuf::DescriptorPool
46 #define GRPC_CUSTOM_FIELDDESCRIPTOR ::google::protobuf::FieldDescriptor
47 #define GRPC_CUSTOM_FILEDESCRIPTOR ::google::protobuf::FileDescriptor
48 #define GRPC_CUSTOM_FILEDESCRIPTORPROTO ::google::protobuf::FileDescriptorProto
49 #define GRPC_CUSTOM_METHODDESCRIPTOR ::google::protobuf::MethodDescriptor
50 #define GRPC_CUSTOM_SERVICEDESCRIPTOR ::google::protobuf::ServiceDescriptor
51 #define GRPC_CUSTOM_SOURCELOCATION ::google::protobuf::SourceLocation
54 #ifndef GRPC_CUSTOM_DESCRIPTORDATABASE
55 #include <google/protobuf/descriptor_database.h>
56 #define GRPC_CUSTOM_DESCRIPTORDATABASE ::google::protobuf::DescriptorDatabase
57 #define GRPC_CUSTOM_SIMPLEDESCRIPTORDATABASE \
58 ::google::protobuf::SimpleDescriptorDatabase
61 #ifndef GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM
62 #include <google/protobuf/io/coded_stream.h>
63 #include <google/protobuf/io/zero_copy_stream.h>
64 #define GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM \
65 ::google::protobuf::io::ZeroCopyOutputStream
66 #define GRPC_CUSTOM_ZEROCOPYINPUTSTREAM \
67 ::google::protobuf::io::ZeroCopyInputStream
68 #define GRPC_CUSTOM_CODEDINPUTSTREAM ::google::protobuf::io::CodedInputStream
71 #ifndef GRPC_CUSTOM_JSONUTIL
72 #include <google/protobuf/util/json_util.h>
73 #define GRPC_CUSTOM_JSONUTIL ::google::protobuf::util
74 #define GRPC_CUSTOM_UTIL_STATUS ::google::protobuf::util::Status
80 typedef GRPC_CUSTOM_MESSAGE Message;
81 typedef GRPC_CUSTOM_MESSAGELITE MessageLite;
82 typedef GRPC_CUSTOM_PROTOBUF_INT64 int64;
84 typedef GRPC_CUSTOM_DESCRIPTOR Descriptor;
85 typedef GRPC_CUSTOM_DESCRIPTORPOOL DescriptorPool;
86 typedef GRPC_CUSTOM_DESCRIPTORDATABASE DescriptorDatabase;
87 typedef GRPC_CUSTOM_FIELDDESCRIPTOR FieldDescriptor;
88 typedef GRPC_CUSTOM_FILEDESCRIPTOR FileDescriptor;
89 typedef GRPC_CUSTOM_FILEDESCRIPTORPROTO FileDescriptorProto;
90 typedef GRPC_CUSTOM_METHODDESCRIPTOR MethodDescriptor;
91 typedef GRPC_CUSTOM_SERVICEDESCRIPTOR ServiceDescriptor;
92 typedef GRPC_CUSTOM_SIMPLEDESCRIPTORDATABASE SimpleDescriptorDatabase;
93 typedef GRPC_CUSTOM_SOURCELOCATION SourceLocation;
96 typedef GRPC_CUSTOM_UTIL_STATUS Status;
99 namespace json = GRPC_CUSTOM_JSONUTIL;
102 typedef GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM ZeroCopyOutputStream;
103 typedef GRPC_CUSTOM_ZEROCOPYINPUTSTREAM ZeroCopyInputStream;
104 typedef GRPC_CUSTOM_CODEDINPUTSTREAM CodedInputStream;
107 } // namespace protobuf
110 #endif // GRPCPP_IMPL_CODEGEN_CONFIG_PROTOBUF_H