GRPC C++  1.62.0
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_void, jobject context, absl::string_view package_name,
49  absl::string_view class_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 context, absl::string_view package_name,
68  absl::string_view class_name,
69  std::shared_ptr<grpc::experimental::binder::SecurityPolicy> security_policy,
70  const ChannelArguments& args);
71 
82 std::shared_ptr<grpc::Channel> CreateBinderChannel(
83  void* jni_env_void, jobject context, absl::string_view uri,
84  std::shared_ptr<grpc::experimental::binder::SecurityPolicy>
85  security_policy);
86 
98 std::shared_ptr<grpc::Channel> CreateCustomBinderChannel(
99  void* jni_env_void, jobject context, absl::string_view uri,
100  std::shared_ptr<grpc::experimental::binder::SecurityPolicy> security_policy,
101  const ChannelArguments& args);
102 
110 bool InitializeBinderChannelJavaClass(void* jni_env_void);
111 
118 bool InitializeBinderChannelJavaClass(
119  void* jni_env_void, std::function<void*(std::string)> class_finder);
120 
121 } // namespace experimental
122 } // namespace grpc
123 
124 #endif
125 
126 #endif // GRPCPP_CREATE_CHANNEL_BINDER_H
grpc
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm.h:33
binder_security_policy.h
channel_arguments.h
channel.h
port_platform.h