Fix access to some CreateChannel/CreateCustomChannel methods

pull/18444/head
Karthik Ravi Shankar 6 years ago
parent 2049b6c2bd
commit df2c2c114c
  1. 4
      include/grpcpp/create_channel.h
  2. 12
      include/grpcpp/security/credentials_impl.h

@ -24,7 +24,7 @@
namespace grpc { namespace grpc {
static inline std::shared_ptr<Channel> CreateChannel( static inline std::shared_ptr<::grpc::Channel> CreateChannel(
const grpc::string& target, const grpc::string& target,
const std::shared_ptr<ChannelCredentials>& creds) { const std::shared_ptr<ChannelCredentials>& creds) {
return ::grpc_impl::CreateChannelImpl(target, creds); return ::grpc_impl::CreateChannelImpl(target, creds);
@ -39,7 +39,7 @@ static inline std::shared_ptr<::grpc::Channel> CreateCustomChannel(
namespace experimental { namespace experimental {
static inline std::shared_ptr<Channel> CreateCustomChannelWithInterceptors( static inline std::shared_ptr<::grpc::Channel> CreateCustomChannelWithInterceptors(
const grpc::string& target, const grpc::string& target,
const std::shared_ptr<ChannelCredentials>& creds, const std::shared_ptr<ChannelCredentials>& creds,
const ChannelArguments& args, const ChannelArguments& args,

@ -44,13 +44,13 @@ class CallCredentials;
class SecureCallCredentials; class SecureCallCredentials;
class SecureChannelCredentials; class SecureChannelCredentials;
std::shared_ptr<Channel> CreateCustomChannel( std::shared_ptr<::grpc::Channel> CreateCustomChannel(
const grpc::string& target, const grpc::string& target,
const std::shared_ptr<ChannelCredentials>& creds, const std::shared_ptr<ChannelCredentials>& creds,
const grpc::ChannelArguments& args); const grpc::ChannelArguments& args);
namespace experimental { namespace experimental {
std::shared_ptr<Channel> CreateCustomChannelWithInterceptors( std::shared_ptr<::grpc::Channel> CreateCustomChannelWithInterceptors(
const grpc::string& target, const grpc::string& target,
const std::shared_ptr<ChannelCredentials>& creds, const std::shared_ptr<ChannelCredentials>& creds,
const grpc::ChannelArguments& args, const grpc::ChannelArguments& args,
@ -78,12 +78,12 @@ class ChannelCredentials : private grpc::GrpcLibraryCodegen {
virtual SecureChannelCredentials* AsSecureCredentials() = 0; virtual SecureChannelCredentials* AsSecureCredentials() = 0;
private: private:
friend std::shared_ptr<Channel> CreateCustomChannel( friend std::shared_ptr<::grpc::Channel> CreateCustomChannel(
const grpc::string& target, const grpc::string& target,
const std::shared_ptr<ChannelCredentials>& creds, const std::shared_ptr<ChannelCredentials>& creds,
const grpc::ChannelArguments& args); const grpc::ChannelArguments& args);
friend std::shared_ptr<Channel> friend std::shared_ptr<::grpc::Channel>
grpc_impl::experimental::CreateCustomChannelWithInterceptors( grpc_impl::experimental::CreateCustomChannelWithInterceptors(
const grpc::string& target, const grpc::string& target,
const std::shared_ptr<ChannelCredentials>& creds, const std::shared_ptr<ChannelCredentials>& creds,
@ -92,12 +92,12 @@ class ChannelCredentials : private grpc::GrpcLibraryCodegen {
grpc::experimental::ClientInterceptorFactoryInterface>> grpc::experimental::ClientInterceptorFactoryInterface>>
interceptor_creators); interceptor_creators);
virtual std::shared_ptr<Channel> CreateChannel( virtual std::shared_ptr<::grpc::Channel> CreateChannel(
const grpc::string& target, const grpc::ChannelArguments& args) = 0; const grpc::string& target, const grpc::ChannelArguments& args) = 0;
// This function should have been a pure virtual function, but it is // This function should have been a pure virtual function, but it is
// implemented as a virtual function so that it does not break API. // implemented as a virtual function so that it does not break API.
virtual std::shared_ptr<Channel> CreateChannelWithInterceptors( virtual std::shared_ptr<::grpc::Channel> CreateChannelWithInterceptors(
const grpc::string& target, const grpc::ChannelArguments& args, const grpc::string& target, const grpc::ChannelArguments& args,
std::vector<std::unique_ptr< std::vector<std::unique_ptr<
grpc::experimental::ClientInterceptorFactoryInterface>> grpc::experimental::ClientInterceptorFactoryInterface>>

Loading…
Cancel
Save