2 #region Copyright notice and license
4 // Copyright 2015 gRPC authors.
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
10 // http://www.apache.org/licenses/LICENSE-2.0
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and
16 // limitations under the License.
21 using System.Collections.Concurrent;
22 using System.Diagnostics;
24 using System.Reflection;
25 using System.Runtime.InteropServices;
26 using System.Threading;
28 using Grpc.Core.Logging;
29 using Grpc.Core.Utils;
31 namespace Grpc.Core.Internal
33 internal partial class NativeMethods
35 #region Native methods
37 public readonly Delegates.grpcsharp_init_delegate grpcsharp_init;
38 public readonly Delegates.grpcsharp_shutdown_delegate grpcsharp_shutdown;
39 public readonly Delegates.grpcsharp_version_string_delegate grpcsharp_version_string;
40 public readonly Delegates.grpcsharp_batch_context_create_delegate grpcsharp_batch_context_create;
41 public readonly Delegates.grpcsharp_batch_context_recv_initial_metadata_delegate grpcsharp_batch_context_recv_initial_metadata;
42 public readonly Delegates.grpcsharp_batch_context_recv_message_length_delegate grpcsharp_batch_context_recv_message_length;
43 public readonly Delegates.grpcsharp_batch_context_recv_message_next_slice_peek_delegate grpcsharp_batch_context_recv_message_next_slice_peek;
44 public readonly Delegates.grpcsharp_batch_context_recv_status_on_client_status_delegate grpcsharp_batch_context_recv_status_on_client_status;
45 public readonly Delegates.grpcsharp_batch_context_recv_status_on_client_details_delegate grpcsharp_batch_context_recv_status_on_client_details;
46 public readonly Delegates.grpcsharp_batch_context_recv_status_on_client_error_string_delegate grpcsharp_batch_context_recv_status_on_client_error_string;
47 public readonly Delegates.grpcsharp_batch_context_recv_status_on_client_trailing_metadata_delegate grpcsharp_batch_context_recv_status_on_client_trailing_metadata;
48 public readonly Delegates.grpcsharp_batch_context_recv_close_on_server_cancelled_delegate grpcsharp_batch_context_recv_close_on_server_cancelled;
49 public readonly Delegates.grpcsharp_batch_context_reset_delegate grpcsharp_batch_context_reset;
50 public readonly Delegates.grpcsharp_batch_context_destroy_delegate grpcsharp_batch_context_destroy;
51 public readonly Delegates.grpcsharp_request_call_context_create_delegate grpcsharp_request_call_context_create;
52 public readonly Delegates.grpcsharp_request_call_context_call_delegate grpcsharp_request_call_context_call;
53 public readonly Delegates.grpcsharp_request_call_context_method_delegate grpcsharp_request_call_context_method;
54 public readonly Delegates.grpcsharp_request_call_context_host_delegate grpcsharp_request_call_context_host;
55 public readonly Delegates.grpcsharp_request_call_context_deadline_delegate grpcsharp_request_call_context_deadline;
56 public readonly Delegates.grpcsharp_request_call_context_request_metadata_delegate grpcsharp_request_call_context_request_metadata;
57 public readonly Delegates.grpcsharp_request_call_context_reset_delegate grpcsharp_request_call_context_reset;
58 public readonly Delegates.grpcsharp_request_call_context_destroy_delegate grpcsharp_request_call_context_destroy;
59 public readonly Delegates.grpcsharp_composite_call_credentials_create_delegate grpcsharp_composite_call_credentials_create;
60 public readonly Delegates.grpcsharp_call_credentials_release_delegate grpcsharp_call_credentials_release;
61 public readonly Delegates.grpcsharp_call_cancel_delegate grpcsharp_call_cancel;
62 public readonly Delegates.grpcsharp_call_cancel_with_status_delegate grpcsharp_call_cancel_with_status;
63 public readonly Delegates.grpcsharp_call_start_unary_delegate grpcsharp_call_start_unary;
64 public readonly Delegates.grpcsharp_call_start_client_streaming_delegate grpcsharp_call_start_client_streaming;
65 public readonly Delegates.grpcsharp_call_start_server_streaming_delegate grpcsharp_call_start_server_streaming;
66 public readonly Delegates.grpcsharp_call_start_duplex_streaming_delegate grpcsharp_call_start_duplex_streaming;
67 public readonly Delegates.grpcsharp_call_send_message_delegate grpcsharp_call_send_message;
68 public readonly Delegates.grpcsharp_call_send_close_from_client_delegate grpcsharp_call_send_close_from_client;
69 public readonly Delegates.grpcsharp_call_send_status_from_server_delegate grpcsharp_call_send_status_from_server;
70 public readonly Delegates.grpcsharp_call_recv_message_delegate grpcsharp_call_recv_message;
71 public readonly Delegates.grpcsharp_call_recv_initial_metadata_delegate grpcsharp_call_recv_initial_metadata;
72 public readonly Delegates.grpcsharp_call_start_serverside_delegate grpcsharp_call_start_serverside;
73 public readonly Delegates.grpcsharp_call_send_initial_metadata_delegate grpcsharp_call_send_initial_metadata;
74 public readonly Delegates.grpcsharp_call_set_credentials_delegate grpcsharp_call_set_credentials;
75 public readonly Delegates.grpcsharp_call_get_peer_delegate grpcsharp_call_get_peer;
76 public readonly Delegates.grpcsharp_call_destroy_delegate grpcsharp_call_destroy;
77 public readonly Delegates.grpcsharp_channel_args_create_delegate grpcsharp_channel_args_create;
78 public readonly Delegates.grpcsharp_channel_args_set_string_delegate grpcsharp_channel_args_set_string;
79 public readonly Delegates.grpcsharp_channel_args_set_integer_delegate grpcsharp_channel_args_set_integer;
80 public readonly Delegates.grpcsharp_channel_args_destroy_delegate grpcsharp_channel_args_destroy;
81 public readonly Delegates.grpcsharp_override_default_ssl_roots_delegate grpcsharp_override_default_ssl_roots;
82 public readonly Delegates.grpcsharp_ssl_credentials_create_delegate grpcsharp_ssl_credentials_create;
83 public readonly Delegates.grpcsharp_composite_channel_credentials_create_delegate grpcsharp_composite_channel_credentials_create;
84 public readonly Delegates.grpcsharp_channel_credentials_release_delegate grpcsharp_channel_credentials_release;
85 public readonly Delegates.grpcsharp_insecure_channel_create_delegate grpcsharp_insecure_channel_create;
86 public readonly Delegates.grpcsharp_secure_channel_create_delegate grpcsharp_secure_channel_create;
87 public readonly Delegates.grpcsharp_channel_create_call_delegate grpcsharp_channel_create_call;
88 public readonly Delegates.grpcsharp_channel_check_connectivity_state_delegate grpcsharp_channel_check_connectivity_state;
89 public readonly Delegates.grpcsharp_channel_watch_connectivity_state_delegate grpcsharp_channel_watch_connectivity_state;
90 public readonly Delegates.grpcsharp_channel_get_target_delegate grpcsharp_channel_get_target;
91 public readonly Delegates.grpcsharp_channel_destroy_delegate grpcsharp_channel_destroy;
92 public readonly Delegates.grpcsharp_sizeof_grpc_event_delegate grpcsharp_sizeof_grpc_event;
93 public readonly Delegates.grpcsharp_completion_queue_create_async_delegate grpcsharp_completion_queue_create_async;
94 public readonly Delegates.grpcsharp_completion_queue_create_sync_delegate grpcsharp_completion_queue_create_sync;
95 public readonly Delegates.grpcsharp_completion_queue_shutdown_delegate grpcsharp_completion_queue_shutdown;
96 public readonly Delegates.grpcsharp_completion_queue_next_delegate grpcsharp_completion_queue_next;
97 public readonly Delegates.grpcsharp_completion_queue_pluck_delegate grpcsharp_completion_queue_pluck;
98 public readonly Delegates.grpcsharp_completion_queue_destroy_delegate grpcsharp_completion_queue_destroy;
99 public readonly Delegates.gprsharp_free_delegate gprsharp_free;
100 public readonly Delegates.grpcsharp_metadata_array_create_delegate grpcsharp_metadata_array_create;
101 public readonly Delegates.grpcsharp_metadata_array_add_delegate grpcsharp_metadata_array_add;
102 public readonly Delegates.grpcsharp_metadata_array_count_delegate grpcsharp_metadata_array_count;
103 public readonly Delegates.grpcsharp_metadata_array_get_key_delegate grpcsharp_metadata_array_get_key;
104 public readonly Delegates.grpcsharp_metadata_array_get_value_delegate grpcsharp_metadata_array_get_value;
105 public readonly Delegates.grpcsharp_metadata_array_destroy_full_delegate grpcsharp_metadata_array_destroy_full;
106 public readonly Delegates.grpcsharp_redirect_log_delegate grpcsharp_redirect_log;
107 public readonly Delegates.grpcsharp_native_callback_dispatcher_init_delegate grpcsharp_native_callback_dispatcher_init;
108 public readonly Delegates.grpcsharp_metadata_credentials_create_from_plugin_delegate grpcsharp_metadata_credentials_create_from_plugin;
109 public readonly Delegates.grpcsharp_metadata_credentials_notify_from_plugin_delegate grpcsharp_metadata_credentials_notify_from_plugin;
110 public readonly Delegates.grpcsharp_ssl_server_credentials_create_delegate grpcsharp_ssl_server_credentials_create;
111 public readonly Delegates.grpcsharp_server_credentials_release_delegate grpcsharp_server_credentials_release;
112 public readonly Delegates.grpcsharp_server_create_delegate grpcsharp_server_create;
113 public readonly Delegates.grpcsharp_server_register_completion_queue_delegate grpcsharp_server_register_completion_queue;
114 public readonly Delegates.grpcsharp_server_add_insecure_http2_port_delegate grpcsharp_server_add_insecure_http2_port;
115 public readonly Delegates.grpcsharp_server_add_secure_http2_port_delegate grpcsharp_server_add_secure_http2_port;
116 public readonly Delegates.grpcsharp_server_start_delegate grpcsharp_server_start;
117 public readonly Delegates.grpcsharp_server_request_call_delegate grpcsharp_server_request_call;
118 public readonly Delegates.grpcsharp_server_cancel_all_calls_delegate grpcsharp_server_cancel_all_calls;
119 public readonly Delegates.grpcsharp_server_shutdown_and_notify_callback_delegate grpcsharp_server_shutdown_and_notify_callback;
120 public readonly Delegates.grpcsharp_server_destroy_delegate grpcsharp_server_destroy;
121 public readonly Delegates.grpcsharp_call_auth_context_delegate grpcsharp_call_auth_context;
122 public readonly Delegates.grpcsharp_auth_context_peer_identity_property_name_delegate grpcsharp_auth_context_peer_identity_property_name;
123 public readonly Delegates.grpcsharp_auth_context_property_iterator_delegate grpcsharp_auth_context_property_iterator;
124 public readonly Delegates.grpcsharp_auth_property_iterator_next_delegate grpcsharp_auth_property_iterator_next;
125 public readonly Delegates.grpcsharp_auth_context_release_delegate grpcsharp_auth_context_release;
126 public readonly Delegates.grpcsharp_slice_buffer_create_delegate grpcsharp_slice_buffer_create;
127 public readonly Delegates.grpcsharp_slice_buffer_adjust_tail_space_delegate grpcsharp_slice_buffer_adjust_tail_space;
128 public readonly Delegates.grpcsharp_slice_buffer_slice_count_delegate grpcsharp_slice_buffer_slice_count;
129 public readonly Delegates.grpcsharp_slice_buffer_slice_peek_delegate grpcsharp_slice_buffer_slice_peek;
130 public readonly Delegates.grpcsharp_slice_buffer_reset_and_unref_delegate grpcsharp_slice_buffer_reset_and_unref;
131 public readonly Delegates.grpcsharp_slice_buffer_destroy_delegate grpcsharp_slice_buffer_destroy;
132 public readonly Delegates.gprsharp_now_delegate gprsharp_now;
133 public readonly Delegates.gprsharp_inf_future_delegate gprsharp_inf_future;
134 public readonly Delegates.gprsharp_inf_past_delegate gprsharp_inf_past;
135 public readonly Delegates.gprsharp_convert_clock_type_delegate gprsharp_convert_clock_type;
136 public readonly Delegates.gprsharp_sizeof_timespec_delegate gprsharp_sizeof_timespec;
137 public readonly Delegates.grpcsharp_test_callback_delegate grpcsharp_test_callback;
138 public readonly Delegates.grpcsharp_test_nop_delegate grpcsharp_test_nop;
139 public readonly Delegates.grpcsharp_test_override_method_delegate grpcsharp_test_override_method;
140 public readonly Delegates.grpcsharp_test_call_start_unary_echo_delegate grpcsharp_test_call_start_unary_echo;
144 public NativeMethods(UnmanagedLibrary library)
146 this.grpcsharp_init = GetMethodDelegate<Delegates.grpcsharp_init_delegate>(library);
147 this.grpcsharp_shutdown = GetMethodDelegate<Delegates.grpcsharp_shutdown_delegate>(library);
148 this.grpcsharp_version_string = GetMethodDelegate<Delegates.grpcsharp_version_string_delegate>(library);
149 this.grpcsharp_batch_context_create = GetMethodDelegate<Delegates.grpcsharp_batch_context_create_delegate>(library);
150 this.grpcsharp_batch_context_recv_initial_metadata = GetMethodDelegate<Delegates.grpcsharp_batch_context_recv_initial_metadata_delegate>(library);
151 this.grpcsharp_batch_context_recv_message_length = GetMethodDelegate<Delegates.grpcsharp_batch_context_recv_message_length_delegate>(library);
152 this.grpcsharp_batch_context_recv_message_next_slice_peek = GetMethodDelegate<Delegates.grpcsharp_batch_context_recv_message_next_slice_peek_delegate>(library);
153 this.grpcsharp_batch_context_recv_status_on_client_status = GetMethodDelegate<Delegates.grpcsharp_batch_context_recv_status_on_client_status_delegate>(library);
154 this.grpcsharp_batch_context_recv_status_on_client_details = GetMethodDelegate<Delegates.grpcsharp_batch_context_recv_status_on_client_details_delegate>(library);
155 this.grpcsharp_batch_context_recv_status_on_client_error_string = GetMethodDelegate<Delegates.grpcsharp_batch_context_recv_status_on_client_error_string_delegate>(library);
156 this.grpcsharp_batch_context_recv_status_on_client_trailing_metadata = GetMethodDelegate<Delegates.grpcsharp_batch_context_recv_status_on_client_trailing_metadata_delegate>(library);
157 this.grpcsharp_batch_context_recv_close_on_server_cancelled = GetMethodDelegate<Delegates.grpcsharp_batch_context_recv_close_on_server_cancelled_delegate>(library);
158 this.grpcsharp_batch_context_reset = GetMethodDelegate<Delegates.grpcsharp_batch_context_reset_delegate>(library);
159 this.grpcsharp_batch_context_destroy = GetMethodDelegate<Delegates.grpcsharp_batch_context_destroy_delegate>(library);
160 this.grpcsharp_request_call_context_create = GetMethodDelegate<Delegates.grpcsharp_request_call_context_create_delegate>(library);
161 this.grpcsharp_request_call_context_call = GetMethodDelegate<Delegates.grpcsharp_request_call_context_call_delegate>(library);
162 this.grpcsharp_request_call_context_method = GetMethodDelegate<Delegates.grpcsharp_request_call_context_method_delegate>(library);
163 this.grpcsharp_request_call_context_host = GetMethodDelegate<Delegates.grpcsharp_request_call_context_host_delegate>(library);
164 this.grpcsharp_request_call_context_deadline = GetMethodDelegate<Delegates.grpcsharp_request_call_context_deadline_delegate>(library);
165 this.grpcsharp_request_call_context_request_metadata = GetMethodDelegate<Delegates.grpcsharp_request_call_context_request_metadata_delegate>(library);
166 this.grpcsharp_request_call_context_reset = GetMethodDelegate<Delegates.grpcsharp_request_call_context_reset_delegate>(library);
167 this.grpcsharp_request_call_context_destroy = GetMethodDelegate<Delegates.grpcsharp_request_call_context_destroy_delegate>(library);
168 this.grpcsharp_composite_call_credentials_create = GetMethodDelegate<Delegates.grpcsharp_composite_call_credentials_create_delegate>(library);
169 this.grpcsharp_call_credentials_release = GetMethodDelegate<Delegates.grpcsharp_call_credentials_release_delegate>(library);
170 this.grpcsharp_call_cancel = GetMethodDelegate<Delegates.grpcsharp_call_cancel_delegate>(library);
171 this.grpcsharp_call_cancel_with_status = GetMethodDelegate<Delegates.grpcsharp_call_cancel_with_status_delegate>(library);
172 this.grpcsharp_call_start_unary = GetMethodDelegate<Delegates.grpcsharp_call_start_unary_delegate>(library);
173 this.grpcsharp_call_start_client_streaming = GetMethodDelegate<Delegates.grpcsharp_call_start_client_streaming_delegate>(library);
174 this.grpcsharp_call_start_server_streaming = GetMethodDelegate<Delegates.grpcsharp_call_start_server_streaming_delegate>(library);
175 this.grpcsharp_call_start_duplex_streaming = GetMethodDelegate<Delegates.grpcsharp_call_start_duplex_streaming_delegate>(library);
176 this.grpcsharp_call_send_message = GetMethodDelegate<Delegates.grpcsharp_call_send_message_delegate>(library);
177 this.grpcsharp_call_send_close_from_client = GetMethodDelegate<Delegates.grpcsharp_call_send_close_from_client_delegate>(library);
178 this.grpcsharp_call_send_status_from_server = GetMethodDelegate<Delegates.grpcsharp_call_send_status_from_server_delegate>(library);
179 this.grpcsharp_call_recv_message = GetMethodDelegate<Delegates.grpcsharp_call_recv_message_delegate>(library);
180 this.grpcsharp_call_recv_initial_metadata = GetMethodDelegate<Delegates.grpcsharp_call_recv_initial_metadata_delegate>(library);
181 this.grpcsharp_call_start_serverside = GetMethodDelegate<Delegates.grpcsharp_call_start_serverside_delegate>(library);
182 this.grpcsharp_call_send_initial_metadata = GetMethodDelegate<Delegates.grpcsharp_call_send_initial_metadata_delegate>(library);
183 this.grpcsharp_call_set_credentials = GetMethodDelegate<Delegates.grpcsharp_call_set_credentials_delegate>(library);
184 this.grpcsharp_call_get_peer = GetMethodDelegate<Delegates.grpcsharp_call_get_peer_delegate>(library);
185 this.grpcsharp_call_destroy = GetMethodDelegate<Delegates.grpcsharp_call_destroy_delegate>(library);
186 this.grpcsharp_channel_args_create = GetMethodDelegate<Delegates.grpcsharp_channel_args_create_delegate>(library);
187 this.grpcsharp_channel_args_set_string = GetMethodDelegate<Delegates.grpcsharp_channel_args_set_string_delegate>(library);
188 this.grpcsharp_channel_args_set_integer = GetMethodDelegate<Delegates.grpcsharp_channel_args_set_integer_delegate>(library);
189 this.grpcsharp_channel_args_destroy = GetMethodDelegate<Delegates.grpcsharp_channel_args_destroy_delegate>(library);
190 this.grpcsharp_override_default_ssl_roots = GetMethodDelegate<Delegates.grpcsharp_override_default_ssl_roots_delegate>(library);
191 this.grpcsharp_ssl_credentials_create = GetMethodDelegate<Delegates.grpcsharp_ssl_credentials_create_delegate>(library);
192 this.grpcsharp_composite_channel_credentials_create = GetMethodDelegate<Delegates.grpcsharp_composite_channel_credentials_create_delegate>(library);
193 this.grpcsharp_channel_credentials_release = GetMethodDelegate<Delegates.grpcsharp_channel_credentials_release_delegate>(library);
194 this.grpcsharp_insecure_channel_create = GetMethodDelegate<Delegates.grpcsharp_insecure_channel_create_delegate>(library);
195 this.grpcsharp_secure_channel_create = GetMethodDelegate<Delegates.grpcsharp_secure_channel_create_delegate>(library);
196 this.grpcsharp_channel_create_call = GetMethodDelegate<Delegates.grpcsharp_channel_create_call_delegate>(library);
197 this.grpcsharp_channel_check_connectivity_state = GetMethodDelegate<Delegates.grpcsharp_channel_check_connectivity_state_delegate>(library);
198 this.grpcsharp_channel_watch_connectivity_state = GetMethodDelegate<Delegates.grpcsharp_channel_watch_connectivity_state_delegate>(library);
199 this.grpcsharp_channel_get_target = GetMethodDelegate<Delegates.grpcsharp_channel_get_target_delegate>(library);
200 this.grpcsharp_channel_destroy = GetMethodDelegate<Delegates.grpcsharp_channel_destroy_delegate>(library);
201 this.grpcsharp_sizeof_grpc_event = GetMethodDelegate<Delegates.grpcsharp_sizeof_grpc_event_delegate>(library);
202 this.grpcsharp_completion_queue_create_async = GetMethodDelegate<Delegates.grpcsharp_completion_queue_create_async_delegate>(library);
203 this.grpcsharp_completion_queue_create_sync = GetMethodDelegate<Delegates.grpcsharp_completion_queue_create_sync_delegate>(library);
204 this.grpcsharp_completion_queue_shutdown = GetMethodDelegate<Delegates.grpcsharp_completion_queue_shutdown_delegate>(library);
205 this.grpcsharp_completion_queue_next = GetMethodDelegate<Delegates.grpcsharp_completion_queue_next_delegate>(library);
206 this.grpcsharp_completion_queue_pluck = GetMethodDelegate<Delegates.grpcsharp_completion_queue_pluck_delegate>(library);
207 this.grpcsharp_completion_queue_destroy = GetMethodDelegate<Delegates.grpcsharp_completion_queue_destroy_delegate>(library);
208 this.gprsharp_free = GetMethodDelegate<Delegates.gprsharp_free_delegate>(library);
209 this.grpcsharp_metadata_array_create = GetMethodDelegate<Delegates.grpcsharp_metadata_array_create_delegate>(library);
210 this.grpcsharp_metadata_array_add = GetMethodDelegate<Delegates.grpcsharp_metadata_array_add_delegate>(library);
211 this.grpcsharp_metadata_array_count = GetMethodDelegate<Delegates.grpcsharp_metadata_array_count_delegate>(library);
212 this.grpcsharp_metadata_array_get_key = GetMethodDelegate<Delegates.grpcsharp_metadata_array_get_key_delegate>(library);
213 this.grpcsharp_metadata_array_get_value = GetMethodDelegate<Delegates.grpcsharp_metadata_array_get_value_delegate>(library);
214 this.grpcsharp_metadata_array_destroy_full = GetMethodDelegate<Delegates.grpcsharp_metadata_array_destroy_full_delegate>(library);
215 this.grpcsharp_redirect_log = GetMethodDelegate<Delegates.grpcsharp_redirect_log_delegate>(library);
216 this.grpcsharp_native_callback_dispatcher_init = GetMethodDelegate<Delegates.grpcsharp_native_callback_dispatcher_init_delegate>(library);
217 this.grpcsharp_metadata_credentials_create_from_plugin = GetMethodDelegate<Delegates.grpcsharp_metadata_credentials_create_from_plugin_delegate>(library);
218 this.grpcsharp_metadata_credentials_notify_from_plugin = GetMethodDelegate<Delegates.grpcsharp_metadata_credentials_notify_from_plugin_delegate>(library);
219 this.grpcsharp_ssl_server_credentials_create = GetMethodDelegate<Delegates.grpcsharp_ssl_server_credentials_create_delegate>(library);
220 this.grpcsharp_server_credentials_release = GetMethodDelegate<Delegates.grpcsharp_server_credentials_release_delegate>(library);
221 this.grpcsharp_server_create = GetMethodDelegate<Delegates.grpcsharp_server_create_delegate>(library);
222 this.grpcsharp_server_register_completion_queue = GetMethodDelegate<Delegates.grpcsharp_server_register_completion_queue_delegate>(library);
223 this.grpcsharp_server_add_insecure_http2_port = GetMethodDelegate<Delegates.grpcsharp_server_add_insecure_http2_port_delegate>(library);
224 this.grpcsharp_server_add_secure_http2_port = GetMethodDelegate<Delegates.grpcsharp_server_add_secure_http2_port_delegate>(library);
225 this.grpcsharp_server_start = GetMethodDelegate<Delegates.grpcsharp_server_start_delegate>(library);
226 this.grpcsharp_server_request_call = GetMethodDelegate<Delegates.grpcsharp_server_request_call_delegate>(library);
227 this.grpcsharp_server_cancel_all_calls = GetMethodDelegate<Delegates.grpcsharp_server_cancel_all_calls_delegate>(library);
228 this.grpcsharp_server_shutdown_and_notify_callback = GetMethodDelegate<Delegates.grpcsharp_server_shutdown_and_notify_callback_delegate>(library);
229 this.grpcsharp_server_destroy = GetMethodDelegate<Delegates.grpcsharp_server_destroy_delegate>(library);
230 this.grpcsharp_call_auth_context = GetMethodDelegate<Delegates.grpcsharp_call_auth_context_delegate>(library);
231 this.grpcsharp_auth_context_peer_identity_property_name = GetMethodDelegate<Delegates.grpcsharp_auth_context_peer_identity_property_name_delegate>(library);
232 this.grpcsharp_auth_context_property_iterator = GetMethodDelegate<Delegates.grpcsharp_auth_context_property_iterator_delegate>(library);
233 this.grpcsharp_auth_property_iterator_next = GetMethodDelegate<Delegates.grpcsharp_auth_property_iterator_next_delegate>(library);
234 this.grpcsharp_auth_context_release = GetMethodDelegate<Delegates.grpcsharp_auth_context_release_delegate>(library);
235 this.grpcsharp_slice_buffer_create = GetMethodDelegate<Delegates.grpcsharp_slice_buffer_create_delegate>(library);
236 this.grpcsharp_slice_buffer_adjust_tail_space = GetMethodDelegate<Delegates.grpcsharp_slice_buffer_adjust_tail_space_delegate>(library);
237 this.grpcsharp_slice_buffer_slice_count = GetMethodDelegate<Delegates.grpcsharp_slice_buffer_slice_count_delegate>(library);
238 this.grpcsharp_slice_buffer_slice_peek = GetMethodDelegate<Delegates.grpcsharp_slice_buffer_slice_peek_delegate>(library);
239 this.grpcsharp_slice_buffer_reset_and_unref = GetMethodDelegate<Delegates.grpcsharp_slice_buffer_reset_and_unref_delegate>(library);
240 this.grpcsharp_slice_buffer_destroy = GetMethodDelegate<Delegates.grpcsharp_slice_buffer_destroy_delegate>(library);
241 this.gprsharp_now = GetMethodDelegate<Delegates.gprsharp_now_delegate>(library);
242 this.gprsharp_inf_future = GetMethodDelegate<Delegates.gprsharp_inf_future_delegate>(library);
243 this.gprsharp_inf_past = GetMethodDelegate<Delegates.gprsharp_inf_past_delegate>(library);
244 this.gprsharp_convert_clock_type = GetMethodDelegate<Delegates.gprsharp_convert_clock_type_delegate>(library);
245 this.gprsharp_sizeof_timespec = GetMethodDelegate<Delegates.gprsharp_sizeof_timespec_delegate>(library);
246 this.grpcsharp_test_callback = GetMethodDelegate<Delegates.grpcsharp_test_callback_delegate>(library);
247 this.grpcsharp_test_nop = GetMethodDelegate<Delegates.grpcsharp_test_nop_delegate>(library);
248 this.grpcsharp_test_override_method = GetMethodDelegate<Delegates.grpcsharp_test_override_method_delegate>(library);
249 this.grpcsharp_test_call_start_unary_echo = GetMethodDelegate<Delegates.grpcsharp_test_call_start_unary_echo_delegate>(library);
252 public NativeMethods(DllImportsFromStaticLib unusedInstance)
254 this.grpcsharp_init = DllImportsFromStaticLib.grpcsharp_init;
255 this.grpcsharp_shutdown = DllImportsFromStaticLib.grpcsharp_shutdown;
256 this.grpcsharp_version_string = DllImportsFromStaticLib.grpcsharp_version_string;
257 this.grpcsharp_batch_context_create = DllImportsFromStaticLib.grpcsharp_batch_context_create;
258 this.grpcsharp_batch_context_recv_initial_metadata = DllImportsFromStaticLib.grpcsharp_batch_context_recv_initial_metadata;
259 this.grpcsharp_batch_context_recv_message_length = DllImportsFromStaticLib.grpcsharp_batch_context_recv_message_length;
260 this.grpcsharp_batch_context_recv_message_next_slice_peek = DllImportsFromStaticLib.grpcsharp_batch_context_recv_message_next_slice_peek;
261 this.grpcsharp_batch_context_recv_status_on_client_status = DllImportsFromStaticLib.grpcsharp_batch_context_recv_status_on_client_status;
262 this.grpcsharp_batch_context_recv_status_on_client_details = DllImportsFromStaticLib.grpcsharp_batch_context_recv_status_on_client_details;
263 this.grpcsharp_batch_context_recv_status_on_client_error_string = DllImportsFromStaticLib.grpcsharp_batch_context_recv_status_on_client_error_string;
264 this.grpcsharp_batch_context_recv_status_on_client_trailing_metadata = DllImportsFromStaticLib.grpcsharp_batch_context_recv_status_on_client_trailing_metadata;
265 this.grpcsharp_batch_context_recv_close_on_server_cancelled = DllImportsFromStaticLib.grpcsharp_batch_context_recv_close_on_server_cancelled;
266 this.grpcsharp_batch_context_reset = DllImportsFromStaticLib.grpcsharp_batch_context_reset;
267 this.grpcsharp_batch_context_destroy = DllImportsFromStaticLib.grpcsharp_batch_context_destroy;
268 this.grpcsharp_request_call_context_create = DllImportsFromStaticLib.grpcsharp_request_call_context_create;
269 this.grpcsharp_request_call_context_call = DllImportsFromStaticLib.grpcsharp_request_call_context_call;
270 this.grpcsharp_request_call_context_method = DllImportsFromStaticLib.grpcsharp_request_call_context_method;
271 this.grpcsharp_request_call_context_host = DllImportsFromStaticLib.grpcsharp_request_call_context_host;
272 this.grpcsharp_request_call_context_deadline = DllImportsFromStaticLib.grpcsharp_request_call_context_deadline;
273 this.grpcsharp_request_call_context_request_metadata = DllImportsFromStaticLib.grpcsharp_request_call_context_request_metadata;
274 this.grpcsharp_request_call_context_reset = DllImportsFromStaticLib.grpcsharp_request_call_context_reset;
275 this.grpcsharp_request_call_context_destroy = DllImportsFromStaticLib.grpcsharp_request_call_context_destroy;
276 this.grpcsharp_composite_call_credentials_create = DllImportsFromStaticLib.grpcsharp_composite_call_credentials_create;
277 this.grpcsharp_call_credentials_release = DllImportsFromStaticLib.grpcsharp_call_credentials_release;
278 this.grpcsharp_call_cancel = DllImportsFromStaticLib.grpcsharp_call_cancel;
279 this.grpcsharp_call_cancel_with_status = DllImportsFromStaticLib.grpcsharp_call_cancel_with_status;
280 this.grpcsharp_call_start_unary = DllImportsFromStaticLib.grpcsharp_call_start_unary;
281 this.grpcsharp_call_start_client_streaming = DllImportsFromStaticLib.grpcsharp_call_start_client_streaming;
282 this.grpcsharp_call_start_server_streaming = DllImportsFromStaticLib.grpcsharp_call_start_server_streaming;
283 this.grpcsharp_call_start_duplex_streaming = DllImportsFromStaticLib.grpcsharp_call_start_duplex_streaming;
284 this.grpcsharp_call_send_message = DllImportsFromStaticLib.grpcsharp_call_send_message;
285 this.grpcsharp_call_send_close_from_client = DllImportsFromStaticLib.grpcsharp_call_send_close_from_client;
286 this.grpcsharp_call_send_status_from_server = DllImportsFromStaticLib.grpcsharp_call_send_status_from_server;
287 this.grpcsharp_call_recv_message = DllImportsFromStaticLib.grpcsharp_call_recv_message;
288 this.grpcsharp_call_recv_initial_metadata = DllImportsFromStaticLib.grpcsharp_call_recv_initial_metadata;
289 this.grpcsharp_call_start_serverside = DllImportsFromStaticLib.grpcsharp_call_start_serverside;
290 this.grpcsharp_call_send_initial_metadata = DllImportsFromStaticLib.grpcsharp_call_send_initial_metadata;
291 this.grpcsharp_call_set_credentials = DllImportsFromStaticLib.grpcsharp_call_set_credentials;
292 this.grpcsharp_call_get_peer = DllImportsFromStaticLib.grpcsharp_call_get_peer;
293 this.grpcsharp_call_destroy = DllImportsFromStaticLib.grpcsharp_call_destroy;
294 this.grpcsharp_channel_args_create = DllImportsFromStaticLib.grpcsharp_channel_args_create;
295 this.grpcsharp_channel_args_set_string = DllImportsFromStaticLib.grpcsharp_channel_args_set_string;
296 this.grpcsharp_channel_args_set_integer = DllImportsFromStaticLib.grpcsharp_channel_args_set_integer;
297 this.grpcsharp_channel_args_destroy = DllImportsFromStaticLib.grpcsharp_channel_args_destroy;
298 this.grpcsharp_override_default_ssl_roots = DllImportsFromStaticLib.grpcsharp_override_default_ssl_roots;
299 this.grpcsharp_ssl_credentials_create = DllImportsFromStaticLib.grpcsharp_ssl_credentials_create;
300 this.grpcsharp_composite_channel_credentials_create = DllImportsFromStaticLib.grpcsharp_composite_channel_credentials_create;
301 this.grpcsharp_channel_credentials_release = DllImportsFromStaticLib.grpcsharp_channel_credentials_release;
302 this.grpcsharp_insecure_channel_create = DllImportsFromStaticLib.grpcsharp_insecure_channel_create;
303 this.grpcsharp_secure_channel_create = DllImportsFromStaticLib.grpcsharp_secure_channel_create;
304 this.grpcsharp_channel_create_call = DllImportsFromStaticLib.grpcsharp_channel_create_call;
305 this.grpcsharp_channel_check_connectivity_state = DllImportsFromStaticLib.grpcsharp_channel_check_connectivity_state;
306 this.grpcsharp_channel_watch_connectivity_state = DllImportsFromStaticLib.grpcsharp_channel_watch_connectivity_state;
307 this.grpcsharp_channel_get_target = DllImportsFromStaticLib.grpcsharp_channel_get_target;
308 this.grpcsharp_channel_destroy = DllImportsFromStaticLib.grpcsharp_channel_destroy;
309 this.grpcsharp_sizeof_grpc_event = DllImportsFromStaticLib.grpcsharp_sizeof_grpc_event;
310 this.grpcsharp_completion_queue_create_async = DllImportsFromStaticLib.grpcsharp_completion_queue_create_async;
311 this.grpcsharp_completion_queue_create_sync = DllImportsFromStaticLib.grpcsharp_completion_queue_create_sync;
312 this.grpcsharp_completion_queue_shutdown = DllImportsFromStaticLib.grpcsharp_completion_queue_shutdown;
313 this.grpcsharp_completion_queue_next = DllImportsFromStaticLib.grpcsharp_completion_queue_next;
314 this.grpcsharp_completion_queue_pluck = DllImportsFromStaticLib.grpcsharp_completion_queue_pluck;
315 this.grpcsharp_completion_queue_destroy = DllImportsFromStaticLib.grpcsharp_completion_queue_destroy;
316 this.gprsharp_free = DllImportsFromStaticLib.gprsharp_free;
317 this.grpcsharp_metadata_array_create = DllImportsFromStaticLib.grpcsharp_metadata_array_create;
318 this.grpcsharp_metadata_array_add = DllImportsFromStaticLib.grpcsharp_metadata_array_add;
319 this.grpcsharp_metadata_array_count = DllImportsFromStaticLib.grpcsharp_metadata_array_count;
320 this.grpcsharp_metadata_array_get_key = DllImportsFromStaticLib.grpcsharp_metadata_array_get_key;
321 this.grpcsharp_metadata_array_get_value = DllImportsFromStaticLib.grpcsharp_metadata_array_get_value;
322 this.grpcsharp_metadata_array_destroy_full = DllImportsFromStaticLib.grpcsharp_metadata_array_destroy_full;
323 this.grpcsharp_redirect_log = DllImportsFromStaticLib.grpcsharp_redirect_log;
324 this.grpcsharp_native_callback_dispatcher_init = DllImportsFromStaticLib.grpcsharp_native_callback_dispatcher_init;
325 this.grpcsharp_metadata_credentials_create_from_plugin = DllImportsFromStaticLib.grpcsharp_metadata_credentials_create_from_plugin;
326 this.grpcsharp_metadata_credentials_notify_from_plugin = DllImportsFromStaticLib.grpcsharp_metadata_credentials_notify_from_plugin;
327 this.grpcsharp_ssl_server_credentials_create = DllImportsFromStaticLib.grpcsharp_ssl_server_credentials_create;
328 this.grpcsharp_server_credentials_release = DllImportsFromStaticLib.grpcsharp_server_credentials_release;
329 this.grpcsharp_server_create = DllImportsFromStaticLib.grpcsharp_server_create;
330 this.grpcsharp_server_register_completion_queue = DllImportsFromStaticLib.grpcsharp_server_register_completion_queue;
331 this.grpcsharp_server_add_insecure_http2_port = DllImportsFromStaticLib.grpcsharp_server_add_insecure_http2_port;
332 this.grpcsharp_server_add_secure_http2_port = DllImportsFromStaticLib.grpcsharp_server_add_secure_http2_port;
333 this.grpcsharp_server_start = DllImportsFromStaticLib.grpcsharp_server_start;
334 this.grpcsharp_server_request_call = DllImportsFromStaticLib.grpcsharp_server_request_call;
335 this.grpcsharp_server_cancel_all_calls = DllImportsFromStaticLib.grpcsharp_server_cancel_all_calls;
336 this.grpcsharp_server_shutdown_and_notify_callback = DllImportsFromStaticLib.grpcsharp_server_shutdown_and_notify_callback;
337 this.grpcsharp_server_destroy = DllImportsFromStaticLib.grpcsharp_server_destroy;
338 this.grpcsharp_call_auth_context = DllImportsFromStaticLib.grpcsharp_call_auth_context;
339 this.grpcsharp_auth_context_peer_identity_property_name = DllImportsFromStaticLib.grpcsharp_auth_context_peer_identity_property_name;
340 this.grpcsharp_auth_context_property_iterator = DllImportsFromStaticLib.grpcsharp_auth_context_property_iterator;
341 this.grpcsharp_auth_property_iterator_next = DllImportsFromStaticLib.grpcsharp_auth_property_iterator_next;
342 this.grpcsharp_auth_context_release = DllImportsFromStaticLib.grpcsharp_auth_context_release;
343 this.grpcsharp_slice_buffer_create = DllImportsFromStaticLib.grpcsharp_slice_buffer_create;
344 this.grpcsharp_slice_buffer_adjust_tail_space = DllImportsFromStaticLib.grpcsharp_slice_buffer_adjust_tail_space;
345 this.grpcsharp_slice_buffer_slice_count = DllImportsFromStaticLib.grpcsharp_slice_buffer_slice_count;
346 this.grpcsharp_slice_buffer_slice_peek = DllImportsFromStaticLib.grpcsharp_slice_buffer_slice_peek;
347 this.grpcsharp_slice_buffer_reset_and_unref = DllImportsFromStaticLib.grpcsharp_slice_buffer_reset_and_unref;
348 this.grpcsharp_slice_buffer_destroy = DllImportsFromStaticLib.grpcsharp_slice_buffer_destroy;
349 this.gprsharp_now = DllImportsFromStaticLib.gprsharp_now;
350 this.gprsharp_inf_future = DllImportsFromStaticLib.gprsharp_inf_future;
351 this.gprsharp_inf_past = DllImportsFromStaticLib.gprsharp_inf_past;
352 this.gprsharp_convert_clock_type = DllImportsFromStaticLib.gprsharp_convert_clock_type;
353 this.gprsharp_sizeof_timespec = DllImportsFromStaticLib.gprsharp_sizeof_timespec;
354 this.grpcsharp_test_callback = DllImportsFromStaticLib.grpcsharp_test_callback;
355 this.grpcsharp_test_nop = DllImportsFromStaticLib.grpcsharp_test_nop;
356 this.grpcsharp_test_override_method = DllImportsFromStaticLib.grpcsharp_test_override_method;
357 this.grpcsharp_test_call_start_unary_echo = DllImportsFromStaticLib.grpcsharp_test_call_start_unary_echo;
360 public NativeMethods(DllImportsFromSharedLib unusedInstance)
362 this.grpcsharp_init = DllImportsFromSharedLib.grpcsharp_init;
363 this.grpcsharp_shutdown = DllImportsFromSharedLib.grpcsharp_shutdown;
364 this.grpcsharp_version_string = DllImportsFromSharedLib.grpcsharp_version_string;
365 this.grpcsharp_batch_context_create = DllImportsFromSharedLib.grpcsharp_batch_context_create;
366 this.grpcsharp_batch_context_recv_initial_metadata = DllImportsFromSharedLib.grpcsharp_batch_context_recv_initial_metadata;
367 this.grpcsharp_batch_context_recv_message_length = DllImportsFromSharedLib.grpcsharp_batch_context_recv_message_length;
368 this.grpcsharp_batch_context_recv_message_next_slice_peek = DllImportsFromSharedLib.grpcsharp_batch_context_recv_message_next_slice_peek;
369 this.grpcsharp_batch_context_recv_status_on_client_status = DllImportsFromSharedLib.grpcsharp_batch_context_recv_status_on_client_status;
370 this.grpcsharp_batch_context_recv_status_on_client_details = DllImportsFromSharedLib.grpcsharp_batch_context_recv_status_on_client_details;
371 this.grpcsharp_batch_context_recv_status_on_client_error_string = DllImportsFromSharedLib.grpcsharp_batch_context_recv_status_on_client_error_string;
372 this.grpcsharp_batch_context_recv_status_on_client_trailing_metadata = DllImportsFromSharedLib.grpcsharp_batch_context_recv_status_on_client_trailing_metadata;
373 this.grpcsharp_batch_context_recv_close_on_server_cancelled = DllImportsFromSharedLib.grpcsharp_batch_context_recv_close_on_server_cancelled;
374 this.grpcsharp_batch_context_reset = DllImportsFromSharedLib.grpcsharp_batch_context_reset;
375 this.grpcsharp_batch_context_destroy = DllImportsFromSharedLib.grpcsharp_batch_context_destroy;
376 this.grpcsharp_request_call_context_create = DllImportsFromSharedLib.grpcsharp_request_call_context_create;
377 this.grpcsharp_request_call_context_call = DllImportsFromSharedLib.grpcsharp_request_call_context_call;
378 this.grpcsharp_request_call_context_method = DllImportsFromSharedLib.grpcsharp_request_call_context_method;
379 this.grpcsharp_request_call_context_host = DllImportsFromSharedLib.grpcsharp_request_call_context_host;
380 this.grpcsharp_request_call_context_deadline = DllImportsFromSharedLib.grpcsharp_request_call_context_deadline;
381 this.grpcsharp_request_call_context_request_metadata = DllImportsFromSharedLib.grpcsharp_request_call_context_request_metadata;
382 this.grpcsharp_request_call_context_reset = DllImportsFromSharedLib.grpcsharp_request_call_context_reset;
383 this.grpcsharp_request_call_context_destroy = DllImportsFromSharedLib.grpcsharp_request_call_context_destroy;
384 this.grpcsharp_composite_call_credentials_create = DllImportsFromSharedLib.grpcsharp_composite_call_credentials_create;
385 this.grpcsharp_call_credentials_release = DllImportsFromSharedLib.grpcsharp_call_credentials_release;
386 this.grpcsharp_call_cancel = DllImportsFromSharedLib.grpcsharp_call_cancel;
387 this.grpcsharp_call_cancel_with_status = DllImportsFromSharedLib.grpcsharp_call_cancel_with_status;
388 this.grpcsharp_call_start_unary = DllImportsFromSharedLib.grpcsharp_call_start_unary;
389 this.grpcsharp_call_start_client_streaming = DllImportsFromSharedLib.grpcsharp_call_start_client_streaming;
390 this.grpcsharp_call_start_server_streaming = DllImportsFromSharedLib.grpcsharp_call_start_server_streaming;
391 this.grpcsharp_call_start_duplex_streaming = DllImportsFromSharedLib.grpcsharp_call_start_duplex_streaming;
392 this.grpcsharp_call_send_message = DllImportsFromSharedLib.grpcsharp_call_send_message;
393 this.grpcsharp_call_send_close_from_client = DllImportsFromSharedLib.grpcsharp_call_send_close_from_client;
394 this.grpcsharp_call_send_status_from_server = DllImportsFromSharedLib.grpcsharp_call_send_status_from_server;
395 this.grpcsharp_call_recv_message = DllImportsFromSharedLib.grpcsharp_call_recv_message;
396 this.grpcsharp_call_recv_initial_metadata = DllImportsFromSharedLib.grpcsharp_call_recv_initial_metadata;
397 this.grpcsharp_call_start_serverside = DllImportsFromSharedLib.grpcsharp_call_start_serverside;
398 this.grpcsharp_call_send_initial_metadata = DllImportsFromSharedLib.grpcsharp_call_send_initial_metadata;
399 this.grpcsharp_call_set_credentials = DllImportsFromSharedLib.grpcsharp_call_set_credentials;
400 this.grpcsharp_call_get_peer = DllImportsFromSharedLib.grpcsharp_call_get_peer;
401 this.grpcsharp_call_destroy = DllImportsFromSharedLib.grpcsharp_call_destroy;
402 this.grpcsharp_channel_args_create = DllImportsFromSharedLib.grpcsharp_channel_args_create;
403 this.grpcsharp_channel_args_set_string = DllImportsFromSharedLib.grpcsharp_channel_args_set_string;
404 this.grpcsharp_channel_args_set_integer = DllImportsFromSharedLib.grpcsharp_channel_args_set_integer;
405 this.grpcsharp_channel_args_destroy = DllImportsFromSharedLib.grpcsharp_channel_args_destroy;
406 this.grpcsharp_override_default_ssl_roots = DllImportsFromSharedLib.grpcsharp_override_default_ssl_roots;
407 this.grpcsharp_ssl_credentials_create = DllImportsFromSharedLib.grpcsharp_ssl_credentials_create;
408 this.grpcsharp_composite_channel_credentials_create = DllImportsFromSharedLib.grpcsharp_composite_channel_credentials_create;
409 this.grpcsharp_channel_credentials_release = DllImportsFromSharedLib.grpcsharp_channel_credentials_release;
410 this.grpcsharp_insecure_channel_create = DllImportsFromSharedLib.grpcsharp_insecure_channel_create;
411 this.grpcsharp_secure_channel_create = DllImportsFromSharedLib.grpcsharp_secure_channel_create;
412 this.grpcsharp_channel_create_call = DllImportsFromSharedLib.grpcsharp_channel_create_call;
413 this.grpcsharp_channel_check_connectivity_state = DllImportsFromSharedLib.grpcsharp_channel_check_connectivity_state;
414 this.grpcsharp_channel_watch_connectivity_state = DllImportsFromSharedLib.grpcsharp_channel_watch_connectivity_state;
415 this.grpcsharp_channel_get_target = DllImportsFromSharedLib.grpcsharp_channel_get_target;
416 this.grpcsharp_channel_destroy = DllImportsFromSharedLib.grpcsharp_channel_destroy;
417 this.grpcsharp_sizeof_grpc_event = DllImportsFromSharedLib.grpcsharp_sizeof_grpc_event;
418 this.grpcsharp_completion_queue_create_async = DllImportsFromSharedLib.grpcsharp_completion_queue_create_async;
419 this.grpcsharp_completion_queue_create_sync = DllImportsFromSharedLib.grpcsharp_completion_queue_create_sync;
420 this.grpcsharp_completion_queue_shutdown = DllImportsFromSharedLib.grpcsharp_completion_queue_shutdown;
421 this.grpcsharp_completion_queue_next = DllImportsFromSharedLib.grpcsharp_completion_queue_next;
422 this.grpcsharp_completion_queue_pluck = DllImportsFromSharedLib.grpcsharp_completion_queue_pluck;
423 this.grpcsharp_completion_queue_destroy = DllImportsFromSharedLib.grpcsharp_completion_queue_destroy;
424 this.gprsharp_free = DllImportsFromSharedLib.gprsharp_free;
425 this.grpcsharp_metadata_array_create = DllImportsFromSharedLib.grpcsharp_metadata_array_create;
426 this.grpcsharp_metadata_array_add = DllImportsFromSharedLib.grpcsharp_metadata_array_add;
427 this.grpcsharp_metadata_array_count = DllImportsFromSharedLib.grpcsharp_metadata_array_count;
428 this.grpcsharp_metadata_array_get_key = DllImportsFromSharedLib.grpcsharp_metadata_array_get_key;
429 this.grpcsharp_metadata_array_get_value = DllImportsFromSharedLib.grpcsharp_metadata_array_get_value;
430 this.grpcsharp_metadata_array_destroy_full = DllImportsFromSharedLib.grpcsharp_metadata_array_destroy_full;
431 this.grpcsharp_redirect_log = DllImportsFromSharedLib.grpcsharp_redirect_log;
432 this.grpcsharp_native_callback_dispatcher_init = DllImportsFromSharedLib.grpcsharp_native_callback_dispatcher_init;
433 this.grpcsharp_metadata_credentials_create_from_plugin = DllImportsFromSharedLib.grpcsharp_metadata_credentials_create_from_plugin;
434 this.grpcsharp_metadata_credentials_notify_from_plugin = DllImportsFromSharedLib.grpcsharp_metadata_credentials_notify_from_plugin;
435 this.grpcsharp_ssl_server_credentials_create = DllImportsFromSharedLib.grpcsharp_ssl_server_credentials_create;
436 this.grpcsharp_server_credentials_release = DllImportsFromSharedLib.grpcsharp_server_credentials_release;
437 this.grpcsharp_server_create = DllImportsFromSharedLib.grpcsharp_server_create;
438 this.grpcsharp_server_register_completion_queue = DllImportsFromSharedLib.grpcsharp_server_register_completion_queue;
439 this.grpcsharp_server_add_insecure_http2_port = DllImportsFromSharedLib.grpcsharp_server_add_insecure_http2_port;
440 this.grpcsharp_server_add_secure_http2_port = DllImportsFromSharedLib.grpcsharp_server_add_secure_http2_port;
441 this.grpcsharp_server_start = DllImportsFromSharedLib.grpcsharp_server_start;
442 this.grpcsharp_server_request_call = DllImportsFromSharedLib.grpcsharp_server_request_call;
443 this.grpcsharp_server_cancel_all_calls = DllImportsFromSharedLib.grpcsharp_server_cancel_all_calls;
444 this.grpcsharp_server_shutdown_and_notify_callback = DllImportsFromSharedLib.grpcsharp_server_shutdown_and_notify_callback;
445 this.grpcsharp_server_destroy = DllImportsFromSharedLib.grpcsharp_server_destroy;
446 this.grpcsharp_call_auth_context = DllImportsFromSharedLib.grpcsharp_call_auth_context;
447 this.grpcsharp_auth_context_peer_identity_property_name = DllImportsFromSharedLib.grpcsharp_auth_context_peer_identity_property_name;
448 this.grpcsharp_auth_context_property_iterator = DllImportsFromSharedLib.grpcsharp_auth_context_property_iterator;
449 this.grpcsharp_auth_property_iterator_next = DllImportsFromSharedLib.grpcsharp_auth_property_iterator_next;
450 this.grpcsharp_auth_context_release = DllImportsFromSharedLib.grpcsharp_auth_context_release;
451 this.grpcsharp_slice_buffer_create = DllImportsFromSharedLib.grpcsharp_slice_buffer_create;
452 this.grpcsharp_slice_buffer_adjust_tail_space = DllImportsFromSharedLib.grpcsharp_slice_buffer_adjust_tail_space;
453 this.grpcsharp_slice_buffer_slice_count = DllImportsFromSharedLib.grpcsharp_slice_buffer_slice_count;
454 this.grpcsharp_slice_buffer_slice_peek = DllImportsFromSharedLib.grpcsharp_slice_buffer_slice_peek;
455 this.grpcsharp_slice_buffer_reset_and_unref = DllImportsFromSharedLib.grpcsharp_slice_buffer_reset_and_unref;
456 this.grpcsharp_slice_buffer_destroy = DllImportsFromSharedLib.grpcsharp_slice_buffer_destroy;
457 this.gprsharp_now = DllImportsFromSharedLib.gprsharp_now;
458 this.gprsharp_inf_future = DllImportsFromSharedLib.gprsharp_inf_future;
459 this.gprsharp_inf_past = DllImportsFromSharedLib.gprsharp_inf_past;
460 this.gprsharp_convert_clock_type = DllImportsFromSharedLib.gprsharp_convert_clock_type;
461 this.gprsharp_sizeof_timespec = DllImportsFromSharedLib.gprsharp_sizeof_timespec;
462 this.grpcsharp_test_callback = DllImportsFromSharedLib.grpcsharp_test_callback;
463 this.grpcsharp_test_nop = DllImportsFromSharedLib.grpcsharp_test_nop;
464 this.grpcsharp_test_override_method = DllImportsFromSharedLib.grpcsharp_test_override_method;
465 this.grpcsharp_test_call_start_unary_echo = DllImportsFromSharedLib.grpcsharp_test_call_start_unary_echo;
468 public NativeMethods(DllImportsFromSharedLib_x86 unusedInstance)
470 this.grpcsharp_init = DllImportsFromSharedLib_x86.grpcsharp_init;
471 this.grpcsharp_shutdown = DllImportsFromSharedLib_x86.grpcsharp_shutdown;
472 this.grpcsharp_version_string = DllImportsFromSharedLib_x86.grpcsharp_version_string;
473 this.grpcsharp_batch_context_create = DllImportsFromSharedLib_x86.grpcsharp_batch_context_create;
474 this.grpcsharp_batch_context_recv_initial_metadata = DllImportsFromSharedLib_x86.grpcsharp_batch_context_recv_initial_metadata;
475 this.grpcsharp_batch_context_recv_message_length = DllImportsFromSharedLib_x86.grpcsharp_batch_context_recv_message_length;
476 this.grpcsharp_batch_context_recv_message_next_slice_peek = DllImportsFromSharedLib_x86.grpcsharp_batch_context_recv_message_next_slice_peek;
477 this.grpcsharp_batch_context_recv_status_on_client_status = DllImportsFromSharedLib_x86.grpcsharp_batch_context_recv_status_on_client_status;
478 this.grpcsharp_batch_context_recv_status_on_client_details = DllImportsFromSharedLib_x86.grpcsharp_batch_context_recv_status_on_client_details;
479 this.grpcsharp_batch_context_recv_status_on_client_error_string = DllImportsFromSharedLib_x86.grpcsharp_batch_context_recv_status_on_client_error_string;
480 this.grpcsharp_batch_context_recv_status_on_client_trailing_metadata = DllImportsFromSharedLib_x86.grpcsharp_batch_context_recv_status_on_client_trailing_metadata;
481 this.grpcsharp_batch_context_recv_close_on_server_cancelled = DllImportsFromSharedLib_x86.grpcsharp_batch_context_recv_close_on_server_cancelled;
482 this.grpcsharp_batch_context_reset = DllImportsFromSharedLib_x86.grpcsharp_batch_context_reset;
483 this.grpcsharp_batch_context_destroy = DllImportsFromSharedLib_x86.grpcsharp_batch_context_destroy;
484 this.grpcsharp_request_call_context_create = DllImportsFromSharedLib_x86.grpcsharp_request_call_context_create;
485 this.grpcsharp_request_call_context_call = DllImportsFromSharedLib_x86.grpcsharp_request_call_context_call;
486 this.grpcsharp_request_call_context_method = DllImportsFromSharedLib_x86.grpcsharp_request_call_context_method;
487 this.grpcsharp_request_call_context_host = DllImportsFromSharedLib_x86.grpcsharp_request_call_context_host;
488 this.grpcsharp_request_call_context_deadline = DllImportsFromSharedLib_x86.grpcsharp_request_call_context_deadline;
489 this.grpcsharp_request_call_context_request_metadata = DllImportsFromSharedLib_x86.grpcsharp_request_call_context_request_metadata;
490 this.grpcsharp_request_call_context_reset = DllImportsFromSharedLib_x86.grpcsharp_request_call_context_reset;
491 this.grpcsharp_request_call_context_destroy = DllImportsFromSharedLib_x86.grpcsharp_request_call_context_destroy;
492 this.grpcsharp_composite_call_credentials_create = DllImportsFromSharedLib_x86.grpcsharp_composite_call_credentials_create;
493 this.grpcsharp_call_credentials_release = DllImportsFromSharedLib_x86.grpcsharp_call_credentials_release;
494 this.grpcsharp_call_cancel = DllImportsFromSharedLib_x86.grpcsharp_call_cancel;
495 this.grpcsharp_call_cancel_with_status = DllImportsFromSharedLib_x86.grpcsharp_call_cancel_with_status;
496 this.grpcsharp_call_start_unary = DllImportsFromSharedLib_x86.grpcsharp_call_start_unary;
497 this.grpcsharp_call_start_client_streaming = DllImportsFromSharedLib_x86.grpcsharp_call_start_client_streaming;
498 this.grpcsharp_call_start_server_streaming = DllImportsFromSharedLib_x86.grpcsharp_call_start_server_streaming;
499 this.grpcsharp_call_start_duplex_streaming = DllImportsFromSharedLib_x86.grpcsharp_call_start_duplex_streaming;
500 this.grpcsharp_call_send_message = DllImportsFromSharedLib_x86.grpcsharp_call_send_message;
501 this.grpcsharp_call_send_close_from_client = DllImportsFromSharedLib_x86.grpcsharp_call_send_close_from_client;
502 this.grpcsharp_call_send_status_from_server = DllImportsFromSharedLib_x86.grpcsharp_call_send_status_from_server;
503 this.grpcsharp_call_recv_message = DllImportsFromSharedLib_x86.grpcsharp_call_recv_message;
504 this.grpcsharp_call_recv_initial_metadata = DllImportsFromSharedLib_x86.grpcsharp_call_recv_initial_metadata;
505 this.grpcsharp_call_start_serverside = DllImportsFromSharedLib_x86.grpcsharp_call_start_serverside;
506 this.grpcsharp_call_send_initial_metadata = DllImportsFromSharedLib_x86.grpcsharp_call_send_initial_metadata;
507 this.grpcsharp_call_set_credentials = DllImportsFromSharedLib_x86.grpcsharp_call_set_credentials;
508 this.grpcsharp_call_get_peer = DllImportsFromSharedLib_x86.grpcsharp_call_get_peer;
509 this.grpcsharp_call_destroy = DllImportsFromSharedLib_x86.grpcsharp_call_destroy;
510 this.grpcsharp_channel_args_create = DllImportsFromSharedLib_x86.grpcsharp_channel_args_create;
511 this.grpcsharp_channel_args_set_string = DllImportsFromSharedLib_x86.grpcsharp_channel_args_set_string;
512 this.grpcsharp_channel_args_set_integer = DllImportsFromSharedLib_x86.grpcsharp_channel_args_set_integer;
513 this.grpcsharp_channel_args_destroy = DllImportsFromSharedLib_x86.grpcsharp_channel_args_destroy;
514 this.grpcsharp_override_default_ssl_roots = DllImportsFromSharedLib_x86.grpcsharp_override_default_ssl_roots;
515 this.grpcsharp_ssl_credentials_create = DllImportsFromSharedLib_x86.grpcsharp_ssl_credentials_create;
516 this.grpcsharp_composite_channel_credentials_create = DllImportsFromSharedLib_x86.grpcsharp_composite_channel_credentials_create;
517 this.grpcsharp_channel_credentials_release = DllImportsFromSharedLib_x86.grpcsharp_channel_credentials_release;
518 this.grpcsharp_insecure_channel_create = DllImportsFromSharedLib_x86.grpcsharp_insecure_channel_create;
519 this.grpcsharp_secure_channel_create = DllImportsFromSharedLib_x86.grpcsharp_secure_channel_create;
520 this.grpcsharp_channel_create_call = DllImportsFromSharedLib_x86.grpcsharp_channel_create_call;
521 this.grpcsharp_channel_check_connectivity_state = DllImportsFromSharedLib_x86.grpcsharp_channel_check_connectivity_state;
522 this.grpcsharp_channel_watch_connectivity_state = DllImportsFromSharedLib_x86.grpcsharp_channel_watch_connectivity_state;
523 this.grpcsharp_channel_get_target = DllImportsFromSharedLib_x86.grpcsharp_channel_get_target;
524 this.grpcsharp_channel_destroy = DllImportsFromSharedLib_x86.grpcsharp_channel_destroy;
525 this.grpcsharp_sizeof_grpc_event = DllImportsFromSharedLib_x86.grpcsharp_sizeof_grpc_event;
526 this.grpcsharp_completion_queue_create_async = DllImportsFromSharedLib_x86.grpcsharp_completion_queue_create_async;
527 this.grpcsharp_completion_queue_create_sync = DllImportsFromSharedLib_x86.grpcsharp_completion_queue_create_sync;
528 this.grpcsharp_completion_queue_shutdown = DllImportsFromSharedLib_x86.grpcsharp_completion_queue_shutdown;
529 this.grpcsharp_completion_queue_next = DllImportsFromSharedLib_x86.grpcsharp_completion_queue_next;
530 this.grpcsharp_completion_queue_pluck = DllImportsFromSharedLib_x86.grpcsharp_completion_queue_pluck;
531 this.grpcsharp_completion_queue_destroy = DllImportsFromSharedLib_x86.grpcsharp_completion_queue_destroy;
532 this.gprsharp_free = DllImportsFromSharedLib_x86.gprsharp_free;
533 this.grpcsharp_metadata_array_create = DllImportsFromSharedLib_x86.grpcsharp_metadata_array_create;
534 this.grpcsharp_metadata_array_add = DllImportsFromSharedLib_x86.grpcsharp_metadata_array_add;
535 this.grpcsharp_metadata_array_count = DllImportsFromSharedLib_x86.grpcsharp_metadata_array_count;
536 this.grpcsharp_metadata_array_get_key = DllImportsFromSharedLib_x86.grpcsharp_metadata_array_get_key;
537 this.grpcsharp_metadata_array_get_value = DllImportsFromSharedLib_x86.grpcsharp_metadata_array_get_value;
538 this.grpcsharp_metadata_array_destroy_full = DllImportsFromSharedLib_x86.grpcsharp_metadata_array_destroy_full;
539 this.grpcsharp_redirect_log = DllImportsFromSharedLib_x86.grpcsharp_redirect_log;
540 this.grpcsharp_native_callback_dispatcher_init = DllImportsFromSharedLib_x86.grpcsharp_native_callback_dispatcher_init;
541 this.grpcsharp_metadata_credentials_create_from_plugin = DllImportsFromSharedLib_x86.grpcsharp_metadata_credentials_create_from_plugin;
542 this.grpcsharp_metadata_credentials_notify_from_plugin = DllImportsFromSharedLib_x86.grpcsharp_metadata_credentials_notify_from_plugin;
543 this.grpcsharp_ssl_server_credentials_create = DllImportsFromSharedLib_x86.grpcsharp_ssl_server_credentials_create;
544 this.grpcsharp_server_credentials_release = DllImportsFromSharedLib_x86.grpcsharp_server_credentials_release;
545 this.grpcsharp_server_create = DllImportsFromSharedLib_x86.grpcsharp_server_create;
546 this.grpcsharp_server_register_completion_queue = DllImportsFromSharedLib_x86.grpcsharp_server_register_completion_queue;
547 this.grpcsharp_server_add_insecure_http2_port = DllImportsFromSharedLib_x86.grpcsharp_server_add_insecure_http2_port;
548 this.grpcsharp_server_add_secure_http2_port = DllImportsFromSharedLib_x86.grpcsharp_server_add_secure_http2_port;
549 this.grpcsharp_server_start = DllImportsFromSharedLib_x86.grpcsharp_server_start;
550 this.grpcsharp_server_request_call = DllImportsFromSharedLib_x86.grpcsharp_server_request_call;
551 this.grpcsharp_server_cancel_all_calls = DllImportsFromSharedLib_x86.grpcsharp_server_cancel_all_calls;
552 this.grpcsharp_server_shutdown_and_notify_callback = DllImportsFromSharedLib_x86.grpcsharp_server_shutdown_and_notify_callback;
553 this.grpcsharp_server_destroy = DllImportsFromSharedLib_x86.grpcsharp_server_destroy;
554 this.grpcsharp_call_auth_context = DllImportsFromSharedLib_x86.grpcsharp_call_auth_context;
555 this.grpcsharp_auth_context_peer_identity_property_name = DllImportsFromSharedLib_x86.grpcsharp_auth_context_peer_identity_property_name;
556 this.grpcsharp_auth_context_property_iterator = DllImportsFromSharedLib_x86.grpcsharp_auth_context_property_iterator;
557 this.grpcsharp_auth_property_iterator_next = DllImportsFromSharedLib_x86.grpcsharp_auth_property_iterator_next;
558 this.grpcsharp_auth_context_release = DllImportsFromSharedLib_x86.grpcsharp_auth_context_release;
559 this.grpcsharp_slice_buffer_create = DllImportsFromSharedLib_x86.grpcsharp_slice_buffer_create;
560 this.grpcsharp_slice_buffer_adjust_tail_space = DllImportsFromSharedLib_x86.grpcsharp_slice_buffer_adjust_tail_space;
561 this.grpcsharp_slice_buffer_slice_count = DllImportsFromSharedLib_x86.grpcsharp_slice_buffer_slice_count;
562 this.grpcsharp_slice_buffer_slice_peek = DllImportsFromSharedLib_x86.grpcsharp_slice_buffer_slice_peek;
563 this.grpcsharp_slice_buffer_reset_and_unref = DllImportsFromSharedLib_x86.grpcsharp_slice_buffer_reset_and_unref;
564 this.grpcsharp_slice_buffer_destroy = DllImportsFromSharedLib_x86.grpcsharp_slice_buffer_destroy;
565 this.gprsharp_now = DllImportsFromSharedLib_x86.gprsharp_now;
566 this.gprsharp_inf_future = DllImportsFromSharedLib_x86.gprsharp_inf_future;
567 this.gprsharp_inf_past = DllImportsFromSharedLib_x86.gprsharp_inf_past;
568 this.gprsharp_convert_clock_type = DllImportsFromSharedLib_x86.gprsharp_convert_clock_type;
569 this.gprsharp_sizeof_timespec = DllImportsFromSharedLib_x86.gprsharp_sizeof_timespec;
570 this.grpcsharp_test_callback = DllImportsFromSharedLib_x86.grpcsharp_test_callback;
571 this.grpcsharp_test_nop = DllImportsFromSharedLib_x86.grpcsharp_test_nop;
572 this.grpcsharp_test_override_method = DllImportsFromSharedLib_x86.grpcsharp_test_override_method;
573 this.grpcsharp_test_call_start_unary_echo = DllImportsFromSharedLib_x86.grpcsharp_test_call_start_unary_echo;
576 public NativeMethods(DllImportsFromSharedLib_x64 unusedInstance)
578 this.grpcsharp_init = DllImportsFromSharedLib_x64.grpcsharp_init;
579 this.grpcsharp_shutdown = DllImportsFromSharedLib_x64.grpcsharp_shutdown;
580 this.grpcsharp_version_string = DllImportsFromSharedLib_x64.grpcsharp_version_string;
581 this.grpcsharp_batch_context_create = DllImportsFromSharedLib_x64.grpcsharp_batch_context_create;
582 this.grpcsharp_batch_context_recv_initial_metadata = DllImportsFromSharedLib_x64.grpcsharp_batch_context_recv_initial_metadata;
583 this.grpcsharp_batch_context_recv_message_length = DllImportsFromSharedLib_x64.grpcsharp_batch_context_recv_message_length;
584 this.grpcsharp_batch_context_recv_message_next_slice_peek = DllImportsFromSharedLib_x64.grpcsharp_batch_context_recv_message_next_slice_peek;
585 this.grpcsharp_batch_context_recv_status_on_client_status = DllImportsFromSharedLib_x64.grpcsharp_batch_context_recv_status_on_client_status;
586 this.grpcsharp_batch_context_recv_status_on_client_details = DllImportsFromSharedLib_x64.grpcsharp_batch_context_recv_status_on_client_details;
587 this.grpcsharp_batch_context_recv_status_on_client_error_string = DllImportsFromSharedLib_x64.grpcsharp_batch_context_recv_status_on_client_error_string;
588 this.grpcsharp_batch_context_recv_status_on_client_trailing_metadata = DllImportsFromSharedLib_x64.grpcsharp_batch_context_recv_status_on_client_trailing_metadata;
589 this.grpcsharp_batch_context_recv_close_on_server_cancelled = DllImportsFromSharedLib_x64.grpcsharp_batch_context_recv_close_on_server_cancelled;
590 this.grpcsharp_batch_context_reset = DllImportsFromSharedLib_x64.grpcsharp_batch_context_reset;
591 this.grpcsharp_batch_context_destroy = DllImportsFromSharedLib_x64.grpcsharp_batch_context_destroy;
592 this.grpcsharp_request_call_context_create = DllImportsFromSharedLib_x64.grpcsharp_request_call_context_create;
593 this.grpcsharp_request_call_context_call = DllImportsFromSharedLib_x64.grpcsharp_request_call_context_call;
594 this.grpcsharp_request_call_context_method = DllImportsFromSharedLib_x64.grpcsharp_request_call_context_method;
595 this.grpcsharp_request_call_context_host = DllImportsFromSharedLib_x64.grpcsharp_request_call_context_host;
596 this.grpcsharp_request_call_context_deadline = DllImportsFromSharedLib_x64.grpcsharp_request_call_context_deadline;
597 this.grpcsharp_request_call_context_request_metadata = DllImportsFromSharedLib_x64.grpcsharp_request_call_context_request_metadata;
598 this.grpcsharp_request_call_context_reset = DllImportsFromSharedLib_x64.grpcsharp_request_call_context_reset;
599 this.grpcsharp_request_call_context_destroy = DllImportsFromSharedLib_x64.grpcsharp_request_call_context_destroy;
600 this.grpcsharp_composite_call_credentials_create = DllImportsFromSharedLib_x64.grpcsharp_composite_call_credentials_create;
601 this.grpcsharp_call_credentials_release = DllImportsFromSharedLib_x64.grpcsharp_call_credentials_release;
602 this.grpcsharp_call_cancel = DllImportsFromSharedLib_x64.grpcsharp_call_cancel;
603 this.grpcsharp_call_cancel_with_status = DllImportsFromSharedLib_x64.grpcsharp_call_cancel_with_status;
604 this.grpcsharp_call_start_unary = DllImportsFromSharedLib_x64.grpcsharp_call_start_unary;
605 this.grpcsharp_call_start_client_streaming = DllImportsFromSharedLib_x64.grpcsharp_call_start_client_streaming;
606 this.grpcsharp_call_start_server_streaming = DllImportsFromSharedLib_x64.grpcsharp_call_start_server_streaming;
607 this.grpcsharp_call_start_duplex_streaming = DllImportsFromSharedLib_x64.grpcsharp_call_start_duplex_streaming;
608 this.grpcsharp_call_send_message = DllImportsFromSharedLib_x64.grpcsharp_call_send_message;
609 this.grpcsharp_call_send_close_from_client = DllImportsFromSharedLib_x64.grpcsharp_call_send_close_from_client;
610 this.grpcsharp_call_send_status_from_server = DllImportsFromSharedLib_x64.grpcsharp_call_send_status_from_server;
611 this.grpcsharp_call_recv_message = DllImportsFromSharedLib_x64.grpcsharp_call_recv_message;
612 this.grpcsharp_call_recv_initial_metadata = DllImportsFromSharedLib_x64.grpcsharp_call_recv_initial_metadata;
613 this.grpcsharp_call_start_serverside = DllImportsFromSharedLib_x64.grpcsharp_call_start_serverside;
614 this.grpcsharp_call_send_initial_metadata = DllImportsFromSharedLib_x64.grpcsharp_call_send_initial_metadata;
615 this.grpcsharp_call_set_credentials = DllImportsFromSharedLib_x64.grpcsharp_call_set_credentials;
616 this.grpcsharp_call_get_peer = DllImportsFromSharedLib_x64.grpcsharp_call_get_peer;
617 this.grpcsharp_call_destroy = DllImportsFromSharedLib_x64.grpcsharp_call_destroy;
618 this.grpcsharp_channel_args_create = DllImportsFromSharedLib_x64.grpcsharp_channel_args_create;
619 this.grpcsharp_channel_args_set_string = DllImportsFromSharedLib_x64.grpcsharp_channel_args_set_string;
620 this.grpcsharp_channel_args_set_integer = DllImportsFromSharedLib_x64.grpcsharp_channel_args_set_integer;
621 this.grpcsharp_channel_args_destroy = DllImportsFromSharedLib_x64.grpcsharp_channel_args_destroy;
622 this.grpcsharp_override_default_ssl_roots = DllImportsFromSharedLib_x64.grpcsharp_override_default_ssl_roots;
623 this.grpcsharp_ssl_credentials_create = DllImportsFromSharedLib_x64.grpcsharp_ssl_credentials_create;
624 this.grpcsharp_composite_channel_credentials_create = DllImportsFromSharedLib_x64.grpcsharp_composite_channel_credentials_create;
625 this.grpcsharp_channel_credentials_release = DllImportsFromSharedLib_x64.grpcsharp_channel_credentials_release;
626 this.grpcsharp_insecure_channel_create = DllImportsFromSharedLib_x64.grpcsharp_insecure_channel_create;
627 this.grpcsharp_secure_channel_create = DllImportsFromSharedLib_x64.grpcsharp_secure_channel_create;
628 this.grpcsharp_channel_create_call = DllImportsFromSharedLib_x64.grpcsharp_channel_create_call;
629 this.grpcsharp_channel_check_connectivity_state = DllImportsFromSharedLib_x64.grpcsharp_channel_check_connectivity_state;
630 this.grpcsharp_channel_watch_connectivity_state = DllImportsFromSharedLib_x64.grpcsharp_channel_watch_connectivity_state;
631 this.grpcsharp_channel_get_target = DllImportsFromSharedLib_x64.grpcsharp_channel_get_target;
632 this.grpcsharp_channel_destroy = DllImportsFromSharedLib_x64.grpcsharp_channel_destroy;
633 this.grpcsharp_sizeof_grpc_event = DllImportsFromSharedLib_x64.grpcsharp_sizeof_grpc_event;
634 this.grpcsharp_completion_queue_create_async = DllImportsFromSharedLib_x64.grpcsharp_completion_queue_create_async;
635 this.grpcsharp_completion_queue_create_sync = DllImportsFromSharedLib_x64.grpcsharp_completion_queue_create_sync;
636 this.grpcsharp_completion_queue_shutdown = DllImportsFromSharedLib_x64.grpcsharp_completion_queue_shutdown;
637 this.grpcsharp_completion_queue_next = DllImportsFromSharedLib_x64.grpcsharp_completion_queue_next;
638 this.grpcsharp_completion_queue_pluck = DllImportsFromSharedLib_x64.grpcsharp_completion_queue_pluck;
639 this.grpcsharp_completion_queue_destroy = DllImportsFromSharedLib_x64.grpcsharp_completion_queue_destroy;
640 this.gprsharp_free = DllImportsFromSharedLib_x64.gprsharp_free;
641 this.grpcsharp_metadata_array_create = DllImportsFromSharedLib_x64.grpcsharp_metadata_array_create;
642 this.grpcsharp_metadata_array_add = DllImportsFromSharedLib_x64.grpcsharp_metadata_array_add;
643 this.grpcsharp_metadata_array_count = DllImportsFromSharedLib_x64.grpcsharp_metadata_array_count;
644 this.grpcsharp_metadata_array_get_key = DllImportsFromSharedLib_x64.grpcsharp_metadata_array_get_key;
645 this.grpcsharp_metadata_array_get_value = DllImportsFromSharedLib_x64.grpcsharp_metadata_array_get_value;
646 this.grpcsharp_metadata_array_destroy_full = DllImportsFromSharedLib_x64.grpcsharp_metadata_array_destroy_full;
647 this.grpcsharp_redirect_log = DllImportsFromSharedLib_x64.grpcsharp_redirect_log;
648 this.grpcsharp_native_callback_dispatcher_init = DllImportsFromSharedLib_x64.grpcsharp_native_callback_dispatcher_init;
649 this.grpcsharp_metadata_credentials_create_from_plugin = DllImportsFromSharedLib_x64.grpcsharp_metadata_credentials_create_from_plugin;
650 this.grpcsharp_metadata_credentials_notify_from_plugin = DllImportsFromSharedLib_x64.grpcsharp_metadata_credentials_notify_from_plugin;
651 this.grpcsharp_ssl_server_credentials_create = DllImportsFromSharedLib_x64.grpcsharp_ssl_server_credentials_create;
652 this.grpcsharp_server_credentials_release = DllImportsFromSharedLib_x64.grpcsharp_server_credentials_release;
653 this.grpcsharp_server_create = DllImportsFromSharedLib_x64.grpcsharp_server_create;
654 this.grpcsharp_server_register_completion_queue = DllImportsFromSharedLib_x64.grpcsharp_server_register_completion_queue;
655 this.grpcsharp_server_add_insecure_http2_port = DllImportsFromSharedLib_x64.grpcsharp_server_add_insecure_http2_port;
656 this.grpcsharp_server_add_secure_http2_port = DllImportsFromSharedLib_x64.grpcsharp_server_add_secure_http2_port;
657 this.grpcsharp_server_start = DllImportsFromSharedLib_x64.grpcsharp_server_start;
658 this.grpcsharp_server_request_call = DllImportsFromSharedLib_x64.grpcsharp_server_request_call;
659 this.grpcsharp_server_cancel_all_calls = DllImportsFromSharedLib_x64.grpcsharp_server_cancel_all_calls;
660 this.grpcsharp_server_shutdown_and_notify_callback = DllImportsFromSharedLib_x64.grpcsharp_server_shutdown_and_notify_callback;
661 this.grpcsharp_server_destroy = DllImportsFromSharedLib_x64.grpcsharp_server_destroy;
662 this.grpcsharp_call_auth_context = DllImportsFromSharedLib_x64.grpcsharp_call_auth_context;
663 this.grpcsharp_auth_context_peer_identity_property_name = DllImportsFromSharedLib_x64.grpcsharp_auth_context_peer_identity_property_name;
664 this.grpcsharp_auth_context_property_iterator = DllImportsFromSharedLib_x64.grpcsharp_auth_context_property_iterator;
665 this.grpcsharp_auth_property_iterator_next = DllImportsFromSharedLib_x64.grpcsharp_auth_property_iterator_next;
666 this.grpcsharp_auth_context_release = DllImportsFromSharedLib_x64.grpcsharp_auth_context_release;
667 this.grpcsharp_slice_buffer_create = DllImportsFromSharedLib_x64.grpcsharp_slice_buffer_create;
668 this.grpcsharp_slice_buffer_adjust_tail_space = DllImportsFromSharedLib_x64.grpcsharp_slice_buffer_adjust_tail_space;
669 this.grpcsharp_slice_buffer_slice_count = DllImportsFromSharedLib_x64.grpcsharp_slice_buffer_slice_count;
670 this.grpcsharp_slice_buffer_slice_peek = DllImportsFromSharedLib_x64.grpcsharp_slice_buffer_slice_peek;
671 this.grpcsharp_slice_buffer_reset_and_unref = DllImportsFromSharedLib_x64.grpcsharp_slice_buffer_reset_and_unref;
672 this.grpcsharp_slice_buffer_destroy = DllImportsFromSharedLib_x64.grpcsharp_slice_buffer_destroy;
673 this.gprsharp_now = DllImportsFromSharedLib_x64.gprsharp_now;
674 this.gprsharp_inf_future = DllImportsFromSharedLib_x64.gprsharp_inf_future;
675 this.gprsharp_inf_past = DllImportsFromSharedLib_x64.gprsharp_inf_past;
676 this.gprsharp_convert_clock_type = DllImportsFromSharedLib_x64.gprsharp_convert_clock_type;
677 this.gprsharp_sizeof_timespec = DllImportsFromSharedLib_x64.gprsharp_sizeof_timespec;
678 this.grpcsharp_test_callback = DllImportsFromSharedLib_x64.grpcsharp_test_callback;
679 this.grpcsharp_test_nop = DllImportsFromSharedLib_x64.grpcsharp_test_nop;
680 this.grpcsharp_test_override_method = DllImportsFromSharedLib_x64.grpcsharp_test_override_method;
681 this.grpcsharp_test_call_start_unary_echo = DllImportsFromSharedLib_x64.grpcsharp_test_call_start_unary_echo;
684 public NativeMethods(DllImportsFromSharedLib_x86_dll unusedInstance)
686 this.grpcsharp_init = DllImportsFromSharedLib_x86_dll.grpcsharp_init;
687 this.grpcsharp_shutdown = DllImportsFromSharedLib_x86_dll.grpcsharp_shutdown;
688 this.grpcsharp_version_string = DllImportsFromSharedLib_x86_dll.grpcsharp_version_string;
689 this.grpcsharp_batch_context_create = DllImportsFromSharedLib_x86_dll.grpcsharp_batch_context_create;
690 this.grpcsharp_batch_context_recv_initial_metadata = DllImportsFromSharedLib_x86_dll.grpcsharp_batch_context_recv_initial_metadata;
691 this.grpcsharp_batch_context_recv_message_length = DllImportsFromSharedLib_x86_dll.grpcsharp_batch_context_recv_message_length;
692 this.grpcsharp_batch_context_recv_message_next_slice_peek = DllImportsFromSharedLib_x86_dll.grpcsharp_batch_context_recv_message_next_slice_peek;
693 this.grpcsharp_batch_context_recv_status_on_client_status = DllImportsFromSharedLib_x86_dll.grpcsharp_batch_context_recv_status_on_client_status;
694 this.grpcsharp_batch_context_recv_status_on_client_details = DllImportsFromSharedLib_x86_dll.grpcsharp_batch_context_recv_status_on_client_details;
695 this.grpcsharp_batch_context_recv_status_on_client_error_string = DllImportsFromSharedLib_x86_dll.grpcsharp_batch_context_recv_status_on_client_error_string;
696 this.grpcsharp_batch_context_recv_status_on_client_trailing_metadata = DllImportsFromSharedLib_x86_dll.grpcsharp_batch_context_recv_status_on_client_trailing_metadata;
697 this.grpcsharp_batch_context_recv_close_on_server_cancelled = DllImportsFromSharedLib_x86_dll.grpcsharp_batch_context_recv_close_on_server_cancelled;
698 this.grpcsharp_batch_context_reset = DllImportsFromSharedLib_x86_dll.grpcsharp_batch_context_reset;
699 this.grpcsharp_batch_context_destroy = DllImportsFromSharedLib_x86_dll.grpcsharp_batch_context_destroy;
700 this.grpcsharp_request_call_context_create = DllImportsFromSharedLib_x86_dll.grpcsharp_request_call_context_create;
701 this.grpcsharp_request_call_context_call = DllImportsFromSharedLib_x86_dll.grpcsharp_request_call_context_call;
702 this.grpcsharp_request_call_context_method = DllImportsFromSharedLib_x86_dll.grpcsharp_request_call_context_method;
703 this.grpcsharp_request_call_context_host = DllImportsFromSharedLib_x86_dll.grpcsharp_request_call_context_host;
704 this.grpcsharp_request_call_context_deadline = DllImportsFromSharedLib_x86_dll.grpcsharp_request_call_context_deadline;
705 this.grpcsharp_request_call_context_request_metadata = DllImportsFromSharedLib_x86_dll.grpcsharp_request_call_context_request_metadata;
706 this.grpcsharp_request_call_context_reset = DllImportsFromSharedLib_x86_dll.grpcsharp_request_call_context_reset;
707 this.grpcsharp_request_call_context_destroy = DllImportsFromSharedLib_x86_dll.grpcsharp_request_call_context_destroy;
708 this.grpcsharp_composite_call_credentials_create = DllImportsFromSharedLib_x86_dll.grpcsharp_composite_call_credentials_create;
709 this.grpcsharp_call_credentials_release = DllImportsFromSharedLib_x86_dll.grpcsharp_call_credentials_release;
710 this.grpcsharp_call_cancel = DllImportsFromSharedLib_x86_dll.grpcsharp_call_cancel;
711 this.grpcsharp_call_cancel_with_status = DllImportsFromSharedLib_x86_dll.grpcsharp_call_cancel_with_status;
712 this.grpcsharp_call_start_unary = DllImportsFromSharedLib_x86_dll.grpcsharp_call_start_unary;
713 this.grpcsharp_call_start_client_streaming = DllImportsFromSharedLib_x86_dll.grpcsharp_call_start_client_streaming;
714 this.grpcsharp_call_start_server_streaming = DllImportsFromSharedLib_x86_dll.grpcsharp_call_start_server_streaming;
715 this.grpcsharp_call_start_duplex_streaming = DllImportsFromSharedLib_x86_dll.grpcsharp_call_start_duplex_streaming;
716 this.grpcsharp_call_send_message = DllImportsFromSharedLib_x86_dll.grpcsharp_call_send_message;
717 this.grpcsharp_call_send_close_from_client = DllImportsFromSharedLib_x86_dll.grpcsharp_call_send_close_from_client;
718 this.grpcsharp_call_send_status_from_server = DllImportsFromSharedLib_x86_dll.grpcsharp_call_send_status_from_server;
719 this.grpcsharp_call_recv_message = DllImportsFromSharedLib_x86_dll.grpcsharp_call_recv_message;
720 this.grpcsharp_call_recv_initial_metadata = DllImportsFromSharedLib_x86_dll.grpcsharp_call_recv_initial_metadata;
721 this.grpcsharp_call_start_serverside = DllImportsFromSharedLib_x86_dll.grpcsharp_call_start_serverside;
722 this.grpcsharp_call_send_initial_metadata = DllImportsFromSharedLib_x86_dll.grpcsharp_call_send_initial_metadata;
723 this.grpcsharp_call_set_credentials = DllImportsFromSharedLib_x86_dll.grpcsharp_call_set_credentials;
724 this.grpcsharp_call_get_peer = DllImportsFromSharedLib_x86_dll.grpcsharp_call_get_peer;
725 this.grpcsharp_call_destroy = DllImportsFromSharedLib_x86_dll.grpcsharp_call_destroy;
726 this.grpcsharp_channel_args_create = DllImportsFromSharedLib_x86_dll.grpcsharp_channel_args_create;
727 this.grpcsharp_channel_args_set_string = DllImportsFromSharedLib_x86_dll.grpcsharp_channel_args_set_string;
728 this.grpcsharp_channel_args_set_integer = DllImportsFromSharedLib_x86_dll.grpcsharp_channel_args_set_integer;
729 this.grpcsharp_channel_args_destroy = DllImportsFromSharedLib_x86_dll.grpcsharp_channel_args_destroy;
730 this.grpcsharp_override_default_ssl_roots = DllImportsFromSharedLib_x86_dll.grpcsharp_override_default_ssl_roots;
731 this.grpcsharp_ssl_credentials_create = DllImportsFromSharedLib_x86_dll.grpcsharp_ssl_credentials_create;
732 this.grpcsharp_composite_channel_credentials_create = DllImportsFromSharedLib_x86_dll.grpcsharp_composite_channel_credentials_create;
733 this.grpcsharp_channel_credentials_release = DllImportsFromSharedLib_x86_dll.grpcsharp_channel_credentials_release;
734 this.grpcsharp_insecure_channel_create = DllImportsFromSharedLib_x86_dll.grpcsharp_insecure_channel_create;
735 this.grpcsharp_secure_channel_create = DllImportsFromSharedLib_x86_dll.grpcsharp_secure_channel_create;
736 this.grpcsharp_channel_create_call = DllImportsFromSharedLib_x86_dll.grpcsharp_channel_create_call;
737 this.grpcsharp_channel_check_connectivity_state = DllImportsFromSharedLib_x86_dll.grpcsharp_channel_check_connectivity_state;
738 this.grpcsharp_channel_watch_connectivity_state = DllImportsFromSharedLib_x86_dll.grpcsharp_channel_watch_connectivity_state;
739 this.grpcsharp_channel_get_target = DllImportsFromSharedLib_x86_dll.grpcsharp_channel_get_target;
740 this.grpcsharp_channel_destroy = DllImportsFromSharedLib_x86_dll.grpcsharp_channel_destroy;
741 this.grpcsharp_sizeof_grpc_event = DllImportsFromSharedLib_x86_dll.grpcsharp_sizeof_grpc_event;
742 this.grpcsharp_completion_queue_create_async = DllImportsFromSharedLib_x86_dll.grpcsharp_completion_queue_create_async;
743 this.grpcsharp_completion_queue_create_sync = DllImportsFromSharedLib_x86_dll.grpcsharp_completion_queue_create_sync;
744 this.grpcsharp_completion_queue_shutdown = DllImportsFromSharedLib_x86_dll.grpcsharp_completion_queue_shutdown;
745 this.grpcsharp_completion_queue_next = DllImportsFromSharedLib_x86_dll.grpcsharp_completion_queue_next;
746 this.grpcsharp_completion_queue_pluck = DllImportsFromSharedLib_x86_dll.grpcsharp_completion_queue_pluck;
747 this.grpcsharp_completion_queue_destroy = DllImportsFromSharedLib_x86_dll.grpcsharp_completion_queue_destroy;
748 this.gprsharp_free = DllImportsFromSharedLib_x86_dll.gprsharp_free;
749 this.grpcsharp_metadata_array_create = DllImportsFromSharedLib_x86_dll.grpcsharp_metadata_array_create;
750 this.grpcsharp_metadata_array_add = DllImportsFromSharedLib_x86_dll.grpcsharp_metadata_array_add;
751 this.grpcsharp_metadata_array_count = DllImportsFromSharedLib_x86_dll.grpcsharp_metadata_array_count;
752 this.grpcsharp_metadata_array_get_key = DllImportsFromSharedLib_x86_dll.grpcsharp_metadata_array_get_key;
753 this.grpcsharp_metadata_array_get_value = DllImportsFromSharedLib_x86_dll.grpcsharp_metadata_array_get_value;
754 this.grpcsharp_metadata_array_destroy_full = DllImportsFromSharedLib_x86_dll.grpcsharp_metadata_array_destroy_full;
755 this.grpcsharp_redirect_log = DllImportsFromSharedLib_x86_dll.grpcsharp_redirect_log;
756 this.grpcsharp_native_callback_dispatcher_init = DllImportsFromSharedLib_x86_dll.grpcsharp_native_callback_dispatcher_init;
757 this.grpcsharp_metadata_credentials_create_from_plugin = DllImportsFromSharedLib_x86_dll.grpcsharp_metadata_credentials_create_from_plugin;
758 this.grpcsharp_metadata_credentials_notify_from_plugin = DllImportsFromSharedLib_x86_dll.grpcsharp_metadata_credentials_notify_from_plugin;
759 this.grpcsharp_ssl_server_credentials_create = DllImportsFromSharedLib_x86_dll.grpcsharp_ssl_server_credentials_create;
760 this.grpcsharp_server_credentials_release = DllImportsFromSharedLib_x86_dll.grpcsharp_server_credentials_release;
761 this.grpcsharp_server_create = DllImportsFromSharedLib_x86_dll.grpcsharp_server_create;
762 this.grpcsharp_server_register_completion_queue = DllImportsFromSharedLib_x86_dll.grpcsharp_server_register_completion_queue;
763 this.grpcsharp_server_add_insecure_http2_port = DllImportsFromSharedLib_x86_dll.grpcsharp_server_add_insecure_http2_port;
764 this.grpcsharp_server_add_secure_http2_port = DllImportsFromSharedLib_x86_dll.grpcsharp_server_add_secure_http2_port;
765 this.grpcsharp_server_start = DllImportsFromSharedLib_x86_dll.grpcsharp_server_start;
766 this.grpcsharp_server_request_call = DllImportsFromSharedLib_x86_dll.grpcsharp_server_request_call;
767 this.grpcsharp_server_cancel_all_calls = DllImportsFromSharedLib_x86_dll.grpcsharp_server_cancel_all_calls;
768 this.grpcsharp_server_shutdown_and_notify_callback = DllImportsFromSharedLib_x86_dll.grpcsharp_server_shutdown_and_notify_callback;
769 this.grpcsharp_server_destroy = DllImportsFromSharedLib_x86_dll.grpcsharp_server_destroy;
770 this.grpcsharp_call_auth_context = DllImportsFromSharedLib_x86_dll.grpcsharp_call_auth_context;
771 this.grpcsharp_auth_context_peer_identity_property_name = DllImportsFromSharedLib_x86_dll.grpcsharp_auth_context_peer_identity_property_name;
772 this.grpcsharp_auth_context_property_iterator = DllImportsFromSharedLib_x86_dll.grpcsharp_auth_context_property_iterator;
773 this.grpcsharp_auth_property_iterator_next = DllImportsFromSharedLib_x86_dll.grpcsharp_auth_property_iterator_next;
774 this.grpcsharp_auth_context_release = DllImportsFromSharedLib_x86_dll.grpcsharp_auth_context_release;
775 this.grpcsharp_slice_buffer_create = DllImportsFromSharedLib_x86_dll.grpcsharp_slice_buffer_create;
776 this.grpcsharp_slice_buffer_adjust_tail_space = DllImportsFromSharedLib_x86_dll.grpcsharp_slice_buffer_adjust_tail_space;
777 this.grpcsharp_slice_buffer_slice_count = DllImportsFromSharedLib_x86_dll.grpcsharp_slice_buffer_slice_count;
778 this.grpcsharp_slice_buffer_slice_peek = DllImportsFromSharedLib_x86_dll.grpcsharp_slice_buffer_slice_peek;
779 this.grpcsharp_slice_buffer_reset_and_unref = DllImportsFromSharedLib_x86_dll.grpcsharp_slice_buffer_reset_and_unref;
780 this.grpcsharp_slice_buffer_destroy = DllImportsFromSharedLib_x86_dll.grpcsharp_slice_buffer_destroy;
781 this.gprsharp_now = DllImportsFromSharedLib_x86_dll.gprsharp_now;
782 this.gprsharp_inf_future = DllImportsFromSharedLib_x86_dll.gprsharp_inf_future;
783 this.gprsharp_inf_past = DllImportsFromSharedLib_x86_dll.gprsharp_inf_past;
784 this.gprsharp_convert_clock_type = DllImportsFromSharedLib_x86_dll.gprsharp_convert_clock_type;
785 this.gprsharp_sizeof_timespec = DllImportsFromSharedLib_x86_dll.gprsharp_sizeof_timespec;
786 this.grpcsharp_test_callback = DllImportsFromSharedLib_x86_dll.grpcsharp_test_callback;
787 this.grpcsharp_test_nop = DllImportsFromSharedLib_x86_dll.grpcsharp_test_nop;
788 this.grpcsharp_test_override_method = DllImportsFromSharedLib_x86_dll.grpcsharp_test_override_method;
789 this.grpcsharp_test_call_start_unary_echo = DllImportsFromSharedLib_x86_dll.grpcsharp_test_call_start_unary_echo;
792 public NativeMethods(DllImportsFromSharedLib_x64_dll unusedInstance)
794 this.grpcsharp_init = DllImportsFromSharedLib_x64_dll.grpcsharp_init;
795 this.grpcsharp_shutdown = DllImportsFromSharedLib_x64_dll.grpcsharp_shutdown;
796 this.grpcsharp_version_string = DllImportsFromSharedLib_x64_dll.grpcsharp_version_string;
797 this.grpcsharp_batch_context_create = DllImportsFromSharedLib_x64_dll.grpcsharp_batch_context_create;
798 this.grpcsharp_batch_context_recv_initial_metadata = DllImportsFromSharedLib_x64_dll.grpcsharp_batch_context_recv_initial_metadata;
799 this.grpcsharp_batch_context_recv_message_length = DllImportsFromSharedLib_x64_dll.grpcsharp_batch_context_recv_message_length;
800 this.grpcsharp_batch_context_recv_message_next_slice_peek = DllImportsFromSharedLib_x64_dll.grpcsharp_batch_context_recv_message_next_slice_peek;
801 this.grpcsharp_batch_context_recv_status_on_client_status = DllImportsFromSharedLib_x64_dll.grpcsharp_batch_context_recv_status_on_client_status;
802 this.grpcsharp_batch_context_recv_status_on_client_details = DllImportsFromSharedLib_x64_dll.grpcsharp_batch_context_recv_status_on_client_details;
803 this.grpcsharp_batch_context_recv_status_on_client_error_string = DllImportsFromSharedLib_x64_dll.grpcsharp_batch_context_recv_status_on_client_error_string;
804 this.grpcsharp_batch_context_recv_status_on_client_trailing_metadata = DllImportsFromSharedLib_x64_dll.grpcsharp_batch_context_recv_status_on_client_trailing_metadata;
805 this.grpcsharp_batch_context_recv_close_on_server_cancelled = DllImportsFromSharedLib_x64_dll.grpcsharp_batch_context_recv_close_on_server_cancelled;
806 this.grpcsharp_batch_context_reset = DllImportsFromSharedLib_x64_dll.grpcsharp_batch_context_reset;
807 this.grpcsharp_batch_context_destroy = DllImportsFromSharedLib_x64_dll.grpcsharp_batch_context_destroy;
808 this.grpcsharp_request_call_context_create = DllImportsFromSharedLib_x64_dll.grpcsharp_request_call_context_create;
809 this.grpcsharp_request_call_context_call = DllImportsFromSharedLib_x64_dll.grpcsharp_request_call_context_call;
810 this.grpcsharp_request_call_context_method = DllImportsFromSharedLib_x64_dll.grpcsharp_request_call_context_method;
811 this.grpcsharp_request_call_context_host = DllImportsFromSharedLib_x64_dll.grpcsharp_request_call_context_host;
812 this.grpcsharp_request_call_context_deadline = DllImportsFromSharedLib_x64_dll.grpcsharp_request_call_context_deadline;
813 this.grpcsharp_request_call_context_request_metadata = DllImportsFromSharedLib_x64_dll.grpcsharp_request_call_context_request_metadata;
814 this.grpcsharp_request_call_context_reset = DllImportsFromSharedLib_x64_dll.grpcsharp_request_call_context_reset;
815 this.grpcsharp_request_call_context_destroy = DllImportsFromSharedLib_x64_dll.grpcsharp_request_call_context_destroy;
816 this.grpcsharp_composite_call_credentials_create = DllImportsFromSharedLib_x64_dll.grpcsharp_composite_call_credentials_create;
817 this.grpcsharp_call_credentials_release = DllImportsFromSharedLib_x64_dll.grpcsharp_call_credentials_release;
818 this.grpcsharp_call_cancel = DllImportsFromSharedLib_x64_dll.grpcsharp_call_cancel;
819 this.grpcsharp_call_cancel_with_status = DllImportsFromSharedLib_x64_dll.grpcsharp_call_cancel_with_status;
820 this.grpcsharp_call_start_unary = DllImportsFromSharedLib_x64_dll.grpcsharp_call_start_unary;
821 this.grpcsharp_call_start_client_streaming = DllImportsFromSharedLib_x64_dll.grpcsharp_call_start_client_streaming;
822 this.grpcsharp_call_start_server_streaming = DllImportsFromSharedLib_x64_dll.grpcsharp_call_start_server_streaming;
823 this.grpcsharp_call_start_duplex_streaming = DllImportsFromSharedLib_x64_dll.grpcsharp_call_start_duplex_streaming;
824 this.grpcsharp_call_send_message = DllImportsFromSharedLib_x64_dll.grpcsharp_call_send_message;
825 this.grpcsharp_call_send_close_from_client = DllImportsFromSharedLib_x64_dll.grpcsharp_call_send_close_from_client;
826 this.grpcsharp_call_send_status_from_server = DllImportsFromSharedLib_x64_dll.grpcsharp_call_send_status_from_server;
827 this.grpcsharp_call_recv_message = DllImportsFromSharedLib_x64_dll.grpcsharp_call_recv_message;
828 this.grpcsharp_call_recv_initial_metadata = DllImportsFromSharedLib_x64_dll.grpcsharp_call_recv_initial_metadata;
829 this.grpcsharp_call_start_serverside = DllImportsFromSharedLib_x64_dll.grpcsharp_call_start_serverside;
830 this.grpcsharp_call_send_initial_metadata = DllImportsFromSharedLib_x64_dll.grpcsharp_call_send_initial_metadata;
831 this.grpcsharp_call_set_credentials = DllImportsFromSharedLib_x64_dll.grpcsharp_call_set_credentials;
832 this.grpcsharp_call_get_peer = DllImportsFromSharedLib_x64_dll.grpcsharp_call_get_peer;
833 this.grpcsharp_call_destroy = DllImportsFromSharedLib_x64_dll.grpcsharp_call_destroy;
834 this.grpcsharp_channel_args_create = DllImportsFromSharedLib_x64_dll.grpcsharp_channel_args_create;
835 this.grpcsharp_channel_args_set_string = DllImportsFromSharedLib_x64_dll.grpcsharp_channel_args_set_string;
836 this.grpcsharp_channel_args_set_integer = DllImportsFromSharedLib_x64_dll.grpcsharp_channel_args_set_integer;
837 this.grpcsharp_channel_args_destroy = DllImportsFromSharedLib_x64_dll.grpcsharp_channel_args_destroy;
838 this.grpcsharp_override_default_ssl_roots = DllImportsFromSharedLib_x64_dll.grpcsharp_override_default_ssl_roots;
839 this.grpcsharp_ssl_credentials_create = DllImportsFromSharedLib_x64_dll.grpcsharp_ssl_credentials_create;
840 this.grpcsharp_composite_channel_credentials_create = DllImportsFromSharedLib_x64_dll.grpcsharp_composite_channel_credentials_create;
841 this.grpcsharp_channel_credentials_release = DllImportsFromSharedLib_x64_dll.grpcsharp_channel_credentials_release;
842 this.grpcsharp_insecure_channel_create = DllImportsFromSharedLib_x64_dll.grpcsharp_insecure_channel_create;
843 this.grpcsharp_secure_channel_create = DllImportsFromSharedLib_x64_dll.grpcsharp_secure_channel_create;
844 this.grpcsharp_channel_create_call = DllImportsFromSharedLib_x64_dll.grpcsharp_channel_create_call;
845 this.grpcsharp_channel_check_connectivity_state = DllImportsFromSharedLib_x64_dll.grpcsharp_channel_check_connectivity_state;
846 this.grpcsharp_channel_watch_connectivity_state = DllImportsFromSharedLib_x64_dll.grpcsharp_channel_watch_connectivity_state;
847 this.grpcsharp_channel_get_target = DllImportsFromSharedLib_x64_dll.grpcsharp_channel_get_target;
848 this.grpcsharp_channel_destroy = DllImportsFromSharedLib_x64_dll.grpcsharp_channel_destroy;
849 this.grpcsharp_sizeof_grpc_event = DllImportsFromSharedLib_x64_dll.grpcsharp_sizeof_grpc_event;
850 this.grpcsharp_completion_queue_create_async = DllImportsFromSharedLib_x64_dll.grpcsharp_completion_queue_create_async;
851 this.grpcsharp_completion_queue_create_sync = DllImportsFromSharedLib_x64_dll.grpcsharp_completion_queue_create_sync;
852 this.grpcsharp_completion_queue_shutdown = DllImportsFromSharedLib_x64_dll.grpcsharp_completion_queue_shutdown;
853 this.grpcsharp_completion_queue_next = DllImportsFromSharedLib_x64_dll.grpcsharp_completion_queue_next;
854 this.grpcsharp_completion_queue_pluck = DllImportsFromSharedLib_x64_dll.grpcsharp_completion_queue_pluck;
855 this.grpcsharp_completion_queue_destroy = DllImportsFromSharedLib_x64_dll.grpcsharp_completion_queue_destroy;
856 this.gprsharp_free = DllImportsFromSharedLib_x64_dll.gprsharp_free;
857 this.grpcsharp_metadata_array_create = DllImportsFromSharedLib_x64_dll.grpcsharp_metadata_array_create;
858 this.grpcsharp_metadata_array_add = DllImportsFromSharedLib_x64_dll.grpcsharp_metadata_array_add;
859 this.grpcsharp_metadata_array_count = DllImportsFromSharedLib_x64_dll.grpcsharp_metadata_array_count;
860 this.grpcsharp_metadata_array_get_key = DllImportsFromSharedLib_x64_dll.grpcsharp_metadata_array_get_key;
861 this.grpcsharp_metadata_array_get_value = DllImportsFromSharedLib_x64_dll.grpcsharp_metadata_array_get_value;
862 this.grpcsharp_metadata_array_destroy_full = DllImportsFromSharedLib_x64_dll.grpcsharp_metadata_array_destroy_full;
863 this.grpcsharp_redirect_log = DllImportsFromSharedLib_x64_dll.grpcsharp_redirect_log;
864 this.grpcsharp_native_callback_dispatcher_init = DllImportsFromSharedLib_x64_dll.grpcsharp_native_callback_dispatcher_init;
865 this.grpcsharp_metadata_credentials_create_from_plugin = DllImportsFromSharedLib_x64_dll.grpcsharp_metadata_credentials_create_from_plugin;
866 this.grpcsharp_metadata_credentials_notify_from_plugin = DllImportsFromSharedLib_x64_dll.grpcsharp_metadata_credentials_notify_from_plugin;
867 this.grpcsharp_ssl_server_credentials_create = DllImportsFromSharedLib_x64_dll.grpcsharp_ssl_server_credentials_create;
868 this.grpcsharp_server_credentials_release = DllImportsFromSharedLib_x64_dll.grpcsharp_server_credentials_release;
869 this.grpcsharp_server_create = DllImportsFromSharedLib_x64_dll.grpcsharp_server_create;
870 this.grpcsharp_server_register_completion_queue = DllImportsFromSharedLib_x64_dll.grpcsharp_server_register_completion_queue;
871 this.grpcsharp_server_add_insecure_http2_port = DllImportsFromSharedLib_x64_dll.grpcsharp_server_add_insecure_http2_port;
872 this.grpcsharp_server_add_secure_http2_port = DllImportsFromSharedLib_x64_dll.grpcsharp_server_add_secure_http2_port;
873 this.grpcsharp_server_start = DllImportsFromSharedLib_x64_dll.grpcsharp_server_start;
874 this.grpcsharp_server_request_call = DllImportsFromSharedLib_x64_dll.grpcsharp_server_request_call;
875 this.grpcsharp_server_cancel_all_calls = DllImportsFromSharedLib_x64_dll.grpcsharp_server_cancel_all_calls;
876 this.grpcsharp_server_shutdown_and_notify_callback = DllImportsFromSharedLib_x64_dll.grpcsharp_server_shutdown_and_notify_callback;
877 this.grpcsharp_server_destroy = DllImportsFromSharedLib_x64_dll.grpcsharp_server_destroy;
878 this.grpcsharp_call_auth_context = DllImportsFromSharedLib_x64_dll.grpcsharp_call_auth_context;
879 this.grpcsharp_auth_context_peer_identity_property_name = DllImportsFromSharedLib_x64_dll.grpcsharp_auth_context_peer_identity_property_name;
880 this.grpcsharp_auth_context_property_iterator = DllImportsFromSharedLib_x64_dll.grpcsharp_auth_context_property_iterator;
881 this.grpcsharp_auth_property_iterator_next = DllImportsFromSharedLib_x64_dll.grpcsharp_auth_property_iterator_next;
882 this.grpcsharp_auth_context_release = DllImportsFromSharedLib_x64_dll.grpcsharp_auth_context_release;
883 this.grpcsharp_slice_buffer_create = DllImportsFromSharedLib_x64_dll.grpcsharp_slice_buffer_create;
884 this.grpcsharp_slice_buffer_adjust_tail_space = DllImportsFromSharedLib_x64_dll.grpcsharp_slice_buffer_adjust_tail_space;
885 this.grpcsharp_slice_buffer_slice_count = DllImportsFromSharedLib_x64_dll.grpcsharp_slice_buffer_slice_count;
886 this.grpcsharp_slice_buffer_slice_peek = DllImportsFromSharedLib_x64_dll.grpcsharp_slice_buffer_slice_peek;
887 this.grpcsharp_slice_buffer_reset_and_unref = DllImportsFromSharedLib_x64_dll.grpcsharp_slice_buffer_reset_and_unref;
888 this.grpcsharp_slice_buffer_destroy = DllImportsFromSharedLib_x64_dll.grpcsharp_slice_buffer_destroy;
889 this.gprsharp_now = DllImportsFromSharedLib_x64_dll.gprsharp_now;
890 this.gprsharp_inf_future = DllImportsFromSharedLib_x64_dll.gprsharp_inf_future;
891 this.gprsharp_inf_past = DllImportsFromSharedLib_x64_dll.gprsharp_inf_past;
892 this.gprsharp_convert_clock_type = DllImportsFromSharedLib_x64_dll.gprsharp_convert_clock_type;
893 this.gprsharp_sizeof_timespec = DllImportsFromSharedLib_x64_dll.gprsharp_sizeof_timespec;
894 this.grpcsharp_test_callback = DllImportsFromSharedLib_x64_dll.grpcsharp_test_callback;
895 this.grpcsharp_test_nop = DllImportsFromSharedLib_x64_dll.grpcsharp_test_nop;
896 this.grpcsharp_test_override_method = DllImportsFromSharedLib_x64_dll.grpcsharp_test_override_method;
897 this.grpcsharp_test_call_start_unary_echo = DllImportsFromSharedLib_x64_dll.grpcsharp_test_call_start_unary_echo;
901 /// Delegate types for all published native methods. Declared under inner class to prevent scope pollution.
903 public class Delegates
905 public delegate void grpcsharp_init_delegate();
906 public delegate void grpcsharp_shutdown_delegate();
907 public delegate IntPtr grpcsharp_version_string_delegate(); // returns not-owned const char*
908 public delegate BatchContextSafeHandle grpcsharp_batch_context_create_delegate();
909 public delegate IntPtr grpcsharp_batch_context_recv_initial_metadata_delegate(BatchContextSafeHandle ctx);
910 public delegate IntPtr grpcsharp_batch_context_recv_message_length_delegate(BatchContextSafeHandle ctx);
911 public delegate int grpcsharp_batch_context_recv_message_next_slice_peek_delegate(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr);
912 public delegate StatusCode grpcsharp_batch_context_recv_status_on_client_status_delegate(BatchContextSafeHandle ctx);
913 public delegate IntPtr grpcsharp_batch_context_recv_status_on_client_details_delegate(BatchContextSafeHandle ctx, out UIntPtr detailsLength);
914 public delegate IntPtr grpcsharp_batch_context_recv_status_on_client_error_string_delegate(BatchContextSafeHandle ctx);
915 public delegate IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata_delegate(BatchContextSafeHandle ctx);
916 public delegate int grpcsharp_batch_context_recv_close_on_server_cancelled_delegate(BatchContextSafeHandle ctx);
917 public delegate void grpcsharp_batch_context_reset_delegate(BatchContextSafeHandle ctx);
918 public delegate void grpcsharp_batch_context_destroy_delegate(IntPtr ctx);
919 public delegate RequestCallContextSafeHandle grpcsharp_request_call_context_create_delegate();
920 public delegate CallSafeHandle grpcsharp_request_call_context_call_delegate(RequestCallContextSafeHandle ctx);
921 public delegate IntPtr grpcsharp_request_call_context_method_delegate(RequestCallContextSafeHandle ctx, out UIntPtr methodLength);
922 public delegate IntPtr grpcsharp_request_call_context_host_delegate(RequestCallContextSafeHandle ctx, out UIntPtr hostLength);
923 public delegate Timespec grpcsharp_request_call_context_deadline_delegate(RequestCallContextSafeHandle ctx);
924 public delegate IntPtr grpcsharp_request_call_context_request_metadata_delegate(RequestCallContextSafeHandle ctx);
925 public delegate void grpcsharp_request_call_context_reset_delegate(RequestCallContextSafeHandle ctx);
926 public delegate void grpcsharp_request_call_context_destroy_delegate(IntPtr ctx);
927 public delegate CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create_delegate(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2);
928 public delegate void grpcsharp_call_credentials_release_delegate(IntPtr credentials);
929 public delegate CallError grpcsharp_call_cancel_delegate(CallSafeHandle call);
930 public delegate CallError grpcsharp_call_cancel_with_status_delegate(CallSafeHandle call, StatusCode status, string description);
931 public delegate CallError grpcsharp_call_start_unary_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
932 public delegate CallError grpcsharp_call_start_client_streaming_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
933 public delegate CallError grpcsharp_call_start_server_streaming_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
934 public delegate CallError grpcsharp_call_start_duplex_streaming_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
935 public delegate CallError grpcsharp_call_send_message_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata);
936 public delegate CallError grpcsharp_call_send_close_from_client_delegate(CallSafeHandle call, BatchContextSafeHandle ctx);
937 public delegate CallError grpcsharp_call_send_status_from_server_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags);
938 public delegate CallError grpcsharp_call_recv_message_delegate(CallSafeHandle call, BatchContextSafeHandle ctx);
939 public delegate CallError grpcsharp_call_recv_initial_metadata_delegate(CallSafeHandle call, BatchContextSafeHandle ctx);
940 public delegate CallError grpcsharp_call_start_serverside_delegate(CallSafeHandle call, BatchContextSafeHandle ctx);
941 public delegate CallError grpcsharp_call_send_initial_metadata_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray);
942 public delegate CallError grpcsharp_call_set_credentials_delegate(CallSafeHandle call, CallCredentialsSafeHandle credentials);
943 public delegate CStringSafeHandle grpcsharp_call_get_peer_delegate(CallSafeHandle call);
944 public delegate void grpcsharp_call_destroy_delegate(IntPtr call);
945 public delegate ChannelArgsSafeHandle grpcsharp_channel_args_create_delegate(UIntPtr numArgs);
946 public delegate void grpcsharp_channel_args_set_string_delegate(ChannelArgsSafeHandle args, UIntPtr index, string key, string value);
947 public delegate void grpcsharp_channel_args_set_integer_delegate(ChannelArgsSafeHandle args, UIntPtr index, string key, int value);
948 public delegate void grpcsharp_channel_args_destroy_delegate(IntPtr args);
949 public delegate void grpcsharp_override_default_ssl_roots_delegate(string pemRootCerts);
950 public delegate ChannelCredentialsSafeHandle grpcsharp_ssl_credentials_create_delegate(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag);
951 public delegate ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create_delegate(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds);
952 public delegate void grpcsharp_channel_credentials_release_delegate(IntPtr credentials);
953 public delegate ChannelSafeHandle grpcsharp_insecure_channel_create_delegate(string target, ChannelArgsSafeHandle channelArgs);
954 public delegate ChannelSafeHandle grpcsharp_secure_channel_create_delegate(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs);
955 public delegate CallSafeHandle grpcsharp_channel_create_call_delegate(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline);
956 public delegate ChannelState grpcsharp_channel_check_connectivity_state_delegate(ChannelSafeHandle channel, int tryToConnect);
957 public delegate void grpcsharp_channel_watch_connectivity_state_delegate(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
958 public delegate CStringSafeHandle grpcsharp_channel_get_target_delegate(ChannelSafeHandle call);
959 public delegate void grpcsharp_channel_destroy_delegate(IntPtr channel);
960 public delegate int grpcsharp_sizeof_grpc_event_delegate();
961 public delegate CompletionQueueSafeHandle grpcsharp_completion_queue_create_async_delegate();
962 public delegate CompletionQueueSafeHandle grpcsharp_completion_queue_create_sync_delegate();
963 public delegate void grpcsharp_completion_queue_shutdown_delegate(CompletionQueueSafeHandle cq);
964 public delegate CompletionQueueEvent grpcsharp_completion_queue_next_delegate(CompletionQueueSafeHandle cq);
965 public delegate CompletionQueueEvent grpcsharp_completion_queue_pluck_delegate(CompletionQueueSafeHandle cq, IntPtr tag);
966 public delegate void grpcsharp_completion_queue_destroy_delegate(IntPtr cq);
967 public delegate void gprsharp_free_delegate(IntPtr ptr);
968 public delegate MetadataArraySafeHandle grpcsharp_metadata_array_create_delegate(UIntPtr capacity);
969 public delegate void grpcsharp_metadata_array_add_delegate(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength);
970 public delegate UIntPtr grpcsharp_metadata_array_count_delegate(IntPtr metadataArray);
971 public delegate IntPtr grpcsharp_metadata_array_get_key_delegate(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength);
972 public delegate IntPtr grpcsharp_metadata_array_get_value_delegate(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength);
973 public delegate void grpcsharp_metadata_array_destroy_full_delegate(IntPtr array);
974 public delegate void grpcsharp_redirect_log_delegate(GprLogDelegate callback);
975 public delegate void grpcsharp_native_callback_dispatcher_init_delegate(NativeCallbackDispatcherCallback dispatcher);
976 public delegate CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin_delegate(IntPtr nativeCallbackTag);
977 public delegate void grpcsharp_metadata_credentials_notify_from_plugin_delegate(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails);
978 public delegate ServerCredentialsSafeHandle grpcsharp_ssl_server_credentials_create_delegate(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest);
979 public delegate void grpcsharp_server_credentials_release_delegate(IntPtr credentials);
980 public delegate ServerSafeHandle grpcsharp_server_create_delegate(ChannelArgsSafeHandle args);
981 public delegate void grpcsharp_server_register_completion_queue_delegate(ServerSafeHandle server, CompletionQueueSafeHandle cq);
982 public delegate int grpcsharp_server_add_insecure_http2_port_delegate(ServerSafeHandle server, string addr);
983 public delegate int grpcsharp_server_add_secure_http2_port_delegate(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds);
984 public delegate void grpcsharp_server_start_delegate(ServerSafeHandle server);
985 public delegate CallError grpcsharp_server_request_call_delegate(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx);
986 public delegate void grpcsharp_server_cancel_all_calls_delegate(ServerSafeHandle server);
987 public delegate void grpcsharp_server_shutdown_and_notify_callback_delegate(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
988 public delegate void grpcsharp_server_destroy_delegate(IntPtr server);
989 public delegate AuthContextSafeHandle grpcsharp_call_auth_context_delegate(CallSafeHandle call);
990 public delegate IntPtr grpcsharp_auth_context_peer_identity_property_name_delegate(AuthContextSafeHandle authContext); // returns const char*
991 public delegate AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator_delegate(AuthContextSafeHandle authContext);
992 public delegate IntPtr grpcsharp_auth_property_iterator_next_delegate(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator); // returns const auth_property*
993 public delegate void grpcsharp_auth_context_release_delegate(IntPtr authContext);
994 public delegate SliceBufferSafeHandle grpcsharp_slice_buffer_create_delegate();
995 public delegate IntPtr grpcsharp_slice_buffer_adjust_tail_space_delegate(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace);
996 public delegate UIntPtr grpcsharp_slice_buffer_slice_count_delegate(SliceBufferSafeHandle sliceBuffer);
997 public delegate void grpcsharp_slice_buffer_slice_peek_delegate(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr);
998 public delegate void grpcsharp_slice_buffer_reset_and_unref_delegate(SliceBufferSafeHandle sliceBuffer);
999 public delegate void grpcsharp_slice_buffer_destroy_delegate(IntPtr sliceBuffer);
1000 public delegate Timespec gprsharp_now_delegate(ClockType clockType);
1001 public delegate Timespec gprsharp_inf_future_delegate(ClockType clockType);
1002 public delegate Timespec gprsharp_inf_past_delegate(ClockType clockType);
1003 public delegate Timespec gprsharp_convert_clock_type_delegate(Timespec t, ClockType targetClock);
1004 public delegate int gprsharp_sizeof_timespec_delegate();
1005 public delegate CallError grpcsharp_test_callback_delegate([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback);
1006 public delegate IntPtr grpcsharp_test_nop_delegate(IntPtr ptr);
1007 public delegate void grpcsharp_test_override_method_delegate(string methodName, string variant);
1008 public delegate CallError grpcsharp_test_call_start_unary_echo_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1012 /// grpc_csharp_ext used as a static library (e.g Unity iOS).
1014 internal class DllImportsFromStaticLib
1016 private const string ImportName = "__Internal";
1018 [DllImport(ImportName)]
1019 public static extern void grpcsharp_init();
1021 [DllImport(ImportName)]
1022 public static extern void grpcsharp_shutdown();
1024 [DllImport(ImportName)]
1025 public static extern IntPtr grpcsharp_version_string();
1027 [DllImport(ImportName)]
1028 public static extern BatchContextSafeHandle grpcsharp_batch_context_create();
1030 [DllImport(ImportName)]
1031 public static extern IntPtr grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx);
1033 [DllImport(ImportName)]
1034 public static extern IntPtr grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx);
1036 [DllImport(ImportName)]
1037 public static extern int grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr);
1039 [DllImport(ImportName)]
1040 public static extern StatusCode grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx);
1042 [DllImport(ImportName)]
1043 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength);
1045 [DllImport(ImportName)]
1046 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx);
1048 [DllImport(ImportName)]
1049 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx);
1051 [DllImport(ImportName)]
1052 public static extern int grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx);
1054 [DllImport(ImportName)]
1055 public static extern void grpcsharp_batch_context_reset(BatchContextSafeHandle ctx);
1057 [DllImport(ImportName)]
1058 public static extern void grpcsharp_batch_context_destroy(IntPtr ctx);
1060 [DllImport(ImportName)]
1061 public static extern RequestCallContextSafeHandle grpcsharp_request_call_context_create();
1063 [DllImport(ImportName)]
1064 public static extern CallSafeHandle grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx);
1066 [DllImport(ImportName)]
1067 public static extern IntPtr grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength);
1069 [DllImport(ImportName)]
1070 public static extern IntPtr grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength);
1072 [DllImport(ImportName)]
1073 public static extern Timespec grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx);
1075 [DllImport(ImportName)]
1076 public static extern IntPtr grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx);
1078 [DllImport(ImportName)]
1079 public static extern void grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx);
1081 [DllImport(ImportName)]
1082 public static extern void grpcsharp_request_call_context_destroy(IntPtr ctx);
1084 [DllImport(ImportName)]
1085 public static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2);
1087 [DllImport(ImportName)]
1088 public static extern void grpcsharp_call_credentials_release(IntPtr credentials);
1090 [DllImport(ImportName)]
1091 public static extern CallError grpcsharp_call_cancel(CallSafeHandle call);
1093 [DllImport(ImportName)]
1094 public static extern CallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description);
1096 [DllImport(ImportName)]
1097 public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1099 [DllImport(ImportName)]
1100 public static extern CallError grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1102 [DllImport(ImportName)]
1103 public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1105 [DllImport(ImportName)]
1106 public static extern CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1108 [DllImport(ImportName)]
1109 public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata);
1111 [DllImport(ImportName)]
1112 public static extern CallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx);
1114 [DllImport(ImportName)]
1115 public static extern CallError grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags);
1117 [DllImport(ImportName)]
1118 public static extern CallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx);
1120 [DllImport(ImportName)]
1121 public static extern CallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx);
1123 [DllImport(ImportName)]
1124 public static extern CallError grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx);
1126 [DllImport(ImportName)]
1127 public static extern CallError grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray);
1129 [DllImport(ImportName)]
1130 public static extern CallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials);
1132 [DllImport(ImportName)]
1133 public static extern CStringSafeHandle grpcsharp_call_get_peer(CallSafeHandle call);
1135 [DllImport(ImportName)]
1136 public static extern void grpcsharp_call_destroy(IntPtr call);
1138 [DllImport(ImportName)]
1139 public static extern ChannelArgsSafeHandle grpcsharp_channel_args_create(UIntPtr numArgs);
1141 [DllImport(ImportName)]
1142 public static extern void grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value);
1144 [DllImport(ImportName)]
1145 public static extern void grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value);
1147 [DllImport(ImportName)]
1148 public static extern void grpcsharp_channel_args_destroy(IntPtr args);
1150 [DllImport(ImportName)]
1151 public static extern void grpcsharp_override_default_ssl_roots(string pemRootCerts);
1153 [DllImport(ImportName)]
1154 public static extern ChannelCredentialsSafeHandle grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag);
1156 [DllImport(ImportName)]
1157 public static extern ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds);
1159 [DllImport(ImportName)]
1160 public static extern void grpcsharp_channel_credentials_release(IntPtr credentials);
1162 [DllImport(ImportName)]
1163 public static extern ChannelSafeHandle grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs);
1165 [DllImport(ImportName)]
1166 public static extern ChannelSafeHandle grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs);
1168 [DllImport(ImportName)]
1169 public static extern CallSafeHandle grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline);
1171 [DllImport(ImportName)]
1172 public static extern ChannelState grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect);
1174 [DllImport(ImportName)]
1175 public static extern void grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
1177 [DllImport(ImportName)]
1178 public static extern CStringSafeHandle grpcsharp_channel_get_target(ChannelSafeHandle call);
1180 [DllImport(ImportName)]
1181 public static extern void grpcsharp_channel_destroy(IntPtr channel);
1183 [DllImport(ImportName)]
1184 public static extern int grpcsharp_sizeof_grpc_event();
1186 [DllImport(ImportName)]
1187 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_async();
1189 [DllImport(ImportName)]
1190 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_sync();
1192 [DllImport(ImportName)]
1193 public static extern void grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq);
1195 [DllImport(ImportName)]
1196 public static extern CompletionQueueEvent grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq);
1198 [DllImport(ImportName)]
1199 public static extern CompletionQueueEvent grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag);
1201 [DllImport(ImportName)]
1202 public static extern void grpcsharp_completion_queue_destroy(IntPtr cq);
1204 [DllImport(ImportName)]
1205 public static extern void gprsharp_free(IntPtr ptr);
1207 [DllImport(ImportName)]
1208 public static extern MetadataArraySafeHandle grpcsharp_metadata_array_create(UIntPtr capacity);
1210 [DllImport(ImportName)]
1211 public static extern void grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength);
1213 [DllImport(ImportName)]
1214 public static extern UIntPtr grpcsharp_metadata_array_count(IntPtr metadataArray);
1216 [DllImport(ImportName)]
1217 public static extern IntPtr grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength);
1219 [DllImport(ImportName)]
1220 public static extern IntPtr grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength);
1222 [DllImport(ImportName)]
1223 public static extern void grpcsharp_metadata_array_destroy_full(IntPtr array);
1225 [DllImport(ImportName)]
1226 public static extern void grpcsharp_redirect_log(GprLogDelegate callback);
1228 [DllImport(ImportName)]
1229 public static extern void grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher);
1231 [DllImport(ImportName)]
1232 public static extern CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag);
1234 [DllImport(ImportName)]
1235 public static extern void grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails);
1237 [DllImport(ImportName)]
1238 public static extern ServerCredentialsSafeHandle grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest);
1240 [DllImport(ImportName)]
1241 public static extern void grpcsharp_server_credentials_release(IntPtr credentials);
1243 [DllImport(ImportName)]
1244 public static extern ServerSafeHandle grpcsharp_server_create(ChannelArgsSafeHandle args);
1246 [DllImport(ImportName)]
1247 public static extern void grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq);
1249 [DllImport(ImportName)]
1250 public static extern int grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr);
1252 [DllImport(ImportName)]
1253 public static extern int grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds);
1255 [DllImport(ImportName)]
1256 public static extern void grpcsharp_server_start(ServerSafeHandle server);
1258 [DllImport(ImportName)]
1259 public static extern CallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx);
1261 [DllImport(ImportName)]
1262 public static extern void grpcsharp_server_cancel_all_calls(ServerSafeHandle server);
1264 [DllImport(ImportName)]
1265 public static extern void grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
1267 [DllImport(ImportName)]
1268 public static extern void grpcsharp_server_destroy(IntPtr server);
1270 [DllImport(ImportName)]
1271 public static extern AuthContextSafeHandle grpcsharp_call_auth_context(CallSafeHandle call);
1273 [DllImport(ImportName)]
1274 public static extern IntPtr grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext);
1276 [DllImport(ImportName)]
1277 public static extern AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext);
1279 [DllImport(ImportName)]
1280 public static extern IntPtr grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator);
1282 [DllImport(ImportName)]
1283 public static extern void grpcsharp_auth_context_release(IntPtr authContext);
1285 [DllImport(ImportName)]
1286 public static extern SliceBufferSafeHandle grpcsharp_slice_buffer_create();
1288 [DllImport(ImportName)]
1289 public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace);
1291 [DllImport(ImportName)]
1292 public static extern UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer);
1294 [DllImport(ImportName)]
1295 public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr);
1297 [DllImport(ImportName)]
1298 public static extern void grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer);
1300 [DllImport(ImportName)]
1301 public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer);
1303 [DllImport(ImportName)]
1304 public static extern Timespec gprsharp_now(ClockType clockType);
1306 [DllImport(ImportName)]
1307 public static extern Timespec gprsharp_inf_future(ClockType clockType);
1309 [DllImport(ImportName)]
1310 public static extern Timespec gprsharp_inf_past(ClockType clockType);
1312 [DllImport(ImportName)]
1313 public static extern Timespec gprsharp_convert_clock_type(Timespec t, ClockType targetClock);
1315 [DllImport(ImportName)]
1316 public static extern int gprsharp_sizeof_timespec();
1318 [DllImport(ImportName)]
1319 public static extern CallError grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback);
1321 [DllImport(ImportName)]
1322 public static extern IntPtr grpcsharp_test_nop(IntPtr ptr);
1324 [DllImport(ImportName)]
1325 public static extern void grpcsharp_test_override_method(string methodName, string variant);
1327 [DllImport(ImportName)]
1328 public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1332 /// grpc_csharp_ext used as a shared library (e.g on Unity Standalone and Android).
1334 internal class DllImportsFromSharedLib
1336 private const string ImportName = "grpc_csharp_ext";
1338 [DllImport(ImportName)]
1339 public static extern void grpcsharp_init();
1341 [DllImport(ImportName)]
1342 public static extern void grpcsharp_shutdown();
1344 [DllImport(ImportName)]
1345 public static extern IntPtr grpcsharp_version_string();
1347 [DllImport(ImportName)]
1348 public static extern BatchContextSafeHandle grpcsharp_batch_context_create();
1350 [DllImport(ImportName)]
1351 public static extern IntPtr grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx);
1353 [DllImport(ImportName)]
1354 public static extern IntPtr grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx);
1356 [DllImport(ImportName)]
1357 public static extern int grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr);
1359 [DllImport(ImportName)]
1360 public static extern StatusCode grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx);
1362 [DllImport(ImportName)]
1363 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength);
1365 [DllImport(ImportName)]
1366 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx);
1368 [DllImport(ImportName)]
1369 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx);
1371 [DllImport(ImportName)]
1372 public static extern int grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx);
1374 [DllImport(ImportName)]
1375 public static extern void grpcsharp_batch_context_reset(BatchContextSafeHandle ctx);
1377 [DllImport(ImportName)]
1378 public static extern void grpcsharp_batch_context_destroy(IntPtr ctx);
1380 [DllImport(ImportName)]
1381 public static extern RequestCallContextSafeHandle grpcsharp_request_call_context_create();
1383 [DllImport(ImportName)]
1384 public static extern CallSafeHandle grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx);
1386 [DllImport(ImportName)]
1387 public static extern IntPtr grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength);
1389 [DllImport(ImportName)]
1390 public static extern IntPtr grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength);
1392 [DllImport(ImportName)]
1393 public static extern Timespec grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx);
1395 [DllImport(ImportName)]
1396 public static extern IntPtr grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx);
1398 [DllImport(ImportName)]
1399 public static extern void grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx);
1401 [DllImport(ImportName)]
1402 public static extern void grpcsharp_request_call_context_destroy(IntPtr ctx);
1404 [DllImport(ImportName)]
1405 public static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2);
1407 [DllImport(ImportName)]
1408 public static extern void grpcsharp_call_credentials_release(IntPtr credentials);
1410 [DllImport(ImportName)]
1411 public static extern CallError grpcsharp_call_cancel(CallSafeHandle call);
1413 [DllImport(ImportName)]
1414 public static extern CallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description);
1416 [DllImport(ImportName)]
1417 public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1419 [DllImport(ImportName)]
1420 public static extern CallError grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1422 [DllImport(ImportName)]
1423 public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1425 [DllImport(ImportName)]
1426 public static extern CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1428 [DllImport(ImportName)]
1429 public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata);
1431 [DllImport(ImportName)]
1432 public static extern CallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx);
1434 [DllImport(ImportName)]
1435 public static extern CallError grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags);
1437 [DllImport(ImportName)]
1438 public static extern CallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx);
1440 [DllImport(ImportName)]
1441 public static extern CallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx);
1443 [DllImport(ImportName)]
1444 public static extern CallError grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx);
1446 [DllImport(ImportName)]
1447 public static extern CallError grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray);
1449 [DllImport(ImportName)]
1450 public static extern CallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials);
1452 [DllImport(ImportName)]
1453 public static extern CStringSafeHandle grpcsharp_call_get_peer(CallSafeHandle call);
1455 [DllImport(ImportName)]
1456 public static extern void grpcsharp_call_destroy(IntPtr call);
1458 [DllImport(ImportName)]
1459 public static extern ChannelArgsSafeHandle grpcsharp_channel_args_create(UIntPtr numArgs);
1461 [DllImport(ImportName)]
1462 public static extern void grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value);
1464 [DllImport(ImportName)]
1465 public static extern void grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value);
1467 [DllImport(ImportName)]
1468 public static extern void grpcsharp_channel_args_destroy(IntPtr args);
1470 [DllImport(ImportName)]
1471 public static extern void grpcsharp_override_default_ssl_roots(string pemRootCerts);
1473 [DllImport(ImportName)]
1474 public static extern ChannelCredentialsSafeHandle grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag);
1476 [DllImport(ImportName)]
1477 public static extern ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds);
1479 [DllImport(ImportName)]
1480 public static extern void grpcsharp_channel_credentials_release(IntPtr credentials);
1482 [DllImport(ImportName)]
1483 public static extern ChannelSafeHandle grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs);
1485 [DllImport(ImportName)]
1486 public static extern ChannelSafeHandle grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs);
1488 [DllImport(ImportName)]
1489 public static extern CallSafeHandle grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline);
1491 [DllImport(ImportName)]
1492 public static extern ChannelState grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect);
1494 [DllImport(ImportName)]
1495 public static extern void grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
1497 [DllImport(ImportName)]
1498 public static extern CStringSafeHandle grpcsharp_channel_get_target(ChannelSafeHandle call);
1500 [DllImport(ImportName)]
1501 public static extern void grpcsharp_channel_destroy(IntPtr channel);
1503 [DllImport(ImportName)]
1504 public static extern int grpcsharp_sizeof_grpc_event();
1506 [DllImport(ImportName)]
1507 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_async();
1509 [DllImport(ImportName)]
1510 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_sync();
1512 [DllImport(ImportName)]
1513 public static extern void grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq);
1515 [DllImport(ImportName)]
1516 public static extern CompletionQueueEvent grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq);
1518 [DllImport(ImportName)]
1519 public static extern CompletionQueueEvent grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag);
1521 [DllImport(ImportName)]
1522 public static extern void grpcsharp_completion_queue_destroy(IntPtr cq);
1524 [DllImport(ImportName)]
1525 public static extern void gprsharp_free(IntPtr ptr);
1527 [DllImport(ImportName)]
1528 public static extern MetadataArraySafeHandle grpcsharp_metadata_array_create(UIntPtr capacity);
1530 [DllImport(ImportName)]
1531 public static extern void grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength);
1533 [DllImport(ImportName)]
1534 public static extern UIntPtr grpcsharp_metadata_array_count(IntPtr metadataArray);
1536 [DllImport(ImportName)]
1537 public static extern IntPtr grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength);
1539 [DllImport(ImportName)]
1540 public static extern IntPtr grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength);
1542 [DllImport(ImportName)]
1543 public static extern void grpcsharp_metadata_array_destroy_full(IntPtr array);
1545 [DllImport(ImportName)]
1546 public static extern void grpcsharp_redirect_log(GprLogDelegate callback);
1548 [DllImport(ImportName)]
1549 public static extern void grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher);
1551 [DllImport(ImportName)]
1552 public static extern CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag);
1554 [DllImport(ImportName)]
1555 public static extern void grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails);
1557 [DllImport(ImportName)]
1558 public static extern ServerCredentialsSafeHandle grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest);
1560 [DllImport(ImportName)]
1561 public static extern void grpcsharp_server_credentials_release(IntPtr credentials);
1563 [DllImport(ImportName)]
1564 public static extern ServerSafeHandle grpcsharp_server_create(ChannelArgsSafeHandle args);
1566 [DllImport(ImportName)]
1567 public static extern void grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq);
1569 [DllImport(ImportName)]
1570 public static extern int grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr);
1572 [DllImport(ImportName)]
1573 public static extern int grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds);
1575 [DllImport(ImportName)]
1576 public static extern void grpcsharp_server_start(ServerSafeHandle server);
1578 [DllImport(ImportName)]
1579 public static extern CallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx);
1581 [DllImport(ImportName)]
1582 public static extern void grpcsharp_server_cancel_all_calls(ServerSafeHandle server);
1584 [DllImport(ImportName)]
1585 public static extern void grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
1587 [DllImport(ImportName)]
1588 public static extern void grpcsharp_server_destroy(IntPtr server);
1590 [DllImport(ImportName)]
1591 public static extern AuthContextSafeHandle grpcsharp_call_auth_context(CallSafeHandle call);
1593 [DllImport(ImportName)]
1594 public static extern IntPtr grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext);
1596 [DllImport(ImportName)]
1597 public static extern AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext);
1599 [DllImport(ImportName)]
1600 public static extern IntPtr grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator);
1602 [DllImport(ImportName)]
1603 public static extern void grpcsharp_auth_context_release(IntPtr authContext);
1605 [DllImport(ImportName)]
1606 public static extern SliceBufferSafeHandle grpcsharp_slice_buffer_create();
1608 [DllImport(ImportName)]
1609 public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace);
1611 [DllImport(ImportName)]
1612 public static extern UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer);
1614 [DllImport(ImportName)]
1615 public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr);
1617 [DllImport(ImportName)]
1618 public static extern void grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer);
1620 [DllImport(ImportName)]
1621 public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer);
1623 [DllImport(ImportName)]
1624 public static extern Timespec gprsharp_now(ClockType clockType);
1626 [DllImport(ImportName)]
1627 public static extern Timespec gprsharp_inf_future(ClockType clockType);
1629 [DllImport(ImportName)]
1630 public static extern Timespec gprsharp_inf_past(ClockType clockType);
1632 [DllImport(ImportName)]
1633 public static extern Timespec gprsharp_convert_clock_type(Timespec t, ClockType targetClock);
1635 [DllImport(ImportName)]
1636 public static extern int gprsharp_sizeof_timespec();
1638 [DllImport(ImportName)]
1639 public static extern CallError grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback);
1641 [DllImport(ImportName)]
1642 public static extern IntPtr grpcsharp_test_nop(IntPtr ptr);
1644 [DllImport(ImportName)]
1645 public static extern void grpcsharp_test_override_method(string methodName, string variant);
1647 [DllImport(ImportName)]
1648 public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1652 /// grpc_csharp_ext used as a shared library (with x86 suffix)
1654 internal class DllImportsFromSharedLib_x86
1656 private const string ImportName = "grpc_csharp_ext.x86";
1658 [DllImport(ImportName)]
1659 public static extern void grpcsharp_init();
1661 [DllImport(ImportName)]
1662 public static extern void grpcsharp_shutdown();
1664 [DllImport(ImportName)]
1665 public static extern IntPtr grpcsharp_version_string();
1667 [DllImport(ImportName)]
1668 public static extern BatchContextSafeHandle grpcsharp_batch_context_create();
1670 [DllImport(ImportName)]
1671 public static extern IntPtr grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx);
1673 [DllImport(ImportName)]
1674 public static extern IntPtr grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx);
1676 [DllImport(ImportName)]
1677 public static extern int grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr);
1679 [DllImport(ImportName)]
1680 public static extern StatusCode grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx);
1682 [DllImport(ImportName)]
1683 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength);
1685 [DllImport(ImportName)]
1686 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx);
1688 [DllImport(ImportName)]
1689 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx);
1691 [DllImport(ImportName)]
1692 public static extern int grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx);
1694 [DllImport(ImportName)]
1695 public static extern void grpcsharp_batch_context_reset(BatchContextSafeHandle ctx);
1697 [DllImport(ImportName)]
1698 public static extern void grpcsharp_batch_context_destroy(IntPtr ctx);
1700 [DllImport(ImportName)]
1701 public static extern RequestCallContextSafeHandle grpcsharp_request_call_context_create();
1703 [DllImport(ImportName)]
1704 public static extern CallSafeHandle grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx);
1706 [DllImport(ImportName)]
1707 public static extern IntPtr grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength);
1709 [DllImport(ImportName)]
1710 public static extern IntPtr grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength);
1712 [DllImport(ImportName)]
1713 public static extern Timespec grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx);
1715 [DllImport(ImportName)]
1716 public static extern IntPtr grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx);
1718 [DllImport(ImportName)]
1719 public static extern void grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx);
1721 [DllImport(ImportName)]
1722 public static extern void grpcsharp_request_call_context_destroy(IntPtr ctx);
1724 [DllImport(ImportName)]
1725 public static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2);
1727 [DllImport(ImportName)]
1728 public static extern void grpcsharp_call_credentials_release(IntPtr credentials);
1730 [DllImport(ImportName)]
1731 public static extern CallError grpcsharp_call_cancel(CallSafeHandle call);
1733 [DllImport(ImportName)]
1734 public static extern CallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description);
1736 [DllImport(ImportName)]
1737 public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1739 [DllImport(ImportName)]
1740 public static extern CallError grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1742 [DllImport(ImportName)]
1743 public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1745 [DllImport(ImportName)]
1746 public static extern CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1748 [DllImport(ImportName)]
1749 public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata);
1751 [DllImport(ImportName)]
1752 public static extern CallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx);
1754 [DllImport(ImportName)]
1755 public static extern CallError grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags);
1757 [DllImport(ImportName)]
1758 public static extern CallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx);
1760 [DllImport(ImportName)]
1761 public static extern CallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx);
1763 [DllImport(ImportName)]
1764 public static extern CallError grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx);
1766 [DllImport(ImportName)]
1767 public static extern CallError grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray);
1769 [DllImport(ImportName)]
1770 public static extern CallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials);
1772 [DllImport(ImportName)]
1773 public static extern CStringSafeHandle grpcsharp_call_get_peer(CallSafeHandle call);
1775 [DllImport(ImportName)]
1776 public static extern void grpcsharp_call_destroy(IntPtr call);
1778 [DllImport(ImportName)]
1779 public static extern ChannelArgsSafeHandle grpcsharp_channel_args_create(UIntPtr numArgs);
1781 [DllImport(ImportName)]
1782 public static extern void grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value);
1784 [DllImport(ImportName)]
1785 public static extern void grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value);
1787 [DllImport(ImportName)]
1788 public static extern void grpcsharp_channel_args_destroy(IntPtr args);
1790 [DllImport(ImportName)]
1791 public static extern void grpcsharp_override_default_ssl_roots(string pemRootCerts);
1793 [DllImport(ImportName)]
1794 public static extern ChannelCredentialsSafeHandle grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag);
1796 [DllImport(ImportName)]
1797 public static extern ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds);
1799 [DllImport(ImportName)]
1800 public static extern void grpcsharp_channel_credentials_release(IntPtr credentials);
1802 [DllImport(ImportName)]
1803 public static extern ChannelSafeHandle grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs);
1805 [DllImport(ImportName)]
1806 public static extern ChannelSafeHandle grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs);
1808 [DllImport(ImportName)]
1809 public static extern CallSafeHandle grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline);
1811 [DllImport(ImportName)]
1812 public static extern ChannelState grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect);
1814 [DllImport(ImportName)]
1815 public static extern void grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
1817 [DllImport(ImportName)]
1818 public static extern CStringSafeHandle grpcsharp_channel_get_target(ChannelSafeHandle call);
1820 [DllImport(ImportName)]
1821 public static extern void grpcsharp_channel_destroy(IntPtr channel);
1823 [DllImport(ImportName)]
1824 public static extern int grpcsharp_sizeof_grpc_event();
1826 [DllImport(ImportName)]
1827 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_async();
1829 [DllImport(ImportName)]
1830 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_sync();
1832 [DllImport(ImportName)]
1833 public static extern void grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq);
1835 [DllImport(ImportName)]
1836 public static extern CompletionQueueEvent grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq);
1838 [DllImport(ImportName)]
1839 public static extern CompletionQueueEvent grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag);
1841 [DllImport(ImportName)]
1842 public static extern void grpcsharp_completion_queue_destroy(IntPtr cq);
1844 [DllImport(ImportName)]
1845 public static extern void gprsharp_free(IntPtr ptr);
1847 [DllImport(ImportName)]
1848 public static extern MetadataArraySafeHandle grpcsharp_metadata_array_create(UIntPtr capacity);
1850 [DllImport(ImportName)]
1851 public static extern void grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength);
1853 [DllImport(ImportName)]
1854 public static extern UIntPtr grpcsharp_metadata_array_count(IntPtr metadataArray);
1856 [DllImport(ImportName)]
1857 public static extern IntPtr grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength);
1859 [DllImport(ImportName)]
1860 public static extern IntPtr grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength);
1862 [DllImport(ImportName)]
1863 public static extern void grpcsharp_metadata_array_destroy_full(IntPtr array);
1865 [DllImport(ImportName)]
1866 public static extern void grpcsharp_redirect_log(GprLogDelegate callback);
1868 [DllImport(ImportName)]
1869 public static extern void grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher);
1871 [DllImport(ImportName)]
1872 public static extern CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag);
1874 [DllImport(ImportName)]
1875 public static extern void grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails);
1877 [DllImport(ImportName)]
1878 public static extern ServerCredentialsSafeHandle grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest);
1880 [DllImport(ImportName)]
1881 public static extern void grpcsharp_server_credentials_release(IntPtr credentials);
1883 [DllImport(ImportName)]
1884 public static extern ServerSafeHandle grpcsharp_server_create(ChannelArgsSafeHandle args);
1886 [DllImport(ImportName)]
1887 public static extern void grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq);
1889 [DllImport(ImportName)]
1890 public static extern int grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr);
1892 [DllImport(ImportName)]
1893 public static extern int grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds);
1895 [DllImport(ImportName)]
1896 public static extern void grpcsharp_server_start(ServerSafeHandle server);
1898 [DllImport(ImportName)]
1899 public static extern CallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx);
1901 [DllImport(ImportName)]
1902 public static extern void grpcsharp_server_cancel_all_calls(ServerSafeHandle server);
1904 [DllImport(ImportName)]
1905 public static extern void grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
1907 [DllImport(ImportName)]
1908 public static extern void grpcsharp_server_destroy(IntPtr server);
1910 [DllImport(ImportName)]
1911 public static extern AuthContextSafeHandle grpcsharp_call_auth_context(CallSafeHandle call);
1913 [DllImport(ImportName)]
1914 public static extern IntPtr grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext);
1916 [DllImport(ImportName)]
1917 public static extern AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext);
1919 [DllImport(ImportName)]
1920 public static extern IntPtr grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator);
1922 [DllImport(ImportName)]
1923 public static extern void grpcsharp_auth_context_release(IntPtr authContext);
1925 [DllImport(ImportName)]
1926 public static extern SliceBufferSafeHandle grpcsharp_slice_buffer_create();
1928 [DllImport(ImportName)]
1929 public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace);
1931 [DllImport(ImportName)]
1932 public static extern UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer);
1934 [DllImport(ImportName)]
1935 public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr);
1937 [DllImport(ImportName)]
1938 public static extern void grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer);
1940 [DllImport(ImportName)]
1941 public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer);
1943 [DllImport(ImportName)]
1944 public static extern Timespec gprsharp_now(ClockType clockType);
1946 [DllImport(ImportName)]
1947 public static extern Timespec gprsharp_inf_future(ClockType clockType);
1949 [DllImport(ImportName)]
1950 public static extern Timespec gprsharp_inf_past(ClockType clockType);
1952 [DllImport(ImportName)]
1953 public static extern Timespec gprsharp_convert_clock_type(Timespec t, ClockType targetClock);
1955 [DllImport(ImportName)]
1956 public static extern int gprsharp_sizeof_timespec();
1958 [DllImport(ImportName)]
1959 public static extern CallError grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback);
1961 [DllImport(ImportName)]
1962 public static extern IntPtr grpcsharp_test_nop(IntPtr ptr);
1964 [DllImport(ImportName)]
1965 public static extern void grpcsharp_test_override_method(string methodName, string variant);
1967 [DllImport(ImportName)]
1968 public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
1972 /// grpc_csharp_ext used as a shared library (with x64 suffix)
1974 internal class DllImportsFromSharedLib_x64
1976 private const string ImportName = "grpc_csharp_ext.x64";
1978 [DllImport(ImportName)]
1979 public static extern void grpcsharp_init();
1981 [DllImport(ImportName)]
1982 public static extern void grpcsharp_shutdown();
1984 [DllImport(ImportName)]
1985 public static extern IntPtr grpcsharp_version_string();
1987 [DllImport(ImportName)]
1988 public static extern BatchContextSafeHandle grpcsharp_batch_context_create();
1990 [DllImport(ImportName)]
1991 public static extern IntPtr grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx);
1993 [DllImport(ImportName)]
1994 public static extern IntPtr grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx);
1996 [DllImport(ImportName)]
1997 public static extern int grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr);
1999 [DllImport(ImportName)]
2000 public static extern StatusCode grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx);
2002 [DllImport(ImportName)]
2003 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength);
2005 [DllImport(ImportName)]
2006 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx);
2008 [DllImport(ImportName)]
2009 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx);
2011 [DllImport(ImportName)]
2012 public static extern int grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx);
2014 [DllImport(ImportName)]
2015 public static extern void grpcsharp_batch_context_reset(BatchContextSafeHandle ctx);
2017 [DllImport(ImportName)]
2018 public static extern void grpcsharp_batch_context_destroy(IntPtr ctx);
2020 [DllImport(ImportName)]
2021 public static extern RequestCallContextSafeHandle grpcsharp_request_call_context_create();
2023 [DllImport(ImportName)]
2024 public static extern CallSafeHandle grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx);
2026 [DllImport(ImportName)]
2027 public static extern IntPtr grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength);
2029 [DllImport(ImportName)]
2030 public static extern IntPtr grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength);
2032 [DllImport(ImportName)]
2033 public static extern Timespec grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx);
2035 [DllImport(ImportName)]
2036 public static extern IntPtr grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx);
2038 [DllImport(ImportName)]
2039 public static extern void grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx);
2041 [DllImport(ImportName)]
2042 public static extern void grpcsharp_request_call_context_destroy(IntPtr ctx);
2044 [DllImport(ImportName)]
2045 public static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2);
2047 [DllImport(ImportName)]
2048 public static extern void grpcsharp_call_credentials_release(IntPtr credentials);
2050 [DllImport(ImportName)]
2051 public static extern CallError grpcsharp_call_cancel(CallSafeHandle call);
2053 [DllImport(ImportName)]
2054 public static extern CallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description);
2056 [DllImport(ImportName)]
2057 public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
2059 [DllImport(ImportName)]
2060 public static extern CallError grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
2062 [DllImport(ImportName)]
2063 public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
2065 [DllImport(ImportName)]
2066 public static extern CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
2068 [DllImport(ImportName)]
2069 public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata);
2071 [DllImport(ImportName)]
2072 public static extern CallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx);
2074 [DllImport(ImportName)]
2075 public static extern CallError grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags);
2077 [DllImport(ImportName)]
2078 public static extern CallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx);
2080 [DllImport(ImportName)]
2081 public static extern CallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx);
2083 [DllImport(ImportName)]
2084 public static extern CallError grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx);
2086 [DllImport(ImportName)]
2087 public static extern CallError grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray);
2089 [DllImport(ImportName)]
2090 public static extern CallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials);
2092 [DllImport(ImportName)]
2093 public static extern CStringSafeHandle grpcsharp_call_get_peer(CallSafeHandle call);
2095 [DllImport(ImportName)]
2096 public static extern void grpcsharp_call_destroy(IntPtr call);
2098 [DllImport(ImportName)]
2099 public static extern ChannelArgsSafeHandle grpcsharp_channel_args_create(UIntPtr numArgs);
2101 [DllImport(ImportName)]
2102 public static extern void grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value);
2104 [DllImport(ImportName)]
2105 public static extern void grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value);
2107 [DllImport(ImportName)]
2108 public static extern void grpcsharp_channel_args_destroy(IntPtr args);
2110 [DllImport(ImportName)]
2111 public static extern void grpcsharp_override_default_ssl_roots(string pemRootCerts);
2113 [DllImport(ImportName)]
2114 public static extern ChannelCredentialsSafeHandle grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag);
2116 [DllImport(ImportName)]
2117 public static extern ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds);
2119 [DllImport(ImportName)]
2120 public static extern void grpcsharp_channel_credentials_release(IntPtr credentials);
2122 [DllImport(ImportName)]
2123 public static extern ChannelSafeHandle grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs);
2125 [DllImport(ImportName)]
2126 public static extern ChannelSafeHandle grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs);
2128 [DllImport(ImportName)]
2129 public static extern CallSafeHandle grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline);
2131 [DllImport(ImportName)]
2132 public static extern ChannelState grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect);
2134 [DllImport(ImportName)]
2135 public static extern void grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
2137 [DllImport(ImportName)]
2138 public static extern CStringSafeHandle grpcsharp_channel_get_target(ChannelSafeHandle call);
2140 [DllImport(ImportName)]
2141 public static extern void grpcsharp_channel_destroy(IntPtr channel);
2143 [DllImport(ImportName)]
2144 public static extern int grpcsharp_sizeof_grpc_event();
2146 [DllImport(ImportName)]
2147 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_async();
2149 [DllImport(ImportName)]
2150 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_sync();
2152 [DllImport(ImportName)]
2153 public static extern void grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq);
2155 [DllImport(ImportName)]
2156 public static extern CompletionQueueEvent grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq);
2158 [DllImport(ImportName)]
2159 public static extern CompletionQueueEvent grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag);
2161 [DllImport(ImportName)]
2162 public static extern void grpcsharp_completion_queue_destroy(IntPtr cq);
2164 [DllImport(ImportName)]
2165 public static extern void gprsharp_free(IntPtr ptr);
2167 [DllImport(ImportName)]
2168 public static extern MetadataArraySafeHandle grpcsharp_metadata_array_create(UIntPtr capacity);
2170 [DllImport(ImportName)]
2171 public static extern void grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength);
2173 [DllImport(ImportName)]
2174 public static extern UIntPtr grpcsharp_metadata_array_count(IntPtr metadataArray);
2176 [DllImport(ImportName)]
2177 public static extern IntPtr grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength);
2179 [DllImport(ImportName)]
2180 public static extern IntPtr grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength);
2182 [DllImport(ImportName)]
2183 public static extern void grpcsharp_metadata_array_destroy_full(IntPtr array);
2185 [DllImport(ImportName)]
2186 public static extern void grpcsharp_redirect_log(GprLogDelegate callback);
2188 [DllImport(ImportName)]
2189 public static extern void grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher);
2191 [DllImport(ImportName)]
2192 public static extern CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag);
2194 [DllImport(ImportName)]
2195 public static extern void grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails);
2197 [DllImport(ImportName)]
2198 public static extern ServerCredentialsSafeHandle grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest);
2200 [DllImport(ImportName)]
2201 public static extern void grpcsharp_server_credentials_release(IntPtr credentials);
2203 [DllImport(ImportName)]
2204 public static extern ServerSafeHandle grpcsharp_server_create(ChannelArgsSafeHandle args);
2206 [DllImport(ImportName)]
2207 public static extern void grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq);
2209 [DllImport(ImportName)]
2210 public static extern int grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr);
2212 [DllImport(ImportName)]
2213 public static extern int grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds);
2215 [DllImport(ImportName)]
2216 public static extern void grpcsharp_server_start(ServerSafeHandle server);
2218 [DllImport(ImportName)]
2219 public static extern CallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx);
2221 [DllImport(ImportName)]
2222 public static extern void grpcsharp_server_cancel_all_calls(ServerSafeHandle server);
2224 [DllImport(ImportName)]
2225 public static extern void grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
2227 [DllImport(ImportName)]
2228 public static extern void grpcsharp_server_destroy(IntPtr server);
2230 [DllImport(ImportName)]
2231 public static extern AuthContextSafeHandle grpcsharp_call_auth_context(CallSafeHandle call);
2233 [DllImport(ImportName)]
2234 public static extern IntPtr grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext);
2236 [DllImport(ImportName)]
2237 public static extern AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext);
2239 [DllImport(ImportName)]
2240 public static extern IntPtr grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator);
2242 [DllImport(ImportName)]
2243 public static extern void grpcsharp_auth_context_release(IntPtr authContext);
2245 [DllImport(ImportName)]
2246 public static extern SliceBufferSafeHandle grpcsharp_slice_buffer_create();
2248 [DllImport(ImportName)]
2249 public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace);
2251 [DllImport(ImportName)]
2252 public static extern UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer);
2254 [DllImport(ImportName)]
2255 public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr);
2257 [DllImport(ImportName)]
2258 public static extern void grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer);
2260 [DllImport(ImportName)]
2261 public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer);
2263 [DllImport(ImportName)]
2264 public static extern Timespec gprsharp_now(ClockType clockType);
2266 [DllImport(ImportName)]
2267 public static extern Timespec gprsharp_inf_future(ClockType clockType);
2269 [DllImport(ImportName)]
2270 public static extern Timespec gprsharp_inf_past(ClockType clockType);
2272 [DllImport(ImportName)]
2273 public static extern Timespec gprsharp_convert_clock_type(Timespec t, ClockType targetClock);
2275 [DllImport(ImportName)]
2276 public static extern int gprsharp_sizeof_timespec();
2278 [DllImport(ImportName)]
2279 public static extern CallError grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback);
2281 [DllImport(ImportName)]
2282 public static extern IntPtr grpcsharp_test_nop(IntPtr ptr);
2284 [DllImport(ImportName)]
2285 public static extern void grpcsharp_test_override_method(string methodName, string variant);
2287 [DllImport(ImportName)]
2288 public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
2292 /// grpc_csharp_ext used as a shared library (with x86.dll suffix)
2294 internal class DllImportsFromSharedLib_x86_dll
2296 private const string ImportName = "grpc_csharp_ext.x86.dll";
2298 [DllImport(ImportName)]
2299 public static extern void grpcsharp_init();
2301 [DllImport(ImportName)]
2302 public static extern void grpcsharp_shutdown();
2304 [DllImport(ImportName)]
2305 public static extern IntPtr grpcsharp_version_string();
2307 [DllImport(ImportName)]
2308 public static extern BatchContextSafeHandle grpcsharp_batch_context_create();
2310 [DllImport(ImportName)]
2311 public static extern IntPtr grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx);
2313 [DllImport(ImportName)]
2314 public static extern IntPtr grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx);
2316 [DllImport(ImportName)]
2317 public static extern int grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr);
2319 [DllImport(ImportName)]
2320 public static extern StatusCode grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx);
2322 [DllImport(ImportName)]
2323 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength);
2325 [DllImport(ImportName)]
2326 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx);
2328 [DllImport(ImportName)]
2329 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx);
2331 [DllImport(ImportName)]
2332 public static extern int grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx);
2334 [DllImport(ImportName)]
2335 public static extern void grpcsharp_batch_context_reset(BatchContextSafeHandle ctx);
2337 [DllImport(ImportName)]
2338 public static extern void grpcsharp_batch_context_destroy(IntPtr ctx);
2340 [DllImport(ImportName)]
2341 public static extern RequestCallContextSafeHandle grpcsharp_request_call_context_create();
2343 [DllImport(ImportName)]
2344 public static extern CallSafeHandle grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx);
2346 [DllImport(ImportName)]
2347 public static extern IntPtr grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength);
2349 [DllImport(ImportName)]
2350 public static extern IntPtr grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength);
2352 [DllImport(ImportName)]
2353 public static extern Timespec grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx);
2355 [DllImport(ImportName)]
2356 public static extern IntPtr grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx);
2358 [DllImport(ImportName)]
2359 public static extern void grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx);
2361 [DllImport(ImportName)]
2362 public static extern void grpcsharp_request_call_context_destroy(IntPtr ctx);
2364 [DllImport(ImportName)]
2365 public static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2);
2367 [DllImport(ImportName)]
2368 public static extern void grpcsharp_call_credentials_release(IntPtr credentials);
2370 [DllImport(ImportName)]
2371 public static extern CallError grpcsharp_call_cancel(CallSafeHandle call);
2373 [DllImport(ImportName)]
2374 public static extern CallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description);
2376 [DllImport(ImportName)]
2377 public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
2379 [DllImport(ImportName)]
2380 public static extern CallError grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
2382 [DllImport(ImportName)]
2383 public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
2385 [DllImport(ImportName)]
2386 public static extern CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
2388 [DllImport(ImportName)]
2389 public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata);
2391 [DllImport(ImportName)]
2392 public static extern CallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx);
2394 [DllImport(ImportName)]
2395 public static extern CallError grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags);
2397 [DllImport(ImportName)]
2398 public static extern CallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx);
2400 [DllImport(ImportName)]
2401 public static extern CallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx);
2403 [DllImport(ImportName)]
2404 public static extern CallError grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx);
2406 [DllImport(ImportName)]
2407 public static extern CallError grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray);
2409 [DllImport(ImportName)]
2410 public static extern CallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials);
2412 [DllImport(ImportName)]
2413 public static extern CStringSafeHandle grpcsharp_call_get_peer(CallSafeHandle call);
2415 [DllImport(ImportName)]
2416 public static extern void grpcsharp_call_destroy(IntPtr call);
2418 [DllImport(ImportName)]
2419 public static extern ChannelArgsSafeHandle grpcsharp_channel_args_create(UIntPtr numArgs);
2421 [DllImport(ImportName)]
2422 public static extern void grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value);
2424 [DllImport(ImportName)]
2425 public static extern void grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value);
2427 [DllImport(ImportName)]
2428 public static extern void grpcsharp_channel_args_destroy(IntPtr args);
2430 [DllImport(ImportName)]
2431 public static extern void grpcsharp_override_default_ssl_roots(string pemRootCerts);
2433 [DllImport(ImportName)]
2434 public static extern ChannelCredentialsSafeHandle grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag);
2436 [DllImport(ImportName)]
2437 public static extern ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds);
2439 [DllImport(ImportName)]
2440 public static extern void grpcsharp_channel_credentials_release(IntPtr credentials);
2442 [DllImport(ImportName)]
2443 public static extern ChannelSafeHandle grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs);
2445 [DllImport(ImportName)]
2446 public static extern ChannelSafeHandle grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs);
2448 [DllImport(ImportName)]
2449 public static extern CallSafeHandle grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline);
2451 [DllImport(ImportName)]
2452 public static extern ChannelState grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect);
2454 [DllImport(ImportName)]
2455 public static extern void grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
2457 [DllImport(ImportName)]
2458 public static extern CStringSafeHandle grpcsharp_channel_get_target(ChannelSafeHandle call);
2460 [DllImport(ImportName)]
2461 public static extern void grpcsharp_channel_destroy(IntPtr channel);
2463 [DllImport(ImportName)]
2464 public static extern int grpcsharp_sizeof_grpc_event();
2466 [DllImport(ImportName)]
2467 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_async();
2469 [DllImport(ImportName)]
2470 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_sync();
2472 [DllImport(ImportName)]
2473 public static extern void grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq);
2475 [DllImport(ImportName)]
2476 public static extern CompletionQueueEvent grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq);
2478 [DllImport(ImportName)]
2479 public static extern CompletionQueueEvent grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag);
2481 [DllImport(ImportName)]
2482 public static extern void grpcsharp_completion_queue_destroy(IntPtr cq);
2484 [DllImport(ImportName)]
2485 public static extern void gprsharp_free(IntPtr ptr);
2487 [DllImport(ImportName)]
2488 public static extern MetadataArraySafeHandle grpcsharp_metadata_array_create(UIntPtr capacity);
2490 [DllImport(ImportName)]
2491 public static extern void grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength);
2493 [DllImport(ImportName)]
2494 public static extern UIntPtr grpcsharp_metadata_array_count(IntPtr metadataArray);
2496 [DllImport(ImportName)]
2497 public static extern IntPtr grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength);
2499 [DllImport(ImportName)]
2500 public static extern IntPtr grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength);
2502 [DllImport(ImportName)]
2503 public static extern void grpcsharp_metadata_array_destroy_full(IntPtr array);
2505 [DllImport(ImportName)]
2506 public static extern void grpcsharp_redirect_log(GprLogDelegate callback);
2508 [DllImport(ImportName)]
2509 public static extern void grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher);
2511 [DllImport(ImportName)]
2512 public static extern CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag);
2514 [DllImport(ImportName)]
2515 public static extern void grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails);
2517 [DllImport(ImportName)]
2518 public static extern ServerCredentialsSafeHandle grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest);
2520 [DllImport(ImportName)]
2521 public static extern void grpcsharp_server_credentials_release(IntPtr credentials);
2523 [DllImport(ImportName)]
2524 public static extern ServerSafeHandle grpcsharp_server_create(ChannelArgsSafeHandle args);
2526 [DllImport(ImportName)]
2527 public static extern void grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq);
2529 [DllImport(ImportName)]
2530 public static extern int grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr);
2532 [DllImport(ImportName)]
2533 public static extern int grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds);
2535 [DllImport(ImportName)]
2536 public static extern void grpcsharp_server_start(ServerSafeHandle server);
2538 [DllImport(ImportName)]
2539 public static extern CallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx);
2541 [DllImport(ImportName)]
2542 public static extern void grpcsharp_server_cancel_all_calls(ServerSafeHandle server);
2544 [DllImport(ImportName)]
2545 public static extern void grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
2547 [DllImport(ImportName)]
2548 public static extern void grpcsharp_server_destroy(IntPtr server);
2550 [DllImport(ImportName)]
2551 public static extern AuthContextSafeHandle grpcsharp_call_auth_context(CallSafeHandle call);
2553 [DllImport(ImportName)]
2554 public static extern IntPtr grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext);
2556 [DllImport(ImportName)]
2557 public static extern AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext);
2559 [DllImport(ImportName)]
2560 public static extern IntPtr grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator);
2562 [DllImport(ImportName)]
2563 public static extern void grpcsharp_auth_context_release(IntPtr authContext);
2565 [DllImport(ImportName)]
2566 public static extern SliceBufferSafeHandle grpcsharp_slice_buffer_create();
2568 [DllImport(ImportName)]
2569 public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace);
2571 [DllImport(ImportName)]
2572 public static extern UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer);
2574 [DllImport(ImportName)]
2575 public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr);
2577 [DllImport(ImportName)]
2578 public static extern void grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer);
2580 [DllImport(ImportName)]
2581 public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer);
2583 [DllImport(ImportName)]
2584 public static extern Timespec gprsharp_now(ClockType clockType);
2586 [DllImport(ImportName)]
2587 public static extern Timespec gprsharp_inf_future(ClockType clockType);
2589 [DllImport(ImportName)]
2590 public static extern Timespec gprsharp_inf_past(ClockType clockType);
2592 [DllImport(ImportName)]
2593 public static extern Timespec gprsharp_convert_clock_type(Timespec t, ClockType targetClock);
2595 [DllImport(ImportName)]
2596 public static extern int gprsharp_sizeof_timespec();
2598 [DllImport(ImportName)]
2599 public static extern CallError grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback);
2601 [DllImport(ImportName)]
2602 public static extern IntPtr grpcsharp_test_nop(IntPtr ptr);
2604 [DllImport(ImportName)]
2605 public static extern void grpcsharp_test_override_method(string methodName, string variant);
2607 [DllImport(ImportName)]
2608 public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
2612 /// grpc_csharp_ext used as a shared library (with x64.dll suffix)
2614 internal class DllImportsFromSharedLib_x64_dll
2616 private const string ImportName = "grpc_csharp_ext.x64.dll";
2618 [DllImport(ImportName)]
2619 public static extern void grpcsharp_init();
2621 [DllImport(ImportName)]
2622 public static extern void grpcsharp_shutdown();
2624 [DllImport(ImportName)]
2625 public static extern IntPtr grpcsharp_version_string();
2627 [DllImport(ImportName)]
2628 public static extern BatchContextSafeHandle grpcsharp_batch_context_create();
2630 [DllImport(ImportName)]
2631 public static extern IntPtr grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx);
2633 [DllImport(ImportName)]
2634 public static extern IntPtr grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx);
2636 [DllImport(ImportName)]
2637 public static extern int grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr);
2639 [DllImport(ImportName)]
2640 public static extern StatusCode grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx);
2642 [DllImport(ImportName)]
2643 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength);
2645 [DllImport(ImportName)]
2646 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx);
2648 [DllImport(ImportName)]
2649 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx);
2651 [DllImport(ImportName)]
2652 public static extern int grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx);
2654 [DllImport(ImportName)]
2655 public static extern void grpcsharp_batch_context_reset(BatchContextSafeHandle ctx);
2657 [DllImport(ImportName)]
2658 public static extern void grpcsharp_batch_context_destroy(IntPtr ctx);
2660 [DllImport(ImportName)]
2661 public static extern RequestCallContextSafeHandle grpcsharp_request_call_context_create();
2663 [DllImport(ImportName)]
2664 public static extern CallSafeHandle grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx);
2666 [DllImport(ImportName)]
2667 public static extern IntPtr grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength);
2669 [DllImport(ImportName)]
2670 public static extern IntPtr grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength);
2672 [DllImport(ImportName)]
2673 public static extern Timespec grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx);
2675 [DllImport(ImportName)]
2676 public static extern IntPtr grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx);
2678 [DllImport(ImportName)]
2679 public static extern void grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx);
2681 [DllImport(ImportName)]
2682 public static extern void grpcsharp_request_call_context_destroy(IntPtr ctx);
2684 [DllImport(ImportName)]
2685 public static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2);
2687 [DllImport(ImportName)]
2688 public static extern void grpcsharp_call_credentials_release(IntPtr credentials);
2690 [DllImport(ImportName)]
2691 public static extern CallError grpcsharp_call_cancel(CallSafeHandle call);
2693 [DllImport(ImportName)]
2694 public static extern CallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description);
2696 [DllImport(ImportName)]
2697 public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
2699 [DllImport(ImportName)]
2700 public static extern CallError grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
2702 [DllImport(ImportName)]
2703 public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
2705 [DllImport(ImportName)]
2706 public static extern CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
2708 [DllImport(ImportName)]
2709 public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata);
2711 [DllImport(ImportName)]
2712 public static extern CallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx);
2714 [DllImport(ImportName)]
2715 public static extern CallError grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags);
2717 [DllImport(ImportName)]
2718 public static extern CallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx);
2720 [DllImport(ImportName)]
2721 public static extern CallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx);
2723 [DllImport(ImportName)]
2724 public static extern CallError grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx);
2726 [DllImport(ImportName)]
2727 public static extern CallError grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray);
2729 [DllImport(ImportName)]
2730 public static extern CallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials);
2732 [DllImport(ImportName)]
2733 public static extern CStringSafeHandle grpcsharp_call_get_peer(CallSafeHandle call);
2735 [DllImport(ImportName)]
2736 public static extern void grpcsharp_call_destroy(IntPtr call);
2738 [DllImport(ImportName)]
2739 public static extern ChannelArgsSafeHandle grpcsharp_channel_args_create(UIntPtr numArgs);
2741 [DllImport(ImportName)]
2742 public static extern void grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value);
2744 [DllImport(ImportName)]
2745 public static extern void grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value);
2747 [DllImport(ImportName)]
2748 public static extern void grpcsharp_channel_args_destroy(IntPtr args);
2750 [DllImport(ImportName)]
2751 public static extern void grpcsharp_override_default_ssl_roots(string pemRootCerts);
2753 [DllImport(ImportName)]
2754 public static extern ChannelCredentialsSafeHandle grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag);
2756 [DllImport(ImportName)]
2757 public static extern ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds);
2759 [DllImport(ImportName)]
2760 public static extern void grpcsharp_channel_credentials_release(IntPtr credentials);
2762 [DllImport(ImportName)]
2763 public static extern ChannelSafeHandle grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs);
2765 [DllImport(ImportName)]
2766 public static extern ChannelSafeHandle grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs);
2768 [DllImport(ImportName)]
2769 public static extern CallSafeHandle grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline);
2771 [DllImport(ImportName)]
2772 public static extern ChannelState grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect);
2774 [DllImport(ImportName)]
2775 public static extern void grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
2777 [DllImport(ImportName)]
2778 public static extern CStringSafeHandle grpcsharp_channel_get_target(ChannelSafeHandle call);
2780 [DllImport(ImportName)]
2781 public static extern void grpcsharp_channel_destroy(IntPtr channel);
2783 [DllImport(ImportName)]
2784 public static extern int grpcsharp_sizeof_grpc_event();
2786 [DllImport(ImportName)]
2787 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_async();
2789 [DllImport(ImportName)]
2790 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_sync();
2792 [DllImport(ImportName)]
2793 public static extern void grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq);
2795 [DllImport(ImportName)]
2796 public static extern CompletionQueueEvent grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq);
2798 [DllImport(ImportName)]
2799 public static extern CompletionQueueEvent grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag);
2801 [DllImport(ImportName)]
2802 public static extern void grpcsharp_completion_queue_destroy(IntPtr cq);
2804 [DllImport(ImportName)]
2805 public static extern void gprsharp_free(IntPtr ptr);
2807 [DllImport(ImportName)]
2808 public static extern MetadataArraySafeHandle grpcsharp_metadata_array_create(UIntPtr capacity);
2810 [DllImport(ImportName)]
2811 public static extern void grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength);
2813 [DllImport(ImportName)]
2814 public static extern UIntPtr grpcsharp_metadata_array_count(IntPtr metadataArray);
2816 [DllImport(ImportName)]
2817 public static extern IntPtr grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength);
2819 [DllImport(ImportName)]
2820 public static extern IntPtr grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength);
2822 [DllImport(ImportName)]
2823 public static extern void grpcsharp_metadata_array_destroy_full(IntPtr array);
2825 [DllImport(ImportName)]
2826 public static extern void grpcsharp_redirect_log(GprLogDelegate callback);
2828 [DllImport(ImportName)]
2829 public static extern void grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher);
2831 [DllImport(ImportName)]
2832 public static extern CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag);
2834 [DllImport(ImportName)]
2835 public static extern void grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails);
2837 [DllImport(ImportName)]
2838 public static extern ServerCredentialsSafeHandle grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest);
2840 [DllImport(ImportName)]
2841 public static extern void grpcsharp_server_credentials_release(IntPtr credentials);
2843 [DllImport(ImportName)]
2844 public static extern ServerSafeHandle grpcsharp_server_create(ChannelArgsSafeHandle args);
2846 [DllImport(ImportName)]
2847 public static extern void grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq);
2849 [DllImport(ImportName)]
2850 public static extern int grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr);
2852 [DllImport(ImportName)]
2853 public static extern int grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds);
2855 [DllImport(ImportName)]
2856 public static extern void grpcsharp_server_start(ServerSafeHandle server);
2858 [DllImport(ImportName)]
2859 public static extern CallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx);
2861 [DllImport(ImportName)]
2862 public static extern void grpcsharp_server_cancel_all_calls(ServerSafeHandle server);
2864 [DllImport(ImportName)]
2865 public static extern void grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
2867 [DllImport(ImportName)]
2868 public static extern void grpcsharp_server_destroy(IntPtr server);
2870 [DllImport(ImportName)]
2871 public static extern AuthContextSafeHandle grpcsharp_call_auth_context(CallSafeHandle call);
2873 [DllImport(ImportName)]
2874 public static extern IntPtr grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext);
2876 [DllImport(ImportName)]
2877 public static extern AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext);
2879 [DllImport(ImportName)]
2880 public static extern IntPtr grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator);
2882 [DllImport(ImportName)]
2883 public static extern void grpcsharp_auth_context_release(IntPtr authContext);
2885 [DllImport(ImportName)]
2886 public static extern SliceBufferSafeHandle grpcsharp_slice_buffer_create();
2888 [DllImport(ImportName)]
2889 public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace);
2891 [DllImport(ImportName)]
2892 public static extern UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer);
2894 [DllImport(ImportName)]
2895 public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr);
2897 [DllImport(ImportName)]
2898 public static extern void grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer);
2900 [DllImport(ImportName)]
2901 public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer);
2903 [DllImport(ImportName)]
2904 public static extern Timespec gprsharp_now(ClockType clockType);
2906 [DllImport(ImportName)]
2907 public static extern Timespec gprsharp_inf_future(ClockType clockType);
2909 [DllImport(ImportName)]
2910 public static extern Timespec gprsharp_inf_past(ClockType clockType);
2912 [DllImport(ImportName)]
2913 public static extern Timespec gprsharp_convert_clock_type(Timespec t, ClockType targetClock);
2915 [DllImport(ImportName)]
2916 public static extern int gprsharp_sizeof_timespec();
2918 [DllImport(ImportName)]
2919 public static extern CallError grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback);
2921 [DllImport(ImportName)]
2922 public static extern IntPtr grpcsharp_test_nop(IntPtr ptr);
2924 [DllImport(ImportName)]
2925 public static extern void grpcsharp_test_override_method(string methodName, string variant);
2927 [DllImport(ImportName)]
2928 public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);