config_grpc_cli.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. *
  3. * Copyright 2016 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. #ifndef GRPC_TEST_CPP_UTIL_CONFIG_GRPC_CLI_H
  19. #define GRPC_TEST_CPP_UTIL_CONFIG_GRPC_CLI_H
  20. #include <grpcpp/impl/codegen/config_protobuf.h>
  21. #ifndef GRPC_CUSTOM_DYNAMICMESSAGEFACTORY
  22. #include <google/protobuf/dynamic_message.h>
  23. #define GRPC_CUSTOM_DYNAMICMESSAGEFACTORY \
  24. ::google::protobuf::DynamicMessageFactory
  25. #endif
  26. #ifndef GRPC_CUSTOM_DESCRIPTORPOOLDATABASE
  27. #include <google/protobuf/descriptor.h>
  28. #define GRPC_CUSTOM_DESCRIPTORPOOLDATABASE \
  29. ::google::protobuf::DescriptorPoolDatabase
  30. #define GRPC_CUSTOM_MERGEDDESCRIPTORDATABASE \
  31. ::google::protobuf::MergedDescriptorDatabase
  32. #endif
  33. #ifndef GRPC_CUSTOM_TEXTFORMAT
  34. #include <google/protobuf/text_format.h>
  35. #define GRPC_CUSTOM_TEXTFORMAT ::google::protobuf::TextFormat
  36. #endif
  37. #ifndef GRPC_CUSTOM_DISKSOURCETREE
  38. #include <google/protobuf/compiler/importer.h>
  39. #define GRPC_CUSTOM_DISKSOURCETREE ::google::protobuf::compiler::DiskSourceTree
  40. #define GRPC_CUSTOM_IMPORTER ::google::protobuf::compiler::Importer
  41. #define GRPC_CUSTOM_MULTIFILEERRORCOLLECTOR \
  42. ::google::protobuf::compiler::MultiFileErrorCollector
  43. #endif
  44. namespace grpc {
  45. namespace protobuf {
  46. typedef GRPC_CUSTOM_DYNAMICMESSAGEFACTORY DynamicMessageFactory;
  47. typedef GRPC_CUSTOM_DESCRIPTORPOOLDATABASE DescriptorPoolDatabase;
  48. typedef GRPC_CUSTOM_MERGEDDESCRIPTORDATABASE MergedDescriptorDatabase;
  49. typedef GRPC_CUSTOM_TEXTFORMAT TextFormat;
  50. namespace compiler {
  51. typedef GRPC_CUSTOM_DISKSOURCETREE DiskSourceTree;
  52. typedef GRPC_CUSTOM_IMPORTER Importer;
  53. typedef GRPC_CUSTOM_MULTIFILEERRORCOLLECTOR MultiFileErrorCollector;
  54. } // namespace compiler
  55. } // namespace protobuf
  56. } // namespace grpc
  57. #endif // GRPC_TEST_CPP_UTIL_CONFIG_GRPC_CLI_H