Move ServerBuilderOption from grpc to grpc_impl namespace

pull/18377/head
Karthik Ravi Shankar 6 years ago
parent a8f90b6df1
commit a88e3f4c2e
  1. 1
      BUILD
  2. 3
      CMakeLists.txt
  3. 3
      Makefile
  4. 1
      build.yaml
  5. 1
      gRPC-C++.podspec
  6. 19
      include/grpcpp/impl/server_builder_option.h
  7. 43
      include/grpcpp/impl/server_builder_option_impl.h

@ -235,6 +235,7 @@ GRPCXX_PUBLIC_HDRS = [
"include/grpcpp/impl/rpc_service_method.h",
"include/grpcpp/impl/serialization_traits.h",
"include/grpcpp/impl/server_builder_option.h",
"include/grpcpp/impl/server_builder_option_impl.h",
"include/grpcpp/impl/server_builder_plugin.h",
"include/grpcpp/impl/server_initializer.h",
"include/grpcpp/impl/service_type.h",

@ -3015,6 +3015,7 @@ foreach(_hdr
include/grpcpp/impl/rpc_service_method.h
include/grpcpp/impl/serialization_traits.h
include/grpcpp/impl/server_builder_option.h
include/grpcpp/impl/server_builder_option_impl.h
include/grpcpp/impl/server_builder_plugin.h
include/grpcpp/impl/server_initializer.h
include/grpcpp/impl/service_type.h
@ -3606,6 +3607,7 @@ foreach(_hdr
include/grpcpp/impl/rpc_service_method.h
include/grpcpp/impl/serialization_traits.h
include/grpcpp/impl/server_builder_option.h
include/grpcpp/impl/server_builder_option_impl.h
include/grpcpp/impl/server_builder_plugin.h
include/grpcpp/impl/server_initializer.h
include/grpcpp/impl/service_type.h
@ -4569,6 +4571,7 @@ foreach(_hdr
include/grpcpp/impl/rpc_service_method.h
include/grpcpp/impl/serialization_traits.h
include/grpcpp/impl/server_builder_option.h
include/grpcpp/impl/server_builder_option_impl.h
include/grpcpp/impl/server_builder_plugin.h
include/grpcpp/impl/server_initializer.h
include/grpcpp/impl/service_type.h

@ -5342,6 +5342,7 @@ PUBLIC_HEADERS_CXX += \
include/grpcpp/impl/rpc_service_method.h \
include/grpcpp/impl/serialization_traits.h \
include/grpcpp/impl/server_builder_option.h \
include/grpcpp/impl/server_builder_option_impl.h \
include/grpcpp/impl/server_builder_plugin.h \
include/grpcpp/impl/server_initializer.h \
include/grpcpp/impl/service_type.h \
@ -5941,6 +5942,7 @@ PUBLIC_HEADERS_CXX += \
include/grpcpp/impl/rpc_service_method.h \
include/grpcpp/impl/serialization_traits.h \
include/grpcpp/impl/server_builder_option.h \
include/grpcpp/impl/server_builder_option_impl.h \
include/grpcpp/impl/server_builder_plugin.h \
include/grpcpp/impl/server_initializer.h \
include/grpcpp/impl/service_type.h \
@ -6853,6 +6855,7 @@ PUBLIC_HEADERS_CXX += \
include/grpcpp/impl/rpc_service_method.h \
include/grpcpp/impl/serialization_traits.h \
include/grpcpp/impl/server_builder_option.h \
include/grpcpp/impl/server_builder_option_impl.h \
include/grpcpp/impl/server_builder_plugin.h \
include/grpcpp/impl/server_initializer.h \
include/grpcpp/impl/service_type.h \

@ -1360,6 +1360,7 @@ filegroups:
- include/grpcpp/impl/rpc_service_method.h
- include/grpcpp/impl/serialization_traits.h
- include/grpcpp/impl/server_builder_option.h
- include/grpcpp/impl/server_builder_option_impl.h
- include/grpcpp/impl/server_builder_plugin.h
- include/grpcpp/impl/server_initializer.h
- include/grpcpp/impl/service_type.h

@ -101,6 +101,7 @@ Pod::Spec.new do |s|
'include/grpcpp/impl/rpc_service_method.h',
'include/grpcpp/impl/serialization_traits.h',
'include/grpcpp/impl/server_builder_option.h',
'include/grpcpp/impl/server_builder_option_impl.h',
'include/grpcpp/impl/server_builder_plugin.h',
'include/grpcpp/impl/server_initializer.h',
'include/grpcpp/impl/service_type.h',

@ -1,6 +1,6 @@
/*
*
* Copyright 2015 gRPC authors.
* Copyright 2019 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,24 +19,11 @@
#ifndef GRPCPP_IMPL_SERVER_BUILDER_OPTION_H
#define GRPCPP_IMPL_SERVER_BUILDER_OPTION_H
#include <map>
#include <memory>
#include <grpcpp/impl/server_builder_plugin.h>
#include <grpcpp/support/channel_arguments.h>
#include <grpcpp/impl/server_builder_option_impl.h>
namespace grpc {
/// Interface to pass an option to a \a ServerBuilder.
class ServerBuilderOption {
public:
virtual ~ServerBuilderOption() {}
/// Alter the \a ChannelArguments used to create the gRPC server.
virtual void UpdateArguments(ChannelArguments* args) = 0;
/// Alter the ServerBuilderPlugin map that will be added into ServerBuilder.
virtual void UpdatePlugins(
std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins) = 0;
};
typedef ::grpc_impl::ServerBuilderOption ServerBuilderOption;
} // namespace grpc

@ -0,0 +1,43 @@
/*
*
* 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_IMPL_SERVER_BUILDER_OPTION_IMPL_H
#define GRPCPP_IMPL_SERVER_BUILDER_OPTION_IMPL_H
#include <map>
#include <memory>
#include <grpcpp/impl/server_builder_plugin.h>
#include <grpcpp/support/channel_arguments.h>
namespace grpc_impl {
/// Interface to pass an option to a \a ServerBuilder.
class ServerBuilderOption {
public:
virtual ~ServerBuilderOption() {}
/// Alter the \a ChannelArguments used to create the gRPC server.
virtual void UpdateArguments(grpc::ChannelArguments* args) = 0;
/// Alter the ServerBuilderPlugin map that will be added into ServerBuilder.
virtual void UpdatePlugins(
std::vector<std::unique_ptr<grpc::ServerBuilderPlugin>>* plugins) = 0;
};
} // namespace grpc_impl
#endif // GRPCPP_IMPL_SERVER_BUILDER_OPTION_IMPL_H
Loading…
Cancel
Save