diff options
author | David Garcia Quintas <dgq@google.com> | 2016-01-27 20:07:36 -0800 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2016-01-27 20:07:36 -0800 |
commit | 6523391782281411cdbcf05f568a60e81f70728e (patch) | |
tree | a8be1678463bdc4f5329e0758a9ce315ddd5db2a /include/grpc++/impl/codegen | |
parent | b4e51b52bdd3a41f44e4959d08957f7142c9c56a (diff) |
sanity fixes
Diffstat (limited to 'include/grpc++/impl/codegen')
-rw-r--r-- | include/grpc++/impl/codegen/async_unary_call.h | 9 | ||||
-rw-r--r-- | include/grpc++/impl/codegen/client_unary_call.h | 3 | ||||
-rw-r--r-- | include/grpc++/impl/codegen/method_handler_impl.h | 32 | ||||
-rw-r--r-- | include/grpc++/impl/codegen/service_type.h | 6 | ||||
-rw-r--r-- | include/grpc++/impl/codegen/sync_stream.h | 3 |
5 files changed, 20 insertions, 33 deletions
diff --git a/include/grpc++/impl/codegen/async_unary_call.h b/include/grpc++/impl/codegen/async_unary_call.h index 39e18415ac..481b20b535 100644 --- a/include/grpc++/impl/codegen/async_unary_call.h +++ b/include/grpc++/impl/codegen/async_unary_call.h @@ -92,12 +92,10 @@ class ClientAsyncResponseReader GRPC_FINAL ClientContext* context_; Call call_; SneakyCallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, - CallOpClientSendClose> - init_buf_; + CallOpClientSendClose> init_buf_; CallOpSet<CallOpRecvInitialMetadata> meta_buf_; CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>, - CallOpClientRecvStatus> - finish_buf_; + CallOpClientRecvStatus> finish_buf_; }; template <class W> @@ -150,8 +148,7 @@ class ServerAsyncResponseWriter GRPC_FINAL ServerContext* ctx_; CallOpSet<CallOpSendInitialMetadata> meta_buf_; CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, - CallOpServerSendStatus> - finish_buf_; + CallOpServerSendStatus> finish_buf_; }; } // namespace grpc diff --git a/include/grpc++/impl/codegen/client_unary_call.h b/include/grpc++/impl/codegen/client_unary_call.h index 817a98ac1f..0134dec800 100644 --- a/include/grpc++/impl/codegen/client_unary_call.h +++ b/include/grpc++/impl/codegen/client_unary_call.h @@ -55,8 +55,7 @@ Status BlockingUnaryCall(ChannelInterface* channel, const RpcMethod& method, Call call(channel->CreateCall(method, context, &cq)); CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, CallOpRecvInitialMetadata, CallOpRecvMessage<OutputMessage>, - CallOpClientSendClose, CallOpClientRecvStatus> - ops; + CallOpClientSendClose, CallOpClientRecvStatus> ops; Status status = ops.SendMessage(request); if (!status.ok()) { return status; diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h index ad65ce9484..1bf9bf0549 100644 --- a/include/grpc++/impl/codegen/method_handler_impl.h +++ b/include/grpc++/impl/codegen/method_handler_impl.h @@ -43,10 +43,10 @@ namespace grpc { template <class ServiceType, class RequestType, class ResponseType> class RpcMethodHandler : public MethodHandler { public: - RpcMethodHandler(std::function<Status(ServiceType*, ServerContext*, - const RequestType*, ResponseType*)> - func, - ServiceType* service) + RpcMethodHandler( + std::function<Status(ServiceType*, ServerContext*, const RequestType*, + ResponseType*)> func, + ServiceType* service) : func_(func), service_(service) {} void RunHandler(const HandlerParameter& param) GRPC_FINAL { @@ -60,8 +60,7 @@ class RpcMethodHandler : public MethodHandler { GPR_ASSERT(!param.server_context->sent_initial_metadata_); CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, - CallOpServerSendStatus> - ops; + CallOpServerSendStatus> ops; ops.SendInitialMetadata(param.server_context->initial_metadata_); if (status.ok()) { status = ops.SendMessage(rsp); @@ -74,8 +73,7 @@ class RpcMethodHandler : public MethodHandler { private: // Application provided rpc handler function. std::function<Status(ServiceType*, ServerContext*, const RequestType*, - ResponseType*)> - func_; + ResponseType*)> func_; // The class the above handler function lives in. ServiceType* service_; }; @@ -86,8 +84,7 @@ class ClientStreamingHandler : public MethodHandler { public: ClientStreamingHandler( std::function<Status(ServiceType*, ServerContext*, - ServerReader<RequestType>*, ResponseType*)> - func, + ServerReader<RequestType>*, ResponseType*)> func, ServiceType* service) : func_(func), service_(service) {} @@ -98,8 +95,7 @@ class ClientStreamingHandler : public MethodHandler { GPR_ASSERT(!param.server_context->sent_initial_metadata_); CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, - CallOpServerSendStatus> - ops; + CallOpServerSendStatus> ops; ops.SendInitialMetadata(param.server_context->initial_metadata_); if (status.ok()) { status = ops.SendMessage(rsp); @@ -111,8 +107,7 @@ class ClientStreamingHandler : public MethodHandler { private: std::function<Status(ServiceType*, ServerContext*, ServerReader<RequestType>*, - ResponseType*)> - func_; + ResponseType*)> func_; ServiceType* service_; }; @@ -122,8 +117,7 @@ class ServerStreamingHandler : public MethodHandler { public: ServerStreamingHandler( std::function<Status(ServiceType*, ServerContext*, const RequestType*, - ServerWriter<ResponseType>*)> - func, + ServerWriter<ResponseType>*)> func, ServiceType* service) : func_(func), service_(service) {} @@ -148,8 +142,7 @@ class ServerStreamingHandler : public MethodHandler { private: std::function<Status(ServiceType*, ServerContext*, const RequestType*, - ServerWriter<ResponseType>*)> - func_; + ServerWriter<ResponseType>*)> func_; ServiceType* service_; }; @@ -180,8 +173,7 @@ class BidiStreamingHandler : public MethodHandler { private: std::function<Status(ServiceType*, ServerContext*, - ServerReaderWriter<ResponseType, RequestType>*)> - func_; + ServerReaderWriter<ResponseType, RequestType>*)> func_; ServiceType* service_; }; diff --git a/include/grpc++/impl/codegen/service_type.h b/include/grpc++/impl/codegen/service_type.h index 9e0a6fa2f7..deb91a41d9 100644 --- a/include/grpc++/impl/codegen/service_type.h +++ b/include/grpc++/impl/codegen/service_type.h @@ -34,10 +34,10 @@ #ifndef GRPCXX_IMPL_CODEGEN_SERVICE_TYPE_H #define GRPCXX_IMPL_CODEGEN_SERVICE_TYPE_H -#include <grpc++/impl/rpc_service_method.h> -#include <grpc++/impl/serialization_traits.h> -#include <grpc++/impl/codegen/server_interface.h> #include <grpc++/impl/codegen/config.h> +#include <grpc++/impl/codegen/rpc_service_method.h> +#include <grpc++/impl/codegen/serialization_traits.h> +#include <grpc++/impl/codegen/server_interface.h> #include <grpc++/impl/codegen/status.h> namespace grpc { diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h index b8cd44fb09..33d25e837c 100644 --- a/include/grpc++/impl/codegen/sync_stream.h +++ b/include/grpc++/impl/codegen/sync_stream.h @@ -122,8 +122,7 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface<R> { ClientContext* context, const W& request) : context_(context), call_(channel->CreateCall(method, context, &cq_)) { CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, - CallOpClientSendClose> - ops; + CallOpClientSendClose> ops; ops.SendInitialMetadata(context->send_initial_metadata_); // TODO(ctiller): don't assert GPR_ASSERT(ops.SendMessage(request).ok()); |