diff --git a/BUILD b/BUILD index 2d5d958575ea33e24654c9f46d27b72b18a71506..257f12f152947cd78d9b77fdb3bb95532f92a154 100644 --- a/BUILD +++ b/BUILD @@ -713,19 +713,13 @@ cc_library( "src/cpp/util/time.cc", ], hdrs = [ - "include/grpc++/async_generic_service.h", - "include/grpc++/async_unary_call.h", - "include/grpc++/auth_context.h", - "include/grpc++/byte_buffer.h", "include/grpc++/channel.h", - "include/grpc++/channel_arguments.h", "include/grpc++/client_context.h", "include/grpc++/completion_queue.h", - "include/grpc++/config.h", - "include/grpc++/config_protobuf.h", "include/grpc++/create_channel.h", "include/grpc++/credentials.h", - "include/grpc++/generic_stub.h", + "include/grpc++/generic/async_generic_service.h", + "include/grpc++/generic/generic_stub.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/grpc_library.h", @@ -744,12 +738,19 @@ cc_library( "include/grpc++/server_builder.h", "include/grpc++/server_context.h", "include/grpc++/server_credentials.h", - "include/grpc++/slice.h", - "include/grpc++/status.h", - "include/grpc++/status_code_enum.h", - "include/grpc++/stream.h", - "include/grpc++/stub_options.h", - "include/grpc++/time.h", + "include/grpc++/support/async_stream.h", + "include/grpc++/support/async_unary_call.h", + "include/grpc++/support/auth_context.h", + "include/grpc++/support/byte_buffer.h", + "include/grpc++/support/channel_arguments.h", + "include/grpc++/support/config.h", + "include/grpc++/support/config_protobuf.h", + "include/grpc++/support/slice.h", + "include/grpc++/support/status.h", + "include/grpc++/support/status_code_enum.h", + "include/grpc++/support/stub_options.h", + "include/grpc++/support/sync_stream.h", + "include/grpc++/support/time.h", ], includes = [ "include", @@ -799,19 +800,13 @@ cc_library( "src/cpp/util/time.cc", ], hdrs = [ - "include/grpc++/async_generic_service.h", - "include/grpc++/async_unary_call.h", - "include/grpc++/auth_context.h", - "include/grpc++/byte_buffer.h", "include/grpc++/channel.h", - "include/grpc++/channel_arguments.h", "include/grpc++/client_context.h", "include/grpc++/completion_queue.h", - "include/grpc++/config.h", - "include/grpc++/config_protobuf.h", "include/grpc++/create_channel.h", "include/grpc++/credentials.h", - "include/grpc++/generic_stub.h", + "include/grpc++/generic/async_generic_service.h", + "include/grpc++/generic/generic_stub.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/grpc_library.h", @@ -830,12 +825,19 @@ cc_library( "include/grpc++/server_builder.h", "include/grpc++/server_context.h", "include/grpc++/server_credentials.h", - "include/grpc++/slice.h", - "include/grpc++/status.h", - "include/grpc++/status_code_enum.h", - "include/grpc++/stream.h", - "include/grpc++/stub_options.h", - "include/grpc++/time.h", + "include/grpc++/support/async_stream.h", + "include/grpc++/support/async_unary_call.h", + "include/grpc++/support/auth_context.h", + "include/grpc++/support/byte_buffer.h", + "include/grpc++/support/channel_arguments.h", + "include/grpc++/support/config.h", + "include/grpc++/support/config_protobuf.h", + "include/grpc++/support/slice.h", + "include/grpc++/support/status.h", + "include/grpc++/support/status_code_enum.h", + "include/grpc++/support/stub_options.h", + "include/grpc++/support/sync_stream.h", + "include/grpc++/support/time.h", ], includes = [ "include", @@ -852,8 +854,8 @@ cc_library( cc_library( name = "grpc_plugin_support", srcs = [ - "include/grpc++/config.h", - "include/grpc++/config_protobuf.h", + "include/grpc++/support/config.h", + "include/grpc++/support/config_protobuf.h", "src/compiler/config.h", "src/compiler/cpp_generator.h", "src/compiler/cpp_generator_helpers.h", diff --git a/Makefile b/Makefile index 5319aa067d416d3e51c6def20fda7bca0a5e388c..e5a7a2c7bfaf86f76172fd757f8c432733ba5109 100644 --- a/Makefile +++ b/Makefile @@ -4626,19 +4626,13 @@ LIBGRPC++_SRC = \ src/cpp/util/time.cc \ PUBLIC_HEADERS_CXX += \ - include/grpc++/async_generic_service.h \ - include/grpc++/async_unary_call.h \ - include/grpc++/auth_context.h \ - include/grpc++/byte_buffer.h \ include/grpc++/channel.h \ - include/grpc++/channel_arguments.h \ include/grpc++/client_context.h \ include/grpc++/completion_queue.h \ - include/grpc++/config.h \ - include/grpc++/config_protobuf.h \ include/grpc++/create_channel.h \ include/grpc++/credentials.h \ - include/grpc++/generic_stub.h \ + include/grpc++/generic/async_generic_service.h \ + include/grpc++/generic/generic_stub.h \ include/grpc++/impl/call.h \ include/grpc++/impl/client_unary_call.h \ include/grpc++/impl/grpc_library.h \ @@ -4657,12 +4651,19 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/server_builder.h \ include/grpc++/server_context.h \ include/grpc++/server_credentials.h \ - include/grpc++/slice.h \ - include/grpc++/status.h \ - include/grpc++/status_code_enum.h \ - include/grpc++/stream.h \ - include/grpc++/stub_options.h \ - include/grpc++/time.h \ + include/grpc++/support/async_stream.h \ + include/grpc++/support/async_unary_call.h \ + include/grpc++/support/auth_context.h \ + include/grpc++/support/byte_buffer.h \ + include/grpc++/support/channel_arguments.h \ + include/grpc++/support/config.h \ + include/grpc++/support/config_protobuf.h \ + include/grpc++/support/slice.h \ + include/grpc++/support/status.h \ + include/grpc++/support/status_code_enum.h \ + include/grpc++/support/stub_options.h \ + include/grpc++/support/sync_stream.h \ + include/grpc++/support/time.h \ LIBGRPC++_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_SRC)))) @@ -4865,19 +4866,13 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/util/time.cc \ PUBLIC_HEADERS_CXX += \ - include/grpc++/async_generic_service.h \ - include/grpc++/async_unary_call.h \ - include/grpc++/auth_context.h \ - include/grpc++/byte_buffer.h \ include/grpc++/channel.h \ - include/grpc++/channel_arguments.h \ include/grpc++/client_context.h \ include/grpc++/completion_queue.h \ - include/grpc++/config.h \ - include/grpc++/config_protobuf.h \ include/grpc++/create_channel.h \ include/grpc++/credentials.h \ - include/grpc++/generic_stub.h \ + include/grpc++/generic/async_generic_service.h \ + include/grpc++/generic/generic_stub.h \ include/grpc++/impl/call.h \ include/grpc++/impl/client_unary_call.h \ include/grpc++/impl/grpc_library.h \ @@ -4896,12 +4891,19 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/server_builder.h \ include/grpc++/server_context.h \ include/grpc++/server_credentials.h \ - include/grpc++/slice.h \ - include/grpc++/status.h \ - include/grpc++/status_code_enum.h \ - include/grpc++/stream.h \ - include/grpc++/stub_options.h \ - include/grpc++/time.h \ + include/grpc++/support/async_stream.h \ + include/grpc++/support/async_unary_call.h \ + include/grpc++/support/auth_context.h \ + include/grpc++/support/byte_buffer.h \ + include/grpc++/support/channel_arguments.h \ + include/grpc++/support/config.h \ + include/grpc++/support/config_protobuf.h \ + include/grpc++/support/slice.h \ + include/grpc++/support/status.h \ + include/grpc++/support/status_code_enum.h \ + include/grpc++/support/stub_options.h \ + include/grpc++/support/sync_stream.h \ + include/grpc++/support/time.h \ LIBGRPC++_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_UNSECURE_SRC)))) diff --git a/build.json b/build.json index b17b332443ceb6ce943f062e8d0c6d853a5cf044..414b95795db01aa1bcd7370de810b2c221284b94 100644 --- a/build.json +++ b/build.json @@ -30,19 +30,13 @@ { "name": "grpc++_base", "public_headers": [ - "include/grpc++/async_generic_service.h", - "include/grpc++/async_unary_call.h", - "include/grpc++/auth_context.h", - "include/grpc++/byte_buffer.h", "include/grpc++/channel.h", - "include/grpc++/channel_arguments.h", "include/grpc++/client_context.h", "include/grpc++/completion_queue.h", - "include/grpc++/config.h", - "include/grpc++/config_protobuf.h", "include/grpc++/create_channel.h", "include/grpc++/credentials.h", - "include/grpc++/generic_stub.h", + "include/grpc++/generic/async_generic_service.h", + "include/grpc++/generic/generic_stub.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/grpc_library.h", @@ -61,12 +55,19 @@ "include/grpc++/server_builder.h", "include/grpc++/server_context.h", "include/grpc++/server_credentials.h", - "include/grpc++/slice.h", - "include/grpc++/status.h", - "include/grpc++/status_code_enum.h", - "include/grpc++/stream.h", - "include/grpc++/stub_options.h", - "include/grpc++/time.h" + "include/grpc++/support/async_stream.h", + "include/grpc++/support/async_unary_call.h", + "include/grpc++/support/auth_context.h", + "include/grpc++/support/byte_buffer.h", + "include/grpc++/support/channel_arguments.h", + "include/grpc++/support/config.h", + "include/grpc++/support/config_protobuf.h", + "include/grpc++/support/slice.h", + "include/grpc++/support/status.h", + "include/grpc++/support/status_code_enum.h", + "include/grpc++/support/stub_options.h", + "include/grpc++/support/sync_stream.h", + "include/grpc++/support/time.h" ], "headers": [ "src/cpp/client/create_channel_internal.h", @@ -696,8 +697,8 @@ "build": "protoc", "language": "c++", "headers": [ - "include/grpc++/config.h", - "include/grpc++/config_protobuf.h", + "include/grpc++/support/config.h", + "include/grpc++/support/config_protobuf.h", "src/compiler/config.h", "src/compiler/cpp_generator.h", "src/compiler/cpp_generator_helpers.h", diff --git a/examples/pubsub/main.cc b/examples/pubsub/main.cc index fcee3b316b320482e3f8565a3cce2b93c8572cff..32102dcb5cd417e8a2fb4e25e4101c1ddfc9f5ab 100644 --- a/examples/pubsub/main.cc +++ b/examples/pubsub/main.cc @@ -37,18 +37,16 @@ #include <string> #include <thread> +#include <gflags/gflags.h> #include <grpc/grpc.h> #include <grpc/support/log.h> -#include <gflags/gflags.h> -#include <grpc++/channel_arguments.h> #include <grpc++/channel.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> -#include <grpc++/status.h> -#include "test/cpp/util/test_config.h" #include "examples/pubsub/publisher.h" #include "examples/pubsub/subscriber.h" +#include "test/cpp/util/test_config.h" DEFINE_int32(server_port, 443, "Server port."); DEFINE_string(server_host, "pubsub-staging.googleapis.com", diff --git a/examples/pubsub/publisher.h b/examples/pubsub/publisher.h index b98e6973dce2f0009cda59f4f563288bb20b4fcc..02e6194b0bde746bac5de724d771ea7f9ac3899e 100644 --- a/examples/pubsub/publisher.h +++ b/examples/pubsub/publisher.h @@ -35,7 +35,6 @@ #define GRPC_EXAMPLES_PUBSUB_PUBLISHER_H #include <grpc++/channel.h> -#include <grpc++/status.h> #include "examples/pubsub/pubsub.grpc.pb.h" diff --git a/examples/pubsub/publisher_test.cc b/examples/pubsub/publisher_test.cc index 972b426e6418e452036fa3c4d591d3ae0fd6d8c7..c2eb295ef277acccbdc41757b4fb5b73054f190d 100644 --- a/examples/pubsub/publisher_test.cc +++ b/examples/pubsub/publisher_test.cc @@ -31,7 +31,6 @@ * */ -#include <grpc++/channel_arguments.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> @@ -39,7 +38,6 @@ #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> #include <gtest/gtest.h> #include "examples/pubsub/publisher.h" diff --git a/examples/pubsub/subscriber.h b/examples/pubsub/subscriber.h index 87c833102c7dcdcf51d3f9b86abae3747c7fa83b..c5b1df0d3ec386df3a66776b3d2e4df909a51587 100644 --- a/examples/pubsub/subscriber.h +++ b/examples/pubsub/subscriber.h @@ -35,7 +35,6 @@ #define GRPC_EXAMPLES_PUBSUB_SUBSCRIBER_H #include <grpc++/channel.h> -#include <grpc++/status.h> #include "examples/pubsub/pubsub.grpc.pb.h" diff --git a/examples/pubsub/subscriber_test.cc b/examples/pubsub/subscriber_test.cc index 7974ca88c2d4af7b3e0725ac238e3f112899c22e..c5a077f407ceb8855a13ab04d87d4acf8bbcebdb 100644 --- a/examples/pubsub/subscriber_test.cc +++ b/examples/pubsub/subscriber_test.cc @@ -31,7 +31,6 @@ * */ -#include <grpc++/channel_arguments.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> @@ -39,7 +38,6 @@ #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> #include <gtest/gtest.h> #include "examples/pubsub/subscriber.h" diff --git a/include/grpc++/channel.h b/include/grpc++/channel.h index 7d6216e9c49c95c98a88961df8a5f5b7e6b28351..a8af74175b4de818591d3e83ae3261838425ca22 100644 --- a/include/grpc++/channel.h +++ b/include/grpc++/channel.h @@ -37,9 +37,9 @@ #include <memory> #include <grpc/grpc.h> -#include <grpc++/config.h> #include <grpc++/impl/call.h> #include <grpc++/impl/grpc_library.h> +#include <grpc++/support/config.h> struct grpc_channel; diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h index 55ed17506a62db9fc5a3d52731f9cdb16e005112..ee28f360cbeaa911fde56ec160b5a33e5c818d6b 100644 --- a/include/grpc++/client_context.h +++ b/include/grpc++/client_context.h @@ -42,10 +42,10 @@ #include <grpc/grpc.h> #include <grpc/support/log.h> #include <grpc/support/time.h> -#include <grpc++/auth_context.h> -#include <grpc++/config.h> -#include <grpc++/status.h> -#include <grpc++/time.h> +#include <grpc++/support/auth_context.h> +#include <grpc++/support/config.h> +#include <grpc++/support/status.h> +#include <grpc++/support/time.h> struct census_context; diff --git a/include/grpc++/completion_queue.h b/include/grpc++/completion_queue.h index 061f4874fab9e32a1188b91c46d9517151439444..d81d2e735d2a05db7a2b3621e4daad499385cf1d 100644 --- a/include/grpc++/completion_queue.h +++ b/include/grpc++/completion_queue.h @@ -36,8 +36,8 @@ #include <grpc/support/time.h> #include <grpc++/impl/grpc_library.h> -#include <grpc++/status.h> -#include <grpc++/time.h> +#include <grpc++/support/status.h> +#include <grpc++/support/time.h> struct grpc_completion_queue; diff --git a/include/grpc++/create_channel.h b/include/grpc++/create_channel.h index fe3445212842ae2d9f0205370f91350216db175c..0e559ac53e45e14e925968862ed62f8dc11ad08d 100644 --- a/include/grpc++/create_channel.h +++ b/include/grpc++/create_channel.h @@ -36,11 +36,11 @@ #include <memory> -#include <grpc++/config.h> #include <grpc++/credentials.h> +#include <grpc++/support/channel_arguments.h> +#include <grpc++/support/config.h> namespace grpc { -class ChannelArguments; // If creds does not hold an object or is invalid, a lame channel is returned. std::shared_ptr<Channel> CreateChannel( diff --git a/include/grpc++/credentials.h b/include/grpc++/credentials.h index 306dc961c0e6b98eb8c2e089c2a11e5cfdbe0db9..71e1f00f15ababb88ee25ea803350841b8d66711 100644 --- a/include/grpc++/credentials.h +++ b/include/grpc++/credentials.h @@ -36,8 +36,8 @@ #include <memory> -#include <grpc++/config.h> #include <grpc++/impl/grpc_library.h> +#include <grpc++/support/config.h> namespace grpc { class ChannelArguments; diff --git a/include/grpc++/async_generic_service.h b/include/grpc++/generic/async_generic_service.h similarity index 91% rename from include/grpc++/async_generic_service.h rename to include/grpc++/generic/async_generic_service.h index b435c6e73d23d92adbe2bde64e085712451fefdd..8578d850ffd75aef0f97d0f671c911a27fc5fed1 100644 --- a/include/grpc++/async_generic_service.h +++ b/include/grpc++/generic/async_generic_service.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPCXX_ASYNC_GENERIC_SERVICE_H -#define GRPCXX_ASYNC_GENERIC_SERVICE_H +#ifndef GRPCXX_GENERIC_ASYNC_GENERIC_SERVICE_H +#define GRPCXX_GENERIC_ASYNC_GENERIC_SERVICE_H -#include <grpc++/byte_buffer.h> -#include <grpc++/stream.h> +#include <grpc++/support/byte_buffer.h> +#include <grpc++/support/async_stream.h> struct grpc_server; @@ -75,4 +75,4 @@ class AsyncGenericService GRPC_FINAL { } // namespace grpc -#endif // GRPCXX_ASYNC_GENERIC_SERVICE_H +#endif // GRPCXX_GENERIC_ASYNC_GENERIC_SERVICE_H diff --git a/include/grpc++/generic_stub.h b/include/grpc++/generic/generic_stub.h similarity index 91% rename from include/grpc++/generic_stub.h rename to include/grpc++/generic/generic_stub.h index 734440881e0a38e64e549f1f2506928339588e4e..1bb7900b0684fc5d4f6c96ecf5c96598d87b5ac1 100644 --- a/include/grpc++/generic_stub.h +++ b/include/grpc++/generic/generic_stub.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPCXX_GENERIC_STUB_H -#define GRPCXX_GENERIC_STUB_H +#ifndef GRPCXX_GENERIC_GENERIC_STUB_H +#define GRPCXX_GENERIC_GENERIC_STUB_H -#include <grpc++/byte_buffer.h> -#include <grpc++/stream.h> +#include <grpc++/support/async_stream.h> +#include <grpc++/support/byte_buffer.h> namespace grpc { @@ -60,4 +60,4 @@ class GenericStub GRPC_FINAL { } // namespace grpc -#endif // GRPCXX_GENERIC_STUB_H +#endif // GRPCXX_GENERIC_GENERIC_STUB_H diff --git a/include/grpc++/impl/call.h b/include/grpc++/impl/call.h index 35338a413e25d95ce8a2544c731173df332cd9d1..e5da6c9e2afa8aa410a3519048a98beadcd51edd 100644 --- a/include/grpc++/impl/call.h +++ b/include/grpc++/impl/call.h @@ -34,18 +34,17 @@ #ifndef GRPCXX_IMPL_CALL_H #define GRPCXX_IMPL_CALL_H -#include <grpc/support/alloc.h> -#include <grpc++/client_context.h> -#include <grpc++/completion_queue.h> -#include <grpc++/config.h> -#include <grpc++/status.h> -#include <grpc++/impl/serialization_traits.h> - #include <functional> #include <memory> #include <map> +#include <cstring> -#include <string.h> +#include <grpc/support/alloc.h> +#include <grpc++/client_context.h> +#include <grpc++/completion_queue.h> +#include <grpc++/impl/serialization_traits.h> +#include <grpc++/support/config.h> +#include <grpc++/support/status.h> struct grpc_call; struct grpc_op; diff --git a/include/grpc++/impl/client_unary_call.h b/include/grpc++/impl/client_unary_call.h index 4aae816cd73c45b9469ba7bdc678e279f361ed21..4cdc800267aea0db2a912bafff0a951459066ed4 100644 --- a/include/grpc++/impl/client_unary_call.h +++ b/include/grpc++/impl/client_unary_call.h @@ -34,10 +34,9 @@ #ifndef GRPCXX_IMPL_CLIENT_UNARY_CALL_H #define GRPCXX_IMPL_CLIENT_UNARY_CALL_H -#include <grpc++/config.h> -#include <grpc++/status.h> - #include <grpc++/impl/call.h> +#include <grpc++/support/config.h> +#include <grpc++/support/status.h> namespace grpc { diff --git a/include/grpc++/impl/proto_utils.h b/include/grpc++/impl/proto_utils.h index ebefa3e1bec6244692e33a18ec8843cbe23dba20..283e33486df474472e36fb98b99ce0d7f50555d6 100644 --- a/include/grpc++/impl/proto_utils.h +++ b/include/grpc++/impl/proto_utils.h @@ -38,8 +38,8 @@ #include <grpc/grpc.h> #include <grpc++/impl/serialization_traits.h> -#include <grpc++/config_protobuf.h> -#include <grpc++/status.h> +#include <grpc++/support/config_protobuf.h> +#include <grpc++/support/status.h> namespace grpc { diff --git a/include/grpc++/impl/rpc_service_method.h b/include/grpc++/impl/rpc_service_method.h index 9dbb4850787aab7c1780bc45d00eab1bf515925b..fcb0b7ccce67b27f4923bcf1124be066c7128a86 100644 --- a/include/grpc++/impl/rpc_service_method.h +++ b/include/grpc++/impl/rpc_service_method.h @@ -39,10 +39,10 @@ #include <memory> #include <vector> -#include <grpc++/config.h> #include <grpc++/impl/rpc_method.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> +#include <grpc++/support/config.h> +#include <grpc++/support/status.h> +#include <grpc++/support/sync_stream.h> namespace grpc { class ServerContext; diff --git a/include/grpc++/impl/service_type.h b/include/grpc++/impl/service_type.h index c33a278f5bad89fb61d6ab806fed1695cc434a46..3b6ac1de771f73c0de8fe99afbc9c61c44e542ae 100644 --- a/include/grpc++/impl/service_type.h +++ b/include/grpc++/impl/service_type.h @@ -34,10 +34,10 @@ #ifndef GRPCXX_IMPL_SERVICE_TYPE_H #define GRPCXX_IMPL_SERVICE_TYPE_H -#include <grpc++/config.h> #include <grpc++/impl/serialization_traits.h> #include <grpc++/server.h> -#include <grpc++/status.h> +#include <grpc++/support/config.h> +#include <grpc++/support/status.h> namespace grpc { diff --git a/include/grpc++/impl/sync.h b/include/grpc++/impl/sync.h index 2f41d2bdebb8b73c0fa3137ceaf650370393bead..999c4303cbe127dbfa5c7706020f87b82cb7ddab 100644 --- a/include/grpc++/impl/sync.h +++ b/include/grpc++/impl/sync.h @@ -34,7 +34,7 @@ #ifndef GRPCXX_IMPL_SYNC_H #define GRPCXX_IMPL_SYNC_H -#include <grpc++/config.h> +#include <grpc++/support/config.h> #ifdef GRPC_CXX0X_NO_THREAD #include <grpc++/impl/sync_no_cxx11.h> diff --git a/include/grpc++/impl/thd.h b/include/grpc++/impl/thd.h index 4c4578a92da142bfaef648b4b4cb1d69aaa58add..f8d4258ac61b72eb3b96050f3880b7d168a22c70 100644 --- a/include/grpc++/impl/thd.h +++ b/include/grpc++/impl/thd.h @@ -34,7 +34,7 @@ #ifndef GRPCXX_IMPL_THD_H #define GRPCXX_IMPL_THD_H -#include <grpc++/config.h> +#include <grpc++/support/config.h> #ifdef GRPC_CXX0X_NO_THREAD #include <grpc++/impl/thd_no_cxx11.h> diff --git a/include/grpc++/server.h b/include/grpc++/server.h index 3cff07fb80c82fd9b2218ca08e1c685c99ec37b2..c8979e433cbd2c9200c3a1ec536dfef66b3cc356 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -38,11 +38,11 @@ #include <memory> #include <grpc++/completion_queue.h> -#include <grpc++/config.h> #include <grpc++/impl/call.h> #include <grpc++/impl/grpc_library.h> #include <grpc++/impl/sync.h> -#include <grpc++/status.h> +#include <grpc++/support/config.h> +#include <grpc++/support/status.h> struct grpc_server; diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index cf800996ec23e33a1c2531509bce3589a99be240..8cd2048592755e02563b19f8959c50e26ccde64f 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -37,7 +37,7 @@ #include <memory> #include <vector> -#include <grpc++/config.h> +#include <grpc++/support/config.h> namespace grpc { diff --git a/include/grpc++/server_context.h b/include/grpc++/server_context.h index b87a1f037982ab7e179871e05ebd3333ff973b16..ce3cb47a237ee1a8e216d54dd2ea8ee45de69185 100644 --- a/include/grpc++/server_context.h +++ b/include/grpc++/server_context.h @@ -39,9 +39,9 @@ #include <grpc/compression.h> #include <grpc/support/time.h> -#include <grpc++/auth_context.h> -#include <grpc++/config.h> -#include <grpc++/time.h> +#include <grpc++/support/auth_context.h> +#include <grpc++/support/config.h> +#include <grpc++/support/time.h> struct gpr_timespec; struct grpc_metadata; diff --git a/include/grpc++/server_credentials.h b/include/grpc++/server_credentials.h index 11acd67e8adad9443e23c10f1956473310a97db7..16b78c08afcfd052fefc94817440701211825134 100644 --- a/include/grpc++/server_credentials.h +++ b/include/grpc++/server_credentials.h @@ -37,7 +37,7 @@ #include <memory> #include <vector> -#include <grpc++/config.h> +#include <grpc++/support/config.h> struct grpc_server; diff --git a/include/grpc++/stream.h b/include/grpc++/support/async_stream.h similarity index 57% rename from include/grpc++/stream.h rename to include/grpc++/support/async_stream.h index dd9508255f47fbf95d952642baff96d2bfa92751..4c12fda12f6d68785338b2898f77b68db64061cf 100644 --- a/include/grpc++/stream.h +++ b/include/grpc++/support/async_stream.h @@ -31,362 +31,20 @@ * */ -#ifndef GRPCXX_STREAM_H -#define GRPCXX_STREAM_H +#ifndef GRPCXX_SUPPORT_ASYNC_STREAM_H +#define GRPCXX_SUPPORT_ASYNC_STREAM_H +#include <grpc/support/log.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/completion_queue.h> -#include <grpc++/server_context.h> #include <grpc++/impl/call.h> #include <grpc++/impl/service_type.h> -#include <grpc++/status.h> -#include <grpc/support/log.h> +#include <grpc++/server_context.h> +#include <grpc++/support/status.h> namespace grpc { -// Common interface for all client side streaming. -class ClientStreamingInterface { - public: - virtual ~ClientStreamingInterface() {} - - // Wait until the stream finishes, and return the final status. When the - // client side declares it has no more message to send, either implicitly or - // by calling WritesDone, it needs to make sure there is no more message to - // be received from the server, either implicitly or by getting a false from - // a Read(). - // This function will return either: - // - when all incoming messages have been read and the server has returned - // status - // - OR when the server has returned a non-OK status - virtual Status Finish() = 0; -}; - -// An interface that yields a sequence of R messages. -template <class R> -class ReaderInterface { - public: - virtual ~ReaderInterface() {} - - // Blocking read a message and parse to msg. Returns true on success. - // The method returns false when there will be no more incoming messages, - // either because the other side has called WritesDone or the stream has - // failed (or been cancelled). - virtual bool Read(R* msg) = 0; -}; - -// An interface that can be fed a sequence of W messages. -template <class W> -class WriterInterface { - public: - virtual ~WriterInterface() {} - - // Blocking write msg to the stream. Returns true on success. - // Returns false when the stream has been closed. - virtual bool Write(const W& msg, const WriteOptions& options) = 0; - - inline bool Write(const W& msg) { return Write(msg, WriteOptions()); } -}; - -template <class R> -class ClientReaderInterface : public ClientStreamingInterface, - public ReaderInterface<R> { - public: - virtual void WaitForInitialMetadata() = 0; -}; - -template <class R> -class ClientReader GRPC_FINAL : public ClientReaderInterface<R> { - public: - // Blocking create a stream and write the first request out. - template <class W> - ClientReader(Channel* channel, const RpcMethod& method, - ClientContext* context, const W& request) - : context_(context), call_(channel->CreateCall(method, context, &cq_)) { - CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, - CallOpClientSendClose> ops; - ops.SendInitialMetadata(context->send_initial_metadata_); - // TODO(ctiller): don't assert - GPR_ASSERT(ops.SendMessage(request).ok()); - ops.ClientSendClose(); - call_.PerformOps(&ops); - cq_.Pluck(&ops); - } - - // Blocking wait for initial metadata from server. The received metadata - // can only be accessed after this call returns. Should only be called before - // the first read. Calling this method is optional, and if it is not called - // the metadata will be available in ClientContext after the first read. - void WaitForInitialMetadata() { - GPR_ASSERT(!context_->initial_metadata_received_); - - CallOpSet<CallOpRecvInitialMetadata> ops; - ops.RecvInitialMetadata(context_); - call_.PerformOps(&ops); - cq_.Pluck(&ops); // status ignored - } - - bool Read(R* msg) GRPC_OVERRIDE { - CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops; - if (!context_->initial_metadata_received_) { - ops.RecvInitialMetadata(context_); - } - ops.RecvMessage(msg); - call_.PerformOps(&ops); - return cq_.Pluck(&ops) && ops.got_message; - } - - Status Finish() GRPC_OVERRIDE { - CallOpSet<CallOpClientRecvStatus> ops; - Status status; - ops.ClientRecvStatus(context_, &status); - call_.PerformOps(&ops); - GPR_ASSERT(cq_.Pluck(&ops)); - return status; - } - - private: - ClientContext* context_; - CompletionQueue cq_; - Call call_; -}; - -template <class W> -class ClientWriterInterface : public ClientStreamingInterface, - public WriterInterface<W> { - public: - virtual bool WritesDone() = 0; -}; - -template <class W> -class ClientWriter : public ClientWriterInterface<W> { - public: - // Blocking create a stream. - template <class R> - ClientWriter(Channel* channel, const RpcMethod& method, - ClientContext* context, R* response) - : context_(context), call_(channel->CreateCall(method, context, &cq_)) { - finish_ops_.RecvMessage(response); - - CallOpSet<CallOpSendInitialMetadata> ops; - ops.SendInitialMetadata(context->send_initial_metadata_); - call_.PerformOps(&ops); - cq_.Pluck(&ops); - } - - using WriterInterface<W>::Write; - bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE { - CallOpSet<CallOpSendMessage> ops; - if (!ops.SendMessage(msg, options).ok()) { - return false; - } - call_.PerformOps(&ops); - return cq_.Pluck(&ops); - } - - bool WritesDone() GRPC_OVERRIDE { - CallOpSet<CallOpClientSendClose> ops; - ops.ClientSendClose(); - call_.PerformOps(&ops); - return cq_.Pluck(&ops); - } - - // Read the final response and wait for the final status. - Status Finish() GRPC_OVERRIDE { - Status status; - finish_ops_.ClientRecvStatus(context_, &status); - call_.PerformOps(&finish_ops_); - GPR_ASSERT(cq_.Pluck(&finish_ops_)); - return status; - } - - private: - ClientContext* context_; - CallOpSet<CallOpGenericRecvMessage, CallOpClientRecvStatus> finish_ops_; - CompletionQueue cq_; - Call call_; -}; - -// Client-side interface for bi-directional streaming. -template <class W, class R> -class ClientReaderWriterInterface : public ClientStreamingInterface, - public WriterInterface<W>, - public ReaderInterface<R> { - public: - virtual void WaitForInitialMetadata() = 0; - virtual bool WritesDone() = 0; -}; - -template <class W, class R> -class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> { - public: - // Blocking create a stream. - ClientReaderWriter(Channel* channel, const RpcMethod& method, - ClientContext* context) - : context_(context), call_(channel->CreateCall(method, context, &cq_)) { - CallOpSet<CallOpSendInitialMetadata> ops; - ops.SendInitialMetadata(context->send_initial_metadata_); - call_.PerformOps(&ops); - cq_.Pluck(&ops); - } - - // Blocking wait for initial metadata from server. The received metadata - // can only be accessed after this call returns. Should only be called before - // the first read. Calling this method is optional, and if it is not called - // the metadata will be available in ClientContext after the first read. - void WaitForInitialMetadata() { - GPR_ASSERT(!context_->initial_metadata_received_); - - CallOpSet<CallOpRecvInitialMetadata> ops; - ops.RecvInitialMetadata(context_); - call_.PerformOps(&ops); - cq_.Pluck(&ops); // status ignored - } - - bool Read(R* msg) GRPC_OVERRIDE { - CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops; - if (!context_->initial_metadata_received_) { - ops.RecvInitialMetadata(context_); - } - ops.RecvMessage(msg); - call_.PerformOps(&ops); - return cq_.Pluck(&ops) && ops.got_message; - } - - using WriterInterface<W>::Write; - bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE { - CallOpSet<CallOpSendMessage> ops; - if (!ops.SendMessage(msg, options).ok()) return false; - call_.PerformOps(&ops); - return cq_.Pluck(&ops); - } - - bool WritesDone() GRPC_OVERRIDE { - CallOpSet<CallOpClientSendClose> ops; - ops.ClientSendClose(); - call_.PerformOps(&ops); - return cq_.Pluck(&ops); - } - - Status Finish() GRPC_OVERRIDE { - CallOpSet<CallOpClientRecvStatus> ops; - Status status; - ops.ClientRecvStatus(context_, &status); - call_.PerformOps(&ops); - GPR_ASSERT(cq_.Pluck(&ops)); - return status; - } - - private: - ClientContext* context_; - CompletionQueue cq_; - Call call_; -}; - -template <class R> -class ServerReader GRPC_FINAL : public ReaderInterface<R> { - public: - ServerReader(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} - - void SendInitialMetadata() { - GPR_ASSERT(!ctx_->sent_initial_metadata_); - - CallOpSet<CallOpSendInitialMetadata> ops; - ops.SendInitialMetadata(ctx_->initial_metadata_); - ctx_->sent_initial_metadata_ = true; - call_->PerformOps(&ops); - call_->cq()->Pluck(&ops); - } - - bool Read(R* msg) GRPC_OVERRIDE { - CallOpSet<CallOpRecvMessage<R>> ops; - ops.RecvMessage(msg); - call_->PerformOps(&ops); - return call_->cq()->Pluck(&ops) && ops.got_message; - } - - private: - Call* const call_; - ServerContext* const ctx_; -}; - -template <class W> -class ServerWriter GRPC_FINAL : public WriterInterface<W> { - public: - ServerWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} - - void SendInitialMetadata() { - GPR_ASSERT(!ctx_->sent_initial_metadata_); - - CallOpSet<CallOpSendInitialMetadata> ops; - ops.SendInitialMetadata(ctx_->initial_metadata_); - ctx_->sent_initial_metadata_ = true; - call_->PerformOps(&ops); - call_->cq()->Pluck(&ops); - } - - using WriterInterface<W>::Write; - bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE { - CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage> ops; - if (!ops.SendMessage(msg, options).ok()) { - return false; - } - if (!ctx_->sent_initial_metadata_) { - ops.SendInitialMetadata(ctx_->initial_metadata_); - ctx_->sent_initial_metadata_ = true; - } - call_->PerformOps(&ops); - return call_->cq()->Pluck(&ops); - } - - private: - Call* const call_; - ServerContext* const ctx_; -}; - -// Server-side interface for bi-directional streaming. -template <class W, class R> -class ServerReaderWriter GRPC_FINAL : public WriterInterface<W>, - public ReaderInterface<R> { - public: - ServerReaderWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} - - void SendInitialMetadata() { - GPR_ASSERT(!ctx_->sent_initial_metadata_); - - CallOpSet<CallOpSendInitialMetadata> ops; - ops.SendInitialMetadata(ctx_->initial_metadata_); - ctx_->sent_initial_metadata_ = true; - call_->PerformOps(&ops); - call_->cq()->Pluck(&ops); - } - - bool Read(R* msg) GRPC_OVERRIDE { - CallOpSet<CallOpRecvMessage<R>> ops; - ops.RecvMessage(msg); - call_->PerformOps(&ops); - return call_->cq()->Pluck(&ops) && ops.got_message; - } - - using WriterInterface<W>::Write; - bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE { - CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage> ops; - if (!ops.SendMessage(msg, options).ok()) { - return false; - } - if (!ctx_->sent_initial_metadata_) { - ops.SendInitialMetadata(ctx_->initial_metadata_); - ctx_->sent_initial_metadata_ = true; - } - call_->PerformOps(&ops); - return call_->cq()->Pluck(&ops); - } - - private: - Call* const call_; - ServerContext* const ctx_; -}; - // Async interfaces // Common interface for all client side streaming. class ClientAsyncStreamingInterface { @@ -775,4 +433,4 @@ class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, } // namespace grpc -#endif // GRPCXX_STREAM_H +#endif // GRPCXX_SUPPORT_ASYNC_STREAM_H diff --git a/include/grpc++/async_unary_call.h b/include/grpc++/support/async_unary_call.h similarity index 97% rename from include/grpc++/async_unary_call.h rename to include/grpc++/support/async_unary_call.h index 4e1dd15f32c32725625eb777fe93638caf97334b..0f4ad2656fccd94a6d1f3daecfa4bd5f4459305d 100644 --- a/include/grpc++/async_unary_call.h +++ b/include/grpc++/support/async_unary_call.h @@ -31,17 +31,17 @@ * */ -#ifndef GRPCXX_ASYNC_UNARY_CALL_H -#define GRPCXX_ASYNC_UNARY_CALL_H +#ifndef GRPCXX_SUPPORT_ASYNC_UNARY_CALL_H +#define GRPCXX_SUPPORT_ASYNC_UNARY_CALL_H +#include <grpc/support/log.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/completion_queue.h> #include <grpc++/server_context.h> #include <grpc++/impl/call.h> #include <grpc++/impl/service_type.h> -#include <grpc++/status.h> -#include <grpc/support/log.h> +#include <grpc++/support/status.h> namespace grpc { @@ -152,4 +152,4 @@ class ServerAsyncResponseWriter GRPC_FINAL } // namespace grpc -#endif // GRPCXX_ASYNC_UNARY_CALL_H +#endif // GRPCXX_SUPPORT_ASYNC_UNARY_CALL_H diff --git a/include/grpc++/auth_context.h b/include/grpc++/support/auth_context.h similarity index 95% rename from include/grpc++/auth_context.h rename to include/grpc++/support/auth_context.h index 7dced90ce50da1d531725393a56c8e36ed45f563..f4f2dcf5bbdfe3077a29ecd140c6f37a9c109789 100644 --- a/include/grpc++/auth_context.h +++ b/include/grpc++/support/auth_context.h @@ -31,13 +31,13 @@ * */ -#ifndef GRPCXX_AUTH_CONTEXT_H -#define GRPCXX_AUTH_CONTEXT_H +#ifndef GRPCXX_SUPPORT_AUTH_CONTEXT_H +#define GRPCXX_SUPPORT_AUTH_CONTEXT_H #include <iterator> #include <vector> -#include <grpc++/config.h> +#include <grpc++/support/config.h> struct grpc_auth_context; struct grpc_auth_property; @@ -92,4 +92,4 @@ class AuthContext { } // namespace grpc -#endif // GRPCXX_AUTH_CONTEXT_H +#endif // GRPCXX_SUPPORT_AUTH_CONTEXT_H diff --git a/include/grpc++/byte_buffer.h b/include/grpc++/support/byte_buffer.h similarity index 93% rename from include/grpc++/byte_buffer.h rename to include/grpc++/support/byte_buffer.h index 64677763985d4deebd649d072a79fee3736bcb77..3f8cc25f47a9699b6de909809087cfc4e7b78935 100644 --- a/include/grpc++/byte_buffer.h +++ b/include/grpc++/support/byte_buffer.h @@ -31,16 +31,16 @@ * */ -#ifndef GRPCXX_BYTE_BUFFER_H -#define GRPCXX_BYTE_BUFFER_H +#ifndef GRPCXX_SUPPORT_BYTE_BUFFER_H +#define GRPCXX_SUPPORT_BYTE_BUFFER_H #include <grpc/grpc.h> #include <grpc/byte_buffer.h> #include <grpc/support/log.h> -#include <grpc++/config.h> -#include <grpc++/slice.h> -#include <grpc++/status.h> #include <grpc++/impl/serialization_traits.h> +#include <grpc++/support/config.h> +#include <grpc++/support/slice.h> +#include <grpc++/support/status.h> #include <vector> @@ -101,4 +101,4 @@ class SerializationTraits<ByteBuffer, void> { } // namespace grpc -#endif // GRPCXX_BYTE_BUFFER_H +#endif // GRPCXX_SUPPORT_BYTE_BUFFER_H diff --git a/include/grpc++/channel_arguments.h b/include/grpc++/support/channel_arguments.h similarity index 94% rename from include/grpc++/channel_arguments.h rename to include/grpc++/support/channel_arguments.h index 4d926377ecd78f069f9da71831986d5657ca498f..cee68467c731b19ab3e4ae95ab0e813e36d9cdb0 100644 --- a/include/grpc++/channel_arguments.h +++ b/include/grpc++/support/channel_arguments.h @@ -31,15 +31,15 @@ * */ -#ifndef GRPCXX_CHANNEL_ARGUMENTS_H -#define GRPCXX_CHANNEL_ARGUMENTS_H +#ifndef GRPCXX_SUPPORT_CHANNEL_ARGUMENTS_H +#define GRPCXX_SUPPORT_CHANNEL_ARGUMENTS_H #include <vector> #include <list> -#include <grpc++/config.h> #include <grpc/compression.h> #include <grpc/grpc.h> +#include <grpc++/support/config.h> namespace grpc { namespace testing { @@ -90,4 +90,4 @@ class ChannelArguments { } // namespace grpc -#endif // GRPCXX_CHANNEL_ARGUMENTS_H +#endif // GRPCXX_SUPPORT_CHANNEL_ARGUMENTS_H diff --git a/include/grpc++/config.h b/include/grpc++/support/config.h similarity index 96% rename from include/grpc++/config.h rename to include/grpc++/support/config.h index 889dc39eb7b3899e271ddf38196a19d95a451eb4..836bd47283a3f3131629f25ab4566aa418f40633 100644 --- a/include/grpc++/config.h +++ b/include/grpc++/support/config.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPCXX_CONFIG_H -#define GRPCXX_CONFIG_H +#ifndef GRPCXX_SUPPORT_CONFIG_H +#define GRPCXX_SUPPORT_CONFIG_H #if !defined(GRPC_NO_AUTODETECT_PLATFORM) @@ -113,4 +113,4 @@ typedef GRPC_CUSTOM_STRING string; } // namespace grpc -#endif // GRPCXX_CONFIG_H +#endif // GRPCXX_SUPPORT_CONFIG_H diff --git a/include/grpc++/config_protobuf.h b/include/grpc++/support/config_protobuf.h similarity index 95% rename from include/grpc++/config_protobuf.h rename to include/grpc++/support/config_protobuf.h index 3afc7a58e2b6395539ab3ea8a751c0a110f3bce0..8235590d413fd68598e69b5e2f2cdab3e36abe2b 100644 --- a/include/grpc++/config_protobuf.h +++ b/include/grpc++/support/config_protobuf.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPCXX_CONFIG_PROTOBUF_H -#define GRPCXX_CONFIG_PROTOBUF_H +#ifndef GRPCXX_SUPPORT_CONFIG_PROTOBUF_H +#define GRPCXX_SUPPORT_CONFIG_PROTOBUF_H #ifndef GRPC_CUSTOM_PROTOBUF_INT64 #include <google/protobuf/stubs/common.h> @@ -69,4 +69,4 @@ typedef GRPC_CUSTOM_CODEDINPUTSTREAM CodedInputStream; } // namespace protobuf } // namespace grpc -#endif // GRPCXX_CONFIG_PROTOBUF_H +#endif // GRPCXX_SUPPORT_CONFIG_PROTOBUF_H diff --git a/include/grpc++/slice.h b/include/grpc++/support/slice.h similarity index 94% rename from include/grpc++/slice.h rename to include/grpc++/support/slice.h index 3e01bcf0ad766434d3d02ed8b236591df102023b..b2343a7f3df17495d65ba7ff0e9600d2fcba456b 100644 --- a/include/grpc++/slice.h +++ b/include/grpc++/support/slice.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPCXX_SLICE_H -#define GRPCXX_SLICE_H +#ifndef GRPCXX_SUPPORT_SLICE_H +#define GRPCXX_SUPPORT_SLICE_H #include <grpc/support/slice.h> -#include <grpc++/config.h> +#include <grpc++/support/config.h> namespace grpc { @@ -71,4 +71,4 @@ class Slice GRPC_FINAL { } // namespace grpc -#endif // GRPCXX_SLICE_H +#endif // GRPCXX_SUPPORT_SLICE_H diff --git a/include/grpc++/status.h b/include/grpc++/support/status.h similarity index 92% rename from include/grpc++/status.h rename to include/grpc++/support/status.h index fb8526ddce0ec29d66215c357a0080302de44f68..05750ff600f8608be1a912ce06651e0cdd63dcfd 100644 --- a/include/grpc++/status.h +++ b/include/grpc++/support/status.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPCXX_STATUS_H -#define GRPCXX_STATUS_H +#ifndef GRPCXX_SUPPORT_STATUS_H +#define GRPCXX_SUPPORT_STATUS_H -#include <grpc++/status_code_enum.h> -#include <grpc++/config.h> +#include <grpc++/support/config.h> +#include <grpc++/support/status_code_enum.h> namespace grpc { @@ -61,4 +61,4 @@ class Status { } // namespace grpc -#endif // GRPCXX_STATUS_H +#endif // GRPCXX_SUPPORT_STATUS_H diff --git a/include/grpc++/status_code_enum.h b/include/grpc++/support/status_code_enum.h similarity index 98% rename from include/grpc++/status_code_enum.h rename to include/grpc++/support/status_code_enum.h index 2211c964cda89a18017f6d0b6f9f1afaed4ae8a3..7cb40452c84c022ff5091f7f7073c43651c64bf4 100644 --- a/include/grpc++/status_code_enum.h +++ b/include/grpc++/support/status_code_enum.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPCXX_STATUS_CODE_ENUM_H -#define GRPCXX_STATUS_CODE_ENUM_H +#ifndef GRPCXX_SUPPORT_STATUS_CODE_ENUM_H +#define GRPCXX_SUPPORT_STATUS_CODE_ENUM_H namespace grpc { @@ -156,4 +156,4 @@ enum StatusCode { } // namespace grpc -#endif // GRPCXX_STATUS_CODE_ENUM_H +#endif // GRPCXX_SUPPORT_STATUS_CODE_ENUM_H diff --git a/include/grpc++/stub_options.h b/include/grpc++/support/stub_options.h similarity index 93% rename from include/grpc++/stub_options.h rename to include/grpc++/support/stub_options.h index c7c16dcd554d945887428cea51c407066b2b4923..973aa9bc83820d101948d07fe59fc2bf41b2fc0b 100644 --- a/include/grpc++/stub_options.h +++ b/include/grpc++/support/stub_options.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPCXX_STUB_OPTIONS_H -#define GRPCXX_STUB_OPTIONS_H +#ifndef GRPCXX_SUPPORT_STUB_OPTIONS_H +#define GRPCXX_SUPPORT_STUB_OPTIONS_H namespace grpc { @@ -40,4 +40,4 @@ class StubOptions {}; } // namespace grpc -#endif // GRPCXX_STUB_OPTIONS_H +#endif // GRPCXX_SUPPORT_STUB_OPTIONS_H diff --git a/include/grpc++/support/sync_stream.h b/include/grpc++/support/sync_stream.h new file mode 100644 index 0000000000000000000000000000000000000000..b4bb637ff2333de35bd5d82807735dbf24d4a759 --- /dev/null +++ b/include/grpc++/support/sync_stream.h @@ -0,0 +1,392 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPCXX_SUPPORT_SYNC_STREAM_H +#define GRPCXX_SUPPORT_SYNC_STREAM_H + +#include <grpc/support/log.h> +#include <grpc++/channel.h> +#include <grpc++/client_context.h> +#include <grpc++/completion_queue.h> +#include <grpc++/impl/call.h> +#include <grpc++/impl/service_type.h> +#include <grpc++/server_context.h> +#include <grpc++/support/status.h> + +namespace grpc { + +// Common interface for all client side streaming. +class ClientStreamingInterface { + public: + virtual ~ClientStreamingInterface() {} + + // Wait until the stream finishes, and return the final status. When the + // client side declares it has no more message to send, either implicitly or + // by calling WritesDone, it needs to make sure there is no more message to + // be received from the server, either implicitly or by getting a false from + // a Read(). + // This function will return either: + // - when all incoming messages have been read and the server has returned + // status + // - OR when the server has returned a non-OK status + virtual Status Finish() = 0; +}; + +// An interface that yields a sequence of R messages. +template <class R> +class ReaderInterface { + public: + virtual ~ReaderInterface() {} + + // Blocking read a message and parse to msg. Returns true on success. + // The method returns false when there will be no more incoming messages, + // either because the other side has called WritesDone or the stream has + // failed (or been cancelled). + virtual bool Read(R* msg) = 0; +}; + +// An interface that can be fed a sequence of W messages. +template <class W> +class WriterInterface { + public: + virtual ~WriterInterface() {} + + // Blocking write msg to the stream. Returns true on success. + // Returns false when the stream has been closed. + virtual bool Write(const W& msg, const WriteOptions& options) = 0; + + inline bool Write(const W& msg) { return Write(msg, WriteOptions()); } +}; + +template <class R> +class ClientReaderInterface : public ClientStreamingInterface, + public ReaderInterface<R> { + public: + virtual void WaitForInitialMetadata() = 0; +}; + +template <class R> +class ClientReader GRPC_FINAL : public ClientReaderInterface<R> { + public: + // Blocking create a stream and write the first request out. + template <class W> + ClientReader(Channel* channel, const RpcMethod& method, + ClientContext* context, const W& request) + : context_(context), call_(channel->CreateCall(method, context, &cq_)) { + CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, + CallOpClientSendClose> ops; + ops.SendInitialMetadata(context->send_initial_metadata_); + // TODO(ctiller): don't assert + GPR_ASSERT(ops.SendMessage(request).ok()); + ops.ClientSendClose(); + call_.PerformOps(&ops); + cq_.Pluck(&ops); + } + + // Blocking wait for initial metadata from server. The received metadata + // can only be accessed after this call returns. Should only be called before + // the first read. Calling this method is optional, and if it is not called + // the metadata will be available in ClientContext after the first read. + void WaitForInitialMetadata() { + GPR_ASSERT(!context_->initial_metadata_received_); + + CallOpSet<CallOpRecvInitialMetadata> ops; + ops.RecvInitialMetadata(context_); + call_.PerformOps(&ops); + cq_.Pluck(&ops); // status ignored + } + + bool Read(R* msg) GRPC_OVERRIDE { + CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops; + if (!context_->initial_metadata_received_) { + ops.RecvInitialMetadata(context_); + } + ops.RecvMessage(msg); + call_.PerformOps(&ops); + return cq_.Pluck(&ops) && ops.got_message; + } + + Status Finish() GRPC_OVERRIDE { + CallOpSet<CallOpClientRecvStatus> ops; + Status status; + ops.ClientRecvStatus(context_, &status); + call_.PerformOps(&ops); + GPR_ASSERT(cq_.Pluck(&ops)); + return status; + } + + private: + ClientContext* context_; + CompletionQueue cq_; + Call call_; +}; + +template <class W> +class ClientWriterInterface : public ClientStreamingInterface, + public WriterInterface<W> { + public: + virtual bool WritesDone() = 0; +}; + +template <class W> +class ClientWriter : public ClientWriterInterface<W> { + public: + // Blocking create a stream. + template <class R> + ClientWriter(Channel* channel, const RpcMethod& method, + ClientContext* context, R* response) + : context_(context), call_(channel->CreateCall(method, context, &cq_)) { + finish_ops_.RecvMessage(response); + + CallOpSet<CallOpSendInitialMetadata> ops; + ops.SendInitialMetadata(context->send_initial_metadata_); + call_.PerformOps(&ops); + cq_.Pluck(&ops); + } + + using WriterInterface<W>::Write; + bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE { + CallOpSet<CallOpSendMessage> ops; + if (!ops.SendMessage(msg, options).ok()) { + return false; + } + call_.PerformOps(&ops); + return cq_.Pluck(&ops); + } + + bool WritesDone() GRPC_OVERRIDE { + CallOpSet<CallOpClientSendClose> ops; + ops.ClientSendClose(); + call_.PerformOps(&ops); + return cq_.Pluck(&ops); + } + + // Read the final response and wait for the final status. + Status Finish() GRPC_OVERRIDE { + Status status; + finish_ops_.ClientRecvStatus(context_, &status); + call_.PerformOps(&finish_ops_); + GPR_ASSERT(cq_.Pluck(&finish_ops_)); + return status; + } + + private: + ClientContext* context_; + CallOpSet<CallOpGenericRecvMessage, CallOpClientRecvStatus> finish_ops_; + CompletionQueue cq_; + Call call_; +}; + +// Client-side interface for bi-directional streaming. +template <class W, class R> +class ClientReaderWriterInterface : public ClientStreamingInterface, + public WriterInterface<W>, + public ReaderInterface<R> { + public: + virtual void WaitForInitialMetadata() = 0; + virtual bool WritesDone() = 0; +}; + +template <class W, class R> +class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> { + public: + // Blocking create a stream. + ClientReaderWriter(Channel* channel, const RpcMethod& method, + ClientContext* context) + : context_(context), call_(channel->CreateCall(method, context, &cq_)) { + CallOpSet<CallOpSendInitialMetadata> ops; + ops.SendInitialMetadata(context->send_initial_metadata_); + call_.PerformOps(&ops); + cq_.Pluck(&ops); + } + + // Blocking wait for initial metadata from server. The received metadata + // can only be accessed after this call returns. Should only be called before + // the first read. Calling this method is optional, and if it is not called + // the metadata will be available in ClientContext after the first read. + void WaitForInitialMetadata() { + GPR_ASSERT(!context_->initial_metadata_received_); + + CallOpSet<CallOpRecvInitialMetadata> ops; + ops.RecvInitialMetadata(context_); + call_.PerformOps(&ops); + cq_.Pluck(&ops); // status ignored + } + + bool Read(R* msg) GRPC_OVERRIDE { + CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops; + if (!context_->initial_metadata_received_) { + ops.RecvInitialMetadata(context_); + } + ops.RecvMessage(msg); + call_.PerformOps(&ops); + return cq_.Pluck(&ops) && ops.got_message; + } + + using WriterInterface<W>::Write; + bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE { + CallOpSet<CallOpSendMessage> ops; + if (!ops.SendMessage(msg, options).ok()) return false; + call_.PerformOps(&ops); + return cq_.Pluck(&ops); + } + + bool WritesDone() GRPC_OVERRIDE { + CallOpSet<CallOpClientSendClose> ops; + ops.ClientSendClose(); + call_.PerformOps(&ops); + return cq_.Pluck(&ops); + } + + Status Finish() GRPC_OVERRIDE { + CallOpSet<CallOpClientRecvStatus> ops; + Status status; + ops.ClientRecvStatus(context_, &status); + call_.PerformOps(&ops); + GPR_ASSERT(cq_.Pluck(&ops)); + return status; + } + + private: + ClientContext* context_; + CompletionQueue cq_; + Call call_; +}; + +template <class R> +class ServerReader GRPC_FINAL : public ReaderInterface<R> { + public: + ServerReader(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} + + void SendInitialMetadata() { + GPR_ASSERT(!ctx_->sent_initial_metadata_); + + CallOpSet<CallOpSendInitialMetadata> ops; + ops.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + call_->PerformOps(&ops); + call_->cq()->Pluck(&ops); + } + + bool Read(R* msg) GRPC_OVERRIDE { + CallOpSet<CallOpRecvMessage<R>> ops; + ops.RecvMessage(msg); + call_->PerformOps(&ops); + return call_->cq()->Pluck(&ops) && ops.got_message; + } + + private: + Call* const call_; + ServerContext* const ctx_; +}; + +template <class W> +class ServerWriter GRPC_FINAL : public WriterInterface<W> { + public: + ServerWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} + + void SendInitialMetadata() { + GPR_ASSERT(!ctx_->sent_initial_metadata_); + + CallOpSet<CallOpSendInitialMetadata> ops; + ops.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + call_->PerformOps(&ops); + call_->cq()->Pluck(&ops); + } + + using WriterInterface<W>::Write; + bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE { + CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage> ops; + if (!ops.SendMessage(msg, options).ok()) { + return false; + } + if (!ctx_->sent_initial_metadata_) { + ops.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + } + call_->PerformOps(&ops); + return call_->cq()->Pluck(&ops); + } + + private: + Call* const call_; + ServerContext* const ctx_; +}; + +// Server-side interface for bi-directional streaming. +template <class W, class R> +class ServerReaderWriter GRPC_FINAL : public WriterInterface<W>, + public ReaderInterface<R> { + public: + ServerReaderWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} + + void SendInitialMetadata() { + GPR_ASSERT(!ctx_->sent_initial_metadata_); + + CallOpSet<CallOpSendInitialMetadata> ops; + ops.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + call_->PerformOps(&ops); + call_->cq()->Pluck(&ops); + } + + bool Read(R* msg) GRPC_OVERRIDE { + CallOpSet<CallOpRecvMessage<R>> ops; + ops.RecvMessage(msg); + call_->PerformOps(&ops); + return call_->cq()->Pluck(&ops) && ops.got_message; + } + + using WriterInterface<W>::Write; + bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE { + CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage> ops; + if (!ops.SendMessage(msg, options).ok()) { + return false; + } + if (!ctx_->sent_initial_metadata_) { + ops.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + } + call_->PerformOps(&ops); + return call_->cq()->Pluck(&ops); + } + + private: + Call* const call_; + ServerContext* const ctx_; +}; + +} // namespace grpc + +#endif // GRPCXX_SUPPORT_SYNC_STREAM_H diff --git a/include/grpc++/time.h b/include/grpc++/support/time.h similarity index 96% rename from include/grpc++/time.h rename to include/grpc++/support/time.h index 8fb2f8505cdf1706adc1dfc03a8264d152298ce2..2d4196b93b7a3afb6d362d5629c6553bf7bec67d 100644 --- a/include/grpc++/time.h +++ b/include/grpc++/support/time.h @@ -31,10 +31,10 @@ * */ -#ifndef GRPCXX_TIME_H -#define GRPCXX_TIME_H +#ifndef GRPCXX_SUPPORT_TIME_H +#define GRPCXX_SUPPORT_TIME_H -#include <grpc++/config.h> +#include <grpc++/support/config.h> namespace grpc { @@ -107,4 +107,4 @@ class TimePoint<std::chrono::system_clock::time_point> { #endif // !GRPC_CXX0X_NO_CHRONO -#endif // GRPCXX_TIME_H +#endif // GRPCXX_SUPPORT_TIME_H diff --git a/src/compiler/config.h b/src/compiler/config.h index cd52aca57d3951dfcd76db8b8722e4508690b4e5..fea976c31818407a203c0b4b530e6206ae7c1dc1 100644 --- a/src/compiler/config.h +++ b/src/compiler/config.h @@ -34,8 +34,8 @@ #ifndef SRC_COMPILER_CONFIG_H #define SRC_COMPILER_CONFIG_H -#include <grpc++/config.h> -#include <grpc++/config_protobuf.h> +#include <grpc++/support/config.h> +#include <grpc++/support/config_protobuf.h> #ifndef GRPC_CUSTOM_DESCRIPTOR #include <google/protobuf/descriptor.h> diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index b04ac038ad25773519e6f3850ebc738c16c588b5..1bf2b16ed6ff787dd4ce2ad32913580c26aeda8c 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -112,13 +112,14 @@ grpc::string GetHeaderPrologue(const grpc::protobuf::FileDescriptor *file, grpc::string GetHeaderIncludes(const grpc::protobuf::FileDescriptor *file, const Parameters ¶ms) { grpc::string temp = + "#include <grpc++/support/async_stream.h>\n" "#include <grpc++/impl/rpc_method.h>\n" "#include <grpc++/impl/proto_utils.h>\n" "#include <grpc++/impl/service_type.h>\n" - "#include <grpc++/async_unary_call.h>\n" - "#include <grpc++/status.h>\n" - "#include <grpc++/stream.h>\n" - "#include <grpc++/stub_options.h>\n" + "#include <grpc++/support/async_unary_call.h>\n" + "#include <grpc++/support/status.h>\n" + "#include <grpc++/support/stub_options.h>\n" + "#include <grpc++/support/sync_stream.h>\n" "\n" "namespace grpc {\n" "class CompletionQueue;\n" @@ -701,12 +702,13 @@ grpc::string GetSourceIncludes(const grpc::protobuf::FileDescriptor *file, grpc::protobuf::io::Printer printer(&output_stream, '$'); std::map<grpc::string, grpc::string> vars; - printer.Print(vars, "#include <grpc++/async_unary_call.h>\n"); printer.Print(vars, "#include <grpc++/channel.h>\n"); printer.Print(vars, "#include <grpc++/impl/client_unary_call.h>\n"); printer.Print(vars, "#include <grpc++/impl/rpc_service_method.h>\n"); printer.Print(vars, "#include <grpc++/impl/service_type.h>\n"); - printer.Print(vars, "#include <grpc++/stream.h>\n"); + printer.Print(vars, "#include <grpc++/support/async_unary_call.h>\n"); + printer.Print(vars, "#include <grpc++/support/async_stream.h>\n"); + printer.Print(vars, "#include <grpc++/support/sync_stream.h>\n"); if (!file->package().empty()) { std::vector<grpc::string> parts = diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index 2982a89fad11b045717505b854f2e144d99b93b8..72c457ac6b1f2a777c6ae1a5de8ba9e4c044933b 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -42,7 +42,7 @@ #include <tuple> #include <vector> -#include <grpc++/config.h> +#include <grpc++/support/config.h> #include "src/compiler/config.h" #include "src/compiler/generator_helpers.h" #include "src/compiler/python_generator.h" diff --git a/src/cpp/client/channel.cc b/src/cpp/client/channel.cc index bb4be07beb05fd4ea118ae94e0e231034d17f130..8bf2e4687e55b23ef3a5b4cb1ab588f3471bc255 100644 --- a/src/cpp/client/channel.cc +++ b/src/cpp/client/channel.cc @@ -38,17 +38,16 @@ #include <grpc/grpc.h> #include <grpc/support/log.h> #include <grpc/support/slice.h> - -#include "src/core/profiling/timers.h" -#include <grpc++/channel_arguments.h> #include <grpc++/client_context.h> #include <grpc++/completion_queue.h> -#include <grpc++/config.h> #include <grpc++/credentials.h> #include <grpc++/impl/call.h> #include <grpc++/impl/rpc_method.h> -#include <grpc++/status.h> -#include <grpc++/time.h> +#include <grpc++/support/channel_arguments.h> +#include <grpc++/support/config.h> +#include <grpc++/support/status.h> +#include <grpc++/support/time.h> +#include "src/core/profiling/timers.h" namespace grpc { diff --git a/src/cpp/client/channel_arguments.cc b/src/cpp/client/channel_arguments.cc index da6602e7af379f7ded1c2f2edcea00573bf9f378..50422d06c927d1fe04469c526160e08053966884 100644 --- a/src/cpp/client/channel_arguments.cc +++ b/src/cpp/client/channel_arguments.cc @@ -31,10 +31,9 @@ * */ -#include <grpc++/channel_arguments.h> +#include <grpc++/support/channel_arguments.h> #include <grpc/support/log.h> - #include "src/core/channel/channel_args.h" namespace grpc { diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc index a3906fc781cd4c32f37ce1c4430fca15f89361a2..c4d7cf2e51467d1ccb735cbb9ac566cec7a13df3 100644 --- a/src/cpp/client/client_context.cc +++ b/src/cpp/client/client_context.cc @@ -38,7 +38,7 @@ #include <grpc/support/string_util.h> #include <grpc++/credentials.h> #include <grpc++/server_context.h> -#include <grpc++/time.h> +#include <grpc++/support/time.h> #include "src/core/channel/compress_filter.h" #include "src/cpp/common/create_auth_context.h" diff --git a/src/cpp/client/create_channel.cc b/src/cpp/client/create_channel.cc index 70ea7e0e275ede1bbdf27e52cfc7e48316f8d9ee..8c571cbbaad24f65591294d9e74ddb704dfd2cf2 100644 --- a/src/cpp/client/create_channel.cc +++ b/src/cpp/client/create_channel.cc @@ -35,8 +35,8 @@ #include <sstream> #include <grpc++/channel.h> -#include <grpc++/channel_arguments.h> #include <grpc++/create_channel.h> +#include <grpc++/support/channel_arguments.h> #include "src/cpp/client/create_channel_internal.h" diff --git a/src/cpp/client/create_channel_internal.h b/src/cpp/client/create_channel_internal.h index 16924719909f1fd2aee331ffad46f276fb2dfe7c..4385ec701e264083c335d23915bea66e42ca238a 100644 --- a/src/cpp/client/create_channel_internal.h +++ b/src/cpp/client/create_channel_internal.h @@ -36,7 +36,7 @@ #include <memory> -#include <grpc++/config.h> +#include <grpc++/support/config.h> struct grpc_channel; diff --git a/src/cpp/client/generic_stub.cc b/src/cpp/client/generic_stub.cc index ee89c029651b4be5b9dfecaa9795542ec88f37c7..7a2fdf941cec7ff29271b99bbce48afbcdcc5fd5 100644 --- a/src/cpp/client/generic_stub.cc +++ b/src/cpp/client/generic_stub.cc @@ -31,7 +31,7 @@ * */ -#include <grpc++/generic_stub.h> +#include <grpc++/generic/generic_stub.h> #include <grpc++/impl/rpc_method.h> diff --git a/src/cpp/client/insecure_credentials.cc b/src/cpp/client/insecure_credentials.cc index 97931406af38e5c09e74da45e5da0e7fc2db5e9c..4a4d2cb97d4f831b8fd6289afada159ae9341d7b 100644 --- a/src/cpp/client/insecure_credentials.cc +++ b/src/cpp/client/insecure_credentials.cc @@ -31,13 +31,13 @@ * */ +#include <grpc++/credentials.h> + #include <grpc/grpc.h> #include <grpc/support/log.h> - #include <grpc++/channel.h> -#include <grpc++/channel_arguments.h> -#include <grpc++/config.h> -#include <grpc++/credentials.h> +#include <grpc++/support/channel_arguments.h> +#include <grpc++/support/config.h> #include "src/cpp/client/create_channel_internal.h" namespace grpc { diff --git a/src/cpp/client/secure_channel_arguments.cc b/src/cpp/client/secure_channel_arguments.cc index d89df999adc7dc8ed1b933e30cfd6111424c2bcf..e17d3b58b06257ee596ecda00cf86257f6d3c0db 100644 --- a/src/cpp/client/secure_channel_arguments.cc +++ b/src/cpp/client/secure_channel_arguments.cc @@ -31,9 +31,9 @@ * */ -#include <grpc++/channel_arguments.h> -#include <grpc/grpc_security.h> +#include <grpc++/support/channel_arguments.h> +#include <grpc/grpc_security.h> #include "src/core/channel/channel_args.h" namespace grpc { diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc index 1e912c6beba8ff631e62b6397c6b97b9f802b2a7..f368f2590a45e85a1155293da83d1817003f3ed2 100644 --- a/src/cpp/client/secure_credentials.cc +++ b/src/cpp/client/secure_credentials.cc @@ -33,8 +33,8 @@ #include <grpc/support/log.h> #include <grpc++/channel.h> -#include <grpc++/channel_arguments.h> #include <grpc++/impl/grpc_library.h> +#include <grpc++/support/channel_arguments.h> #include "src/cpp/client/create_channel_internal.h" #include "src/cpp/client/secure_credentials.h" diff --git a/src/cpp/client/secure_credentials.h b/src/cpp/client/secure_credentials.h index 974d83514de1a2d83ba8fd82089f8994047a7a75..62d31854776f425c8c00951656ba27841261cb7a 100644 --- a/src/cpp/client/secure_credentials.h +++ b/src/cpp/client/secure_credentials.h @@ -36,7 +36,7 @@ #include <grpc/grpc_security.h> -#include <grpc++/config.h> +#include <grpc++/support/config.h> #include <grpc++/credentials.h> namespace grpc { diff --git a/src/cpp/common/auth_property_iterator.cc b/src/cpp/common/auth_property_iterator.cc index d3bfd5cb6b3847e67fb09edf4d822f75ade0e639..5ccf8cf72c10901c773972dddd78d0be29f7abb1 100644 --- a/src/cpp/common/auth_property_iterator.cc +++ b/src/cpp/common/auth_property_iterator.cc @@ -31,7 +31,7 @@ * */ -#include <grpc++/auth_context.h> +#include <grpc++/support/auth_context.h> #include <grpc/grpc_security.h> diff --git a/src/cpp/common/call.cc b/src/cpp/common/call.cc index 479f14d42bbae5d6caf222b6c6912949bb5696b1..16aa2c9fb9dbd3c1c079babc7d19cdf57e120df2 100644 --- a/src/cpp/common/call.cc +++ b/src/cpp/common/call.cc @@ -34,10 +34,9 @@ #include <grpc++/impl/call.h> #include <grpc/support/alloc.h> -#include <grpc++/byte_buffer.h> -#include <grpc++/client_context.h> #include <grpc++/channel.h> - +#include <grpc++/client_context.h> +#include <grpc++/support/byte_buffer.h> #include "src/core/profiling/timers.h" namespace grpc { diff --git a/src/cpp/common/completion_queue.cc b/src/cpp/common/completion_queue.cc index fca33f8f5420ba1f1ca88f58398422fecba13800..a175beb452c97b7f1b1d62fce308bb3ee401b8a6 100644 --- a/src/cpp/common/completion_queue.cc +++ b/src/cpp/common/completion_queue.cc @@ -36,7 +36,7 @@ #include <grpc/grpc.h> #include <grpc/support/log.h> -#include <grpc++/time.h> +#include <grpc++/support/time.h> namespace grpc { diff --git a/src/cpp/common/create_auth_context.h b/src/cpp/common/create_auth_context.h index 9082a90c6d76807a4629fd690cf0d9946cb18f4f..b4962bae4e3f5fd8200e10d47fcfe9c093541f6e 100644 --- a/src/cpp/common/create_auth_context.h +++ b/src/cpp/common/create_auth_context.h @@ -33,7 +33,7 @@ #include <memory> #include <grpc/grpc.h> -#include <grpc++/auth_context.h> +#include <grpc++/support/auth_context.h> namespace grpc { diff --git a/src/cpp/common/insecure_create_auth_context.cc b/src/cpp/common/insecure_create_auth_context.cc index 07fc0bd549ce48f9273b91f132d0bd17a5b7822c..fe80c1a80cde000fea2c5d7047e98ea8beacfeea 100644 --- a/src/cpp/common/insecure_create_auth_context.cc +++ b/src/cpp/common/insecure_create_auth_context.cc @@ -33,7 +33,7 @@ #include <memory> #include <grpc/grpc.h> -#include <grpc++/auth_context.h> +#include <grpc++/support/auth_context.h> namespace grpc { diff --git a/src/cpp/common/secure_auth_context.h b/src/cpp/common/secure_auth_context.h index 264ed620a30ef3bffa65e9ed9c0c568db5808e02..01b71261898e547c932e4993835c92342950a797 100644 --- a/src/cpp/common/secure_auth_context.h +++ b/src/cpp/common/secure_auth_context.h @@ -34,7 +34,7 @@ #ifndef GRPC_INTERNAL_CPP_COMMON_SECURE_AUTH_CONTEXT_H #define GRPC_INTERNAL_CPP_COMMON_SECURE_AUTH_CONTEXT_H -#include <grpc++/auth_context.h> +#include <grpc++/support/auth_context.h> struct grpc_auth_context; diff --git a/src/cpp/common/secure_create_auth_context.cc b/src/cpp/common/secure_create_auth_context.cc index d81f4bbc4a7835993ca010bc64da6663374a33db..f13d25a1dd6726a7010bdf484424739c6cb401a8 100644 --- a/src/cpp/common/secure_create_auth_context.cc +++ b/src/cpp/common/secure_create_auth_context.cc @@ -34,7 +34,7 @@ #include <grpc/grpc.h> #include <grpc/grpc_security.h> -#include <grpc++/auth_context.h> +#include <grpc++/support/auth_context.h> #include "src/cpp/common/secure_auth_context.h" namespace grpc { diff --git a/src/cpp/proto/proto_utils.cc b/src/cpp/proto/proto_utils.cc index 05470ec627ee0b3cbe6749bd82f57bcadc2c49e6..be84c222a0efbfe88b419b07f9bc5aa22c5bbc22 100644 --- a/src/cpp/proto/proto_utils.cc +++ b/src/cpp/proto/proto_utils.cc @@ -32,7 +32,6 @@ */ #include <grpc++/impl/proto_utils.h> -#include <grpc++/config.h> #include <grpc/grpc.h> #include <grpc/byte_buffer.h> @@ -40,6 +39,7 @@ #include <grpc/support/slice.h> #include <grpc/support/slice_buffer.h> #include <grpc/support/port_platform.h> +#include <grpc++/support/config.h> const int kMaxBufferLength = 8192; diff --git a/src/cpp/server/async_generic_service.cc b/src/cpp/server/async_generic_service.cc index 2e99afcb5f136b379a43d2973a6b9eb5e8235389..6b9ea532b6d597c13b4b5a9f663f2df53cd4086f 100644 --- a/src/cpp/server/async_generic_service.cc +++ b/src/cpp/server/async_generic_service.cc @@ -31,7 +31,7 @@ * */ -#include <grpc++/async_generic_service.h> +#include <grpc++/generic/async_generic_service.h> #include <grpc++/server.h> diff --git a/src/cpp/server/create_default_thread_pool.cc b/src/cpp/server/create_default_thread_pool.cc index f4ff4154b21bc87c607422d86273193571b63c05..f3b07ec8ce86627f313fb2691ea18a7fbebb48c8 100644 --- a/src/cpp/server/create_default_thread_pool.cc +++ b/src/cpp/server/create_default_thread_pool.cc @@ -32,6 +32,7 @@ */ #include <grpc/support/cpu.h> + #include "src/cpp/server/dynamic_thread_pool.h" #ifndef GRPC_CUSTOM_DEFAULT_THREAD_POOL diff --git a/src/cpp/server/dynamic_thread_pool.cc b/src/cpp/server/dynamic_thread_pool.cc index 34bf169396a3c82a02ec2d90f33ff3fd8a17ad70..4b226c2992d4827506b2726439d24151475fc76d 100644 --- a/src/cpp/server/dynamic_thread_pool.cc +++ b/src/cpp/server/dynamic_thread_pool.cc @@ -33,6 +33,7 @@ #include <grpc++/impl/sync.h> #include <grpc++/impl/thd.h> + #include "src/cpp/server/dynamic_thread_pool.h" namespace grpc { diff --git a/src/cpp/server/dynamic_thread_pool.h b/src/cpp/server/dynamic_thread_pool.h index a4683eefc4c25631df8b368372c1eb2d5d89f042..5ba7533c05f41872cf10edb14609fd47376e2383 100644 --- a/src/cpp/server/dynamic_thread_pool.h +++ b/src/cpp/server/dynamic_thread_pool.h @@ -34,15 +34,14 @@ #ifndef GRPC_INTERNAL_CPP_DYNAMIC_THREAD_POOL_H #define GRPC_INTERNAL_CPP_DYNAMIC_THREAD_POOL_H -#include <grpc++/config.h> - -#include <grpc++/impl/sync.h> -#include <grpc++/impl/thd.h> - #include <list> #include <memory> #include <queue> +#include <grpc++/impl/sync.h> +#include <grpc++/impl/thd.h> +#include <grpc++/support/config.h> + #include "src/cpp/server/thread_pool_interface.h" namespace grpc { diff --git a/src/cpp/server/fixed_size_thread_pool.h b/src/cpp/server/fixed_size_thread_pool.h index 65d3134ec48ba47f62d4971f395de4d13e99a103..394ae5821ecb3f057215ddb1ac02dddb97259ba1 100644 --- a/src/cpp/server/fixed_size_thread_pool.h +++ b/src/cpp/server/fixed_size_thread_pool.h @@ -34,13 +34,12 @@ #ifndef GRPC_INTERNAL_CPP_FIXED_SIZE_THREAD_POOL_H #define GRPC_INTERNAL_CPP_FIXED_SIZE_THREAD_POOL_H -#include <grpc++/config.h> +#include <queue> +#include <vector> #include <grpc++/impl/sync.h> #include <grpc++/impl/thd.h> - -#include <queue> -#include <vector> +#include <grpc++/support/config.h> #include "src/cpp/server/thread_pool_interface.h" diff --git a/src/cpp/server/secure_server_credentials.h b/src/cpp/server/secure_server_credentials.h index b9803f107e5d587774809d2b694ca5ed4f5b4402..d3d37b188df52d111e11254524f57ca53a1209d6 100644 --- a/src/cpp/server/secure_server_credentials.h +++ b/src/cpp/server/secure_server_credentials.h @@ -34,10 +34,10 @@ #ifndef GRPC_INTERNAL_CPP_SERVER_SECURE_SERVER_CREDENTIALS_H #define GRPC_INTERNAL_CPP_SERVER_SECURE_SERVER_CREDENTIALS_H -#include <grpc/grpc_security.h> - #include <grpc++/server_credentials.h> +#include <grpc/grpc_security.h> + namespace grpc { class SecureServerCredentials GRPC_FINAL : public ServerCredentials { diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index 3db23c2abed99d628f1ba808dd13dc53c42f71cb..66cd27cc3398284865035950fa484e38448406b1 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -32,18 +32,19 @@ */ #include <grpc++/server.h> + #include <utility> #include <grpc/grpc.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include <grpc++/completion_queue.h> -#include <grpc++/async_generic_service.h> +#include <grpc++/generic/async_generic_service.h> #include <grpc++/impl/rpc_service_method.h> #include <grpc++/impl/service_type.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/time.h> +#include <grpc++/support/time.h> #include "src/core/profiling/timers.h" #include "src/cpp/server/thread_pool_interface.h" diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc index 03461ddda544c1a39c19f3e171ab9206e7f22a1e..acc163d6b5d2ad5d18fa2830d900cc84058f9829 100644 --- a/src/cpp/server/server_context.cc +++ b/src/cpp/server/server_context.cc @@ -38,7 +38,7 @@ #include <grpc/support/log.h> #include <grpc++/impl/call.h> #include <grpc++/impl/sync.h> -#include <grpc++/time.h> +#include <grpc++/support/time.h> #include "src/core/channel/compress_filter.h" #include "src/cpp/common/create_auth_context.h" diff --git a/src/cpp/util/byte_buffer.cc b/src/cpp/util/byte_buffer.cc index a66c92c3e156560e0170ac48aad127fb479e1350..e46e656beb097e932dcf2c568735ced9bcb331e9 100644 --- a/src/cpp/util/byte_buffer.cc +++ b/src/cpp/util/byte_buffer.cc @@ -32,7 +32,7 @@ */ #include <grpc/byte_buffer_reader.h> -#include <grpc++/byte_buffer.h> +#include <grpc++/support/byte_buffer.h> namespace grpc { diff --git a/src/cpp/util/slice.cc b/src/cpp/util/slice.cc index 57370dabc68fd170f6e8a5534cf55241a3280603..7e88423b6c5304052d76b0ccf9236d57ee2ba70a 100644 --- a/src/cpp/util/slice.cc +++ b/src/cpp/util/slice.cc @@ -31,7 +31,7 @@ * */ -#include <grpc++/slice.h> +#include <grpc++/support/slice.h> namespace grpc { diff --git a/src/cpp/util/status.cc b/src/cpp/util/status.cc index 5bb9eda3d9c898fe2d755165d0053048fc9fdd34..ad9850cf074ec32ea9df9c5bda78a2d518af1d94 100644 --- a/src/cpp/util/status.cc +++ b/src/cpp/util/status.cc @@ -31,7 +31,7 @@ * */ -#include <grpc++/status.h> +#include <grpc++/support/status.h> namespace grpc { diff --git a/src/cpp/util/time.cc b/src/cpp/util/time.cc index 799c597e0b9207487952262d78423bf5115fecf4..b3401eb26b7a25e1efc4ed40b6406aedd8571084 100644 --- a/src/cpp/util/time.cc +++ b/src/cpp/util/time.cc @@ -31,12 +31,12 @@ * */ -#include <grpc++/config.h> +#include <grpc++/support/config.h> #ifndef GRPC_CXX0X_NO_CHRONO #include <grpc/support/time.h> -#include <grpc++/time.h> +#include <grpc++/support/time.h> using std::chrono::duration_cast; using std::chrono::nanoseconds; diff --git a/test/cpp/client/channel_arguments_test.cc b/test/cpp/client/channel_arguments_test.cc index 01c56cb795f579c1c2b5589f155bd5fed9a67dea..3d75e7b0e6ae2e4754a3e0eb1b52ad4e351eceda 100644 --- a/test/cpp/client/channel_arguments_test.cc +++ b/test/cpp/client/channel_arguments_test.cc @@ -31,7 +31,7 @@ * */ -#include <grpc++/channel_arguments.h> +#include <grpc++/support/channel_arguments.h> #include <grpc/grpc.h> #include <gtest/gtest.h> diff --git a/test/cpp/common/auth_property_iterator_test.cc b/test/cpp/common/auth_property_iterator_test.cc index bf17842a8457b569def2891eee8075a7d026c4c7..630c38c7f6767cc677910f77a49b934f75bceb6b 100644 --- a/test/cpp/common/auth_property_iterator_test.cc +++ b/test/cpp/common/auth_property_iterator_test.cc @@ -32,7 +32,7 @@ */ #include <grpc/grpc_security.h> -#include <grpc++/auth_context.h> +#include <grpc++/support/auth_context.h> #include <gtest/gtest.h> #include "src/cpp/common/secure_auth_context.h" diff --git a/test/cpp/common/secure_auth_context_test.cc b/test/cpp/common/secure_auth_context_test.cc index e0376c9cc780ec642de3a0cb9714964b5511c836..c71ef58023f0958e1e692fb6a74c79d62bdb5dd7 100644 --- a/test/cpp/common/secure_auth_context_test.cc +++ b/test/cpp/common/secure_auth_context_test.cc @@ -32,7 +32,7 @@ */ #include <grpc/grpc_security.h> -#include <grpc++/auth_context.h> +#include <grpc++/support/auth_context.h> #include <gtest/gtest.h> #include "src/cpp/common/secure_auth_context.h" diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 6b922d96980626122d15a12f6e5aa94f4ca7dae4..6343810ee93488bc1af3cf1c3311766580e85f5b 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -33,12 +33,9 @@ #include <memory> -#include "test/core/util/port.h" -#include "test/core/util/test_config.h" -#include "test/cpp/util/echo_duplicate.grpc.pb.h" -#include "test/cpp/util/echo.grpc.pb.h" -#include <grpc++/async_unary_call.h> -#include <grpc++/channel_arguments.h> +#include <grpc/grpc.h> +#include <grpc/support/thd.h> +#include <grpc/support/time.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> @@ -47,14 +44,12 @@ #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> -#include <grpc++/time.h> #include <gtest/gtest.h> -#include <grpc/grpc.h> -#include <grpc/support/thd.h> -#include <grpc/support/time.h> +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" +#include "test/cpp/util/echo_duplicate.grpc.pb.h" +#include "test/cpp/util/echo.grpc.pb.h" #ifdef GPR_POSIX_SOCKET #include "src/core/iomgr/pollset_posix.h" diff --git a/test/cpp/end2end/client_crash_test.cc b/test/cpp/end2end/client_crash_test.cc index 89708a2ef66cceb7eedc9ebbf1e1d84c22800ff4..3359080cec50c4cd57a223c7b5d2a4cc74fc54cf 100644 --- a/test/cpp/end2end/client_crash_test.cc +++ b/test/cpp/end2end/client_crash_test.cc @@ -31,11 +31,9 @@ * */ -#include "test/core/util/port.h" -#include "test/core/util/test_config.h" -#include "test/cpp/util/echo_duplicate.grpc.pb.h" -#include "test/cpp/util/echo.grpc.pb.h" -#include <grpc++/channel_arguments.h> +#include <grpc/grpc.h> +#include <grpc/support/thd.h> +#include <grpc/support/time.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> @@ -44,15 +42,12 @@ #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> -#include <grpc++/time.h> #include <gtest/gtest.h> -#include <grpc/grpc.h> -#include <grpc/support/thd.h> -#include <grpc/support/time.h> - +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" +#include "test/cpp/util/echo_duplicate.grpc.pb.h" +#include "test/cpp/util/echo.grpc.pb.h" #include "test/cpp/util/subprocess.h" using grpc::cpp::test::util::EchoRequest; diff --git a/test/cpp/end2end/client_crash_test_server.cc b/test/cpp/end2end/client_crash_test_server.cc index 3fd8c2c2f92498e87b257b2c785990b5229043c0..79a783287417e0fe852567083ef5ec481ed34538 100644 --- a/test/cpp/end2end/client_crash_test_server.cc +++ b/test/cpp/end2end/client_crash_test_server.cc @@ -40,7 +40,6 @@ #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> #include "test/cpp/util/echo.grpc.pb.h" DEFINE_string(address, "", "Address to bind to"); diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index cb155a84acdb43031da254bc406a5d742afc1de7..2728dce07e5646726367c1443eb3cbfac9b84125 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -34,13 +34,9 @@ #include <mutex> #include <thread> -#include "src/core/security/credentials.h" -#include "test/core/end2end/data/ssl_test_data.h" -#include "test/core/util/port.h" -#include "test/core/util/test_config.h" -#include "test/cpp/util/echo_duplicate.grpc.pb.h" -#include "test/cpp/util/echo.grpc.pb.h" -#include <grpc++/channel_arguments.h> +#include <grpc/grpc.h> +#include <grpc/support/thd.h> +#include <grpc/support/time.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> @@ -49,14 +45,14 @@ #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> -#include <grpc++/time.h> #include <gtest/gtest.h> -#include <grpc/grpc.h> -#include <grpc/support/thd.h> -#include <grpc/support/time.h> +#include "src/core/security/credentials.h" +#include "test/core/end2end/data/ssl_test_data.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" +#include "test/cpp/util/echo_duplicate.grpc.pb.h" +#include "test/cpp/util/echo.grpc.pb.h" using grpc::cpp::test::util::EchoRequest; using grpc::cpp::test::util::EchoResponse; diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc index b817198fa7019abb9f5f782f23fedde65c9ba93b..de7eab8dc2931b5f2a431732abb62bd15bd82196 100644 --- a/test/cpp/end2end/generic_end2end_test.cc +++ b/test/cpp/end2end/generic_end2end_test.cc @@ -33,32 +33,26 @@ #include <memory> -#include "test/core/util/port.h" -#include "test/core/util/test_config.h" -#include "test/cpp/util/echo.grpc.pb.h" +#include <grpc/grpc.h> +#include <grpc/support/thd.h> +#include <grpc/support/time.h> #include <grpc++/impl/proto_utils.h> -#include <grpc++/async_generic_service.h> -#include <grpc++/async_unary_call.h> -#include <grpc++/byte_buffer.h> -#include <grpc++/channel_arguments.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> -#include <grpc++/generic_stub.h> +#include <grpc++/generic/async_generic_service.h> +#include <grpc++/generic/generic_stub.h> #include <grpc++/server.h> #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/slice.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> -#include <grpc++/time.h> +#include <grpc++/support/slice.h> #include <gtest/gtest.h> -#include <grpc/grpc.h> -#include <grpc/support/thd.h> -#include <grpc/support/time.h> +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" +#include "test/cpp/util/echo.grpc.pb.h" using grpc::cpp::test::util::EchoRequest; using grpc::cpp::test::util::EchoResponse; diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc index 32493c56610e71512509e5d9129f45d52a5c250d..b2c6dc39a8124ea281d50288e799fa0b15b68921 100644 --- a/test/cpp/end2end/mock_test.cc +++ b/test/cpp/end2end/mock_test.cc @@ -33,11 +33,9 @@ #include <thread> -#include "test/core/util/port.h" -#include "test/core/util/test_config.h" -#include "test/cpp/util/echo_duplicate.grpc.pb.h" -#include "test/cpp/util/echo.grpc.pb.h" -#include <grpc++/channel_arguments.h> +#include <grpc/grpc.h> +#include <grpc/support/thd.h> +#include <grpc/support/time.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> @@ -46,14 +44,12 @@ #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> -#include <grpc++/time.h> #include <gtest/gtest.h> -#include <grpc/grpc.h> -#include <grpc/support/thd.h> -#include <grpc/support/time.h> +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" +#include "test/cpp/util/echo_duplicate.grpc.pb.h" +#include "test/cpp/util/echo.grpc.pb.h" using grpc::cpp::test::util::EchoRequest; using grpc::cpp::test::util::EchoResponse; diff --git a/test/cpp/end2end/server_crash_test.cc b/test/cpp/end2end/server_crash_test.cc index 2688f2c4eacb62bd0ecbebf09c818fc2a69aa80c..1a0f04e22b3e98ccf1f76492c44f4fa3f0a68936 100644 --- a/test/cpp/end2end/server_crash_test.cc +++ b/test/cpp/end2end/server_crash_test.cc @@ -31,11 +31,9 @@ * */ -#include "test/core/util/port.h" -#include "test/core/util/test_config.h" -#include "test/cpp/util/echo_duplicate.grpc.pb.h" -#include "test/cpp/util/echo.grpc.pb.h" -#include <grpc++/channel_arguments.h> +#include <grpc/grpc.h> +#include <grpc/support/thd.h> +#include <grpc/support/time.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> @@ -44,15 +42,12 @@ #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> -#include <grpc++/time.h> #include <gtest/gtest.h> -#include <grpc/grpc.h> -#include <grpc/support/thd.h> -#include <grpc/support/time.h> - +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" +#include "test/cpp/util/echo.grpc.pb.h" +#include "test/cpp/util/echo_duplicate.grpc.pb.h" #include "test/cpp/util/subprocess.h" using grpc::cpp::test::util::EchoRequest; diff --git a/test/cpp/end2end/server_crash_test_client.cc b/test/cpp/end2end/server_crash_test_client.cc index 52dce8f28ef8212022418128db7e05c9400193ee..7ca43a0c5b867916be84d47ea83bd10e9fe39663 100644 --- a/test/cpp/end2end/server_crash_test_client.cc +++ b/test/cpp/end2end/server_crash_test_client.cc @@ -37,12 +37,10 @@ #include <string> #include <gflags/gflags.h> -#include <grpc++/channel_arguments.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> -#include <grpc++/status.h> #include "test/cpp/util/echo.grpc.pb.h" DEFINE_string(address, "", "Address to connect to"); diff --git a/test/cpp/end2end/shutdown_test.cc b/test/cpp/end2end/shutdown_test.cc index dc5fb5af9b3accf2663817166ac7ee76b0daf625..e83f86f7ec5c0107d0c3194b8af99a834a98fd77 100644 --- a/test/cpp/end2end/shutdown_test.cc +++ b/test/cpp/end2end/shutdown_test.cc @@ -31,14 +31,10 @@ * */ -#include "test/core/util/test_config.h" - #include <thread> -#include "test/core/util/port.h" -#include "test/cpp/util/echo.grpc.pb.h" -#include "src/core/support/env.h" -#include <grpc++/channel_arguments.h> +#include <grpc/grpc.h> +#include <grpc/support/sync.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> @@ -47,10 +43,12 @@ #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> #include <gtest/gtest.h> -#include <grpc/grpc.h> -#include <grpc/support/sync.h> + +#include "src/core/support/env.h" +#include "test/core/util/test_config.h" +#include "test/core/util/port.h" +#include "test/cpp/util/echo.grpc.pb.h" using grpc::cpp::test::util::EchoRequest; using grpc::cpp::test::util::EchoResponse; diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc index bdcf07573e8a82f9de43ffe7f2ed3ddd529a1194..8304f04d56ab8cb5f72a7ce08cb8e2b66e595e39 100644 --- a/test/cpp/end2end/thread_stress_test.cc +++ b/test/cpp/end2end/thread_stress_test.cc @@ -34,11 +34,9 @@ #include <mutex> #include <thread> -#include "test/core/util/port.h" -#include "test/core/util/test_config.h" -#include "test/cpp/util/echo_duplicate.grpc.pb.h" -#include "test/cpp/util/echo.grpc.pb.h" -#include <grpc++/channel_arguments.h> +#include <grpc/grpc.h> +#include <grpc/support/thd.h> +#include <grpc/support/time.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> @@ -47,14 +45,12 @@ #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> -#include <grpc++/time.h> #include <gtest/gtest.h> -#include <grpc/grpc.h> -#include <grpc/support/thd.h> -#include <grpc/support/time.h> +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" +#include "test/cpp/util/echo_duplicate.grpc.pb.h" +#include "test/cpp/util/echo.grpc.pb.h" using grpc::cpp::test::util::EchoRequest; using grpc::cpp::test::util::EchoResponse; diff --git a/test/cpp/end2end/zookeeper_test.cc b/test/cpp/end2end/zookeeper_test.cc index d7fac3d07e387b8029bdb555c47c0de93581d7bf..e7d95b1c4625c77210772158fcd6e7e76df49b6b 100644 --- a/test/cpp/end2end/zookeeper_test.cc +++ b/test/cpp/end2end/zookeeper_test.cc @@ -31,11 +31,6 @@ * */ -#include "test/core/util/test_config.h" -#include "test/core/util/port.h" -#include "test/cpp/util/echo.grpc.pb.h" -#include "src/core/support/env.h" -#include <grpc++/channel_arguments.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> @@ -44,12 +39,16 @@ #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> #include <gtest/gtest.h> #include <grpc/grpc.h> #include <grpc/grpc_zookeeper.h> #include <zookeeper/zookeeper.h> +#include "test/core/util/test_config.h" +#include "test/core/util/port.h" +#include "test/cpp/util/echo.grpc.pb.h" +#include "src/core/support/env.h" + using grpc::cpp::test::util::EchoRequest; using grpc::cpp::test::util::EchoResponse; diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index d9e4f1ba6a64cfff17d29a67ec474c5028d6f37a..cb5232153bb69d5c5e61a6d03faf0f18b46c630c 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -40,8 +40,7 @@ #include <gflags/gflags.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> + #include "test/cpp/interop/client_helper.h" #include "test/cpp/interop/interop_client.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc index be652a4add4712296fa999ef7c48f98015922814..abc14aeb983e1122a9347110881b6fe32aa379ff 100644 --- a/test/cpp/interop/client_helper.cc +++ b/test/cpp/interop/client_helper.cc @@ -33,27 +33,24 @@ #include "test/cpp/interop/client_helper.h" +#include <unistd.h> + #include <fstream> #include <memory> #include <sstream> -#include <unistd.h> - #include <grpc/grpc.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include <gflags/gflags.h> -#include <grpc++/channel_arguments.h> #include <grpc++/channel.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> -#include <grpc++/stream.h> +#include "src/cpp/client/secure_credentials.h" #include "test/core/security/oauth2_utils.h" #include "test/cpp/util/create_test_channel.h" -#include "src/cpp/client/secure_credentials.h" - DECLARE_bool(enable_ssl); DECLARE_bool(use_prod_roots); DECLARE_int32(server_port); diff --git a/test/cpp/interop/client_helper.h b/test/cpp/interop/client_helper.h index d4c14433a98ffdae0daf16357ae7934d161cc59a..92d5078f48b672b4bdfbd338e5153b8cfb097995 100644 --- a/test/cpp/interop/client_helper.h +++ b/test/cpp/interop/client_helper.h @@ -36,7 +36,6 @@ #include <memory> -#include <grpc++/config.h> #include <grpc++/channel.h> #include "src/core/surface/call.h" diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index c73505c670e11112470913a03449afcfbeed8088..fa358585d4337323630909fc5c03e411710db5b1 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -33,11 +33,11 @@ #include "test/cpp/interop/interop_client.h" +#include <unistd.h> + #include <fstream> #include <memory> -#include <unistd.h> - #include <grpc/grpc.h> #include <grpc/support/log.h> #include <grpc/support/string_util.h> @@ -45,14 +45,12 @@ #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/credentials.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> +#include "src/core/transport/stream_op.h" #include "test/cpp/interop/client_helper.h" #include "test/proto/test.grpc.pb.h" #include "test/proto/empty.grpc.pb.h" #include "test/proto/messages.grpc.pb.h" -#include "src/core/transport/stream_op.h" namespace grpc { namespace testing { diff --git a/test/cpp/interop/interop_client.h b/test/cpp/interop/interop_client.h index 354c2c61959cabbe2a52a8f50f3713d37367f3b2..5e26cc82e6685d95c18015f5dd49d6c187acfb5c 100644 --- a/test/cpp/interop/interop_client.h +++ b/test/cpp/interop/interop_client.h @@ -33,11 +33,11 @@ #ifndef GRPC_TEST_CPP_INTEROP_INTEROP_CLIENT_H #define GRPC_TEST_CPP_INTEROP_INTEROP_CLIENT_H + #include <memory> #include <grpc/grpc.h> #include <grpc++/channel.h> -#include <grpc++/status.h> #include "test/proto/messages.grpc.pb.h" namespace grpc { diff --git a/test/cpp/interop/interop_test.cc b/test/cpp/interop/interop_test.cc index aac6e56b892c5c5a676a05ad3af7606398be6a2a..f01b032e95b6126a7f40fdadfb0e12a46ddb6c51 100644 --- a/test/cpp/interop/interop_test.cc +++ b/test/cpp/interop/interop_test.cc @@ -44,17 +44,18 @@ #include <sys/types.h> #include <sys/wait.h> -extern "C" { -#include "src/core/iomgr/socket_utils_posix.h" -#include "src/core/support/string.h" -} - #include <grpc/support/alloc.h> #include <grpc/support/host_port.h> #include <grpc/support/log.h> #include <grpc/support/string_util.h> #include "test/core/util/port.h" +extern "C" { +#include "src/core/iomgr/socket_utils_posix.h" +#include "src/core/support/string.h" +} + + int test_client(const char* root, const char* host, int port) { int status; pid_t cli; diff --git a/test/cpp/interop/reconnect_interop_client.cc b/test/cpp/interop/reconnect_interop_client.cc index 675c6ff07398ca515475057fe7e3dc182cf08612..d332dcad844eef6042ce17bff45087e4a7728446 100644 --- a/test/cpp/interop/reconnect_interop_client.cc +++ b/test/cpp/interop/reconnect_interop_client.cc @@ -39,7 +39,6 @@ #include <gflags/gflags.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> -#include <grpc++/status.h> #include "test/cpp/util/create_test_channel.h" #include "test/cpp/util/test_config.h" #include "test/proto/test.grpc.pb.h" diff --git a/test/cpp/interop/reconnect_interop_server.cc b/test/cpp/interop/reconnect_interop_server.cc index 8bc51aa52e4fea2744eb3ba714990b0d82706309..d4f171b1d0a98df01cceab8b5b248fe7253ef642 100644 --- a/test/cpp/interop/reconnect_interop_server.cc +++ b/test/cpp/interop/reconnect_interop_server.cc @@ -31,23 +31,22 @@ * */ +#include <signal.h> +#include <unistd.h> + #include <condition_variable> #include <memory> #include <mutex> #include <sstream> -#include <signal.h> -#include <unistd.h> - #include <gflags/gflags.h> #include <grpc/grpc.h> #include <grpc/support/log.h> -#include <grpc++/config.h> #include <grpc++/server.h> #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> + #include "test/core/util/reconnect_server.h" #include "test/cpp/util/test_config.h" #include "test/proto/test.grpc.pb.h" diff --git a/test/cpp/interop/server.cc b/test/cpp/interop/server.cc index 760bb18f7344881df26f3e1210f696068296b4f6..35ec890aa022ac1630e48768b46a0b0bdaaedccc 100644 --- a/test/cpp/interop/server.cc +++ b/test/cpp/interop/server.cc @@ -31,32 +31,28 @@ * */ +#include <signal.h> +#include <unistd.h> + #include <fstream> #include <memory> #include <sstream> #include <thread> -#include <signal.h> -#include <unistd.h> - #include <gflags/gflags.h> #include <grpc/grpc.h> #include <grpc/support/log.h> #include <grpc/support/useful.h> - -#include <grpc++/config.h> #include <grpc++/server.h> #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> +#include "test/cpp/interop/server_helper.h" +#include "test/cpp/util/test_config.h" #include "test/proto/test.grpc.pb.h" #include "test/proto/empty.grpc.pb.h" #include "test/proto/messages.grpc.pb.h" -#include "test/cpp/interop/server_helper.h" -#include "test/cpp/util/test_config.h" DEFINE_bool(enable_ssl, false, "Whether to use ssl/tls."); DEFINE_int32(port, 0, "Server port."); diff --git a/test/cpp/interop/server_helper.cc b/test/cpp/interop/server_helper.cc index 3721d7963594dc0e45464fd592fca848b2cdb8a1..e897f4ebf003106e6d6f4924cefe85d08c012951 100644 --- a/test/cpp/interop/server_helper.cc +++ b/test/cpp/interop/server_helper.cc @@ -36,7 +36,6 @@ #include <memory> #include <gflags/gflags.h> -#include <grpc++/config.h> #include <grpc++/server_credentials.h> #include "src/core/surface/call.h" diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 5395d02e32f4c1a26a866e2b7179b97a43f937ce..0f95cfea38d14a4d834f47287507f62caf93f3b2 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -34,14 +34,14 @@ #ifndef TEST_QPS_CLIENT_H #define TEST_QPS_CLIENT_H +#include <condition_variable> +#include <mutex> + #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/timer.h" #include "test/cpp/qps/qpstest.grpc.pb.h" - -#include <condition_variable> -#include <mutex> -#include <grpc++/config.h> +#include "test/cpp/util/create_test_channel.h" namespace grpc { diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index a337610cbf7769fe589128e41fea125285d05167..f779e4a5776c2d61cffc4c74a18e8bcfbe72023a 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -46,14 +46,12 @@ #include <grpc/support/histogram.h> #include <grpc/support/log.h> #include <gflags/gflags.h> -#include <grpc++/async_unary_call.h> #include <grpc++/client_context.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> -#include "test/cpp/util/create_test_channel.h" + #include "test/cpp/qps/qpstest.grpc.pb.h" #include "test/cpp/qps/timer.h" #include "test/cpp/qps/client.h" +#include "test/cpp/util/create_test_channel.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index db5416a707e37a7d3a66e9e3fe1a0e64dde41e76..123dca6600749b8d72f838c9f63908d469cfb5f5 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -31,6 +31,8 @@ * */ +#include <sys/signal.h> + #include <cassert> #include <chrono> #include <memory> @@ -40,21 +42,18 @@ #include <vector> #include <sstream> -#include <sys/signal.h> - +#include <gflags/gflags.h> #include <grpc/grpc.h> #include <grpc/support/alloc.h> #include <grpc/support/histogram.h> #include <grpc/support/host_port.h> #include <grpc/support/log.h> #include <grpc/support/time.h> -#include <gflags/gflags.h> #include <grpc++/client_context.h> #include <grpc++/server.h> #include <grpc++/server_builder.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> #include <gtest/gtest.h> + #include "test/cpp/util/create_test_channel.h" #include "test/cpp/qps/client.h" #include "test/cpp/qps/qpstest.grpc.pb.h" diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 78e37209382b27e1efb5e404ed029bbfd0d8e345..3bd61ea4e8bafe3e48f0bea5e1add7b2b9dc865b 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -31,24 +31,24 @@ * */ -#include "test/cpp/qps/driver.h" -#include "src/core/support/env.h" +#include <unistd.h> +#include <list> +#include <thread> +#include <deque> +#include <vector> + #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include <grpc/support/host_port.h> -#include <grpc++/channel_arguments.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> -#include <grpc++/stream.h> -#include <list> -#include <thread> -#include <deque> -#include <vector> -#include <unistd.h> -#include "test/cpp/qps/histogram.h" -#include "test/cpp/qps/qps_worker.h" + +#include "src/core/support/env.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" +#include "test/cpp/qps/driver.h" +#include "test/cpp/qps/histogram.h" +#include "test/cpp/qps/qps_worker.h" using std::list; using std::thread; diff --git a/test/cpp/qps/interarrival.h b/test/cpp/qps/interarrival.h index 04d14f689fc7b39eb41387cc9e7e9695985b1558..841619e3ff5a81a5070eeb136b9a587f8f4a9218 100644 --- a/test/cpp/qps/interarrival.h +++ b/test/cpp/qps/interarrival.h @@ -39,7 +39,7 @@ #include <cstdlib> #include <vector> -#include <grpc++/config.h> +#include <grpc++/support/config.h> namespace grpc { namespace testing { diff --git a/test/cpp/qps/perf_db_client.h b/test/cpp/qps/perf_db_client.h index 3433cd88d129104fedc0ee3195dc3c4890e19256..ae5d17074b1887b6aa8af1d9743bdae32cd767ed 100644 --- a/test/cpp/qps/perf_db_client.h +++ b/test/cpp/qps/perf_db_client.h @@ -37,12 +37,11 @@ #include <cfloat> #include <grpc/grpc.h> -#include <grpc++/channel_arguments.h> +#include <grpc++/support/channel_arguments.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> -#include <grpc++/status.h> #include "test/cpp/qps/perf_db.grpc.pb.h" namespace grpc { diff --git a/test/cpp/qps/qps_interarrival_test.cc b/test/cpp/qps/qps_interarrival_test.cc index 1eed956a1c408f5912eafbe2477aad73d2b98e9f..a7979e6187813041c15661ca06234835b99a8f86 100644 --- a/test/cpp/qps/qps_interarrival_test.cc +++ b/test/cpp/qps/qps_interarrival_test.cc @@ -31,13 +31,13 @@ * */ -#include "test/cpp/qps/interarrival.h" #include <chrono> #include <iostream> // Use the C histogram rather than C++ to avoid depending on proto #include <grpc/support/histogram.h> -#include <grpc++/config.h> + +#include "test/cpp/qps/interarrival.h" using grpc::testing::RandomDist; using grpc::testing::InterarrivalTimer; diff --git a/test/cpp/qps/qps_openloop_test.cc b/test/cpp/qps/qps_openloop_test.cc index 9a7313f6e8581a0c2ec9b115600b6f9579ec5f80..5a6a9249a93e558c76be4783efba2d6b69df082d 100644 --- a/test/cpp/qps/qps_openloop_test.cc +++ b/test/cpp/qps/qps_openloop_test.cc @@ -31,12 +31,12 @@ * */ +#include <signal.h> + #include <set> #include <grpc/support/log.h> -#include <signal.h> - #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" #include "test/cpp/util/benchmark_config.h" diff --git a/test/cpp/qps/qps_test.cc b/test/cpp/qps/qps_test.cc index ba980a666438e73a6a78fa308b83e19f31aa6f63..d0c4a79cd92ae94504842dab72a26763287d88ac 100644 --- a/test/cpp/qps/qps_test.cc +++ b/test/cpp/qps/qps_test.cc @@ -31,12 +31,12 @@ * */ +#include <signal.h> + #include <set> #include <grpc/support/log.h> -#include <signal.h> - #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" #include "test/cpp/util/benchmark_config.h" diff --git a/test/cpp/qps/qps_test_with_poll.cc b/test/cpp/qps/qps_test_with_poll.cc index 90a8da8d1109fbc76a612f4e33e2bf831f2592a6..31d2c1bf7b49b55fa44815f678f379813dfae73b 100644 --- a/test/cpp/qps/qps_test_with_poll.cc +++ b/test/cpp/qps/qps_test_with_poll.cc @@ -31,12 +31,12 @@ * */ +#include <signal.h> + #include <set> #include <grpc/support/log.h> -#include <signal.h> - #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" #include "test/cpp/util/benchmark_config.h" diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index f1cea5ee6655b71dc0545907fb4c0e2db51a2eab..51e955a80a45649fe6a0a6633e5b8e92230d8755 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -47,16 +47,15 @@ #include <grpc/support/log.h> #include <grpc/support/host_port.h> #include <grpc++/client_context.h> -#include <grpc++/status.h> #include <grpc++/server.h> #include <grpc++/server_builder.h> #include <grpc++/server_credentials.h> -#include <grpc++/stream.h> + #include "test/core/util/grpc_profiler.h" -#include "test/cpp/util/create_test_channel.h" #include "test/cpp/qps/qpstest.pb.h" #include "test/cpp/qps/client.h" #include "test/cpp/qps/server.h" +#include "test/cpp/util/create_test_channel.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/report.h b/test/cpp/qps/report.h index aec3cbe80a35366b281a023abfbc2d36aede8550..620abade39bee4544c996b5711e8a082a9bd6eaf 100644 --- a/test/cpp/qps/report.h +++ b/test/cpp/qps/report.h @@ -37,7 +37,8 @@ #include <memory> #include <set> #include <vector> -#include <grpc++/config.h> + +#include <grpc++/support/config.h> #include "test/cpp/qps/driver.h" #include "test/cpp/qps/qpstest.grpc.pb.h" diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index b4fc49c31c3e162dafe76b2f4d3f78d6bcf7df2b..77415f42ce7bd4db6f2afed8e9ded8826a9fe646 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -41,22 +41,20 @@ #include <thread> #include <gflags/gflags.h> +#include <grpc/grpc.h> #include <grpc/support/alloc.h> #include <grpc/support/host_port.h> -#include <grpc++/async_unary_call.h> -#include <grpc++/config.h> +#include <grpc/support/log.h> +#include <grpc++/support/config.h> #include <grpc++/server.h> #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> #include <gtest/gtest.h> + #include "test/cpp/qps/qpstest.grpc.pb.h" #include "test/cpp/qps/server.h" -#include <grpc/grpc.h> -#include <grpc/support/log.h> namespace grpc { namespace testing { diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index 93f747a8f33eca1ee2113b23d99706053e7c64f1..29ec19cd4bca3cbc7155a6f1eadbd61db447c2ef 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -32,26 +32,23 @@ */ #include <sys/signal.h> -#include <thread> - #include <unistd.h> +#include <thread> #include <gflags/gflags.h> +#include <grpc/grpc.h> #include <grpc/support/alloc.h> #include <grpc/support/host_port.h> -#include <grpc++/config.h> +#include <grpc/support/log.h> #include <grpc++/server.h> #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> + #include "test/cpp/qps/qpstest.grpc.pb.h" #include "test/cpp/qps/server.h" #include "test/cpp/qps/timer.h" -#include <grpc/grpc.h> -#include <grpc/support/log.h> namespace grpc { namespace testing { diff --git a/test/cpp/qps/stats.h b/test/cpp/qps/stats.h index 82dc03e3dadf7ed06e3e3a098e57dbf957e8211d..93875017ca757eae0f3bc1ad41301e870ac3d6f7 100644 --- a/test/cpp/qps/stats.h +++ b/test/cpp/qps/stats.h @@ -34,9 +34,10 @@ #ifndef TEST_QPS_STATS_UTILS_H #define TEST_QPS_STATS_UTILS_H -#include "test/cpp/qps/histogram.h" #include <string> +#include "test/cpp/qps/histogram.h" + namespace grpc { namespace testing { diff --git a/test/cpp/qps/sync_streaming_ping_pong_test.cc b/test/cpp/qps/sync_streaming_ping_pong_test.cc index d53905a7790da07630b8de2ec750fe6923bef854..52e43939a814c7151425d9e0befdd83706620217 100644 --- a/test/cpp/qps/sync_streaming_ping_pong_test.cc +++ b/test/cpp/qps/sync_streaming_ping_pong_test.cc @@ -31,12 +31,12 @@ * */ +#include <signal.h> + #include <set> #include <grpc/support/log.h> -#include <signal.h> - #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" #include "test/cpp/util/benchmark_config.h" diff --git a/test/cpp/qps/sync_unary_ping_pong_test.cc b/test/cpp/qps/sync_unary_ping_pong_test.cc index d276d13a4306fe5cc8a4aac679dbbd4f32f2634b..fbd21357aa593dd9358effbbf1d1b5ca6eadd3eb 100644 --- a/test/cpp/qps/sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/sync_unary_ping_pong_test.cc @@ -31,12 +31,12 @@ * */ +#include <signal.h> + #include <set> #include <grpc/support/log.h> -#include <signal.h> - #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" #include "test/cpp/util/benchmark_config.h" diff --git a/test/cpp/qps/timer.cc b/test/cpp/qps/timer.cc index c1ba23decd961fe6b5f5ecc7958e9784175218db..8edb838da37dff75d5e64141660010ad509931d8 100644 --- a/test/cpp/qps/timer.cc +++ b/test/cpp/qps/timer.cc @@ -36,7 +36,6 @@ #include <sys/time.h> #include <sys/resource.h> #include <grpc/support/time.h> -#include <grpc++/config.h> Timer::Timer() : start_(Sample()) {} diff --git a/test/cpp/qps/worker.cc b/test/cpp/qps/worker.cc index 7cf4903148af164d47fcdb2676a0114b6c79dd82..935e4853a62a11239f75924f15d2a73d10025ce5 100644 --- a/test/cpp/qps/worker.cc +++ b/test/cpp/qps/worker.cc @@ -36,9 +36,9 @@ #include <chrono> #include <thread> +#include <gflags/gflags.h> #include <grpc/grpc.h> #include <grpc/support/time.h> -#include <gflags/gflags.h> #include "test/cpp/qps/qps_worker.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/util/byte_buffer_test.cc b/test/cpp/util/byte_buffer_test.cc index 5195575f995571d61d8dcddf67e0852032442fbf..f36c32cac5b1d47527a2594875efcb8148ec8688 100644 --- a/test/cpp/util/byte_buffer_test.cc +++ b/test/cpp/util/byte_buffer_test.cc @@ -31,13 +31,13 @@ * */ -#include <grpc++/byte_buffer.h> +#include <grpc++/support/byte_buffer.h> #include <cstring> #include <vector> #include <grpc/support/slice.h> -#include <grpc++/slice.h> +#include <grpc++/support/slice.h> #include <gtest/gtest.h> namespace grpc { diff --git a/test/cpp/util/cli_call.cc b/test/cpp/util/cli_call.cc index d0a300f511505df82fff4301dfa35d5cbde96057..d60cee9c024db5f8cf00bce42eb6e360cc83b516 100644 --- a/test/cpp/util/cli_call.cc +++ b/test/cpp/util/cli_call.cc @@ -35,16 +35,13 @@ #include <iostream> -#include <grpc++/byte_buffer.h> -#include <grpc++/channel.h> -#include <grpc++/client_context.h> -#include <grpc++/generic_stub.h> -#include <grpc++/status.h> -#include <grpc++/stream.h> - #include <grpc/grpc.h> #include <grpc/support/log.h> #include <grpc/support/slice.h> +#include <grpc++/support/byte_buffer.h> +#include <grpc++/channel.h> +#include <grpc++/client_context.h> +#include <grpc++/generic/generic_stub.h> namespace grpc { namespace testing { diff --git a/test/cpp/util/cli_call.h b/test/cpp/util/cli_call.h index 46b5dd3e4f316dfac0555b4e7b7224eba7ef0c78..7a3dcf2e9f6c4082710b42bd73935adb9829a7e0 100644 --- a/test/cpp/util/cli_call.h +++ b/test/cpp/util/cli_call.h @@ -37,8 +37,7 @@ #include <map> #include <grpc++/channel.h> -#include <grpc++/config.h> -#include <grpc++/status.h> +#include <grpc++/support/status.h> namespace grpc { namespace testing { diff --git a/test/cpp/util/cli_call_test.cc b/test/cpp/util/cli_call_test.cc index a48a56ae908b008f28776c0a12676b35fe89e11a..35bfad202f0c01cc9f0cb36d4c779e1b246430e2 100644 --- a/test/cpp/util/cli_call_test.cc +++ b/test/cpp/util/cli_call_test.cc @@ -31,10 +31,9 @@ * */ -#include "test/core/util/test_config.h" #include "test/cpp/util/cli_call.h" -#include "test/cpp/util/echo.grpc.pb.h" -#include <grpc++/channel_arguments.h> + +#include <grpc/grpc.h> #include <grpc++/channel.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> @@ -43,11 +42,11 @@ #include <grpc++/server_builder.h> #include <grpc++/server_context.h> #include <grpc++/server_credentials.h> -#include <grpc++/status.h> -#include "test/core/util/port.h" #include <gtest/gtest.h> -#include <grpc/grpc.h> +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" +#include "test/cpp/util/echo.grpc.pb.h" using grpc::cpp::test::util::EchoRequest; using grpc::cpp::test::util::EchoResponse; diff --git a/test/cpp/util/create_test_channel.cc b/test/cpp/util/create_test_channel.cc index 43e719ef6b52a3341d9bf64db7c4c8e5999fd651..161b4bdc1d5ea9b6d98b12a9002bc559c9f184b2 100644 --- a/test/cpp/util/create_test_channel.cc +++ b/test/cpp/util/create_test_channel.cc @@ -33,11 +33,11 @@ #include "test/cpp/util/create_test_channel.h" -#include "test/core/end2end/data/ssl_test_data.h" -#include <grpc++/channel_arguments.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> +#include "test/core/end2end/data/ssl_test_data.h" + namespace grpc { // When ssl is enabled, if server is empty, override_hostname is used to diff --git a/test/cpp/util/create_test_channel.h b/test/cpp/util/create_test_channel.h index 129cc746f9e371974f2e9c84a1f844aadae8532b..1263d4ed68609c87e63a9d400466de20dc3527cc 100644 --- a/test/cpp/util/create_test_channel.h +++ b/test/cpp/util/create_test_channel.h @@ -36,7 +36,6 @@ #include <memory> -#include <grpc++/config.h> #include <grpc++/credentials.h> namespace grpc { diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc index 15c56a352cb0552cff25f04f9e92236ea837b8b6..746d67deeb9145e728065b1d000db645364922cf 100644 --- a/test/cpp/util/grpc_cli.cc +++ b/test/cpp/util/grpc_cli.cc @@ -64,14 +64,13 @@ #include <sstream> #include <gflags/gflags.h> -#include "test/cpp/util/cli_call.h" -#include "test/cpp/util/test_config.h" -#include <grpc++/channel_arguments.h> +#include <grpc/grpc.h> #include <grpc++/channel.h> #include <grpc++/create_channel.h> #include <grpc++/credentials.h> -#include <grpc/grpc.h> +#include "test/cpp/util/cli_call.h" +#include "test/cpp/util/test_config.h" DEFINE_bool(enable_ssl, true, "Whether to use ssl/tls."); DEFINE_bool(use_auth, false, "Whether to create default google credentials."); diff --git a/test/cpp/util/slice_test.cc b/test/cpp/util/slice_test.cc index eb328490e13ba87f8bb203629dcb9b8ee5d0738b..de7ff031ab8593ecbc63908cc18f60cd9623bac4 100644 --- a/test/cpp/util/slice_test.cc +++ b/test/cpp/util/slice_test.cc @@ -31,7 +31,7 @@ * */ -#include <grpc++/slice.h> +#include <grpc++/support/slice.h> #include <grpc/support/slice.h> #include <gtest/gtest.h> diff --git a/test/cpp/util/status_test.cc b/test/cpp/util/status_test.cc index 17b92ab06a28ed896395807af452e6c5e480e908..837a6bab02ed1ae5caa5e6002bf30ee9fdc0f666 100644 --- a/test/cpp/util/status_test.cc +++ b/test/cpp/util/status_test.cc @@ -31,7 +31,8 @@ * */ -#include <grpc++/status.h> +#include <grpc++/support/status.h> + #include <grpc/status.h> #include <grpc/support/log.h> diff --git a/test/cpp/util/time_test.cc b/test/cpp/util/time_test.cc index 4cb6ec4b4e9f4ecbb766954370eff1d378b6b418..1e501dfd28877413fd5ff4274fd1c1c37067d2b8 100644 --- a/test/cpp/util/time_test.cc +++ b/test/cpp/util/time_test.cc @@ -32,7 +32,7 @@ */ #include <grpc/support/time.h> -#include <grpc++/time.h> +#include <grpc++/support/time.h> #include <gtest/gtest.h> using std::chrono::duration_cast; diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 052d3e74c7011086de1da43d2f6a0d944972e836..796528457d13b87c5dbafee8051e3c7cb73ac6fb 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -760,19 +760,13 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = include/grpc++/async_generic_service.h \ -include/grpc++/async_unary_call.h \ -include/grpc++/auth_context.h \ -include/grpc++/byte_buffer.h \ -include/grpc++/channel.h \ -include/grpc++/channel_arguments.h \ +INPUT = include/grpc++/channel.h \ include/grpc++/client_context.h \ include/grpc++/completion_queue.h \ -include/grpc++/config.h \ -include/grpc++/config_protobuf.h \ include/grpc++/create_channel.h \ include/grpc++/credentials.h \ -include/grpc++/generic_stub.h \ +include/grpc++/generic/async_generic_service.h \ +include/grpc++/generic/generic_stub.h \ include/grpc++/impl/call.h \ include/grpc++/impl/client_unary_call.h \ include/grpc++/impl/grpc_library.h \ @@ -791,12 +785,19 @@ include/grpc++/server.h \ include/grpc++/server_builder.h \ include/grpc++/server_context.h \ include/grpc++/server_credentials.h \ -include/grpc++/slice.h \ -include/grpc++/status.h \ -include/grpc++/status_code_enum.h \ -include/grpc++/stream.h \ -include/grpc++/stub_options.h \ -include/grpc++/time.h +include/grpc++/support/async_stream.h \ +include/grpc++/support/async_unary_call.h \ +include/grpc++/support/auth_context.h \ +include/grpc++/support/byte_buffer.h \ +include/grpc++/support/channel_arguments.h \ +include/grpc++/support/config.h \ +include/grpc++/support/config_protobuf.h \ +include/grpc++/support/slice.h \ +include/grpc++/support/status.h \ +include/grpc++/support/status_code_enum.h \ +include/grpc++/support/stub_options.h \ +include/grpc++/support/sync_stream.h \ +include/grpc++/support/time.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index ed19c6ca2b0077e21eee8edbf34203f509a73dcc..0ce703ad0d200977d06ffee222f32e774375fb38 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -760,19 +760,13 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = include/grpc++/async_generic_service.h \ -include/grpc++/async_unary_call.h \ -include/grpc++/auth_context.h \ -include/grpc++/byte_buffer.h \ -include/grpc++/channel.h \ -include/grpc++/channel_arguments.h \ +INPUT = include/grpc++/channel.h \ include/grpc++/client_context.h \ include/grpc++/completion_queue.h \ -include/grpc++/config.h \ -include/grpc++/config_protobuf.h \ include/grpc++/create_channel.h \ include/grpc++/credentials.h \ -include/grpc++/generic_stub.h \ +include/grpc++/generic/async_generic_service.h \ +include/grpc++/generic/generic_stub.h \ include/grpc++/impl/call.h \ include/grpc++/impl/client_unary_call.h \ include/grpc++/impl/grpc_library.h \ @@ -791,12 +785,19 @@ include/grpc++/server.h \ include/grpc++/server_builder.h \ include/grpc++/server_context.h \ include/grpc++/server_credentials.h \ -include/grpc++/slice.h \ -include/grpc++/status.h \ -include/grpc++/status_code_enum.h \ -include/grpc++/stream.h \ -include/grpc++/stub_options.h \ -include/grpc++/time.h \ +include/grpc++/support/async_stream.h \ +include/grpc++/support/async_unary_call.h \ +include/grpc++/support/auth_context.h \ +include/grpc++/support/byte_buffer.h \ +include/grpc++/support/channel_arguments.h \ +include/grpc++/support/config.h \ +include/grpc++/support/config_protobuf.h \ +include/grpc++/support/slice.h \ +include/grpc++/support/status.h \ +include/grpc++/support/status_code_enum.h \ +include/grpc++/support/stub_options.h \ +include/grpc++/support/sync_stream.h \ +include/grpc++/support/time.h \ src/cpp/client/secure_credentials.h \ src/cpp/common/secure_auth_context.h \ src/cpp/server/secure_server_credentials.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index f2c124a49dc7b285bef46bf8240cb2ba9cd66618..0fe5f68d6ac8c56351d5bc11dc7197c7f4b353ad 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -13101,19 +13101,13 @@ "grpc" ], "headers": [ - "include/grpc++/async_generic_service.h", - "include/grpc++/async_unary_call.h", - "include/grpc++/auth_context.h", - "include/grpc++/byte_buffer.h", "include/grpc++/channel.h", - "include/grpc++/channel_arguments.h", "include/grpc++/client_context.h", "include/grpc++/completion_queue.h", - "include/grpc++/config.h", - "include/grpc++/config_protobuf.h", "include/grpc++/create_channel.h", "include/grpc++/credentials.h", - "include/grpc++/generic_stub.h", + "include/grpc++/generic/async_generic_service.h", + "include/grpc++/generic/generic_stub.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/grpc_library.h", @@ -13132,12 +13126,19 @@ "include/grpc++/server_builder.h", "include/grpc++/server_context.h", "include/grpc++/server_credentials.h", - "include/grpc++/slice.h", - "include/grpc++/status.h", - "include/grpc++/status_code_enum.h", - "include/grpc++/stream.h", - "include/grpc++/stub_options.h", - "include/grpc++/time.h", + "include/grpc++/support/async_stream.h", + "include/grpc++/support/async_unary_call.h", + "include/grpc++/support/auth_context.h", + "include/grpc++/support/byte_buffer.h", + "include/grpc++/support/channel_arguments.h", + "include/grpc++/support/config.h", + "include/grpc++/support/config_protobuf.h", + "include/grpc++/support/slice.h", + "include/grpc++/support/status.h", + "include/grpc++/support/status_code_enum.h", + "include/grpc++/support/stub_options.h", + "include/grpc++/support/sync_stream.h", + "include/grpc++/support/time.h", "src/cpp/client/create_channel_internal.h", "src/cpp/client/secure_credentials.h", "src/cpp/common/create_auth_context.h", @@ -13150,19 +13151,13 @@ "language": "c++", "name": "grpc++", "src": [ - "include/grpc++/async_generic_service.h", - "include/grpc++/async_unary_call.h", - "include/grpc++/auth_context.h", - "include/grpc++/byte_buffer.h", "include/grpc++/channel.h", - "include/grpc++/channel_arguments.h", "include/grpc++/client_context.h", "include/grpc++/completion_queue.h", - "include/grpc++/config.h", - "include/grpc++/config_protobuf.h", "include/grpc++/create_channel.h", "include/grpc++/credentials.h", - "include/grpc++/generic_stub.h", + "include/grpc++/generic/async_generic_service.h", + "include/grpc++/generic/generic_stub.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/grpc_library.h", @@ -13181,12 +13176,19 @@ "include/grpc++/server_builder.h", "include/grpc++/server_context.h", "include/grpc++/server_credentials.h", - "include/grpc++/slice.h", - "include/grpc++/status.h", - "include/grpc++/status_code_enum.h", - "include/grpc++/stream.h", - "include/grpc++/stub_options.h", - "include/grpc++/time.h", + "include/grpc++/support/async_stream.h", + "include/grpc++/support/async_unary_call.h", + "include/grpc++/support/auth_context.h", + "include/grpc++/support/byte_buffer.h", + "include/grpc++/support/channel_arguments.h", + "include/grpc++/support/config.h", + "include/grpc++/support/config_protobuf.h", + "include/grpc++/support/slice.h", + "include/grpc++/support/status.h", + "include/grpc++/support/status_code_enum.h", + "include/grpc++/support/stub_options.h", + "include/grpc++/support/sync_stream.h", + "include/grpc++/support/time.h", "src/cpp/client/channel.cc", "src/cpp/client/channel_arguments.cc", "src/cpp/client/client_context.cc", @@ -13273,19 +13275,13 @@ "grpc_unsecure" ], "headers": [ - "include/grpc++/async_generic_service.h", - "include/grpc++/async_unary_call.h", - "include/grpc++/auth_context.h", - "include/grpc++/byte_buffer.h", "include/grpc++/channel.h", - "include/grpc++/channel_arguments.h", "include/grpc++/client_context.h", "include/grpc++/completion_queue.h", - "include/grpc++/config.h", - "include/grpc++/config_protobuf.h", "include/grpc++/create_channel.h", "include/grpc++/credentials.h", - "include/grpc++/generic_stub.h", + "include/grpc++/generic/async_generic_service.h", + "include/grpc++/generic/generic_stub.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/grpc_library.h", @@ -13304,12 +13300,19 @@ "include/grpc++/server_builder.h", "include/grpc++/server_context.h", "include/grpc++/server_credentials.h", - "include/grpc++/slice.h", - "include/grpc++/status.h", - "include/grpc++/status_code_enum.h", - "include/grpc++/stream.h", - "include/grpc++/stub_options.h", - "include/grpc++/time.h", + "include/grpc++/support/async_stream.h", + "include/grpc++/support/async_unary_call.h", + "include/grpc++/support/auth_context.h", + "include/grpc++/support/byte_buffer.h", + "include/grpc++/support/channel_arguments.h", + "include/grpc++/support/config.h", + "include/grpc++/support/config_protobuf.h", + "include/grpc++/support/slice.h", + "include/grpc++/support/status.h", + "include/grpc++/support/status_code_enum.h", + "include/grpc++/support/stub_options.h", + "include/grpc++/support/sync_stream.h", + "include/grpc++/support/time.h", "src/cpp/client/create_channel_internal.h", "src/cpp/common/create_auth_context.h", "src/cpp/server/dynamic_thread_pool.h", @@ -13319,19 +13322,13 @@ "language": "c++", "name": "grpc++_unsecure", "src": [ - "include/grpc++/async_generic_service.h", - "include/grpc++/async_unary_call.h", - "include/grpc++/auth_context.h", - "include/grpc++/byte_buffer.h", "include/grpc++/channel.h", - "include/grpc++/channel_arguments.h", "include/grpc++/client_context.h", "include/grpc++/completion_queue.h", - "include/grpc++/config.h", - "include/grpc++/config_protobuf.h", "include/grpc++/create_channel.h", "include/grpc++/credentials.h", - "include/grpc++/generic_stub.h", + "include/grpc++/generic/async_generic_service.h", + "include/grpc++/generic/generic_stub.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/grpc_library.h", @@ -13350,12 +13347,19 @@ "include/grpc++/server_builder.h", "include/grpc++/server_context.h", "include/grpc++/server_credentials.h", - "include/grpc++/slice.h", - "include/grpc++/status.h", - "include/grpc++/status_code_enum.h", - "include/grpc++/stream.h", - "include/grpc++/stub_options.h", - "include/grpc++/time.h", + "include/grpc++/support/async_stream.h", + "include/grpc++/support/async_unary_call.h", + "include/grpc++/support/auth_context.h", + "include/grpc++/support/byte_buffer.h", + "include/grpc++/support/channel_arguments.h", + "include/grpc++/support/config.h", + "include/grpc++/support/config_protobuf.h", + "include/grpc++/support/slice.h", + "include/grpc++/support/status.h", + "include/grpc++/support/status_code_enum.h", + "include/grpc++/support/stub_options.h", + "include/grpc++/support/sync_stream.h", + "include/grpc++/support/time.h", "src/cpp/client/channel.cc", "src/cpp/client/channel_arguments.cc", "src/cpp/client/client_context.cc", @@ -13392,8 +13396,8 @@ { "deps": [], "headers": [ - "include/grpc++/config.h", - "include/grpc++/config_protobuf.h", + "include/grpc++/support/config.h", + "include/grpc++/support/config_protobuf.h", "src/compiler/config.h", "src/compiler/cpp_generator.h", "src/compiler/cpp_generator_helpers.h", @@ -13411,8 +13415,8 @@ "language": "c++", "name": "grpc_plugin_support", "src": [ - "include/grpc++/config.h", - "include/grpc++/config_protobuf.h", + "include/grpc++/support/config.h", + "include/grpc++/support/config_protobuf.h", "src/compiler/config.h", "src/compiler/cpp_generator.cc", "src/compiler/cpp_generator.h", diff --git a/vsprojects/grpc++/grpc++.vcxproj b/vsprojects/grpc++/grpc++.vcxproj index 168bd440c3016ae0d36e7fca209f1a515979f35f..e178bbc3dbdde67b5479ec211386daee39ef14cc 100644 --- a/vsprojects/grpc++/grpc++.vcxproj +++ b/vsprojects/grpc++/grpc++.vcxproj @@ -213,19 +213,13 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClInclude Include="..\..\include\grpc++\async_generic_service.h" /> - <ClInclude Include="..\..\include\grpc++\async_unary_call.h" /> - <ClInclude Include="..\..\include\grpc++\auth_context.h" /> - <ClInclude Include="..\..\include\grpc++\byte_buffer.h" /> <ClInclude Include="..\..\include\grpc++\channel.h" /> - <ClInclude Include="..\..\include\grpc++\channel_arguments.h" /> <ClInclude Include="..\..\include\grpc++\client_context.h" /> <ClInclude Include="..\..\include\grpc++\completion_queue.h" /> - <ClInclude Include="..\..\include\grpc++\config.h" /> - <ClInclude Include="..\..\include\grpc++\config_protobuf.h" /> <ClInclude Include="..\..\include\grpc++\create_channel.h" /> <ClInclude Include="..\..\include\grpc++\credentials.h" /> - <ClInclude Include="..\..\include\grpc++\generic_stub.h" /> + <ClInclude Include="..\..\include\grpc++\generic\async_generic_service.h" /> + <ClInclude Include="..\..\include\grpc++\generic\generic_stub.h" /> <ClInclude Include="..\..\include\grpc++\impl\call.h" /> <ClInclude Include="..\..\include\grpc++\impl\client_unary_call.h" /> <ClInclude Include="..\..\include\grpc++\impl\grpc_library.h" /> @@ -244,12 +238,19 @@ <ClInclude Include="..\..\include\grpc++\server_builder.h" /> <ClInclude Include="..\..\include\grpc++\server_context.h" /> <ClInclude Include="..\..\include\grpc++\server_credentials.h" /> - <ClInclude Include="..\..\include\grpc++\slice.h" /> - <ClInclude Include="..\..\include\grpc++\status.h" /> - <ClInclude Include="..\..\include\grpc++\status_code_enum.h" /> - <ClInclude Include="..\..\include\grpc++\stream.h" /> - <ClInclude Include="..\..\include\grpc++\stub_options.h" /> - <ClInclude Include="..\..\include\grpc++\time.h" /> + <ClInclude Include="..\..\include\grpc++\support\async_stream.h" /> + <ClInclude Include="..\..\include\grpc++\support\async_unary_call.h" /> + <ClInclude Include="..\..\include\grpc++\support\auth_context.h" /> + <ClInclude Include="..\..\include\grpc++\support\byte_buffer.h" /> + <ClInclude Include="..\..\include\grpc++\support\channel_arguments.h" /> + <ClInclude Include="..\..\include\grpc++\support\config.h" /> + <ClInclude Include="..\..\include\grpc++\support\config_protobuf.h" /> + <ClInclude Include="..\..\include\grpc++\support\slice.h" /> + <ClInclude Include="..\..\include\grpc++\support\status.h" /> + <ClInclude Include="..\..\include\grpc++\support\status_code_enum.h" /> + <ClInclude Include="..\..\include\grpc++\support\stub_options.h" /> + <ClInclude Include="..\..\include\grpc++\support\sync_stream.h" /> + <ClInclude Include="..\..\include\grpc++\support\time.h" /> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\src\cpp\client\secure_credentials.h" /> diff --git a/vsprojects/grpc++/grpc++.vcxproj.filters b/vsprojects/grpc++/grpc++.vcxproj.filters index e36db288014575c79b95e5068a0c58e176b8d55b..8b9d68afcb8f5b0552b10b6f97402d5a435f5d98 100644 --- a/vsprojects/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/grpc++/grpc++.vcxproj.filters @@ -96,44 +96,26 @@ </ClCompile> </ItemGroup> <ItemGroup> - <ClInclude Include="..\..\include\grpc++\async_generic_service.h"> - <Filter>include\grpc++</Filter> - </ClInclude> - <ClInclude Include="..\..\include\grpc++\async_unary_call.h"> - <Filter>include\grpc++</Filter> - </ClInclude> - <ClInclude Include="..\..\include\grpc++\auth_context.h"> - <Filter>include\grpc++</Filter> - </ClInclude> - <ClInclude Include="..\..\include\grpc++\byte_buffer.h"> - <Filter>include\grpc++</Filter> - </ClInclude> <ClInclude Include="..\..\include\grpc++\channel.h"> <Filter>include\grpc++</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\channel_arguments.h"> - <Filter>include\grpc++</Filter> - </ClInclude> <ClInclude Include="..\..\include\grpc++\client_context.h"> <Filter>include\grpc++</Filter> </ClInclude> <ClInclude Include="..\..\include\grpc++\completion_queue.h"> <Filter>include\grpc++</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\config.h"> - <Filter>include\grpc++</Filter> - </ClInclude> - <ClInclude Include="..\..\include\grpc++\config_protobuf.h"> - <Filter>include\grpc++</Filter> - </ClInclude> <ClInclude Include="..\..\include\grpc++\create_channel.h"> <Filter>include\grpc++</Filter> </ClInclude> <ClInclude Include="..\..\include\grpc++\credentials.h"> <Filter>include\grpc++</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\generic_stub.h"> - <Filter>include\grpc++</Filter> + <ClInclude Include="..\..\include\grpc++\generic\async_generic_service.h"> + <Filter>include\grpc++\generic</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\generic\generic_stub.h"> + <Filter>include\grpc++\generic</Filter> </ClInclude> <ClInclude Include="..\..\include\grpc++\impl\call.h"> <Filter>include\grpc++\impl</Filter> @@ -189,23 +171,44 @@ <ClInclude Include="..\..\include\grpc++\server_credentials.h"> <Filter>include\grpc++</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\slice.h"> - <Filter>include\grpc++</Filter> + <ClInclude Include="..\..\include\grpc++\support\async_stream.h"> + <Filter>include\grpc++\support</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\status.h"> - <Filter>include\grpc++</Filter> + <ClInclude Include="..\..\include\grpc++\support\async_unary_call.h"> + <Filter>include\grpc++\support</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\status_code_enum.h"> - <Filter>include\grpc++</Filter> + <ClInclude Include="..\..\include\grpc++\support\auth_context.h"> + <Filter>include\grpc++\support</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\stream.h"> - <Filter>include\grpc++</Filter> + <ClInclude Include="..\..\include\grpc++\support\byte_buffer.h"> + <Filter>include\grpc++\support</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\stub_options.h"> - <Filter>include\grpc++</Filter> + <ClInclude Include="..\..\include\grpc++\support\channel_arguments.h"> + <Filter>include\grpc++\support</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\time.h"> - <Filter>include\grpc++</Filter> + <ClInclude Include="..\..\include\grpc++\support\config.h"> + <Filter>include\grpc++\support</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\support\config_protobuf.h"> + <Filter>include\grpc++\support</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\support\slice.h"> + <Filter>include\grpc++\support</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\support\status.h"> + <Filter>include\grpc++\support</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\support\status_code_enum.h"> + <Filter>include\grpc++\support</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\support\stub_options.h"> + <Filter>include\grpc++\support</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\support\sync_stream.h"> + <Filter>include\grpc++\support</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\support\time.h"> + <Filter>include\grpc++\support</Filter> </ClInclude> </ItemGroup> <ItemGroup> @@ -242,9 +245,15 @@ <Filter Include="include\grpc++"> <UniqueIdentifier>{784a0281-f547-aeb0-9f55-b26b7de9c769}</UniqueIdentifier> </Filter> + <Filter Include="include\grpc++\generic"> + <UniqueIdentifier>{51dae921-3aa2-1976-2ee4-c5615de1af54}</UniqueIdentifier> + </Filter> <Filter Include="include\grpc++\impl"> <UniqueIdentifier>{0da8cd95-314f-da1b-5ce7-7791a5be1f1a}</UniqueIdentifier> </Filter> + <Filter Include="include\grpc++\support"> + <UniqueIdentifier>{a5c10dae-f715-2a30-1066-d22f8bc94cb2}</UniqueIdentifier> + </Filter> <Filter Include="src"> <UniqueIdentifier>{328ff211-2886-406e-56f9-18ba1686f363}</UniqueIdentifier> </Filter> diff --git a/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj index f004556dbbb9019680def2c44d458960eb91053a..2f0b18dedf5a8377b41ad4eb6ec5860bcc9a382c 100644 --- a/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -213,19 +213,13 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClInclude Include="..\..\include\grpc++\async_generic_service.h" /> - <ClInclude Include="..\..\include\grpc++\async_unary_call.h" /> - <ClInclude Include="..\..\include\grpc++\auth_context.h" /> - <ClInclude Include="..\..\include\grpc++\byte_buffer.h" /> <ClInclude Include="..\..\include\grpc++\channel.h" /> - <ClInclude Include="..\..\include\grpc++\channel_arguments.h" /> <ClInclude Include="..\..\include\grpc++\client_context.h" /> <ClInclude Include="..\..\include\grpc++\completion_queue.h" /> - <ClInclude Include="..\..\include\grpc++\config.h" /> - <ClInclude Include="..\..\include\grpc++\config_protobuf.h" /> <ClInclude Include="..\..\include\grpc++\create_channel.h" /> <ClInclude Include="..\..\include\grpc++\credentials.h" /> - <ClInclude Include="..\..\include\grpc++\generic_stub.h" /> + <ClInclude Include="..\..\include\grpc++\generic\async_generic_service.h" /> + <ClInclude Include="..\..\include\grpc++\generic\generic_stub.h" /> <ClInclude Include="..\..\include\grpc++\impl\call.h" /> <ClInclude Include="..\..\include\grpc++\impl\client_unary_call.h" /> <ClInclude Include="..\..\include\grpc++\impl\grpc_library.h" /> @@ -244,12 +238,19 @@ <ClInclude Include="..\..\include\grpc++\server_builder.h" /> <ClInclude Include="..\..\include\grpc++\server_context.h" /> <ClInclude Include="..\..\include\grpc++\server_credentials.h" /> - <ClInclude Include="..\..\include\grpc++\slice.h" /> - <ClInclude Include="..\..\include\grpc++\status.h" /> - <ClInclude Include="..\..\include\grpc++\status_code_enum.h" /> - <ClInclude Include="..\..\include\grpc++\stream.h" /> - <ClInclude Include="..\..\include\grpc++\stub_options.h" /> - <ClInclude Include="..\..\include\grpc++\time.h" /> + <ClInclude Include="..\..\include\grpc++\support\async_stream.h" /> + <ClInclude Include="..\..\include\grpc++\support\async_unary_call.h" /> + <ClInclude Include="..\..\include\grpc++\support\auth_context.h" /> + <ClInclude Include="..\..\include\grpc++\support\byte_buffer.h" /> + <ClInclude Include="..\..\include\grpc++\support\channel_arguments.h" /> + <ClInclude Include="..\..\include\grpc++\support\config.h" /> + <ClInclude Include="..\..\include\grpc++\support\config_protobuf.h" /> + <ClInclude Include="..\..\include\grpc++\support\slice.h" /> + <ClInclude Include="..\..\include\grpc++\support\status.h" /> + <ClInclude Include="..\..\include\grpc++\support\status_code_enum.h" /> + <ClInclude Include="..\..\include\grpc++\support\stub_options.h" /> + <ClInclude Include="..\..\include\grpc++\support\sync_stream.h" /> + <ClInclude Include="..\..\include\grpc++\support\time.h" /> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\src\cpp\client\create_channel_internal.h" /> diff --git a/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index a28581eb53e28dcf4bb5333d0255c2de52376df0..911ca323c0d81aa9e7f563e935e3faaa102b5706 100644 --- a/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -81,44 +81,26 @@ </ClCompile> </ItemGroup> <ItemGroup> - <ClInclude Include="..\..\include\grpc++\async_generic_service.h"> - <Filter>include\grpc++</Filter> - </ClInclude> - <ClInclude Include="..\..\include\grpc++\async_unary_call.h"> - <Filter>include\grpc++</Filter> - </ClInclude> - <ClInclude Include="..\..\include\grpc++\auth_context.h"> - <Filter>include\grpc++</Filter> - </ClInclude> - <ClInclude Include="..\..\include\grpc++\byte_buffer.h"> - <Filter>include\grpc++</Filter> - </ClInclude> <ClInclude Include="..\..\include\grpc++\channel.h"> <Filter>include\grpc++</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\channel_arguments.h"> - <Filter>include\grpc++</Filter> - </ClInclude> <ClInclude Include="..\..\include\grpc++\client_context.h"> <Filter>include\grpc++</Filter> </ClInclude> <ClInclude Include="..\..\include\grpc++\completion_queue.h"> <Filter>include\grpc++</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\config.h"> - <Filter>include\grpc++</Filter> - </ClInclude> - <ClInclude Include="..\..\include\grpc++\config_protobuf.h"> - <Filter>include\grpc++</Filter> - </ClInclude> <ClInclude Include="..\..\include\grpc++\create_channel.h"> <Filter>include\grpc++</Filter> </ClInclude> <ClInclude Include="..\..\include\grpc++\credentials.h"> <Filter>include\grpc++</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\generic_stub.h"> - <Filter>include\grpc++</Filter> + <ClInclude Include="..\..\include\grpc++\generic\async_generic_service.h"> + <Filter>include\grpc++\generic</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\generic\generic_stub.h"> + <Filter>include\grpc++\generic</Filter> </ClInclude> <ClInclude Include="..\..\include\grpc++\impl\call.h"> <Filter>include\grpc++\impl</Filter> @@ -174,23 +156,44 @@ <ClInclude Include="..\..\include\grpc++\server_credentials.h"> <Filter>include\grpc++</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\slice.h"> - <Filter>include\grpc++</Filter> + <ClInclude Include="..\..\include\grpc++\support\async_stream.h"> + <Filter>include\grpc++\support</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\status.h"> - <Filter>include\grpc++</Filter> + <ClInclude Include="..\..\include\grpc++\support\async_unary_call.h"> + <Filter>include\grpc++\support</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\status_code_enum.h"> - <Filter>include\grpc++</Filter> + <ClInclude Include="..\..\include\grpc++\support\auth_context.h"> + <Filter>include\grpc++\support</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\stream.h"> - <Filter>include\grpc++</Filter> + <ClInclude Include="..\..\include\grpc++\support\byte_buffer.h"> + <Filter>include\grpc++\support</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\stub_options.h"> - <Filter>include\grpc++</Filter> + <ClInclude Include="..\..\include\grpc++\support\channel_arguments.h"> + <Filter>include\grpc++\support</Filter> </ClInclude> - <ClInclude Include="..\..\include\grpc++\time.h"> - <Filter>include\grpc++</Filter> + <ClInclude Include="..\..\include\grpc++\support\config.h"> + <Filter>include\grpc++\support</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\support\config_protobuf.h"> + <Filter>include\grpc++\support</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\support\slice.h"> + <Filter>include\grpc++\support</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\support\status.h"> + <Filter>include\grpc++\support</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\support\status_code_enum.h"> + <Filter>include\grpc++\support</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\support\stub_options.h"> + <Filter>include\grpc++\support</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\support\sync_stream.h"> + <Filter>include\grpc++\support</Filter> + </ClInclude> + <ClInclude Include="..\..\include\grpc++\support\time.h"> + <Filter>include\grpc++\support</Filter> </ClInclude> </ItemGroup> <ItemGroup> @@ -218,9 +221,15 @@ <Filter Include="include\grpc++"> <UniqueIdentifier>{eceb50c0-bb49-3812-b6bd-b0af6df81da7}</UniqueIdentifier> </Filter> + <Filter Include="include\grpc++\generic"> + <UniqueIdentifier>{83717d3c-57d9-2bfa-ed9c-2b08f86da12b}</UniqueIdentifier> + </Filter> <Filter Include="include\grpc++\impl"> <UniqueIdentifier>{dadc0002-f2ac-451b-a9b8-33b8de10b5fc}</UniqueIdentifier> </Filter> + <Filter Include="include\grpc++\support"> + <UniqueIdentifier>{0ebf8008-80b9-d6da-e1dc-854bf1ec2195}</UniqueIdentifier> + </Filter> <Filter Include="src"> <UniqueIdentifier>{cce6a85d-1111-3834-6825-31e170d93cff}</UniqueIdentifier> </Filter> diff --git a/vsprojects/grpc_plugin_support/grpc_plugin_support.vcxproj b/vsprojects/grpc_plugin_support/grpc_plugin_support.vcxproj index 444d796137e3c740909164f54252b2631b437b56..9f098d10a10fbe2f4fd002f102fffa291ce6ad91 100644 --- a/vsprojects/grpc_plugin_support/grpc_plugin_support.vcxproj +++ b/vsprojects/grpc_plugin_support/grpc_plugin_support.vcxproj @@ -122,8 +122,8 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClInclude Include="..\..\include\grpc++\config.h" /> - <ClInclude Include="..\..\include\grpc++\config_protobuf.h" /> + <ClInclude Include="..\..\include\grpc++\support\config.h" /> + <ClInclude Include="..\..\include\grpc++\support\config_protobuf.h" /> <ClInclude Include="..\..\src\compiler\config.h" /> <ClInclude Include="..\..\src\compiler\cpp_generator.h" /> <ClInclude Include="..\..\src\compiler\cpp_generator_helpers.h" />