Merge pull request #3028 from yang-g/header_rearrange

Header rearrangement
pull/3050/head
Craig Tiller 10 years ago
commit fede51f7b7
  1. 62
      BUILD
  2. 58
      Makefile
  3. 33
      build.json
  4. 6
      examples/pubsub/main.cc
  5. 1
      examples/pubsub/publisher.h
  6. 2
      examples/pubsub/publisher_test.cc
  7. 1
      examples/pubsub/subscriber.h
  8. 2
      examples/pubsub/subscriber_test.cc
  9. 2
      include/grpc++/channel.h
  10. 8
      include/grpc++/client_context.h
  11. 4
      include/grpc++/completion_queue.h
  12. 4
      include/grpc++/create_channel.h
  13. 2
      include/grpc++/credentials.h
  14. 10
      include/grpc++/generic/async_generic_service.h
  15. 10
      include/grpc++/generic/generic_stub.h
  16. 15
      include/grpc++/impl/call.h
  17. 5
      include/grpc++/impl/client_unary_call.h
  18. 4
      include/grpc++/impl/proto_utils.h
  19. 6
      include/grpc++/impl/rpc_service_method.h
  20. 4
      include/grpc++/impl/service_type.h
  21. 2
      include/grpc++/impl/sync.h
  22. 2
      include/grpc++/impl/thd.h
  23. 4
      include/grpc++/server.h
  24. 2
      include/grpc++/server_builder.h
  25. 6
      include/grpc++/server_context.h
  26. 2
      include/grpc++/server_credentials.h
  27. 354
      include/grpc++/support/async_stream.h
  28. 10
      include/grpc++/support/async_unary_call.h
  29. 8
      include/grpc++/support/auth_context.h
  30. 12
      include/grpc++/support/byte_buffer.h
  31. 8
      include/grpc++/support/channel_arguments.h
  32. 6
      include/grpc++/support/config.h
  33. 6
      include/grpc++/support/config_protobuf.h
  34. 8
      include/grpc++/support/slice.h
  35. 10
      include/grpc++/support/status.h
  36. 6
      include/grpc++/support/status_code_enum.h
  37. 6
      include/grpc++/support/stub_options.h
  38. 392
      include/grpc++/support/sync_stream.h
  39. 8
      include/grpc++/support/time.h
  40. 4
      src/compiler/config.h
  41. 14
      src/compiler/cpp_generator.cc
  42. 2
      src/compiler/python_generator.cc
  43. 11
      src/cpp/client/channel.cc
  44. 3
      src/cpp/client/channel_arguments.cc
  45. 2
      src/cpp/client/client_context.cc
  46. 2
      src/cpp/client/create_channel.cc
  47. 2
      src/cpp/client/create_channel_internal.h
  48. 2
      src/cpp/client/generic_stub.cc
  49. 8
      src/cpp/client/insecure_credentials.cc
  50. 4
      src/cpp/client/secure_channel_arguments.cc
  51. 2
      src/cpp/client/secure_credentials.cc
  52. 2
      src/cpp/client/secure_credentials.h
  53. 2
      src/cpp/common/auth_property_iterator.cc
  54. 5
      src/cpp/common/call.cc
  55. 2
      src/cpp/common/completion_queue.cc
  56. 2
      src/cpp/common/create_auth_context.h
  57. 2
      src/cpp/common/insecure_create_auth_context.cc
  58. 2
      src/cpp/common/secure_auth_context.h
  59. 2
      src/cpp/common/secure_create_auth_context.cc
  60. 2
      src/cpp/proto/proto_utils.cc
  61. 2
      src/cpp/server/async_generic_service.cc
  62. 1
      src/cpp/server/create_default_thread_pool.cc
  63. 1
      src/cpp/server/dynamic_thread_pool.cc
  64. 9
      src/cpp/server/dynamic_thread_pool.h
  65. 7
      src/cpp/server/fixed_size_thread_pool.h
  66. 4
      src/cpp/server/secure_server_credentials.h
  67. 5
      src/cpp/server/server.cc
  68. 2
      src/cpp/server/server_context.cc
  69. 2
      src/cpp/util/byte_buffer.cc
  70. 2
      src/cpp/util/slice.cc
  71. 2
      src/cpp/util/status.cc
  72. 4
      src/cpp/util/time.cc
  73. 2
      test/cpp/client/channel_arguments_test.cc
  74. 2
      test/cpp/common/auth_property_iterator_test.cc
  75. 2
      test/cpp/common/secure_auth_context_test.cc
  76. 19
      test/cpp/end2end/async_end2end_test.cc
  77. 19
      test/cpp/end2end/client_crash_test.cc
  78. 1
      test/cpp/end2end/client_crash_test_server.cc
  79. 22
      test/cpp/end2end/end2end_test.cc
  80. 24
      test/cpp/end2end/generic_end2end_test.cc
  81. 18
      test/cpp/end2end/mock_test.cc
  82. 19
      test/cpp/end2end/server_crash_test.cc
  83. 2
      test/cpp/end2end/server_crash_test_client.cc
  84. 16
      test/cpp/end2end/shutdown_test.cc
  85. 18
      test/cpp/end2end/thread_stress_test.cc
  86. 11
      test/cpp/end2end/zookeeper_test.cc
  87. 3
      test/cpp/interop/client.cc
  88. 9
      test/cpp/interop/client_helper.cc
  89. 1
      test/cpp/interop/client_helper.h
  90. 8
      test/cpp/interop/interop_client.cc
  91. 2
      test/cpp/interop/interop_client.h
  92. 11
      test/cpp/interop/interop_test.cc
  93. 1
      test/cpp/interop/reconnect_interop_client.cc
  94. 9
      test/cpp/interop/reconnect_interop_server.cc
  95. 14
      test/cpp/interop/server.cc
  96. 1
      test/cpp/interop/server_helper.cc
  97. 8
      test/cpp/qps/client.h
  98. 6
      test/cpp/qps/client_async.cc
  99. 9
      test/cpp/qps/client_sync.cc
  100. 22
      test/cpp/qps/driver.cc
  101. Some files were not shown because too many files have changed in this diff Show More

