Fix build errors

pull/18444/head
Karthik Ravi Shankar 6 years ago
parent be9479542c
commit 2049b6c2bd
  1. 1
      include/grpcpp/security/credentials.h
  2. 14
      include/grpcpp/security/credentials_impl.h
  3. 2
      src/cpp/client/insecure_credentials.cc
  4. 2
      src/cpp/client/secure_credentials.cc

@ -22,7 +22,6 @@
#include <grpcpp/security/credentials_impl.h> #include <grpcpp/security/credentials_impl.h>
namespace grpc { namespace grpc {
class Channel;
typedef ::grpc_impl::ChannelCredentials ChannelCredentials; typedef ::grpc_impl::ChannelCredentials ChannelCredentials;
typedef ::grpc_impl::CallCredentials CallCredentials; typedef ::grpc_impl::CallCredentials CallCredentials;

@ -34,23 +34,23 @@ struct grpc_call;
namespace grpc { namespace grpc {
class ChannelArguments; class ChannelArguments;
class Channel;
} // namespace grpc } // namespace grpc
namespace grpc_impl { namespace grpc_impl {
class Channel;
class ChannelCredentials; class ChannelCredentials;
class CallCredentials; class CallCredentials;
class SecureCallCredentials; class SecureCallCredentials;
class SecureChannelCredentials; class SecureChannelCredentials;
std::shared_ptr<grpc::Channel> CreateCustomChannelImpl( std::shared_ptr<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<grpc::Channel> CreateCustomChannelWithInterceptors( std::shared_ptr<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<grpc::Channel> CreateCustomChannelImpl( friend std::shared_ptr<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<grpc::Channel> friend std::shared_ptr<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<grpc::Channel> CreateChannelImpl( virtual std::shared_ptr<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<grpc::Channel> CreateChannelWithInterceptors( virtual std::shared_ptr<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>>

@ -31,7 +31,7 @@ namespace grpc_impl {
namespace { namespace {
class InsecureChannelCredentialsImpl final : public ChannelCredentials { class InsecureChannelCredentialsImpl final : public ChannelCredentials {
public: public:
std::shared_ptr<grpc::Channel> CreateChannelImpl( std::shared_ptr<grpc::Channel> CreateChannel(
const grpc::string& target, const grpc::ChannelArguments& args) override { const grpc::string& target, const grpc::ChannelArguments& args) override {
return CreateChannelWithInterceptors( return CreateChannelWithInterceptors(
target, args, target, args,

@ -34,7 +34,7 @@ SecureChannelCredentials::SecureChannelCredentials(
g_gli_initializer.summon(); g_gli_initializer.summon();
} }
std::shared_ptr<grpc::Channel> SecureChannelCredentials::CreateChannelImpl( std::shared_ptr<grpc::Channel> SecureChannelCredentials::CreateChannel(
const grpc::string& target, const grpc::ChannelArguments& args) { const grpc::string& target, const grpc::ChannelArguments& args) {
return CreateChannelWithInterceptors( return CreateChannelWithInterceptors(
target, args, target, args,

Loading…
Cancel
Save