| 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 |
#ifndef GRPC_CUSTOM_MESSAGE |
| 27 |
#ifdef GRPC_USE_PROTO_LITE |
| 28 |
#include <google/protobuf/message_lite.h> |
| 29 |
#define GRPC_CUSTOM_MESSAGE ::google::protobuf::MessageLite |
| 30 |
#define GRPC_CUSTOM_MESSAGELITE ::google::protobuf::MessageLite |
| 31 |
#else |
| 32 |
#include <google/protobuf/message.h> |
| 33 |
#define GRPC_CUSTOM_MESSAGE ::google::protobuf::Message |
| 34 |
#define GRPC_CUSTOM_MESSAGELITE ::google::protobuf::MessageLite |
| 35 |
#endif |
| 36 |
#endif |
| 37 |
|
| 38 |
#ifndef GRPC_CUSTOM_DESCRIPTOR |
| 39 |
#include <google/protobuf/descriptor.h> |
| 40 |
#include <google/protobuf/descriptor.pb.h> |
| 41 |
#define GRPC_CUSTOM_DESCRIPTOR ::google::protobuf::Descriptor |
| 42 |
#define GRPC_CUSTOM_DESCRIPTORPOOL ::google::protobuf::DescriptorPool |
| 43 |
#define GRPC_CUSTOM_FIELDDESCRIPTOR ::google::protobuf::FieldDescriptor |
| 44 |
#define GRPC_CUSTOM_FILEDESCRIPTOR ::google::protobuf::FileDescriptor |
| 45 |
#define GRPC_CUSTOM_FILEDESCRIPTORPROTO ::google::protobuf::FileDescriptorProto |
| 46 |
#define GRPC_CUSTOM_METHODDESCRIPTOR ::google::protobuf::MethodDescriptor |
| 47 |
#define GRPC_CUSTOM_SERVICEDESCRIPTOR ::google::protobuf::ServiceDescriptor |
| 48 |
#define GRPC_CUSTOM_SOURCELOCATION ::google::protobuf::SourceLocation |
| 49 |
#endif |
| 50 |
|
| 51 |
#ifndef GRPC_CUSTOM_DESCRIPTORDATABASE |
| 52 |
#include <google/protobuf/descriptor_database.h> |
| 53 |
#define GRPC_CUSTOM_DESCRIPTORDATABASE ::google::protobuf::DescriptorDatabase |
| 54 |
#define GRPC_CUSTOM_SIMPLEDESCRIPTORDATABASE \ |
| 55 |
::google::protobuf::SimpleDescriptorDatabase |
| 56 |
#endif |
| 57 |
|
| 58 |
#ifndef GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM |
| 59 |
#include <google/protobuf/io/coded_stream.h> |
| 60 |
#include <google/protobuf/io/zero_copy_stream.h> |
| 61 |
#define GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM \ |
| 62 |
::google::protobuf::io::ZeroCopyOutputStream |
| 63 |
#define GRPC_CUSTOM_ZEROCOPYINPUTSTREAM \ |
| 64 |
::google::protobuf::io::ZeroCopyInputStream |
| 65 |
#define GRPC_CUSTOM_CODEDINPUTSTREAM ::google::protobuf::io::CodedInputStream |
| 66 |
#endif |
| 67 |
|
| 68 |
#ifndef GRPC_CUSTOM_JSONUTIL |
| 69 |
#include <google/protobuf/util/json_util.h> |
| 70 |
#include <google/protobuf/util/type_resolver_util.h> |
| 71 |
#define GRPC_CUSTOM_JSONUTIL ::google::protobuf::util |
| 72 |
#define GRPC_CUSTOM_UTIL_STATUS ::google::protobuf::util::Status |
| 73 |
#endif |
| 74 |
|
| 75 |
namespace grpc { |
| 76 |
namespace protobuf { |
| 77 |
|
| 78 |
typedef GRPC_CUSTOM_MESSAGE Message; |
| 79 |
typedef GRPC_CUSTOM_MESSAGELITE MessageLite; |
| 80 |
|
| 81 |
typedef GRPC_CUSTOM_DESCRIPTOR Descriptor; |
| 82 |
typedef GRPC_CUSTOM_DESCRIPTORPOOL DescriptorPool; |
| 83 |
typedef GRPC_CUSTOM_DESCRIPTORDATABASE DescriptorDatabase; |
| 84 |
typedef GRPC_CUSTOM_FIELDDESCRIPTOR FieldDescriptor; |
| 85 |
typedef GRPC_CUSTOM_FILEDESCRIPTOR FileDescriptor; |
| 86 |
typedef GRPC_CUSTOM_FILEDESCRIPTORPROTO FileDescriptorProto; |
| 87 |
typedef GRPC_CUSTOM_METHODDESCRIPTOR MethodDescriptor; |
| 88 |
typedef GRPC_CUSTOM_SERVICEDESCRIPTOR ServiceDescriptor; |
| 89 |
typedef GRPC_CUSTOM_SIMPLEDESCRIPTORDATABASE SimpleDescriptorDatabase; |
| 90 |
typedef GRPC_CUSTOM_SOURCELOCATION SourceLocation; |
| 91 |
|
| 92 |
namespace util { |
| 93 |
typedef GRPC_CUSTOM_UTIL_STATUS Status; |
| 94 |
} // namespace util |
| 95 |
|
| 96 |
// NOLINTNEXTLINE(misc-unused-alias-decls) |
| 97 |
namespace json = GRPC_CUSTOM_JSONUTIL; |
| 98 |
|
| 99 |
namespace io { |
| 100 |
typedef GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM ZeroCopyOutputStream; |
| 101 |
typedef GRPC_CUSTOM_ZEROCOPYINPUTSTREAM ZeroCopyInputStream; |
| 102 |
typedef GRPC_CUSTOM_CODEDINPUTSTREAM CodedInputStream; |
| 103 |
} // namespace io |
| 104 |
|
| 105 |
} // namespace protobuf |
| 106 |
} // namespace grpc |
| 107 |
|
| 108 |
#endif // GRPCPP_IMPL_CODEGEN_CONFIG_PROTOBUF_H |