From 6abd20020b99514af9df381c72b509aeb88177a4 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Tue, 25 Jul 2017 00:43:30 -0700 Subject: Revert "Separate internal-only and public parts of C++ API" --- include/grpc++/impl/codegen/completion_queue.h | 56 +++++++++++--------------- 1 file changed, 24 insertions(+), 32 deletions(-) (limited to 'include/grpc++/impl/codegen/completion_queue.h') diff --git a/include/grpc++/impl/codegen/completion_queue.h b/include/grpc++/impl/codegen/completion_queue.h index a04778aa72..ca757e2a9c 100644 --- a/include/grpc++/impl/codegen/completion_queue.h +++ b/include/grpc++/impl/codegen/completion_queue.h @@ -56,19 +56,7 @@ class ServerWriter; namespace internal { template class ServerReaderWriterBody; -} // namespace internal - -class Channel; -class ChannelInterface; -class ClientContext; -class CompletionQueue; -class Server; -class ServerBuilder; -class ServerContext; - -namespace internal { -class CompletionQueueTag; -class RpcMethod; +} template class RpcMethodHandler; template @@ -78,13 +66,16 @@ class ServerStreamingHandler; template class BidiStreamingHandler; class UnknownMethodHandler; -template -class TemplatedBidiStreamingHandler; -template -Status BlockingUnaryCall(ChannelInterface* channel, const RpcMethod& method, - ClientContext* context, const InputMessage& request, - OutputMessage* result); -} // namespace internal + +class Channel; +class ChannelInterface; +class ClientContext; +class CompletionQueueTag; +class CompletionQueue; +class RpcMethod; +class Server; +class ServerBuilder; +class ServerContext; extern CoreCodegenInterface* g_core_codegen_interface; @@ -205,27 +196,28 @@ class CompletionQueue : private GrpcLibraryCodegen { template friend class ::grpc::internal::ServerReaderWriterBody; template - friend class ::grpc::internal::RpcMethodHandler; + friend class RpcMethodHandler; template - friend class ::grpc::internal::ClientStreamingHandler; + friend class ClientStreamingHandler; template - friend class ::grpc::internal::ServerStreamingHandler; + friend class ServerStreamingHandler; template - friend class ::grpc::internal::TemplatedBidiStreamingHandler; - friend class ::grpc::internal::UnknownMethodHandler; + friend class TemplatedBidiStreamingHandler; + friend class UnknownMethodHandler; friend class ::grpc::Server; friend class ::grpc::ServerContext; template - friend Status(::grpc::internal::BlockingUnaryCall)( - ChannelInterface* channel, const internal::RpcMethod& method, - ClientContext* context, const InputMessage& request, - OutputMessage* result); + friend Status BlockingUnaryCall(ChannelInterface* channel, + const RpcMethod& method, + ClientContext* context, + const InputMessage& request, + OutputMessage* result); NextStatus AsyncNextInternal(void** tag, bool* ok, gpr_timespec deadline); /// Wraps \a grpc_completion_queue_pluck. /// \warning Must not be mixed with calls to \a Next. - bool Pluck(internal::CompletionQueueTag* tag) { + bool Pluck(CompletionQueueTag* tag) { auto deadline = g_core_codegen_interface->gpr_inf_future(GPR_CLOCK_REALTIME); auto ev = g_core_codegen_interface->grpc_completion_queue_pluck( @@ -246,7 +238,7 @@ class CompletionQueue : private GrpcLibraryCodegen { /// implementation to simple call the other TryPluck function with a zero /// timeout. i.e: /// TryPluck(tag, gpr_time_0(GPR_CLOCK_REALTIME)) - void TryPluck(internal::CompletionQueueTag* tag) { + void TryPluck(CompletionQueueTag* tag) { auto deadline = g_core_codegen_interface->gpr_time_0(GPR_CLOCK_REALTIME); auto ev = g_core_codegen_interface->grpc_completion_queue_pluck( cq_, tag, deadline, nullptr); @@ -262,7 +254,7 @@ class CompletionQueue : private GrpcLibraryCodegen { /// /// This exects tag->FinalizeResult (if called) to return 'false' i.e expects /// that the tag is internal not something that is returned to the user. - void TryPluck(internal::CompletionQueueTag* tag, gpr_timespec deadline) { + void TryPluck(CompletionQueueTag* tag, gpr_timespec deadline) { auto ev = g_core_codegen_interface->grpc_completion_queue_pluck( cq_, tag, deadline, nullptr); if (ev.type == GRPC_QUEUE_TIMEOUT || ev.type == GRPC_QUEUE_SHUTDOWN) { -- cgit v1.2.3