aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKarthik Ravi Shankar <karthikrs@google.com>2020-07-13 14:57:01 -0700
committerKarthik Ravi Shankar <karthikrs@google.com>2020-07-13 14:57:01 -0700
commitf9fac8a6b7ca7a7c660decf9d29b6c32a6691c3e (patch)
tree77c1a3cc5b2668e8ca99104934e9b78c9f96ff8a /include
parent6ff6066dd59aff38fec77a25127427609983b650 (diff)
downloadgrpc-grpc-f9fac8a6b7ca7a7c660decf9d29b6c32a6691c3e.tar.gz
Move ProtoServerReflectionPlugin from grpc_impl to grpc namespace
Reverts: https://github.com/grpc/grpc/pull/18600
Diffstat (limited to 'include')
-rw-r--r--include/grpcpp/ext/proto_server_reflection_plugin.h32
-rw-r--r--include/grpcpp/ext/proto_server_reflection_plugin_impl.h55
2 files changed, 25 insertions, 62 deletions
diff --git a/include/grpcpp/ext/proto_server_reflection_plugin.h b/include/grpcpp/ext/proto_server_reflection_plugin.h
index f6f2202ffb..14b58cdfe0 100644
--- a/include/grpcpp/ext/proto_server_reflection_plugin.h
+++ b/include/grpcpp/ext/proto_server_reflection_plugin.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2019 gRPC authors.
+ * Copyright 2015 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,17 +19,35 @@
#ifndef GRPCPP_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H
#define GRPCPP_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H
-#include <grpcpp/ext/proto_server_reflection_plugin_impl.h>
+#include <grpcpp/impl/server_builder_plugin.h>
+#include <grpcpp/support/config.h>
+
+namespace grpc_impl {
+class ServerInitializer;
+} // namespace grpc_impl
namespace grpc {
+class ProtoServerReflection;
+
namespace reflection {
-typedef ::grpc_impl::reflection::ProtoServerReflectionPlugin
- ProtoServerReflectionPlugin;
+class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin {
+ public:
+ ProtoServerReflectionPlugin();
+ ::std::string name() override;
+ void InitServer(::grpc_impl::ServerInitializer* si) override;
+ void Finish(::grpc_impl::ServerInitializer* si) override;
+ void ChangeArguments(const ::std::string& name, void* value) override;
+ bool has_async_methods() const override;
+ bool has_sync_methods() const override;
+
+ private:
+ std::shared_ptr<grpc::ProtoServerReflection> reflection_service_;
+};
-static inline void InitProtoReflectionServerBuilderPlugin() {
- ::grpc_impl::reflection::InitProtoReflectionServerBuilderPlugin();
-}
+/// Add proto reflection plugin to \a ServerBuilder.
+/// This function should be called at the static initialization time.
+void InitProtoReflectionServerBuilderPlugin();
} // namespace reflection
} // namespace grpc
diff --git a/include/grpcpp/ext/proto_server_reflection_plugin_impl.h b/include/grpcpp/ext/proto_server_reflection_plugin_impl.h
deleted file mode 100644
index bc51c2dda3..0000000000
--- a/include/grpcpp/ext/proto_server_reflection_plugin_impl.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- * Copyright 2015 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef GRPCPP_EXT_PROTO_SERVER_REFLECTION_PLUGIN_IMPL_H
-#define GRPCPP_EXT_PROTO_SERVER_REFLECTION_PLUGIN_IMPL_H
-
-#include <grpcpp/impl/server_builder_plugin.h>
-#include <grpcpp/support/config.h>
-
-namespace grpc {
-class ProtoServerReflection;
-} // namespace grpc
-
-namespace grpc_impl {
-class ServerInitializer;
-
-namespace reflection {
-
-class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin {
- public:
- ProtoServerReflectionPlugin();
- ::std::string name() override;
- void InitServer(::grpc_impl::ServerInitializer* si) override;
- void Finish(::grpc_impl::ServerInitializer* si) override;
- void ChangeArguments(const ::std::string& name, void* value) override;
- bool has_async_methods() const override;
- bool has_sync_methods() const override;
-
- private:
- std::shared_ptr<grpc::ProtoServerReflection> reflection_service_;
-};
-
-/// Add proto reflection plugin to \a ServerBuilder.
-/// This function should be called at the static initialization time.
-void InitProtoReflectionServerBuilderPlugin();
-
-} // namespace reflection
-} // namespace grpc_impl
-
-#endif // GRPCPP_EXT_PROTO_SERVER_REFLECTION_PLUGIN_IMPL_H