diff options
Diffstat (limited to 'include/grpc++/impl')
-rw-r--r-- | include/grpc++/impl/call.h | 14 | ||||
-rw-r--r-- | include/grpc++/impl/client_unary_call.h | 11 | ||||
-rw-r--r-- | include/grpc++/impl/rpc_method.h | 6 | ||||
-rw-r--r-- | include/grpc++/impl/rpc_service_method.h | 20 | ||||
-rw-r--r-- | include/grpc++/impl/service_type.h | 12 |
5 files changed, 22 insertions, 41 deletions
diff --git a/include/grpc++/impl/call.h b/include/grpc++/impl/call.h index 3e199e3eae..5de5662973 100644 --- a/include/grpc++/impl/call.h +++ b/include/grpc++/impl/call.h @@ -42,12 +42,6 @@ #include <memory> #include <map> -namespace google { -namespace protobuf { -class Message; -} // namespace protobuf -} // namespace google - struct grpc_call; struct grpc_op; @@ -67,8 +61,8 @@ class CallOpBuffer : public CompletionQueueTag { std::multimap<grpc::string, grpc::string> *metadata); void AddSendInitialMetadata(ClientContext *ctx); void AddRecvInitialMetadata(ClientContext *ctx); - void AddSendMessage(const google::protobuf::Message &message); - void AddRecvMessage(google::protobuf::Message *message); + void AddSendMessage(const grpc::protobuf::Message &message); + void AddRecvMessage(grpc::protobuf::Message *message); void AddClientSendClose(); void AddClientRecvStatus(ClientContext *ctx, Status *status); void AddServerSendStatus(std::multimap<grpc::string, grpc::string> *metadata, @@ -95,10 +89,10 @@ class CallOpBuffer : public CompletionQueueTag { std::multimap<grpc::string, grpc::string> *recv_initial_metadata_; grpc_metadata_array recv_initial_metadata_arr_; // Send message - const google::protobuf::Message *send_message_; + const grpc::protobuf::Message *send_message_; grpc_byte_buffer *send_message_buf_; // Recv message - google::protobuf::Message *recv_message_; + grpc::protobuf::Message *recv_message_; grpc_byte_buffer *recv_message_buf_; // Client send close bool client_send_close_; diff --git a/include/grpc++/impl/client_unary_call.h b/include/grpc++/impl/client_unary_call.h index d8703264e6..23cf3a66df 100644 --- a/include/grpc++/impl/client_unary_call.h +++ b/include/grpc++/impl/client_unary_call.h @@ -34,11 +34,8 @@ #ifndef GRPCXX_IMPL_CLIENT_UNARY_CALL_H #define GRPCXX_IMPL_CLIENT_UNARY_CALL_H -namespace google { -namespace protobuf { -class Message; -} // namespace protobuf -} // namespace google + +#include <grpc++/config.h> namespace grpc { @@ -51,8 +48,8 @@ class Status; // Wrapper that performs a blocking unary call Status BlockingUnaryCall(ChannelInterface *channel, const RpcMethod &method, ClientContext *context, - const google::protobuf::Message &request, - google::protobuf::Message *result); + const grpc::protobuf::Message &request, + grpc::protobuf::Message *result); } // namespace grpc diff --git a/include/grpc++/impl/rpc_method.h b/include/grpc++/impl/rpc_method.h index ab407f5c46..e8909ac184 100644 --- a/include/grpc++/impl/rpc_method.h +++ b/include/grpc++/impl/rpc_method.h @@ -34,12 +34,6 @@ #ifndef GRPCXX_IMPL_RPC_METHOD_H #define GRPCXX_IMPL_RPC_METHOD_H -namespace google { -namespace protobuf { -class Message; -} // namespace protobuf -} // namespace google - namespace grpc { class RpcMethod { diff --git a/include/grpc++/impl/rpc_service_method.h b/include/grpc++/impl/rpc_service_method.h index ff94c7e6c0..325c8812ca 100644 --- a/include/grpc++/impl/rpc_service_method.h +++ b/include/grpc++/impl/rpc_service_method.h @@ -56,13 +56,13 @@ class MethodHandler { virtual ~MethodHandler() {} struct HandlerParameter { HandlerParameter(Call* c, ServerContext* context, - const google::protobuf::Message* req, - google::protobuf::Message* resp) + const grpc::protobuf::Message* req, + grpc::protobuf::Message* resp) : call(c), server_context(context), request(req), response(resp) {} Call* call; ServerContext* server_context; - const google::protobuf::Message* request; - google::protobuf::Message* response; + const grpc::protobuf::Message* request; + grpc::protobuf::Message* response; }; virtual Status RunHandler(const HandlerParameter& param) = 0; }; @@ -165,8 +165,8 @@ class RpcServiceMethod : public RpcMethod { // Takes ownership of the handler and two prototype objects. RpcServiceMethod(const char* name, RpcMethod::RpcType type, MethodHandler* handler, - google::protobuf::Message* request_prototype, - google::protobuf::Message* response_prototype) + grpc::protobuf::Message* request_prototype, + grpc::protobuf::Message* response_prototype) : RpcMethod(name, type), handler_(handler), request_prototype_(request_prototype), @@ -174,17 +174,17 @@ class RpcServiceMethod : public RpcMethod { MethodHandler* handler() { return handler_.get(); } - google::protobuf::Message* AllocateRequestProto() { + grpc::protobuf::Message* AllocateRequestProto() { return request_prototype_->New(); } - google::protobuf::Message* AllocateResponseProto() { + grpc::protobuf::Message* AllocateResponseProto() { return response_prototype_->New(); } private: std::unique_ptr<MethodHandler> handler_; - std::unique_ptr<google::protobuf::Message> request_prototype_; - std::unique_ptr<google::protobuf::Message> response_prototype_; + std::unique_ptr<grpc::protobuf::Message> request_prototype_; + std::unique_ptr<grpc::protobuf::Message> response_prototype_; }; // This class contains all the method information for an rpc service. It is diff --git a/include/grpc++/impl/service_type.h b/include/grpc++/impl/service_type.h index 7481d64d6a..7cd3ddad6b 100644 --- a/include/grpc++/impl/service_type.h +++ b/include/grpc++/impl/service_type.h @@ -34,11 +34,7 @@ #ifndef GRPCXX_IMPL_SERVICE_TYPE_H #define GRPCXX_IMPL_SERVICE_TYPE_H -namespace google { -namespace protobuf { -class Message; -} // namespace protobuf -} // namespace google +#include <grpc++/config.h> namespace grpc { @@ -72,7 +68,7 @@ class AsynchronousService { public: virtual void RequestAsyncCall(void* registered_method, ServerContext* context, - ::google::protobuf::Message* request, + ::grpc::protobuf::Message* request, ServerAsyncStreamingInterface* stream, CompletionQueue* cq, void* tag) = 0; }; @@ -91,7 +87,7 @@ class AsynchronousService { protected: void RequestAsyncUnary(int index, ServerContext* context, - ::google::protobuf::Message* request, + grpc::protobuf::Message* request, ServerAsyncStreamingInterface* stream, CompletionQueue* cq, void* tag) { dispatch_impl_->RequestAsyncCall(request_args_[index], context, request, @@ -104,7 +100,7 @@ class AsynchronousService { stream, cq, tag); } void RequestServerStreaming(int index, ServerContext* context, - ::google::protobuf::Message* request, + grpc::protobuf::Message* request, ServerAsyncStreamingInterface* stream, CompletionQueue* cq, void* tag) { dispatch_impl_->RequestAsyncCall(request_args_[index], context, request, |