62
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",

@ -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))))

@ -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",

@ -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",

@ -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"

@ -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"

@ -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"

@ -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"

@ -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;

@ -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;

@ -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;

@ -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(

@ -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;

@ -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

@ -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

@ -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;

@ -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 {

@ -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 {

@ -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;

@ -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 {

@ -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>

@ -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>

@ -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;

@ -37,7 +37,7 @@
#include <memory>
#include <vector>
#include <grpc++/config.h>
#include <grpc++/support/config.h>
namespace grpc {

@ -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;

@ -37,7 +37,7 @@
#include <memory>
#include <vector>
#include <grpc++/config.h>
#include <grpc++/support/config.h>
struct grpc_server;

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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>

@ -112,13 +112,14 @@ grpc::string GetHeaderPrologue(const grpc::protobuf::FileDescriptor *file,
grpc::string GetHeaderIncludes(const grpc::protobuf::FileDescriptor *file,
const Parameters &params) {
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 =

@ -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"

@ -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 {

@ -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 {

@ -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"

@ -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"

@ -36,7 +36,7 @@
#include <memory>
#include <grpc++/config.h>
#include <grpc++/support/config.h>
struct grpc_channel;

@ -31,7 +31,7 @@
*
*/
#include <grpc++/generic_stub.h>
#include <grpc++/generic/generic_stub.h>
#include <grpc++/impl/rpc_method.h>

@ -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 {

@ -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 {

@ -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"

@ -36,7 +36,7 @@
#include <grpc/grpc_security.h>
#include <grpc++/config.h>
#include <grpc++/support/config.h>
#include <grpc++/credentials.h>
namespace grpc {

@ -31,7 +31,7 @@
*
*/
#include <grpc++/auth_context.h>
#include <grpc++/support/auth_context.h>
#include <grpc/grpc_security.h>

@ -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 {

@ -36,7 +36,7 @@
#include <grpc/grpc.h>
#include <grpc/support/log.h>
#include <grpc++/time.h>
#include <grpc++/support/time.h>
namespace grpc {

@ -33,7 +33,7 @@
#include <memory>
#include <grpc/grpc.h>
#include <grpc++/auth_context.h>
#include <grpc++/support/auth_context.h>
namespace grpc {

@ -33,7 +33,7 @@
#include <memory>
#include <grpc/grpc.h>
#include <grpc++/auth_context.h>
#include <grpc++/support/auth_context.h>
namespace grpc {

@ -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;

@ -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 {

@ -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;

@ -31,7 +31,7 @@
*
*/
#include <grpc++/async_generic_service.h>
#include <grpc++/generic/async_generic_service.h>
#include <grpc++/server.h>

@ -32,6 +32,7 @@
*/
#include <grpc/support/cpu.h>
#include "src/cpp/server/dynamic_thread_pool.h"
#ifndef GRPC_CUSTOM_DEFAULT_THREAD_POOL

@ -33,6 +33,7 @@
#include <grpc++/impl/sync.h>
#include <grpc++/impl/thd.h>
#include "src/cpp/server/dynamic_thread_pool.h"
namespace grpc {

@ -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 {

@ -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"

@ -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 {

@ -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"

@ -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"

@ -32,7 +32,7 @@
*/
#include <grpc/byte_buffer_reader.h>
#include <grpc++/byte_buffer.h>
#include <grpc++/support/byte_buffer.h>
namespace grpc {

@ -31,7 +31,7 @@
*
*/
#include <grpc++/slice.h>
#include <grpc++/support/slice.h>
namespace grpc {

@ -31,7 +31,7 @@
*
*/
#include <grpc++/status.h>
#include <grpc++/support/status.h>
namespace grpc {

@ -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;

@ -31,7 +31,7 @@
*
*/
#include <grpc++/channel_arguments.h>
#include <grpc++/support/channel_arguments.h>
#include <grpc/grpc.h>
#include <gtest/gtest.h>

@ -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"

@ -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"

@ -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"

@ -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;

@ -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");

@ -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;

@ -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;

@ -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;

@ -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;

@ -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");

@ -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;

@ -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;

@ -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;

@ -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"

@ -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);

@ -36,7 +36,6 @@
#include <memory>
#include <grpc++/config.h>
#include <grpc++/channel.h>
#include "src/core/surface/call.h"

@ -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 {

@ -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 {

@ -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;

@ -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"

@ -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"

@ -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.");

@ -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"

@ -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 {

@ -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 {

@ -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"

@ -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;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save