diff options
author | Muxi Yan <mxyan@google.com> | 2018-01-26 15:39:32 -0800 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2018-02-15 14:49:34 -0800 |
commit | 0e00c430827e81d61e1e7164ef04ca21ccbfaa77 (patch) | |
tree | 9246301d4f3583a4befd834f7ea426663b8eb622 /include/grpc++/ext | |
parent | 8224c45866c6a2cfa29ede0c91a6ae9f40572658 (diff) |
Move headers from grpc++ to grpcpp
Diffstat (limited to 'include/grpc++/ext')
-rw-r--r-- | include/grpc++/ext/health_check_service_server_builder_option.h | 31 | ||||
-rw-r--r-- | include/grpc++/ext/proto_server_reflection_plugin.h | 38 |
2 files changed, 12 insertions, 57 deletions
diff --git a/include/grpc++/ext/health_check_service_server_builder_option.h b/include/grpc++/ext/health_check_service_server_builder_option.h index 89af294aa9..cb82fc03b6 100644 --- a/include/grpc++/ext/health_check_service_server_builder_option.h +++ b/include/grpc++/ext/health_check_service_server_builder_option.h @@ -1,6 +1,6 @@ /* * - * Copyright 2016 gRPC authors. + * Copyright 2018 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,32 +16,13 @@ * */ +// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the +// headers in include/grpcpp instead. This header exists only for backwards +// compatibility. + #ifndef GRPCXX_EXT_HEALTH_CHECK_SERVICE_SERVER_BUILDER_OPTION_H #define GRPCXX_EXT_HEALTH_CHECK_SERVICE_SERVER_BUILDER_OPTION_H -#include <memory> - -#include <grpc++/health_check_service_interface.h> -#include <grpc++/impl/server_builder_option.h> -#include <grpc++/support/config.h> - -namespace grpc { - -class HealthCheckServiceServerBuilderOption : public ServerBuilderOption { - public: - /// The ownership of \a hc will be taken and transferred to the grpc server. - /// To explicitly disable default service, pass in a nullptr. - explicit HealthCheckServiceServerBuilderOption( - std::unique_ptr<HealthCheckServiceInterface> hc); - ~HealthCheckServiceServerBuilderOption() override {} - void UpdateArguments(ChannelArguments* args) override; - void UpdatePlugins( - std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins) override; - - private: - std::unique_ptr<HealthCheckServiceInterface> hc_; -}; - -} // namespace grpc +#include <grpcpp/ext/health_check_service_server_builder_option.h> #endif // GRPCXX_EXT_HEALTH_CHECK_SERVICE_SERVER_BUILDER_OPTION_H diff --git a/include/grpc++/ext/proto_server_reflection_plugin.h b/include/grpc++/ext/proto_server_reflection_plugin.h index ee3fafd7da..02e21b9219 100644 --- a/include/grpc++/ext/proto_server_reflection_plugin.h +++ b/include/grpc++/ext/proto_server_reflection_plugin.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015 gRPC authors. + * Copyright 2018 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,39 +16,13 @@ * */ +// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the +// headers in include/grpcpp instead. This header exists only for backwards +// compatibility. + #ifndef GRPCXX_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H #define GRPCXX_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H -#include <grpc++/impl/server_builder_plugin.h> -#include <grpc++/support/config.h> - -namespace grpc { -class ServerInitializer; -class ProtoServerReflection; -} // namespace grpc - -namespace grpc { -namespace reflection { - -class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { - public: - ProtoServerReflectionPlugin(); - ::grpc::string name() override; - void InitServer(::grpc::ServerInitializer* si) override; - void Finish(::grpc::ServerInitializer* si) override; - void ChangeArguments(const ::grpc::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 +#include <grpcpp/ext/proto_server_reflection_plugin.h> #endif // GRPCXX_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H |