aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/impl/codegen/completion_queue.h
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2017-07-25 00:43:30 -0700
committerGravatar GitHub <noreply@github.com>2017-07-25 00:43:30 -0700
commit6abd20020b99514af9df381c72b509aeb88177a4 (patch)
tree57f023ebf29d0bf15c3288e1b4d7489bdde5b7d4 /include/grpc++/impl/codegen/completion_queue.h
parent2c12d506fa8113bf3c4ce5949c762a5a8d9e8ee5 (diff)
Revert "Separate internal-only and public parts of C++ API"
Diffstat (limited to 'include/grpc++/impl/codegen/completion_queue.h')
-rw-r--r--include/grpc++/impl/codegen/completion_queue.h56
1 files changed, 24 insertions, 32 deletions
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 W, class R>
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 ServiceType, class RequestType, class ResponseType>
class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
@@ -78,13 +66,16 @@ class ServerStreamingHandler;
template <class ServiceType, class RequestType, class ResponseType>
class BidiStreamingHandler;
class UnknownMethodHandler;
-template <class Streamer, bool WriteNeeded>
-class TemplatedBidiStreamingHandler;
-template <class InputMessage, class OutputMessage>
-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 <class W, class R>
friend class ::grpc::internal::ServerReaderWriterBody;
template <class ServiceType, class RequestType, class ResponseType>
- friend class ::grpc::internal::RpcMethodHandler;
+ friend class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
- friend class ::grpc::internal::ClientStreamingHandler;
+ friend class ClientStreamingHandler;
template <class ServiceType, class RequestType, class ResponseType>
- friend class ::grpc::internal::ServerStreamingHandler;
+ friend class ServerStreamingHandler;
template <class Streamer, bool WriteNeeded>
- 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 <class InputMessage, class OutputMessage>
- 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) {