diff --git a/BUILD b/BUILD index 47fcfae1db1..d7f0e5a5881 100644 --- a/BUILD +++ b/BUILD @@ -577,7 +577,6 @@ cc_library( "src/cpp/client/secure_credentials.h", "src/cpp/server/secure_server_credentials.h", "src/cpp/client/channel.h", - "src/cpp/proto/proto_utils.h", "src/cpp/server/thread_pool.h", "src/cpp/client/secure_credentials.cc", "src/cpp/server/secure_server_credentials.cc", @@ -615,6 +614,7 @@ cc_library( "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", @@ -622,6 +622,7 @@ cc_library( "include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/internal_stub.h", + "include/grpc++/impl/proto_utils.h", "include/grpc++/impl/rpc_method.h", "include/grpc++/impl/rpc_service_method.h", "include/grpc++/impl/serialization_traits.h", @@ -659,7 +660,6 @@ cc_library( name = "grpc++_unsecure", srcs = [ "src/cpp/client/channel.h", - "src/cpp/proto/proto_utils.h", "src/cpp/server/thread_pool.h", "src/cpp/client/channel.cc", "src/cpp/client/channel_arguments.cc", @@ -695,6 +695,7 @@ cc_library( "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", @@ -702,6 +703,7 @@ cc_library( "include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/internal_stub.h", + "include/grpc++/impl/proto_utils.h", "include/grpc++/impl/rpc_method.h", "include/grpc++/impl/rpc_service_method.h", "include/grpc++/impl/serialization_traits.h", diff --git a/Makefile b/Makefile index a8b3ffa4204..26899c5c051 100644 --- a/Makefile +++ b/Makefile @@ -3433,6 +3433,7 @@ PUBLIC_HEADERS_CXX += \ 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 \ @@ -3440,6 +3441,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/client_unary_call.h \ include/grpc++/impl/grpc_library.h \ include/grpc++/impl/internal_stub.h \ + include/grpc++/impl/proto_utils.h \ include/grpc++/impl/rpc_method.h \ include/grpc++/impl/rpc_service_method.h \ include/grpc++/impl/serialization_traits.h \ @@ -3721,6 +3723,7 @@ PUBLIC_HEADERS_CXX += \ 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 \ @@ -3728,6 +3731,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/client_unary_call.h \ include/grpc++/impl/grpc_library.h \ include/grpc++/impl/internal_stub.h \ + include/grpc++/impl/proto_utils.h \ include/grpc++/impl/rpc_method.h \ include/grpc++/impl/rpc_service_method.h \ include/grpc++/impl/serialization_traits.h \ diff --git a/build.json b/build.json index f012cf827fa..e01a419bbe6 100644 --- a/build.json +++ b/build.json @@ -36,6 +36,7 @@ "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", @@ -43,6 +44,7 @@ "include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/internal_stub.h", + "include/grpc++/impl/proto_utils.h", "include/grpc++/impl/rpc_method.h", "include/grpc++/impl/rpc_service_method.h", "include/grpc++/impl/serialization_traits.h", @@ -66,7 +68,6 @@ ], "headers": [ "src/cpp/client/channel.h", - "src/cpp/proto/proto_utils.h", "src/cpp/server/thread_pool.h" ], "src": [ diff --git a/include/grpc++/completion_queue.h b/include/grpc++/completion_queue.h index a3e7a9c9f40..f32cbff06cc 100644 --- a/include/grpc++/completion_queue.h +++ b/include/grpc++/completion_queue.h @@ -36,6 +36,7 @@ #include #include +#include #include struct grpc_completion_queue; @@ -70,7 +71,6 @@ class RpcMethod; class Server; class ServerBuilder; class ServerContext; -class Status; class CompletionQueueTag { public: diff --git a/src/cpp/proto/proto_utils.cc b/src/cpp/proto/proto_utils.cc index 268e4f6d1fe..7b2a65e99bb 100644 --- a/src/cpp/proto/proto_utils.cc +++ b/src/cpp/proto/proto_utils.cc @@ -154,13 +154,16 @@ namespace grpc { Status SerializeProto(const grpc::protobuf::Message& msg, grpc_byte_buffer** bp) { GrpcBufferWriter writer(bp); - return msg.SerializeToZeroCopyStream(&writer) ? Status::OK : Status(INVALID_ARGUMENT, "Failed to serialize message"); + return msg.SerializeToZeroCopyStream(&writer) + ? Status::OK + : Status(StatusCode::INVALID_ARGUMENT, + "Failed to serialize message"); } Status DeserializeProto(grpc_byte_buffer* buffer, grpc::protobuf::Message* msg, int max_message_size) { if (!buffer) { - return Status(INVALID_ARGUMENT, "No payload"); + return Status(StatusCode::INVALID_ARGUMENT, "No payload"); } GrpcBufferReader reader(buffer); ::grpc::protobuf::io::CodedInputStream decoder(&reader); @@ -168,10 +171,11 @@ Status DeserializeProto(grpc_byte_buffer* buffer, grpc::protobuf::Message* msg, decoder.SetTotalBytesLimit(max_message_size, max_message_size); } if (!msg->ParseFromCodedStream(&decoder)) { - return Status(INVALID_ARGUMENT, msg->InitializationErrorString()); + return Status(StatusCode::INVALID_ARGUMENT, + msg->InitializationErrorString()); } if (!decoder.ConsumedEntireMessage()) { - return Status(INVALID_ARGUMENT, "Did not read entire message"); + return Status(StatusCode::INVALID_ARGUMENT, "Did not read entire message"); } return Status::OK; } diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 79868464a14..f947b7823eb 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -760,7 +760,7 @@ 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++/byte_buffer.h include/grpc++/channel_arguments.h include/grpc++/channel_interface.h include/grpc++/client_context.h include/grpc++/completion_queue.h include/grpc++/config.h include/grpc++/create_channel.h include/grpc++/credentials.h include/grpc++/generic_stub.h include/grpc++/impl/call.h include/grpc++/impl/client_unary_call.h include/grpc++/impl/grpc_library.h include/grpc++/impl/internal_stub.h include/grpc++/impl/rpc_method.h include/grpc++/impl/rpc_service_method.h include/grpc++/impl/serialization_traits.h include/grpc++/impl/service_type.h include/grpc++/impl/sync.h include/grpc++/impl/sync_cxx11.h include/grpc++/impl/sync_no_cxx11.h include/grpc++/impl/thd.h include/grpc++/impl/thd_cxx11.h include/grpc++/impl/thd_no_cxx11.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++/status_code_enum.h include/grpc++/stream.h include/grpc++/thread_pool_interface.h include/grpc++/time.h +INPUT = 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_interface.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++/impl/call.h include/grpc++/impl/client_unary_call.h include/grpc++/impl/grpc_library.h include/grpc++/impl/internal_stub.h include/grpc++/impl/proto_utils.h include/grpc++/impl/rpc_method.h include/grpc++/impl/rpc_service_method.h include/grpc++/impl/serialization_traits.h include/grpc++/impl/service_type.h include/grpc++/impl/sync.h include/grpc++/impl/sync_cxx11.h include/grpc++/impl/sync_no_cxx11.h include/grpc++/impl/thd.h include/grpc++/impl/thd_cxx11.h include/grpc++/impl/thd_no_cxx11.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++/status_code_enum.h include/grpc++/stream.h include/grpc++/thread_pool_interface.h include/grpc++/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 48ae86c9331..a19f89ac7be 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -760,7 +760,7 @@ 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++/byte_buffer.h include/grpc++/channel_arguments.h include/grpc++/channel_interface.h include/grpc++/client_context.h include/grpc++/completion_queue.h include/grpc++/config.h include/grpc++/create_channel.h include/grpc++/credentials.h include/grpc++/generic_stub.h include/grpc++/impl/call.h include/grpc++/impl/client_unary_call.h include/grpc++/impl/grpc_library.h include/grpc++/impl/internal_stub.h include/grpc++/impl/rpc_method.h include/grpc++/impl/rpc_service_method.h include/grpc++/impl/serialization_traits.h include/grpc++/impl/service_type.h include/grpc++/impl/sync.h include/grpc++/impl/sync_cxx11.h include/grpc++/impl/sync_no_cxx11.h include/grpc++/impl/thd.h include/grpc++/impl/thd_cxx11.h include/grpc++/impl/thd_no_cxx11.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++/status_code_enum.h include/grpc++/stream.h include/grpc++/thread_pool_interface.h include/grpc++/time.h src/cpp/client/secure_credentials.h src/cpp/server/secure_server_credentials.h src/cpp/client/channel.h src/cpp/proto/proto_utils.h src/cpp/server/thread_pool.h src/cpp/client/secure_credentials.cc src/cpp/server/secure_server_credentials.cc src/cpp/client/channel.cc src/cpp/client/channel_arguments.cc src/cpp/client/client_context.cc src/cpp/client/create_channel.cc src/cpp/client/credentials.cc src/cpp/client/generic_stub.cc src/cpp/client/insecure_credentials.cc src/cpp/client/internal_stub.cc src/cpp/common/call.cc src/cpp/common/completion_queue.cc src/cpp/common/rpc_method.cc src/cpp/proto/proto_utils.cc src/cpp/server/async_generic_service.cc src/cpp/server/create_default_thread_pool.cc src/cpp/server/insecure_server_credentials.cc src/cpp/server/server.cc src/cpp/server/server_builder.cc src/cpp/server/server_context.cc src/cpp/server/server_credentials.cc src/cpp/server/thread_pool.cc src/cpp/util/byte_buffer.cc src/cpp/util/slice.cc src/cpp/util/status.cc src/cpp/util/time.cc +INPUT = 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_interface.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++/impl/call.h include/grpc++/impl/client_unary_call.h include/grpc++/impl/grpc_library.h include/grpc++/impl/internal_stub.h include/grpc++/impl/proto_utils.h include/grpc++/impl/rpc_method.h include/grpc++/impl/rpc_service_method.h include/grpc++/impl/serialization_traits.h include/grpc++/impl/service_type.h include/grpc++/impl/sync.h include/grpc++/impl/sync_cxx11.h include/grpc++/impl/sync_no_cxx11.h include/grpc++/impl/thd.h include/grpc++/impl/thd_cxx11.h include/grpc++/impl/thd_no_cxx11.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++/status_code_enum.h include/grpc++/stream.h include/grpc++/thread_pool_interface.h include/grpc++/time.h src/cpp/client/secure_credentials.h src/cpp/server/secure_server_credentials.h src/cpp/client/channel.h src/cpp/server/thread_pool.h src/cpp/client/secure_credentials.cc src/cpp/server/secure_server_credentials.cc src/cpp/client/channel.cc src/cpp/client/channel_arguments.cc src/cpp/client/client_context.cc src/cpp/client/create_channel.cc src/cpp/client/credentials.cc src/cpp/client/generic_stub.cc src/cpp/client/insecure_credentials.cc src/cpp/client/internal_stub.cc src/cpp/common/call.cc src/cpp/common/completion_queue.cc src/cpp/common/rpc_method.cc src/cpp/proto/proto_utils.cc src/cpp/server/async_generic_service.cc src/cpp/server/create_default_thread_pool.cc src/cpp/server/insecure_server_credentials.cc src/cpp/server/server.cc src/cpp/server/server_builder.cc src/cpp/server/server_context.cc src/cpp/server/server_credentials.cc src/cpp/server/thread_pool.cc src/cpp/util/byte_buffer.cc src/cpp/util/slice.cc src/cpp/util/status.cc src/cpp/util/time.cc # 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/vsprojects/grpc++/grpc++.vcxproj b/vsprojects/grpc++/grpc++.vcxproj index 092b962aa00..e7afd991899 100644 --- a/vsprojects/grpc++/grpc++.vcxproj +++ b/vsprojects/grpc++/grpc++.vcxproj @@ -154,6 +154,7 @@ + @@ -161,6 +162,7 @@ + @@ -186,7 +188,6 @@ - diff --git a/vsprojects/grpc++/grpc++.vcxproj.filters b/vsprojects/grpc++/grpc++.vcxproj.filters index f44fb87fbce..fb0bcab09dd 100644 --- a/vsprojects/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/grpc++/grpc++.vcxproj.filters @@ -105,6 +105,9 @@ include\grpc++ + + include\grpc++ + include\grpc++ @@ -126,6 +129,9 @@ include\grpc++\impl + + include\grpc++\impl + include\grpc++\impl @@ -197,9 +203,6 @@ src\cpp\client - - src\cpp\proto - src\cpp\server diff --git a/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj index aabbdc04e7f..639f904cce8 100644 --- a/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -154,6 +154,7 @@ + @@ -161,6 +162,7 @@ + @@ -184,7 +186,6 @@ - diff --git a/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 23efb25ebe0..974dc3e27a4 100644 --- a/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -99,6 +99,9 @@ include\grpc++ + + include\grpc++ + include\grpc++ @@ -120,6 +123,9 @@ include\grpc++\impl + + include\grpc++\impl + include\grpc++\impl @@ -185,9 +191,6 @@ src\cpp\client - - src\cpp\proto - src\cpp\server