create_channel_binder.h
Go to the documentation of this file.
1 // Copyright 2021 gRPC authors.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef GRPCPP_CREATE_CHANNEL_BINDER_H
16 #define GRPCPP_CREATE_CHANNEL_BINDER_H
17 
19 
20 #ifdef GPR_ANDROID
21 
22 #include <jni.h>
23 
24 #include <memory>
25 
26 #include "absl/strings/string_view.h"
27 
28 #include <grpcpp/channel.h>
31 
32 namespace grpc {
33 namespace experimental {
34 
47 std::shared_ptr<grpc::Channel> CreateBinderChannel(
48  void* jni_env, jobject context, absl::string_view package_name,
50  std::shared_ptr<grpc::experimental::binder::SecurityPolicy>
51  security_policy);
52 
66 std::shared_ptr<grpc::Channel> CreateCustomBinderChannel(
67  void* jni_env_void, jobject application, absl::string_view package_name,
69  std::shared_ptr<grpc::experimental::binder::SecurityPolicy> security_policy,
70  const ChannelArguments& args);
71 
79 bool InitializeBinderChannelJavaClass(void* jni_env_void);
80 
87 bool InitializeBinderChannelJavaClass(
88  void* jni_env_void, std::function<void*(std::string)> class_finder);
89 
90 } // namespace experimental
91 } // namespace grpc
92 
93 #endif
94 
95 #endif // GRPCPP_CREATE_CHANNEL_BINDER_H
grpc
Definition: grpcpp/alarm.h:33
grpc::testing::CreateBinderChannel
std::shared_ptr< grpc::Channel > CreateBinderChannel(std::unique_ptr< grpc_binder::Binder > endpoint_binder)
Definition: binder_server_test.cc:70
absl::string_view
Definition: abseil-cpp/absl/strings/string_view.h:167
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
binder_security_policy.h
asyncio_get_stats.args
args
Definition: asyncio_get_stats.py:40
channel_arguments.h
channel.h
class_name
static const char * class_name(int dnsclass)
Definition: adig.c:901
context
grpc::ClientContext context
Definition: istio_echo_server_lib.cc:61
function
std::function< bool(GrpcTool *, int, const char **, const CliCredentials &, GrpcToolOutputCallback)> function
Definition: grpc_tool.cc:250
port_platform.h


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:59