cronet_credentials.cc
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2016 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #include <grpc/grpc_cronet.h>
20 #include <grpcpp/channel.h>
23 
25 
26 namespace grpc {
27 
29  public:
30  CronetChannelCredentialsImpl(void* engine) : engine_(engine) {}
31 
32  std::shared_ptr<grpc::Channel> CreateChannelImpl(
33  const string& target, const grpc::ChannelArguments& args) override {
35  target, args,
36  std::vector<std::unique_ptr<
38  }
39 
40  SecureChannelCredentials* AsSecureCredentials() override { return nullptr; }
41 
42  private:
43  std::shared_ptr<grpc::Channel> CreateChannelWithInterceptors(
44  const string& target, const grpc::ChannelArguments& args,
45  std::vector<
46  std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
47  interceptor_creators) override {
48  grpc_channel_args channel_args;
49  args.SetChannelArgs(&channel_args);
50  return CreateChannelInternal(
51  "",
53  &channel_args, nullptr),
54  std::move(interceptor_creators));
55  }
56  void* engine_;
57 };
58 
59 std::shared_ptr<ChannelCredentials> CronetChannelCredentials(void* engine) {
60  return std::shared_ptr<ChannelCredentials>(
62 }
63 } // namespace grpc
grpc::CreateChannelInternal
std::shared_ptr< Channel > CreateChannelInternal(const std::string &host, grpc_channel *c_channel, std::vector< std::unique_ptr< experimental::ClientInterceptorFactoryInterface >> interceptor_creators)
create_channel_internal.h
grpc::CronetChannelCredentialsImpl::AsSecureCredentials
SecureChannelCredentials * AsSecureCredentials() override
Definition: cronet_credentials.cc:40
grpc
Definition: grpcpp/alarm.h:33
grpc::experimental::ClientInterceptorFactoryInterface
Definition: impl/codegen/client_interceptor.h:48
grpc::CronetChannelCredentialsImpl::CreateChannelImpl
std::shared_ptr< grpc::Channel > CreateChannelImpl(const string &target, const grpc::ChannelArguments &args) override
Definition: cronet_credentials.cc:32
grpc::CronetChannelCredentialsImpl
Definition: cronet_credentials.cc:28
grpc::ChannelCredentials
Definition: include/grpcpp/security/credentials.h:75
grpc_channel_args
Definition: grpc_types.h:132
grpc::CronetChannelCredentialsImpl::CronetChannelCredentialsImpl
CronetChannelCredentialsImpl(void *engine)
Definition: cronet_credentials.cc:30
asyncio_get_stats.args
args
Definition: asyncio_get_stats.py:40
absl::move
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
Definition: abseil-cpp/absl/utility/utility.h:221
channel_arguments.h
channel.h
grpc_cronet_secure_channel_create
GRPCAPI grpc_channel * grpc_cronet_secure_channel_create(void *engine, const char *target, const grpc_channel_args *args, void *reserved)
Definition: cronet_channel_create.cc:47
grpc::CronetChannelCredentialsImpl::CreateChannelWithInterceptors
std::shared_ptr< grpc::Channel > CreateChannelWithInterceptors(const string &target, const grpc::ChannelArguments &args, std::vector< std::unique_ptr< experimental::ClientInterceptorFactoryInterface >> interceptor_creators) override
Definition: cronet_credentials.cc:43
grpc::ChannelArguments
Definition: grpcpp/support/channel_arguments.h:39
credentials.h
grpc::SecureChannelCredentials
Definition: secure_credentials.h:49
grpc::CronetChannelCredentialsImpl::engine_
void * engine_
Definition: cronet_credentials.cc:56
grpc::CronetChannelCredentials
std::shared_ptr< ChannelCredentials > CronetChannelCredentials(void *engine)
Credentials for a channel using Cronet.
Definition: cronet_credentials.cc:59
setup.target
target
Definition: third_party/bloaty/third_party/protobuf/python/setup.py:179
grpc_cronet.h


grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:06