1 2 #region Copyright notice and license 3 4 // Copyright 2015 gRPC authors. 5 // 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 9 // 10 // http://www.apache.org/licenses/LICENSE-2.0 11 // 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. 17 18 #endregion 19 20 using System; 21 using System.Collections.Concurrent; 22 using System.Diagnostics; 23 using System.IO; 24 using System.Reflection; 25 using System.Runtime.InteropServices; 26 using System.Threading; 27 28 using Grpc.Core.Logging; 29 using Grpc.Core.Utils; 30 31 namespace Grpc.Core.Internal 32 { 33 internal partial class NativeMethods 34 { 35 #region Native methods 36 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; 141 142 #endregion 143 NativeMethods(UnmanagedLibrary library)144 public NativeMethods(UnmanagedLibrary library) 145 { 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); 250 } 251 NativeMethods(DllImportsFromStaticLib unusedInstance)252 public NativeMethods(DllImportsFromStaticLib unusedInstance) 253 { 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; 358 } 359 NativeMethods(DllImportsFromSharedLib unusedInstance)360 public NativeMethods(DllImportsFromSharedLib unusedInstance) 361 { 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; 466 } 467 NativeMethods(DllImportsFromSharedLib_x86 unusedInstance)468 public NativeMethods(DllImportsFromSharedLib_x86 unusedInstance) 469 { 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; 574 } 575 NativeMethods(DllImportsFromSharedLib_x64 unusedInstance)576 public NativeMethods(DllImportsFromSharedLib_x64 unusedInstance) 577 { 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; 682 } 683 NativeMethods(DllImportsFromSharedLib_x86_dll unusedInstance)684 public NativeMethods(DllImportsFromSharedLib_x86_dll unusedInstance) 685 { 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; 790 } 791 NativeMethods(DllImportsFromSharedLib_x64_dll unusedInstance)792 public NativeMethods(DllImportsFromSharedLib_x64_dll unusedInstance) 793 { 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; 898 } 899 900 /// <summary> 901 /// Delegate types for all published native methods. Declared under inner class to prevent scope pollution. 902 /// </summary> 903 public class Delegates 904 { grpcsharp_init_delegate()905 public delegate void grpcsharp_init_delegate(); grpcsharp_shutdown_delegate()906 public delegate void grpcsharp_shutdown_delegate(); grpcsharp_version_string_delegate()907 public delegate IntPtr grpcsharp_version_string_delegate(); // returns not-owned const char* grpcsharp_batch_context_create_delegate()908 public delegate BatchContextSafeHandle grpcsharp_batch_context_create_delegate(); grpcsharp_batch_context_recv_initial_metadata_delegate(BatchContextSafeHandle ctx)909 public delegate IntPtr grpcsharp_batch_context_recv_initial_metadata_delegate(BatchContextSafeHandle ctx); grpcsharp_batch_context_recv_message_length_delegate(BatchContextSafeHandle ctx)910 public delegate IntPtr grpcsharp_batch_context_recv_message_length_delegate(BatchContextSafeHandle ctx); grpcsharp_batch_context_recv_message_next_slice_peek_delegate(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr)911 public delegate int grpcsharp_batch_context_recv_message_next_slice_peek_delegate(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr); grpcsharp_batch_context_recv_status_on_client_status_delegate(BatchContextSafeHandle ctx)912 public delegate StatusCode grpcsharp_batch_context_recv_status_on_client_status_delegate(BatchContextSafeHandle ctx); grpcsharp_batch_context_recv_status_on_client_details_delegate(BatchContextSafeHandle ctx, out UIntPtr detailsLength)913 public delegate IntPtr grpcsharp_batch_context_recv_status_on_client_details_delegate(BatchContextSafeHandle ctx, out UIntPtr detailsLength); grpcsharp_batch_context_recv_status_on_client_error_string_delegate(BatchContextSafeHandle ctx)914 public delegate IntPtr grpcsharp_batch_context_recv_status_on_client_error_string_delegate(BatchContextSafeHandle ctx); grpcsharp_batch_context_recv_status_on_client_trailing_metadata_delegate(BatchContextSafeHandle ctx)915 public delegate IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata_delegate(BatchContextSafeHandle ctx); grpcsharp_batch_context_recv_close_on_server_cancelled_delegate(BatchContextSafeHandle ctx)916 public delegate int grpcsharp_batch_context_recv_close_on_server_cancelled_delegate(BatchContextSafeHandle ctx); grpcsharp_batch_context_reset_delegate(BatchContextSafeHandle ctx)917 public delegate void grpcsharp_batch_context_reset_delegate(BatchContextSafeHandle ctx); grpcsharp_batch_context_destroy_delegate(IntPtr ctx)918 public delegate void grpcsharp_batch_context_destroy_delegate(IntPtr ctx); grpcsharp_request_call_context_create_delegate()919 public delegate RequestCallContextSafeHandle grpcsharp_request_call_context_create_delegate(); grpcsharp_request_call_context_call_delegate(RequestCallContextSafeHandle ctx)920 public delegate CallSafeHandle grpcsharp_request_call_context_call_delegate(RequestCallContextSafeHandle ctx); grpcsharp_request_call_context_method_delegate(RequestCallContextSafeHandle ctx, out UIntPtr methodLength)921 public delegate IntPtr grpcsharp_request_call_context_method_delegate(RequestCallContextSafeHandle ctx, out UIntPtr methodLength); grpcsharp_request_call_context_host_delegate(RequestCallContextSafeHandle ctx, out UIntPtr hostLength)922 public delegate IntPtr grpcsharp_request_call_context_host_delegate(RequestCallContextSafeHandle ctx, out UIntPtr hostLength); grpcsharp_request_call_context_deadline_delegate(RequestCallContextSafeHandle ctx)923 public delegate Timespec grpcsharp_request_call_context_deadline_delegate(RequestCallContextSafeHandle ctx); grpcsharp_request_call_context_request_metadata_delegate(RequestCallContextSafeHandle ctx)924 public delegate IntPtr grpcsharp_request_call_context_request_metadata_delegate(RequestCallContextSafeHandle ctx); grpcsharp_request_call_context_reset_delegate(RequestCallContextSafeHandle ctx)925 public delegate void grpcsharp_request_call_context_reset_delegate(RequestCallContextSafeHandle ctx); grpcsharp_request_call_context_destroy_delegate(IntPtr ctx)926 public delegate void grpcsharp_request_call_context_destroy_delegate(IntPtr ctx); grpcsharp_composite_call_credentials_create_delegate(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2)927 public delegate CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create_delegate(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2); grpcsharp_call_credentials_release_delegate(IntPtr credentials)928 public delegate void grpcsharp_call_credentials_release_delegate(IntPtr credentials); grpcsharp_call_cancel_delegate(CallSafeHandle call)929 public delegate CallError grpcsharp_call_cancel_delegate(CallSafeHandle call); grpcsharp_call_cancel_with_status_delegate(CallSafeHandle call, StatusCode status, string description)930 public delegate CallError grpcsharp_call_cancel_with_status_delegate(CallSafeHandle call, StatusCode status, string description); grpcsharp_call_start_unary_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)931 public delegate CallError grpcsharp_call_start_unary_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); grpcsharp_call_start_client_streaming_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)932 public delegate CallError grpcsharp_call_start_client_streaming_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); grpcsharp_call_start_server_streaming_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, 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); grpcsharp_call_start_duplex_streaming_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)934 public delegate CallError grpcsharp_call_start_duplex_streaming_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); grpcsharp_call_send_message_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata)935 public delegate CallError grpcsharp_call_send_message_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata); grpcsharp_call_send_close_from_client_delegate(CallSafeHandle call, BatchContextSafeHandle ctx)936 public delegate CallError grpcsharp_call_send_close_from_client_delegate(CallSafeHandle call, BatchContextSafeHandle ctx); 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)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); grpcsharp_call_recv_message_delegate(CallSafeHandle call, BatchContextSafeHandle ctx)938 public delegate CallError grpcsharp_call_recv_message_delegate(CallSafeHandle call, BatchContextSafeHandle ctx); grpcsharp_call_recv_initial_metadata_delegate(CallSafeHandle call, BatchContextSafeHandle ctx)939 public delegate CallError grpcsharp_call_recv_initial_metadata_delegate(CallSafeHandle call, BatchContextSafeHandle ctx); grpcsharp_call_start_serverside_delegate(CallSafeHandle call, BatchContextSafeHandle ctx)940 public delegate CallError grpcsharp_call_start_serverside_delegate(CallSafeHandle call, BatchContextSafeHandle ctx); grpcsharp_call_send_initial_metadata_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray)941 public delegate CallError grpcsharp_call_send_initial_metadata_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray); grpcsharp_call_set_credentials_delegate(CallSafeHandle call, CallCredentialsSafeHandle credentials)942 public delegate CallError grpcsharp_call_set_credentials_delegate(CallSafeHandle call, CallCredentialsSafeHandle credentials); grpcsharp_call_get_peer_delegate(CallSafeHandle call)943 public delegate CStringSafeHandle grpcsharp_call_get_peer_delegate(CallSafeHandle call); grpcsharp_call_destroy_delegate(IntPtr call)944 public delegate void grpcsharp_call_destroy_delegate(IntPtr call); grpcsharp_channel_args_create_delegate(UIntPtr numArgs)945 public delegate ChannelArgsSafeHandle grpcsharp_channel_args_create_delegate(UIntPtr numArgs); grpcsharp_channel_args_set_string_delegate(ChannelArgsSafeHandle args, UIntPtr index, string key, string value)946 public delegate void grpcsharp_channel_args_set_string_delegate(ChannelArgsSafeHandle args, UIntPtr index, string key, string value); grpcsharp_channel_args_set_integer_delegate(ChannelArgsSafeHandle args, UIntPtr index, string key, int value)947 public delegate void grpcsharp_channel_args_set_integer_delegate(ChannelArgsSafeHandle args, UIntPtr index, string key, int value); grpcsharp_channel_args_destroy_delegate(IntPtr args)948 public delegate void grpcsharp_channel_args_destroy_delegate(IntPtr args); grpcsharp_override_default_ssl_roots_delegate(string pemRootCerts)949 public delegate void grpcsharp_override_default_ssl_roots_delegate(string pemRootCerts); grpcsharp_ssl_credentials_create_delegate(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag)950 public delegate ChannelCredentialsSafeHandle grpcsharp_ssl_credentials_create_delegate(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag); grpcsharp_composite_channel_credentials_create_delegate(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds)951 public delegate ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create_delegate(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds); grpcsharp_channel_credentials_release_delegate(IntPtr credentials)952 public delegate void grpcsharp_channel_credentials_release_delegate(IntPtr credentials); grpcsharp_insecure_channel_create_delegate(string target, ChannelArgsSafeHandle channelArgs)953 public delegate ChannelSafeHandle grpcsharp_insecure_channel_create_delegate(string target, ChannelArgsSafeHandle channelArgs); grpcsharp_secure_channel_create_delegate(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs)954 public delegate ChannelSafeHandle grpcsharp_secure_channel_create_delegate(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs); grpcsharp_channel_create_call_delegate(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline)955 public delegate CallSafeHandle grpcsharp_channel_create_call_delegate(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline); grpcsharp_channel_check_connectivity_state_delegate(ChannelSafeHandle channel, int tryToConnect)956 public delegate ChannelState grpcsharp_channel_check_connectivity_state_delegate(ChannelSafeHandle channel, int tryToConnect); grpcsharp_channel_watch_connectivity_state_delegate(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)957 public delegate void grpcsharp_channel_watch_connectivity_state_delegate(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); grpcsharp_channel_get_target_delegate(ChannelSafeHandle call)958 public delegate CStringSafeHandle grpcsharp_channel_get_target_delegate(ChannelSafeHandle call); grpcsharp_channel_destroy_delegate(IntPtr channel)959 public delegate void grpcsharp_channel_destroy_delegate(IntPtr channel); grpcsharp_sizeof_grpc_event_delegate()960 public delegate int grpcsharp_sizeof_grpc_event_delegate(); grpcsharp_completion_queue_create_async_delegate()961 public delegate CompletionQueueSafeHandle grpcsharp_completion_queue_create_async_delegate(); grpcsharp_completion_queue_create_sync_delegate()962 public delegate CompletionQueueSafeHandle grpcsharp_completion_queue_create_sync_delegate(); grpcsharp_completion_queue_shutdown_delegate(CompletionQueueSafeHandle cq)963 public delegate void grpcsharp_completion_queue_shutdown_delegate(CompletionQueueSafeHandle cq); grpcsharp_completion_queue_next_delegate(CompletionQueueSafeHandle cq)964 public delegate CompletionQueueEvent grpcsharp_completion_queue_next_delegate(CompletionQueueSafeHandle cq); grpcsharp_completion_queue_pluck_delegate(CompletionQueueSafeHandle cq, IntPtr tag)965 public delegate CompletionQueueEvent grpcsharp_completion_queue_pluck_delegate(CompletionQueueSafeHandle cq, IntPtr tag); grpcsharp_completion_queue_destroy_delegate(IntPtr cq)966 public delegate void grpcsharp_completion_queue_destroy_delegate(IntPtr cq); gprsharp_free_delegate(IntPtr ptr)967 public delegate void gprsharp_free_delegate(IntPtr ptr); grpcsharp_metadata_array_create_delegate(UIntPtr capacity)968 public delegate MetadataArraySafeHandle grpcsharp_metadata_array_create_delegate(UIntPtr capacity); grpcsharp_metadata_array_add_delegate(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength)969 public delegate void grpcsharp_metadata_array_add_delegate(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength); grpcsharp_metadata_array_count_delegate(IntPtr metadataArray)970 public delegate UIntPtr grpcsharp_metadata_array_count_delegate(IntPtr metadataArray); grpcsharp_metadata_array_get_key_delegate(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength)971 public delegate IntPtr grpcsharp_metadata_array_get_key_delegate(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength); grpcsharp_metadata_array_get_value_delegate(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength)972 public delegate IntPtr grpcsharp_metadata_array_get_value_delegate(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength); grpcsharp_metadata_array_destroy_full_delegate(IntPtr array)973 public delegate void grpcsharp_metadata_array_destroy_full_delegate(IntPtr array); grpcsharp_redirect_log_delegate(GprLogDelegate callback)974 public delegate void grpcsharp_redirect_log_delegate(GprLogDelegate callback); grpcsharp_native_callback_dispatcher_init_delegate(NativeCallbackDispatcherCallback dispatcher)975 public delegate void grpcsharp_native_callback_dispatcher_init_delegate(NativeCallbackDispatcherCallback dispatcher); grpcsharp_metadata_credentials_create_from_plugin_delegate(IntPtr nativeCallbackTag)976 public delegate CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin_delegate(IntPtr nativeCallbackTag); grpcsharp_metadata_credentials_notify_from_plugin_delegate(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails)977 public delegate void grpcsharp_metadata_credentials_notify_from_plugin_delegate(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails); grpcsharp_ssl_server_credentials_create_delegate(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest)978 public delegate ServerCredentialsSafeHandle grpcsharp_ssl_server_credentials_create_delegate(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest); grpcsharp_server_credentials_release_delegate(IntPtr credentials)979 public delegate void grpcsharp_server_credentials_release_delegate(IntPtr credentials); grpcsharp_server_create_delegate(ChannelArgsSafeHandle args)980 public delegate ServerSafeHandle grpcsharp_server_create_delegate(ChannelArgsSafeHandle args); grpcsharp_server_register_completion_queue_delegate(ServerSafeHandle server, CompletionQueueSafeHandle cq)981 public delegate void grpcsharp_server_register_completion_queue_delegate(ServerSafeHandle server, CompletionQueueSafeHandle cq); grpcsharp_server_add_insecure_http2_port_delegate(ServerSafeHandle server, string addr)982 public delegate int grpcsharp_server_add_insecure_http2_port_delegate(ServerSafeHandle server, string addr); grpcsharp_server_add_secure_http2_port_delegate(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds)983 public delegate int grpcsharp_server_add_secure_http2_port_delegate(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds); grpcsharp_server_start_delegate(ServerSafeHandle server)984 public delegate void grpcsharp_server_start_delegate(ServerSafeHandle server); grpcsharp_server_request_call_delegate(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx)985 public delegate CallError grpcsharp_server_request_call_delegate(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx); grpcsharp_server_cancel_all_calls_delegate(ServerSafeHandle server)986 public delegate void grpcsharp_server_cancel_all_calls_delegate(ServerSafeHandle server); grpcsharp_server_shutdown_and_notify_callback_delegate(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)987 public delegate void grpcsharp_server_shutdown_and_notify_callback_delegate(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); grpcsharp_server_destroy_delegate(IntPtr server)988 public delegate void grpcsharp_server_destroy_delegate(IntPtr server); grpcsharp_call_auth_context_delegate(CallSafeHandle call)989 public delegate AuthContextSafeHandle grpcsharp_call_auth_context_delegate(CallSafeHandle call); grpcsharp_auth_context_peer_identity_property_name_delegate(AuthContextSafeHandle authContext)990 public delegate IntPtr grpcsharp_auth_context_peer_identity_property_name_delegate(AuthContextSafeHandle authContext); // returns const char* grpcsharp_auth_context_property_iterator_delegate(AuthContextSafeHandle authContext)991 public delegate AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator_delegate(AuthContextSafeHandle authContext); grpcsharp_auth_property_iterator_next_delegate(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator)992 public delegate IntPtr grpcsharp_auth_property_iterator_next_delegate(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator); // returns const auth_property* grpcsharp_auth_context_release_delegate(IntPtr authContext)993 public delegate void grpcsharp_auth_context_release_delegate(IntPtr authContext); grpcsharp_slice_buffer_create_delegate()994 public delegate SliceBufferSafeHandle grpcsharp_slice_buffer_create_delegate(); grpcsharp_slice_buffer_adjust_tail_space_delegate(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace)995 public delegate IntPtr grpcsharp_slice_buffer_adjust_tail_space_delegate(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace); grpcsharp_slice_buffer_slice_count_delegate(SliceBufferSafeHandle sliceBuffer)996 public delegate UIntPtr grpcsharp_slice_buffer_slice_count_delegate(SliceBufferSafeHandle sliceBuffer); grpcsharp_slice_buffer_slice_peek_delegate(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr)997 public delegate void grpcsharp_slice_buffer_slice_peek_delegate(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr); grpcsharp_slice_buffer_reset_and_unref_delegate(SliceBufferSafeHandle sliceBuffer)998 public delegate void grpcsharp_slice_buffer_reset_and_unref_delegate(SliceBufferSafeHandle sliceBuffer); grpcsharp_slice_buffer_destroy_delegate(IntPtr sliceBuffer)999 public delegate void grpcsharp_slice_buffer_destroy_delegate(IntPtr sliceBuffer); gprsharp_now_delegate(ClockType clockType)1000 public delegate Timespec gprsharp_now_delegate(ClockType clockType); gprsharp_inf_future_delegate(ClockType clockType)1001 public delegate Timespec gprsharp_inf_future_delegate(ClockType clockType); gprsharp_inf_past_delegate(ClockType clockType)1002 public delegate Timespec gprsharp_inf_past_delegate(ClockType clockType); gprsharp_convert_clock_type_delegate(Timespec t, ClockType targetClock)1003 public delegate Timespec gprsharp_convert_clock_type_delegate(Timespec t, ClockType targetClock); gprsharp_sizeof_timespec_delegate()1004 public delegate int gprsharp_sizeof_timespec_delegate(); grpcsharp_test_callback_delegate([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback)1005 public delegate CallError grpcsharp_test_callback_delegate([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback); grpcsharp_test_nop_delegate(IntPtr ptr)1006 public delegate IntPtr grpcsharp_test_nop_delegate(IntPtr ptr); grpcsharp_test_override_method_delegate(string methodName, string variant)1007 public delegate void grpcsharp_test_override_method_delegate(string methodName, string variant); grpcsharp_test_call_start_unary_echo_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1008 public delegate CallError grpcsharp_test_call_start_unary_echo_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1009 } 1010 1011 /// <summary> 1012 /// grpc_csharp_ext used as a static library (e.g Unity iOS). 1013 /// </summary> 1014 internal class DllImportsFromStaticLib 1015 { 1016 private const string ImportName = "__Internal"; 1017 1018 [DllImport(ImportName)] grpcsharp_init()1019 public static extern void grpcsharp_init(); 1020 1021 [DllImport(ImportName)] grpcsharp_shutdown()1022 public static extern void grpcsharp_shutdown(); 1023 1024 [DllImport(ImportName)] grpcsharp_version_string()1025 public static extern IntPtr grpcsharp_version_string(); 1026 1027 [DllImport(ImportName)] grpcsharp_batch_context_create()1028 public static extern BatchContextSafeHandle grpcsharp_batch_context_create(); 1029 1030 [DllImport(ImportName)] grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx)1031 public static extern IntPtr grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx); 1032 1033 [DllImport(ImportName)] grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx)1034 public static extern IntPtr grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx); 1035 1036 [DllImport(ImportName)] grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr)1037 public static extern int grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr); 1038 1039 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx)1040 public static extern StatusCode grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx); 1041 1042 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength)1043 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength); 1044 1045 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx)1046 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx); 1047 1048 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx)1049 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx); 1050 1051 [DllImport(ImportName)] grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx)1052 public static extern int grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx); 1053 1054 [DllImport(ImportName)] grpcsharp_batch_context_reset(BatchContextSafeHandle ctx)1055 public static extern void grpcsharp_batch_context_reset(BatchContextSafeHandle ctx); 1056 1057 [DllImport(ImportName)] grpcsharp_batch_context_destroy(IntPtr ctx)1058 public static extern void grpcsharp_batch_context_destroy(IntPtr ctx); 1059 1060 [DllImport(ImportName)] grpcsharp_request_call_context_create()1061 public static extern RequestCallContextSafeHandle grpcsharp_request_call_context_create(); 1062 1063 [DllImport(ImportName)] grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx)1064 public static extern CallSafeHandle grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx); 1065 1066 [DllImport(ImportName)] grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength)1067 public static extern IntPtr grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength); 1068 1069 [DllImport(ImportName)] grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength)1070 public static extern IntPtr grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength); 1071 1072 [DllImport(ImportName)] grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx)1073 public static extern Timespec grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx); 1074 1075 [DllImport(ImportName)] grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx)1076 public static extern IntPtr grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx); 1077 1078 [DllImport(ImportName)] grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx)1079 public static extern void grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx); 1080 1081 [DllImport(ImportName)] grpcsharp_request_call_context_destroy(IntPtr ctx)1082 public static extern void grpcsharp_request_call_context_destroy(IntPtr ctx); 1083 1084 [DllImport(ImportName)] grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2)1085 public static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2); 1086 1087 [DllImport(ImportName)] grpcsharp_call_credentials_release(IntPtr credentials)1088 public static extern void grpcsharp_call_credentials_release(IntPtr credentials); 1089 1090 [DllImport(ImportName)] grpcsharp_call_cancel(CallSafeHandle call)1091 public static extern CallError grpcsharp_call_cancel(CallSafeHandle call); 1092 1093 [DllImport(ImportName)] grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description)1094 public static extern CallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description); 1095 1096 [DllImport(ImportName)] grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1097 public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1098 1099 [DllImport(ImportName)] grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1100 public static extern CallError grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1101 1102 [DllImport(ImportName)] grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1103 public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1104 1105 [DllImport(ImportName)] grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1106 public static extern CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1107 1108 [DllImport(ImportName)] grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata)1109 public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata); 1110 1111 [DllImport(ImportName)] grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx)1112 public static extern CallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx); 1113 1114 [DllImport(ImportName)] grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags)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); 1116 1117 [DllImport(ImportName)] grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx)1118 public static extern CallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx); 1119 1120 [DllImport(ImportName)] grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx)1121 public static extern CallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx); 1122 1123 [DllImport(ImportName)] grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx)1124 public static extern CallError grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx); 1125 1126 [DllImport(ImportName)] grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray)1127 public static extern CallError grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray); 1128 1129 [DllImport(ImportName)] grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials)1130 public static extern CallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials); 1131 1132 [DllImport(ImportName)] grpcsharp_call_get_peer(CallSafeHandle call)1133 public static extern CStringSafeHandle grpcsharp_call_get_peer(CallSafeHandle call); 1134 1135 [DllImport(ImportName)] grpcsharp_call_destroy(IntPtr call)1136 public static extern void grpcsharp_call_destroy(IntPtr call); 1137 1138 [DllImport(ImportName)] grpcsharp_channel_args_create(UIntPtr numArgs)1139 public static extern ChannelArgsSafeHandle grpcsharp_channel_args_create(UIntPtr numArgs); 1140 1141 [DllImport(ImportName)] grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value)1142 public static extern void grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value); 1143 1144 [DllImport(ImportName)] grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value)1145 public static extern void grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value); 1146 1147 [DllImport(ImportName)] grpcsharp_channel_args_destroy(IntPtr args)1148 public static extern void grpcsharp_channel_args_destroy(IntPtr args); 1149 1150 [DllImport(ImportName)] grpcsharp_override_default_ssl_roots(string pemRootCerts)1151 public static extern void grpcsharp_override_default_ssl_roots(string pemRootCerts); 1152 1153 [DllImport(ImportName)] grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag)1154 public static extern ChannelCredentialsSafeHandle grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag); 1155 1156 [DllImport(ImportName)] grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds)1157 public static extern ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds); 1158 1159 [DllImport(ImportName)] grpcsharp_channel_credentials_release(IntPtr credentials)1160 public static extern void grpcsharp_channel_credentials_release(IntPtr credentials); 1161 1162 [DllImport(ImportName)] grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs)1163 public static extern ChannelSafeHandle grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs); 1164 1165 [DllImport(ImportName)] grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs)1166 public static extern ChannelSafeHandle grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs); 1167 1168 [DllImport(ImportName)] grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline)1169 public static extern CallSafeHandle grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline); 1170 1171 [DllImport(ImportName)] grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect)1172 public static extern ChannelState grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect); 1173 1174 [DllImport(ImportName)] grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)1175 public static extern void grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); 1176 1177 [DllImport(ImportName)] grpcsharp_channel_get_target(ChannelSafeHandle call)1178 public static extern CStringSafeHandle grpcsharp_channel_get_target(ChannelSafeHandle call); 1179 1180 [DllImport(ImportName)] grpcsharp_channel_destroy(IntPtr channel)1181 public static extern void grpcsharp_channel_destroy(IntPtr channel); 1182 1183 [DllImport(ImportName)] grpcsharp_sizeof_grpc_event()1184 public static extern int grpcsharp_sizeof_grpc_event(); 1185 1186 [DllImport(ImportName)] grpcsharp_completion_queue_create_async()1187 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_async(); 1188 1189 [DllImport(ImportName)] grpcsharp_completion_queue_create_sync()1190 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_sync(); 1191 1192 [DllImport(ImportName)] grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq)1193 public static extern void grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq); 1194 1195 [DllImport(ImportName)] grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq)1196 public static extern CompletionQueueEvent grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq); 1197 1198 [DllImport(ImportName)] grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag)1199 public static extern CompletionQueueEvent grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag); 1200 1201 [DllImport(ImportName)] grpcsharp_completion_queue_destroy(IntPtr cq)1202 public static extern void grpcsharp_completion_queue_destroy(IntPtr cq); 1203 1204 [DllImport(ImportName)] gprsharp_free(IntPtr ptr)1205 public static extern void gprsharp_free(IntPtr ptr); 1206 1207 [DllImport(ImportName)] grpcsharp_metadata_array_create(UIntPtr capacity)1208 public static extern MetadataArraySafeHandle grpcsharp_metadata_array_create(UIntPtr capacity); 1209 1210 [DllImport(ImportName)] grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength)1211 public static extern void grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength); 1212 1213 [DllImport(ImportName)] grpcsharp_metadata_array_count(IntPtr metadataArray)1214 public static extern UIntPtr grpcsharp_metadata_array_count(IntPtr metadataArray); 1215 1216 [DllImport(ImportName)] grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength)1217 public static extern IntPtr grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength); 1218 1219 [DllImport(ImportName)] grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength)1220 public static extern IntPtr grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength); 1221 1222 [DllImport(ImportName)] grpcsharp_metadata_array_destroy_full(IntPtr array)1223 public static extern void grpcsharp_metadata_array_destroy_full(IntPtr array); 1224 1225 [DllImport(ImportName)] grpcsharp_redirect_log(GprLogDelegate callback)1226 public static extern void grpcsharp_redirect_log(GprLogDelegate callback); 1227 1228 [DllImport(ImportName)] grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher)1229 public static extern void grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher); 1230 1231 [DllImport(ImportName)] grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag)1232 public static extern CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag); 1233 1234 [DllImport(ImportName)] grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails)1235 public static extern void grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails); 1236 1237 [DllImport(ImportName)] grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest)1238 public static extern ServerCredentialsSafeHandle grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest); 1239 1240 [DllImport(ImportName)] grpcsharp_server_credentials_release(IntPtr credentials)1241 public static extern void grpcsharp_server_credentials_release(IntPtr credentials); 1242 1243 [DllImport(ImportName)] grpcsharp_server_create(ChannelArgsSafeHandle args)1244 public static extern ServerSafeHandle grpcsharp_server_create(ChannelArgsSafeHandle args); 1245 1246 [DllImport(ImportName)] grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq)1247 public static extern void grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq); 1248 1249 [DllImport(ImportName)] grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr)1250 public static extern int grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr); 1251 1252 [DllImport(ImportName)] grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds)1253 public static extern int grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds); 1254 1255 [DllImport(ImportName)] grpcsharp_server_start(ServerSafeHandle server)1256 public static extern void grpcsharp_server_start(ServerSafeHandle server); 1257 1258 [DllImport(ImportName)] grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx)1259 public static extern CallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx); 1260 1261 [DllImport(ImportName)] grpcsharp_server_cancel_all_calls(ServerSafeHandle server)1262 public static extern void grpcsharp_server_cancel_all_calls(ServerSafeHandle server); 1263 1264 [DllImport(ImportName)] grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)1265 public static extern void grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); 1266 1267 [DllImport(ImportName)] grpcsharp_server_destroy(IntPtr server)1268 public static extern void grpcsharp_server_destroy(IntPtr server); 1269 1270 [DllImport(ImportName)] grpcsharp_call_auth_context(CallSafeHandle call)1271 public static extern AuthContextSafeHandle grpcsharp_call_auth_context(CallSafeHandle call); 1272 1273 [DllImport(ImportName)] grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext)1274 public static extern IntPtr grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext); 1275 1276 [DllImport(ImportName)] grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext)1277 public static extern AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext); 1278 1279 [DllImport(ImportName)] grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator)1280 public static extern IntPtr grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator); 1281 1282 [DllImport(ImportName)] grpcsharp_auth_context_release(IntPtr authContext)1283 public static extern void grpcsharp_auth_context_release(IntPtr authContext); 1284 1285 [DllImport(ImportName)] grpcsharp_slice_buffer_create()1286 public static extern SliceBufferSafeHandle grpcsharp_slice_buffer_create(); 1287 1288 [DllImport(ImportName)] grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace)1289 public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace); 1290 1291 [DllImport(ImportName)] grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer)1292 public static extern UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer); 1293 1294 [DllImport(ImportName)] grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr)1295 public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr); 1296 1297 [DllImport(ImportName)] grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer)1298 public static extern void grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer); 1299 1300 [DllImport(ImportName)] grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer)1301 public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer); 1302 1303 [DllImport(ImportName)] gprsharp_now(ClockType clockType)1304 public static extern Timespec gprsharp_now(ClockType clockType); 1305 1306 [DllImport(ImportName)] gprsharp_inf_future(ClockType clockType)1307 public static extern Timespec gprsharp_inf_future(ClockType clockType); 1308 1309 [DllImport(ImportName)] gprsharp_inf_past(ClockType clockType)1310 public static extern Timespec gprsharp_inf_past(ClockType clockType); 1311 1312 [DllImport(ImportName)] gprsharp_convert_clock_type(Timespec t, ClockType targetClock)1313 public static extern Timespec gprsharp_convert_clock_type(Timespec t, ClockType targetClock); 1314 1315 [DllImport(ImportName)] gprsharp_sizeof_timespec()1316 public static extern int gprsharp_sizeof_timespec(); 1317 1318 [DllImport(ImportName)] grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback)1319 public static extern CallError grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback); 1320 1321 [DllImport(ImportName)] grpcsharp_test_nop(IntPtr ptr)1322 public static extern IntPtr grpcsharp_test_nop(IntPtr ptr); 1323 1324 [DllImport(ImportName)] grpcsharp_test_override_method(string methodName, string variant)1325 public static extern void grpcsharp_test_override_method(string methodName, string variant); 1326 1327 [DllImport(ImportName)] grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1328 public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1329 } 1330 1331 /// <summary> 1332 /// grpc_csharp_ext used as a shared library (e.g on Unity Standalone and Android). 1333 /// </summary> 1334 internal class DllImportsFromSharedLib 1335 { 1336 private const string ImportName = "grpc_csharp_ext"; 1337 1338 [DllImport(ImportName)] grpcsharp_init()1339 public static extern void grpcsharp_init(); 1340 1341 [DllImport(ImportName)] grpcsharp_shutdown()1342 public static extern void grpcsharp_shutdown(); 1343 1344 [DllImport(ImportName)] grpcsharp_version_string()1345 public static extern IntPtr grpcsharp_version_string(); 1346 1347 [DllImport(ImportName)] grpcsharp_batch_context_create()1348 public static extern BatchContextSafeHandle grpcsharp_batch_context_create(); 1349 1350 [DllImport(ImportName)] grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx)1351 public static extern IntPtr grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx); 1352 1353 [DllImport(ImportName)] grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx)1354 public static extern IntPtr grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx); 1355 1356 [DllImport(ImportName)] grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr)1357 public static extern int grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr); 1358 1359 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx)1360 public static extern StatusCode grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx); 1361 1362 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength)1363 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength); 1364 1365 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx)1366 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx); 1367 1368 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx)1369 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx); 1370 1371 [DllImport(ImportName)] grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx)1372 public static extern int grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx); 1373 1374 [DllImport(ImportName)] grpcsharp_batch_context_reset(BatchContextSafeHandle ctx)1375 public static extern void grpcsharp_batch_context_reset(BatchContextSafeHandle ctx); 1376 1377 [DllImport(ImportName)] grpcsharp_batch_context_destroy(IntPtr ctx)1378 public static extern void grpcsharp_batch_context_destroy(IntPtr ctx); 1379 1380 [DllImport(ImportName)] grpcsharp_request_call_context_create()1381 public static extern RequestCallContextSafeHandle grpcsharp_request_call_context_create(); 1382 1383 [DllImport(ImportName)] grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx)1384 public static extern CallSafeHandle grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx); 1385 1386 [DllImport(ImportName)] grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength)1387 public static extern IntPtr grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength); 1388 1389 [DllImport(ImportName)] grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength)1390 public static extern IntPtr grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength); 1391 1392 [DllImport(ImportName)] grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx)1393 public static extern Timespec grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx); 1394 1395 [DllImport(ImportName)] grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx)1396 public static extern IntPtr grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx); 1397 1398 [DllImport(ImportName)] grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx)1399 public static extern void grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx); 1400 1401 [DllImport(ImportName)] grpcsharp_request_call_context_destroy(IntPtr ctx)1402 public static extern void grpcsharp_request_call_context_destroy(IntPtr ctx); 1403 1404 [DllImport(ImportName)] grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2)1405 public static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2); 1406 1407 [DllImport(ImportName)] grpcsharp_call_credentials_release(IntPtr credentials)1408 public static extern void grpcsharp_call_credentials_release(IntPtr credentials); 1409 1410 [DllImport(ImportName)] grpcsharp_call_cancel(CallSafeHandle call)1411 public static extern CallError grpcsharp_call_cancel(CallSafeHandle call); 1412 1413 [DllImport(ImportName)] grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description)1414 public static extern CallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description); 1415 1416 [DllImport(ImportName)] grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1417 public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1418 1419 [DllImport(ImportName)] grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1420 public static extern CallError grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1421 1422 [DllImport(ImportName)] grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1423 public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1424 1425 [DllImport(ImportName)] grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1426 public static extern CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1427 1428 [DllImport(ImportName)] grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata)1429 public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata); 1430 1431 [DllImport(ImportName)] grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx)1432 public static extern CallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx); 1433 1434 [DllImport(ImportName)] grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags)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); 1436 1437 [DllImport(ImportName)] grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx)1438 public static extern CallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx); 1439 1440 [DllImport(ImportName)] grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx)1441 public static extern CallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx); 1442 1443 [DllImport(ImportName)] grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx)1444 public static extern CallError grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx); 1445 1446 [DllImport(ImportName)] grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray)1447 public static extern CallError grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray); 1448 1449 [DllImport(ImportName)] grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials)1450 public static extern CallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials); 1451 1452 [DllImport(ImportName)] grpcsharp_call_get_peer(CallSafeHandle call)1453 public static extern CStringSafeHandle grpcsharp_call_get_peer(CallSafeHandle call); 1454 1455 [DllImport(ImportName)] grpcsharp_call_destroy(IntPtr call)1456 public static extern void grpcsharp_call_destroy(IntPtr call); 1457 1458 [DllImport(ImportName)] grpcsharp_channel_args_create(UIntPtr numArgs)1459 public static extern ChannelArgsSafeHandle grpcsharp_channel_args_create(UIntPtr numArgs); 1460 1461 [DllImport(ImportName)] grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value)1462 public static extern void grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value); 1463 1464 [DllImport(ImportName)] grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value)1465 public static extern void grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value); 1466 1467 [DllImport(ImportName)] grpcsharp_channel_args_destroy(IntPtr args)1468 public static extern void grpcsharp_channel_args_destroy(IntPtr args); 1469 1470 [DllImport(ImportName)] grpcsharp_override_default_ssl_roots(string pemRootCerts)1471 public static extern void grpcsharp_override_default_ssl_roots(string pemRootCerts); 1472 1473 [DllImport(ImportName)] grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag)1474 public static extern ChannelCredentialsSafeHandle grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag); 1475 1476 [DllImport(ImportName)] grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds)1477 public static extern ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds); 1478 1479 [DllImport(ImportName)] grpcsharp_channel_credentials_release(IntPtr credentials)1480 public static extern void grpcsharp_channel_credentials_release(IntPtr credentials); 1481 1482 [DllImport(ImportName)] grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs)1483 public static extern ChannelSafeHandle grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs); 1484 1485 [DllImport(ImportName)] grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs)1486 public static extern ChannelSafeHandle grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs); 1487 1488 [DllImport(ImportName)] grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline)1489 public static extern CallSafeHandle grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline); 1490 1491 [DllImport(ImportName)] grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect)1492 public static extern ChannelState grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect); 1493 1494 [DllImport(ImportName)] grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)1495 public static extern void grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); 1496 1497 [DllImport(ImportName)] grpcsharp_channel_get_target(ChannelSafeHandle call)1498 public static extern CStringSafeHandle grpcsharp_channel_get_target(ChannelSafeHandle call); 1499 1500 [DllImport(ImportName)] grpcsharp_channel_destroy(IntPtr channel)1501 public static extern void grpcsharp_channel_destroy(IntPtr channel); 1502 1503 [DllImport(ImportName)] grpcsharp_sizeof_grpc_event()1504 public static extern int grpcsharp_sizeof_grpc_event(); 1505 1506 [DllImport(ImportName)] grpcsharp_completion_queue_create_async()1507 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_async(); 1508 1509 [DllImport(ImportName)] grpcsharp_completion_queue_create_sync()1510 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_sync(); 1511 1512 [DllImport(ImportName)] grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq)1513 public static extern void grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq); 1514 1515 [DllImport(ImportName)] grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq)1516 public static extern CompletionQueueEvent grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq); 1517 1518 [DllImport(ImportName)] grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag)1519 public static extern CompletionQueueEvent grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag); 1520 1521 [DllImport(ImportName)] grpcsharp_completion_queue_destroy(IntPtr cq)1522 public static extern void grpcsharp_completion_queue_destroy(IntPtr cq); 1523 1524 [DllImport(ImportName)] gprsharp_free(IntPtr ptr)1525 public static extern void gprsharp_free(IntPtr ptr); 1526 1527 [DllImport(ImportName)] grpcsharp_metadata_array_create(UIntPtr capacity)1528 public static extern MetadataArraySafeHandle grpcsharp_metadata_array_create(UIntPtr capacity); 1529 1530 [DllImport(ImportName)] grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength)1531 public static extern void grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength); 1532 1533 [DllImport(ImportName)] grpcsharp_metadata_array_count(IntPtr metadataArray)1534 public static extern UIntPtr grpcsharp_metadata_array_count(IntPtr metadataArray); 1535 1536 [DllImport(ImportName)] grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength)1537 public static extern IntPtr grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength); 1538 1539 [DllImport(ImportName)] grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength)1540 public static extern IntPtr grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength); 1541 1542 [DllImport(ImportName)] grpcsharp_metadata_array_destroy_full(IntPtr array)1543 public static extern void grpcsharp_metadata_array_destroy_full(IntPtr array); 1544 1545 [DllImport(ImportName)] grpcsharp_redirect_log(GprLogDelegate callback)1546 public static extern void grpcsharp_redirect_log(GprLogDelegate callback); 1547 1548 [DllImport(ImportName)] grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher)1549 public static extern void grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher); 1550 1551 [DllImport(ImportName)] grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag)1552 public static extern CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag); 1553 1554 [DllImport(ImportName)] grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails)1555 public static extern void grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails); 1556 1557 [DllImport(ImportName)] grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest)1558 public static extern ServerCredentialsSafeHandle grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest); 1559 1560 [DllImport(ImportName)] grpcsharp_server_credentials_release(IntPtr credentials)1561 public static extern void grpcsharp_server_credentials_release(IntPtr credentials); 1562 1563 [DllImport(ImportName)] grpcsharp_server_create(ChannelArgsSafeHandle args)1564 public static extern ServerSafeHandle grpcsharp_server_create(ChannelArgsSafeHandle args); 1565 1566 [DllImport(ImportName)] grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq)1567 public static extern void grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq); 1568 1569 [DllImport(ImportName)] grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr)1570 public static extern int grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr); 1571 1572 [DllImport(ImportName)] grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds)1573 public static extern int grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds); 1574 1575 [DllImport(ImportName)] grpcsharp_server_start(ServerSafeHandle server)1576 public static extern void grpcsharp_server_start(ServerSafeHandle server); 1577 1578 [DllImport(ImportName)] grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx)1579 public static extern CallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx); 1580 1581 [DllImport(ImportName)] grpcsharp_server_cancel_all_calls(ServerSafeHandle server)1582 public static extern void grpcsharp_server_cancel_all_calls(ServerSafeHandle server); 1583 1584 [DllImport(ImportName)] grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)1585 public static extern void grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); 1586 1587 [DllImport(ImportName)] grpcsharp_server_destroy(IntPtr server)1588 public static extern void grpcsharp_server_destroy(IntPtr server); 1589 1590 [DllImport(ImportName)] grpcsharp_call_auth_context(CallSafeHandle call)1591 public static extern AuthContextSafeHandle grpcsharp_call_auth_context(CallSafeHandle call); 1592 1593 [DllImport(ImportName)] grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext)1594 public static extern IntPtr grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext); 1595 1596 [DllImport(ImportName)] grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext)1597 public static extern AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext); 1598 1599 [DllImport(ImportName)] grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator)1600 public static extern IntPtr grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator); 1601 1602 [DllImport(ImportName)] grpcsharp_auth_context_release(IntPtr authContext)1603 public static extern void grpcsharp_auth_context_release(IntPtr authContext); 1604 1605 [DllImport(ImportName)] grpcsharp_slice_buffer_create()1606 public static extern SliceBufferSafeHandle grpcsharp_slice_buffer_create(); 1607 1608 [DllImport(ImportName)] grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace)1609 public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace); 1610 1611 [DllImport(ImportName)] grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer)1612 public static extern UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer); 1613 1614 [DllImport(ImportName)] grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr)1615 public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr); 1616 1617 [DllImport(ImportName)] grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer)1618 public static extern void grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer); 1619 1620 [DllImport(ImportName)] grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer)1621 public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer); 1622 1623 [DllImport(ImportName)] gprsharp_now(ClockType clockType)1624 public static extern Timespec gprsharp_now(ClockType clockType); 1625 1626 [DllImport(ImportName)] gprsharp_inf_future(ClockType clockType)1627 public static extern Timespec gprsharp_inf_future(ClockType clockType); 1628 1629 [DllImport(ImportName)] gprsharp_inf_past(ClockType clockType)1630 public static extern Timespec gprsharp_inf_past(ClockType clockType); 1631 1632 [DllImport(ImportName)] gprsharp_convert_clock_type(Timespec t, ClockType targetClock)1633 public static extern Timespec gprsharp_convert_clock_type(Timespec t, ClockType targetClock); 1634 1635 [DllImport(ImportName)] gprsharp_sizeof_timespec()1636 public static extern int gprsharp_sizeof_timespec(); 1637 1638 [DllImport(ImportName)] grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback)1639 public static extern CallError grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback); 1640 1641 [DllImport(ImportName)] grpcsharp_test_nop(IntPtr ptr)1642 public static extern IntPtr grpcsharp_test_nop(IntPtr ptr); 1643 1644 [DllImport(ImportName)] grpcsharp_test_override_method(string methodName, string variant)1645 public static extern void grpcsharp_test_override_method(string methodName, string variant); 1646 1647 [DllImport(ImportName)] grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1648 public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1649 } 1650 1651 /// <summary> 1652 /// grpc_csharp_ext used as a shared library (with x86 suffix) 1653 /// </summary> 1654 internal class DllImportsFromSharedLib_x86 1655 { 1656 private const string ImportName = "grpc_csharp_ext.x86"; 1657 1658 [DllImport(ImportName)] grpcsharp_init()1659 public static extern void grpcsharp_init(); 1660 1661 [DllImport(ImportName)] grpcsharp_shutdown()1662 public static extern void grpcsharp_shutdown(); 1663 1664 [DllImport(ImportName)] grpcsharp_version_string()1665 public static extern IntPtr grpcsharp_version_string(); 1666 1667 [DllImport(ImportName)] grpcsharp_batch_context_create()1668 public static extern BatchContextSafeHandle grpcsharp_batch_context_create(); 1669 1670 [DllImport(ImportName)] grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx)1671 public static extern IntPtr grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx); 1672 1673 [DllImport(ImportName)] grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx)1674 public static extern IntPtr grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx); 1675 1676 [DllImport(ImportName)] grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr)1677 public static extern int grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr); 1678 1679 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx)1680 public static extern StatusCode grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx); 1681 1682 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength)1683 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength); 1684 1685 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx)1686 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx); 1687 1688 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx)1689 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx); 1690 1691 [DllImport(ImportName)] grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx)1692 public static extern int grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx); 1693 1694 [DllImport(ImportName)] grpcsharp_batch_context_reset(BatchContextSafeHandle ctx)1695 public static extern void grpcsharp_batch_context_reset(BatchContextSafeHandle ctx); 1696 1697 [DllImport(ImportName)] grpcsharp_batch_context_destroy(IntPtr ctx)1698 public static extern void grpcsharp_batch_context_destroy(IntPtr ctx); 1699 1700 [DllImport(ImportName)] grpcsharp_request_call_context_create()1701 public static extern RequestCallContextSafeHandle grpcsharp_request_call_context_create(); 1702 1703 [DllImport(ImportName)] grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx)1704 public static extern CallSafeHandle grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx); 1705 1706 [DllImport(ImportName)] grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength)1707 public static extern IntPtr grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength); 1708 1709 [DllImport(ImportName)] grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength)1710 public static extern IntPtr grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength); 1711 1712 [DllImport(ImportName)] grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx)1713 public static extern Timespec grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx); 1714 1715 [DllImport(ImportName)] grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx)1716 public static extern IntPtr grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx); 1717 1718 [DllImport(ImportName)] grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx)1719 public static extern void grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx); 1720 1721 [DllImport(ImportName)] grpcsharp_request_call_context_destroy(IntPtr ctx)1722 public static extern void grpcsharp_request_call_context_destroy(IntPtr ctx); 1723 1724 [DllImport(ImportName)] grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2)1725 public static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2); 1726 1727 [DllImport(ImportName)] grpcsharp_call_credentials_release(IntPtr credentials)1728 public static extern void grpcsharp_call_credentials_release(IntPtr credentials); 1729 1730 [DllImport(ImportName)] grpcsharp_call_cancel(CallSafeHandle call)1731 public static extern CallError grpcsharp_call_cancel(CallSafeHandle call); 1732 1733 [DllImport(ImportName)] grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description)1734 public static extern CallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description); 1735 1736 [DllImport(ImportName)] grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1737 public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1738 1739 [DllImport(ImportName)] grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1740 public static extern CallError grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1741 1742 [DllImport(ImportName)] grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1743 public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1744 1745 [DllImport(ImportName)] grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1746 public static extern CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1747 1748 [DllImport(ImportName)] grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata)1749 public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata); 1750 1751 [DllImport(ImportName)] grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx)1752 public static extern CallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx); 1753 1754 [DllImport(ImportName)] grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags)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); 1756 1757 [DllImport(ImportName)] grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx)1758 public static extern CallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx); 1759 1760 [DllImport(ImportName)] grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx)1761 public static extern CallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx); 1762 1763 [DllImport(ImportName)] grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx)1764 public static extern CallError grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx); 1765 1766 [DllImport(ImportName)] grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray)1767 public static extern CallError grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray); 1768 1769 [DllImport(ImportName)] grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials)1770 public static extern CallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials); 1771 1772 [DllImport(ImportName)] grpcsharp_call_get_peer(CallSafeHandle call)1773 public static extern CStringSafeHandle grpcsharp_call_get_peer(CallSafeHandle call); 1774 1775 [DllImport(ImportName)] grpcsharp_call_destroy(IntPtr call)1776 public static extern void grpcsharp_call_destroy(IntPtr call); 1777 1778 [DllImport(ImportName)] grpcsharp_channel_args_create(UIntPtr numArgs)1779 public static extern ChannelArgsSafeHandle grpcsharp_channel_args_create(UIntPtr numArgs); 1780 1781 [DllImport(ImportName)] grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value)1782 public static extern void grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value); 1783 1784 [DllImport(ImportName)] grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value)1785 public static extern void grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value); 1786 1787 [DllImport(ImportName)] grpcsharp_channel_args_destroy(IntPtr args)1788 public static extern void grpcsharp_channel_args_destroy(IntPtr args); 1789 1790 [DllImport(ImportName)] grpcsharp_override_default_ssl_roots(string pemRootCerts)1791 public static extern void grpcsharp_override_default_ssl_roots(string pemRootCerts); 1792 1793 [DllImport(ImportName)] grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag)1794 public static extern ChannelCredentialsSafeHandle grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag); 1795 1796 [DllImport(ImportName)] grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds)1797 public static extern ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds); 1798 1799 [DllImport(ImportName)] grpcsharp_channel_credentials_release(IntPtr credentials)1800 public static extern void grpcsharp_channel_credentials_release(IntPtr credentials); 1801 1802 [DllImport(ImportName)] grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs)1803 public static extern ChannelSafeHandle grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs); 1804 1805 [DllImport(ImportName)] grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs)1806 public static extern ChannelSafeHandle grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs); 1807 1808 [DllImport(ImportName)] grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline)1809 public static extern CallSafeHandle grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline); 1810 1811 [DllImport(ImportName)] grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect)1812 public static extern ChannelState grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect); 1813 1814 [DllImport(ImportName)] grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)1815 public static extern void grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); 1816 1817 [DllImport(ImportName)] grpcsharp_channel_get_target(ChannelSafeHandle call)1818 public static extern CStringSafeHandle grpcsharp_channel_get_target(ChannelSafeHandle call); 1819 1820 [DllImport(ImportName)] grpcsharp_channel_destroy(IntPtr channel)1821 public static extern void grpcsharp_channel_destroy(IntPtr channel); 1822 1823 [DllImport(ImportName)] grpcsharp_sizeof_grpc_event()1824 public static extern int grpcsharp_sizeof_grpc_event(); 1825 1826 [DllImport(ImportName)] grpcsharp_completion_queue_create_async()1827 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_async(); 1828 1829 [DllImport(ImportName)] grpcsharp_completion_queue_create_sync()1830 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_sync(); 1831 1832 [DllImport(ImportName)] grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq)1833 public static extern void grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq); 1834 1835 [DllImport(ImportName)] grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq)1836 public static extern CompletionQueueEvent grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq); 1837 1838 [DllImport(ImportName)] grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag)1839 public static extern CompletionQueueEvent grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag); 1840 1841 [DllImport(ImportName)] grpcsharp_completion_queue_destroy(IntPtr cq)1842 public static extern void grpcsharp_completion_queue_destroy(IntPtr cq); 1843 1844 [DllImport(ImportName)] gprsharp_free(IntPtr ptr)1845 public static extern void gprsharp_free(IntPtr ptr); 1846 1847 [DllImport(ImportName)] grpcsharp_metadata_array_create(UIntPtr capacity)1848 public static extern MetadataArraySafeHandle grpcsharp_metadata_array_create(UIntPtr capacity); 1849 1850 [DllImport(ImportName)] grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength)1851 public static extern void grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength); 1852 1853 [DllImport(ImportName)] grpcsharp_metadata_array_count(IntPtr metadataArray)1854 public static extern UIntPtr grpcsharp_metadata_array_count(IntPtr metadataArray); 1855 1856 [DllImport(ImportName)] grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength)1857 public static extern IntPtr grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength); 1858 1859 [DllImport(ImportName)] grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength)1860 public static extern IntPtr grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength); 1861 1862 [DllImport(ImportName)] grpcsharp_metadata_array_destroy_full(IntPtr array)1863 public static extern void grpcsharp_metadata_array_destroy_full(IntPtr array); 1864 1865 [DllImport(ImportName)] grpcsharp_redirect_log(GprLogDelegate callback)1866 public static extern void grpcsharp_redirect_log(GprLogDelegate callback); 1867 1868 [DllImport(ImportName)] grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher)1869 public static extern void grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher); 1870 1871 [DllImport(ImportName)] grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag)1872 public static extern CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag); 1873 1874 [DllImport(ImportName)] grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails)1875 public static extern void grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails); 1876 1877 [DllImport(ImportName)] grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest)1878 public static extern ServerCredentialsSafeHandle grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest); 1879 1880 [DllImport(ImportName)] grpcsharp_server_credentials_release(IntPtr credentials)1881 public static extern void grpcsharp_server_credentials_release(IntPtr credentials); 1882 1883 [DllImport(ImportName)] grpcsharp_server_create(ChannelArgsSafeHandle args)1884 public static extern ServerSafeHandle grpcsharp_server_create(ChannelArgsSafeHandle args); 1885 1886 [DllImport(ImportName)] grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq)1887 public static extern void grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq); 1888 1889 [DllImport(ImportName)] grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr)1890 public static extern int grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr); 1891 1892 [DllImport(ImportName)] grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds)1893 public static extern int grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds); 1894 1895 [DllImport(ImportName)] grpcsharp_server_start(ServerSafeHandle server)1896 public static extern void grpcsharp_server_start(ServerSafeHandle server); 1897 1898 [DllImport(ImportName)] grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx)1899 public static extern CallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx); 1900 1901 [DllImport(ImportName)] grpcsharp_server_cancel_all_calls(ServerSafeHandle server)1902 public static extern void grpcsharp_server_cancel_all_calls(ServerSafeHandle server); 1903 1904 [DllImport(ImportName)] grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)1905 public static extern void grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); 1906 1907 [DllImport(ImportName)] grpcsharp_server_destroy(IntPtr server)1908 public static extern void grpcsharp_server_destroy(IntPtr server); 1909 1910 [DllImport(ImportName)] grpcsharp_call_auth_context(CallSafeHandle call)1911 public static extern AuthContextSafeHandle grpcsharp_call_auth_context(CallSafeHandle call); 1912 1913 [DllImport(ImportName)] grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext)1914 public static extern IntPtr grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext); 1915 1916 [DllImport(ImportName)] grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext)1917 public static extern AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext); 1918 1919 [DllImport(ImportName)] grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator)1920 public static extern IntPtr grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator); 1921 1922 [DllImport(ImportName)] grpcsharp_auth_context_release(IntPtr authContext)1923 public static extern void grpcsharp_auth_context_release(IntPtr authContext); 1924 1925 [DllImport(ImportName)] grpcsharp_slice_buffer_create()1926 public static extern SliceBufferSafeHandle grpcsharp_slice_buffer_create(); 1927 1928 [DllImport(ImportName)] grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace)1929 public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace); 1930 1931 [DllImport(ImportName)] grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer)1932 public static extern UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer); 1933 1934 [DllImport(ImportName)] grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr)1935 public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr); 1936 1937 [DllImport(ImportName)] grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer)1938 public static extern void grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer); 1939 1940 [DllImport(ImportName)] grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer)1941 public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer); 1942 1943 [DllImport(ImportName)] gprsharp_now(ClockType clockType)1944 public static extern Timespec gprsharp_now(ClockType clockType); 1945 1946 [DllImport(ImportName)] gprsharp_inf_future(ClockType clockType)1947 public static extern Timespec gprsharp_inf_future(ClockType clockType); 1948 1949 [DllImport(ImportName)] gprsharp_inf_past(ClockType clockType)1950 public static extern Timespec gprsharp_inf_past(ClockType clockType); 1951 1952 [DllImport(ImportName)] gprsharp_convert_clock_type(Timespec t, ClockType targetClock)1953 public static extern Timespec gprsharp_convert_clock_type(Timespec t, ClockType targetClock); 1954 1955 [DllImport(ImportName)] gprsharp_sizeof_timespec()1956 public static extern int gprsharp_sizeof_timespec(); 1957 1958 [DllImport(ImportName)] grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback)1959 public static extern CallError grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback); 1960 1961 [DllImport(ImportName)] grpcsharp_test_nop(IntPtr ptr)1962 public static extern IntPtr grpcsharp_test_nop(IntPtr ptr); 1963 1964 [DllImport(ImportName)] grpcsharp_test_override_method(string methodName, string variant)1965 public static extern void grpcsharp_test_override_method(string methodName, string variant); 1966 1967 [DllImport(ImportName)] grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)1968 public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 1969 } 1970 1971 /// <summary> 1972 /// grpc_csharp_ext used as a shared library (with x64 suffix) 1973 /// </summary> 1974 internal class DllImportsFromSharedLib_x64 1975 { 1976 private const string ImportName = "grpc_csharp_ext.x64"; 1977 1978 [DllImport(ImportName)] grpcsharp_init()1979 public static extern void grpcsharp_init(); 1980 1981 [DllImport(ImportName)] grpcsharp_shutdown()1982 public static extern void grpcsharp_shutdown(); 1983 1984 [DllImport(ImportName)] grpcsharp_version_string()1985 public static extern IntPtr grpcsharp_version_string(); 1986 1987 [DllImport(ImportName)] grpcsharp_batch_context_create()1988 public static extern BatchContextSafeHandle grpcsharp_batch_context_create(); 1989 1990 [DllImport(ImportName)] grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx)1991 public static extern IntPtr grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx); 1992 1993 [DllImport(ImportName)] grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx)1994 public static extern IntPtr grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx); 1995 1996 [DllImport(ImportName)] grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr)1997 public static extern int grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr); 1998 1999 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx)2000 public static extern StatusCode grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx); 2001 2002 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength)2003 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength); 2004 2005 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx)2006 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx); 2007 2008 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx)2009 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx); 2010 2011 [DllImport(ImportName)] grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx)2012 public static extern int grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx); 2013 2014 [DllImport(ImportName)] grpcsharp_batch_context_reset(BatchContextSafeHandle ctx)2015 public static extern void grpcsharp_batch_context_reset(BatchContextSafeHandle ctx); 2016 2017 [DllImport(ImportName)] grpcsharp_batch_context_destroy(IntPtr ctx)2018 public static extern void grpcsharp_batch_context_destroy(IntPtr ctx); 2019 2020 [DllImport(ImportName)] grpcsharp_request_call_context_create()2021 public static extern RequestCallContextSafeHandle grpcsharp_request_call_context_create(); 2022 2023 [DllImport(ImportName)] grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx)2024 public static extern CallSafeHandle grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx); 2025 2026 [DllImport(ImportName)] grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength)2027 public static extern IntPtr grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength); 2028 2029 [DllImport(ImportName)] grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength)2030 public static extern IntPtr grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength); 2031 2032 [DllImport(ImportName)] grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx)2033 public static extern Timespec grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx); 2034 2035 [DllImport(ImportName)] grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx)2036 public static extern IntPtr grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx); 2037 2038 [DllImport(ImportName)] grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx)2039 public static extern void grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx); 2040 2041 [DllImport(ImportName)] grpcsharp_request_call_context_destroy(IntPtr ctx)2042 public static extern void grpcsharp_request_call_context_destroy(IntPtr ctx); 2043 2044 [DllImport(ImportName)] grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2)2045 public static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2); 2046 2047 [DllImport(ImportName)] grpcsharp_call_credentials_release(IntPtr credentials)2048 public static extern void grpcsharp_call_credentials_release(IntPtr credentials); 2049 2050 [DllImport(ImportName)] grpcsharp_call_cancel(CallSafeHandle call)2051 public static extern CallError grpcsharp_call_cancel(CallSafeHandle call); 2052 2053 [DllImport(ImportName)] grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description)2054 public static extern CallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description); 2055 2056 [DllImport(ImportName)] grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)2057 public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 2058 2059 [DllImport(ImportName)] grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)2060 public static extern CallError grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 2061 2062 [DllImport(ImportName)] grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)2063 public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 2064 2065 [DllImport(ImportName)] grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)2066 public static extern CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 2067 2068 [DllImport(ImportName)] grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata)2069 public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata); 2070 2071 [DllImport(ImportName)] grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx)2072 public static extern CallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx); 2073 2074 [DllImport(ImportName)] grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags)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); 2076 2077 [DllImport(ImportName)] grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx)2078 public static extern CallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx); 2079 2080 [DllImport(ImportName)] grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx)2081 public static extern CallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx); 2082 2083 [DllImport(ImportName)] grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx)2084 public static extern CallError grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx); 2085 2086 [DllImport(ImportName)] grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray)2087 public static extern CallError grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray); 2088 2089 [DllImport(ImportName)] grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials)2090 public static extern CallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials); 2091 2092 [DllImport(ImportName)] grpcsharp_call_get_peer(CallSafeHandle call)2093 public static extern CStringSafeHandle grpcsharp_call_get_peer(CallSafeHandle call); 2094 2095 [DllImport(ImportName)] grpcsharp_call_destroy(IntPtr call)2096 public static extern void grpcsharp_call_destroy(IntPtr call); 2097 2098 [DllImport(ImportName)] grpcsharp_channel_args_create(UIntPtr numArgs)2099 public static extern ChannelArgsSafeHandle grpcsharp_channel_args_create(UIntPtr numArgs); 2100 2101 [DllImport(ImportName)] grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value)2102 public static extern void grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value); 2103 2104 [DllImport(ImportName)] grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value)2105 public static extern void grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value); 2106 2107 [DllImport(ImportName)] grpcsharp_channel_args_destroy(IntPtr args)2108 public static extern void grpcsharp_channel_args_destroy(IntPtr args); 2109 2110 [DllImport(ImportName)] grpcsharp_override_default_ssl_roots(string pemRootCerts)2111 public static extern void grpcsharp_override_default_ssl_roots(string pemRootCerts); 2112 2113 [DllImport(ImportName)] grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag)2114 public static extern ChannelCredentialsSafeHandle grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag); 2115 2116 [DllImport(ImportName)] grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds)2117 public static extern ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds); 2118 2119 [DllImport(ImportName)] grpcsharp_channel_credentials_release(IntPtr credentials)2120 public static extern void grpcsharp_channel_credentials_release(IntPtr credentials); 2121 2122 [DllImport(ImportName)] grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs)2123 public static extern ChannelSafeHandle grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs); 2124 2125 [DllImport(ImportName)] grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs)2126 public static extern ChannelSafeHandle grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs); 2127 2128 [DllImport(ImportName)] grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline)2129 public static extern CallSafeHandle grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline); 2130 2131 [DllImport(ImportName)] grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect)2132 public static extern ChannelState grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect); 2133 2134 [DllImport(ImportName)] grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)2135 public static extern void grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); 2136 2137 [DllImport(ImportName)] grpcsharp_channel_get_target(ChannelSafeHandle call)2138 public static extern CStringSafeHandle grpcsharp_channel_get_target(ChannelSafeHandle call); 2139 2140 [DllImport(ImportName)] grpcsharp_channel_destroy(IntPtr channel)2141 public static extern void grpcsharp_channel_destroy(IntPtr channel); 2142 2143 [DllImport(ImportName)] grpcsharp_sizeof_grpc_event()2144 public static extern int grpcsharp_sizeof_grpc_event(); 2145 2146 [DllImport(ImportName)] grpcsharp_completion_queue_create_async()2147 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_async(); 2148 2149 [DllImport(ImportName)] grpcsharp_completion_queue_create_sync()2150 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_sync(); 2151 2152 [DllImport(ImportName)] grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq)2153 public static extern void grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq); 2154 2155 [DllImport(ImportName)] grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq)2156 public static extern CompletionQueueEvent grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq); 2157 2158 [DllImport(ImportName)] grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag)2159 public static extern CompletionQueueEvent grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag); 2160 2161 [DllImport(ImportName)] grpcsharp_completion_queue_destroy(IntPtr cq)2162 public static extern void grpcsharp_completion_queue_destroy(IntPtr cq); 2163 2164 [DllImport(ImportName)] gprsharp_free(IntPtr ptr)2165 public static extern void gprsharp_free(IntPtr ptr); 2166 2167 [DllImport(ImportName)] grpcsharp_metadata_array_create(UIntPtr capacity)2168 public static extern MetadataArraySafeHandle grpcsharp_metadata_array_create(UIntPtr capacity); 2169 2170 [DllImport(ImportName)] grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength)2171 public static extern void grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength); 2172 2173 [DllImport(ImportName)] grpcsharp_metadata_array_count(IntPtr metadataArray)2174 public static extern UIntPtr grpcsharp_metadata_array_count(IntPtr metadataArray); 2175 2176 [DllImport(ImportName)] grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength)2177 public static extern IntPtr grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength); 2178 2179 [DllImport(ImportName)] grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength)2180 public static extern IntPtr grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength); 2181 2182 [DllImport(ImportName)] grpcsharp_metadata_array_destroy_full(IntPtr array)2183 public static extern void grpcsharp_metadata_array_destroy_full(IntPtr array); 2184 2185 [DllImport(ImportName)] grpcsharp_redirect_log(GprLogDelegate callback)2186 public static extern void grpcsharp_redirect_log(GprLogDelegate callback); 2187 2188 [DllImport(ImportName)] grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher)2189 public static extern void grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher); 2190 2191 [DllImport(ImportName)] grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag)2192 public static extern CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag); 2193 2194 [DllImport(ImportName)] grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails)2195 public static extern void grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails); 2196 2197 [DllImport(ImportName)] grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest)2198 public static extern ServerCredentialsSafeHandle grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest); 2199 2200 [DllImport(ImportName)] grpcsharp_server_credentials_release(IntPtr credentials)2201 public static extern void grpcsharp_server_credentials_release(IntPtr credentials); 2202 2203 [DllImport(ImportName)] grpcsharp_server_create(ChannelArgsSafeHandle args)2204 public static extern ServerSafeHandle grpcsharp_server_create(ChannelArgsSafeHandle args); 2205 2206 [DllImport(ImportName)] grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq)2207 public static extern void grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq); 2208 2209 [DllImport(ImportName)] grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr)2210 public static extern int grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr); 2211 2212 [DllImport(ImportName)] grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds)2213 public static extern int grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds); 2214 2215 [DllImport(ImportName)] grpcsharp_server_start(ServerSafeHandle server)2216 public static extern void grpcsharp_server_start(ServerSafeHandle server); 2217 2218 [DllImport(ImportName)] grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx)2219 public static extern CallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx); 2220 2221 [DllImport(ImportName)] grpcsharp_server_cancel_all_calls(ServerSafeHandle server)2222 public static extern void grpcsharp_server_cancel_all_calls(ServerSafeHandle server); 2223 2224 [DllImport(ImportName)] grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)2225 public static extern void grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); 2226 2227 [DllImport(ImportName)] grpcsharp_server_destroy(IntPtr server)2228 public static extern void grpcsharp_server_destroy(IntPtr server); 2229 2230 [DllImport(ImportName)] grpcsharp_call_auth_context(CallSafeHandle call)2231 public static extern AuthContextSafeHandle grpcsharp_call_auth_context(CallSafeHandle call); 2232 2233 [DllImport(ImportName)] grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext)2234 public static extern IntPtr grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext); 2235 2236 [DllImport(ImportName)] grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext)2237 public static extern AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext); 2238 2239 [DllImport(ImportName)] grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator)2240 public static extern IntPtr grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator); 2241 2242 [DllImport(ImportName)] grpcsharp_auth_context_release(IntPtr authContext)2243 public static extern void grpcsharp_auth_context_release(IntPtr authContext); 2244 2245 [DllImport(ImportName)] grpcsharp_slice_buffer_create()2246 public static extern SliceBufferSafeHandle grpcsharp_slice_buffer_create(); 2247 2248 [DllImport(ImportName)] grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace)2249 public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace); 2250 2251 [DllImport(ImportName)] grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer)2252 public static extern UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer); 2253 2254 [DllImport(ImportName)] grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr)2255 public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr); 2256 2257 [DllImport(ImportName)] grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer)2258 public static extern void grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer); 2259 2260 [DllImport(ImportName)] grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer)2261 public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer); 2262 2263 [DllImport(ImportName)] gprsharp_now(ClockType clockType)2264 public static extern Timespec gprsharp_now(ClockType clockType); 2265 2266 [DllImport(ImportName)] gprsharp_inf_future(ClockType clockType)2267 public static extern Timespec gprsharp_inf_future(ClockType clockType); 2268 2269 [DllImport(ImportName)] gprsharp_inf_past(ClockType clockType)2270 public static extern Timespec gprsharp_inf_past(ClockType clockType); 2271 2272 [DllImport(ImportName)] gprsharp_convert_clock_type(Timespec t, ClockType targetClock)2273 public static extern Timespec gprsharp_convert_clock_type(Timespec t, ClockType targetClock); 2274 2275 [DllImport(ImportName)] gprsharp_sizeof_timespec()2276 public static extern int gprsharp_sizeof_timespec(); 2277 2278 [DllImport(ImportName)] grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback)2279 public static extern CallError grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback); 2280 2281 [DllImport(ImportName)] grpcsharp_test_nop(IntPtr ptr)2282 public static extern IntPtr grpcsharp_test_nop(IntPtr ptr); 2283 2284 [DllImport(ImportName)] grpcsharp_test_override_method(string methodName, string variant)2285 public static extern void grpcsharp_test_override_method(string methodName, string variant); 2286 2287 [DllImport(ImportName)] grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)2288 public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 2289 } 2290 2291 /// <summary> 2292 /// grpc_csharp_ext used as a shared library (with x86.dll suffix) 2293 /// </summary> 2294 internal class DllImportsFromSharedLib_x86_dll 2295 { 2296 private const string ImportName = "grpc_csharp_ext.x86.dll"; 2297 2298 [DllImport(ImportName)] grpcsharp_init()2299 public static extern void grpcsharp_init(); 2300 2301 [DllImport(ImportName)] grpcsharp_shutdown()2302 public static extern void grpcsharp_shutdown(); 2303 2304 [DllImport(ImportName)] grpcsharp_version_string()2305 public static extern IntPtr grpcsharp_version_string(); 2306 2307 [DllImport(ImportName)] grpcsharp_batch_context_create()2308 public static extern BatchContextSafeHandle grpcsharp_batch_context_create(); 2309 2310 [DllImport(ImportName)] grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx)2311 public static extern IntPtr grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx); 2312 2313 [DllImport(ImportName)] grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx)2314 public static extern IntPtr grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx); 2315 2316 [DllImport(ImportName)] grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr)2317 public static extern int grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr); 2318 2319 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx)2320 public static extern StatusCode grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx); 2321 2322 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength)2323 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength); 2324 2325 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx)2326 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx); 2327 2328 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx)2329 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx); 2330 2331 [DllImport(ImportName)] grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx)2332 public static extern int grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx); 2333 2334 [DllImport(ImportName)] grpcsharp_batch_context_reset(BatchContextSafeHandle ctx)2335 public static extern void grpcsharp_batch_context_reset(BatchContextSafeHandle ctx); 2336 2337 [DllImport(ImportName)] grpcsharp_batch_context_destroy(IntPtr ctx)2338 public static extern void grpcsharp_batch_context_destroy(IntPtr ctx); 2339 2340 [DllImport(ImportName)] grpcsharp_request_call_context_create()2341 public static extern RequestCallContextSafeHandle grpcsharp_request_call_context_create(); 2342 2343 [DllImport(ImportName)] grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx)2344 public static extern CallSafeHandle grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx); 2345 2346 [DllImport(ImportName)] grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength)2347 public static extern IntPtr grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength); 2348 2349 [DllImport(ImportName)] grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength)2350 public static extern IntPtr grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength); 2351 2352 [DllImport(ImportName)] grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx)2353 public static extern Timespec grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx); 2354 2355 [DllImport(ImportName)] grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx)2356 public static extern IntPtr grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx); 2357 2358 [DllImport(ImportName)] grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx)2359 public static extern void grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx); 2360 2361 [DllImport(ImportName)] grpcsharp_request_call_context_destroy(IntPtr ctx)2362 public static extern void grpcsharp_request_call_context_destroy(IntPtr ctx); 2363 2364 [DllImport(ImportName)] grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2)2365 public static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2); 2366 2367 [DllImport(ImportName)] grpcsharp_call_credentials_release(IntPtr credentials)2368 public static extern void grpcsharp_call_credentials_release(IntPtr credentials); 2369 2370 [DllImport(ImportName)] grpcsharp_call_cancel(CallSafeHandle call)2371 public static extern CallError grpcsharp_call_cancel(CallSafeHandle call); 2372 2373 [DllImport(ImportName)] grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description)2374 public static extern CallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description); 2375 2376 [DllImport(ImportName)] grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)2377 public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 2378 2379 [DllImport(ImportName)] grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)2380 public static extern CallError grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 2381 2382 [DllImport(ImportName)] grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)2383 public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 2384 2385 [DllImport(ImportName)] grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)2386 public static extern CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 2387 2388 [DllImport(ImportName)] grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata)2389 public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata); 2390 2391 [DllImport(ImportName)] grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx)2392 public static extern CallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx); 2393 2394 [DllImport(ImportName)] grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags)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); 2396 2397 [DllImport(ImportName)] grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx)2398 public static extern CallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx); 2399 2400 [DllImport(ImportName)] grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx)2401 public static extern CallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx); 2402 2403 [DllImport(ImportName)] grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx)2404 public static extern CallError grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx); 2405 2406 [DllImport(ImportName)] grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray)2407 public static extern CallError grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray); 2408 2409 [DllImport(ImportName)] grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials)2410 public static extern CallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials); 2411 2412 [DllImport(ImportName)] grpcsharp_call_get_peer(CallSafeHandle call)2413 public static extern CStringSafeHandle grpcsharp_call_get_peer(CallSafeHandle call); 2414 2415 [DllImport(ImportName)] grpcsharp_call_destroy(IntPtr call)2416 public static extern void grpcsharp_call_destroy(IntPtr call); 2417 2418 [DllImport(ImportName)] grpcsharp_channel_args_create(UIntPtr numArgs)2419 public static extern ChannelArgsSafeHandle grpcsharp_channel_args_create(UIntPtr numArgs); 2420 2421 [DllImport(ImportName)] grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value)2422 public static extern void grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value); 2423 2424 [DllImport(ImportName)] grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value)2425 public static extern void grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value); 2426 2427 [DllImport(ImportName)] grpcsharp_channel_args_destroy(IntPtr args)2428 public static extern void grpcsharp_channel_args_destroy(IntPtr args); 2429 2430 [DllImport(ImportName)] grpcsharp_override_default_ssl_roots(string pemRootCerts)2431 public static extern void grpcsharp_override_default_ssl_roots(string pemRootCerts); 2432 2433 [DllImport(ImportName)] grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag)2434 public static extern ChannelCredentialsSafeHandle grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag); 2435 2436 [DllImport(ImportName)] grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds)2437 public static extern ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds); 2438 2439 [DllImport(ImportName)] grpcsharp_channel_credentials_release(IntPtr credentials)2440 public static extern void grpcsharp_channel_credentials_release(IntPtr credentials); 2441 2442 [DllImport(ImportName)] grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs)2443 public static extern ChannelSafeHandle grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs); 2444 2445 [DllImport(ImportName)] grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs)2446 public static extern ChannelSafeHandle grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs); 2447 2448 [DllImport(ImportName)] grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline)2449 public static extern CallSafeHandle grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline); 2450 2451 [DllImport(ImportName)] grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect)2452 public static extern ChannelState grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect); 2453 2454 [DllImport(ImportName)] grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)2455 public static extern void grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); 2456 2457 [DllImport(ImportName)] grpcsharp_channel_get_target(ChannelSafeHandle call)2458 public static extern CStringSafeHandle grpcsharp_channel_get_target(ChannelSafeHandle call); 2459 2460 [DllImport(ImportName)] grpcsharp_channel_destroy(IntPtr channel)2461 public static extern void grpcsharp_channel_destroy(IntPtr channel); 2462 2463 [DllImport(ImportName)] grpcsharp_sizeof_grpc_event()2464 public static extern int grpcsharp_sizeof_grpc_event(); 2465 2466 [DllImport(ImportName)] grpcsharp_completion_queue_create_async()2467 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_async(); 2468 2469 [DllImport(ImportName)] grpcsharp_completion_queue_create_sync()2470 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_sync(); 2471 2472 [DllImport(ImportName)] grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq)2473 public static extern void grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq); 2474 2475 [DllImport(ImportName)] grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq)2476 public static extern CompletionQueueEvent grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq); 2477 2478 [DllImport(ImportName)] grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag)2479 public static extern CompletionQueueEvent grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag); 2480 2481 [DllImport(ImportName)] grpcsharp_completion_queue_destroy(IntPtr cq)2482 public static extern void grpcsharp_completion_queue_destroy(IntPtr cq); 2483 2484 [DllImport(ImportName)] gprsharp_free(IntPtr ptr)2485 public static extern void gprsharp_free(IntPtr ptr); 2486 2487 [DllImport(ImportName)] grpcsharp_metadata_array_create(UIntPtr capacity)2488 public static extern MetadataArraySafeHandle grpcsharp_metadata_array_create(UIntPtr capacity); 2489 2490 [DllImport(ImportName)] grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength)2491 public static extern void grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength); 2492 2493 [DllImport(ImportName)] grpcsharp_metadata_array_count(IntPtr metadataArray)2494 public static extern UIntPtr grpcsharp_metadata_array_count(IntPtr metadataArray); 2495 2496 [DllImport(ImportName)] grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength)2497 public static extern IntPtr grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength); 2498 2499 [DllImport(ImportName)] grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength)2500 public static extern IntPtr grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength); 2501 2502 [DllImport(ImportName)] grpcsharp_metadata_array_destroy_full(IntPtr array)2503 public static extern void grpcsharp_metadata_array_destroy_full(IntPtr array); 2504 2505 [DllImport(ImportName)] grpcsharp_redirect_log(GprLogDelegate callback)2506 public static extern void grpcsharp_redirect_log(GprLogDelegate callback); 2507 2508 [DllImport(ImportName)] grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher)2509 public static extern void grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher); 2510 2511 [DllImport(ImportName)] grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag)2512 public static extern CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag); 2513 2514 [DllImport(ImportName)] grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails)2515 public static extern void grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails); 2516 2517 [DllImport(ImportName)] grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest)2518 public static extern ServerCredentialsSafeHandle grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest); 2519 2520 [DllImport(ImportName)] grpcsharp_server_credentials_release(IntPtr credentials)2521 public static extern void grpcsharp_server_credentials_release(IntPtr credentials); 2522 2523 [DllImport(ImportName)] grpcsharp_server_create(ChannelArgsSafeHandle args)2524 public static extern ServerSafeHandle grpcsharp_server_create(ChannelArgsSafeHandle args); 2525 2526 [DllImport(ImportName)] grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq)2527 public static extern void grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq); 2528 2529 [DllImport(ImportName)] grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr)2530 public static extern int grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr); 2531 2532 [DllImport(ImportName)] grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds)2533 public static extern int grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds); 2534 2535 [DllImport(ImportName)] grpcsharp_server_start(ServerSafeHandle server)2536 public static extern void grpcsharp_server_start(ServerSafeHandle server); 2537 2538 [DllImport(ImportName)] grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx)2539 public static extern CallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx); 2540 2541 [DllImport(ImportName)] grpcsharp_server_cancel_all_calls(ServerSafeHandle server)2542 public static extern void grpcsharp_server_cancel_all_calls(ServerSafeHandle server); 2543 2544 [DllImport(ImportName)] grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)2545 public static extern void grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); 2546 2547 [DllImport(ImportName)] grpcsharp_server_destroy(IntPtr server)2548 public static extern void grpcsharp_server_destroy(IntPtr server); 2549 2550 [DllImport(ImportName)] grpcsharp_call_auth_context(CallSafeHandle call)2551 public static extern AuthContextSafeHandle grpcsharp_call_auth_context(CallSafeHandle call); 2552 2553 [DllImport(ImportName)] grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext)2554 public static extern IntPtr grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext); 2555 2556 [DllImport(ImportName)] grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext)2557 public static extern AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext); 2558 2559 [DllImport(ImportName)] grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator)2560 public static extern IntPtr grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator); 2561 2562 [DllImport(ImportName)] grpcsharp_auth_context_release(IntPtr authContext)2563 public static extern void grpcsharp_auth_context_release(IntPtr authContext); 2564 2565 [DllImport(ImportName)] grpcsharp_slice_buffer_create()2566 public static extern SliceBufferSafeHandle grpcsharp_slice_buffer_create(); 2567 2568 [DllImport(ImportName)] grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace)2569 public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace); 2570 2571 [DllImport(ImportName)] grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer)2572 public static extern UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer); 2573 2574 [DllImport(ImportName)] grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr)2575 public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr); 2576 2577 [DllImport(ImportName)] grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer)2578 public static extern void grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer); 2579 2580 [DllImport(ImportName)] grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer)2581 public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer); 2582 2583 [DllImport(ImportName)] gprsharp_now(ClockType clockType)2584 public static extern Timespec gprsharp_now(ClockType clockType); 2585 2586 [DllImport(ImportName)] gprsharp_inf_future(ClockType clockType)2587 public static extern Timespec gprsharp_inf_future(ClockType clockType); 2588 2589 [DllImport(ImportName)] gprsharp_inf_past(ClockType clockType)2590 public static extern Timespec gprsharp_inf_past(ClockType clockType); 2591 2592 [DllImport(ImportName)] gprsharp_convert_clock_type(Timespec t, ClockType targetClock)2593 public static extern Timespec gprsharp_convert_clock_type(Timespec t, ClockType targetClock); 2594 2595 [DllImport(ImportName)] gprsharp_sizeof_timespec()2596 public static extern int gprsharp_sizeof_timespec(); 2597 2598 [DllImport(ImportName)] grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback)2599 public static extern CallError grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback); 2600 2601 [DllImport(ImportName)] grpcsharp_test_nop(IntPtr ptr)2602 public static extern IntPtr grpcsharp_test_nop(IntPtr ptr); 2603 2604 [DllImport(ImportName)] grpcsharp_test_override_method(string methodName, string variant)2605 public static extern void grpcsharp_test_override_method(string methodName, string variant); 2606 2607 [DllImport(ImportName)] grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)2608 public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 2609 } 2610 2611 /// <summary> 2612 /// grpc_csharp_ext used as a shared library (with x64.dll suffix) 2613 /// </summary> 2614 internal class DllImportsFromSharedLib_x64_dll 2615 { 2616 private const string ImportName = "grpc_csharp_ext.x64.dll"; 2617 2618 [DllImport(ImportName)] grpcsharp_init()2619 public static extern void grpcsharp_init(); 2620 2621 [DllImport(ImportName)] grpcsharp_shutdown()2622 public static extern void grpcsharp_shutdown(); 2623 2624 [DllImport(ImportName)] grpcsharp_version_string()2625 public static extern IntPtr grpcsharp_version_string(); 2626 2627 [DllImport(ImportName)] grpcsharp_batch_context_create()2628 public static extern BatchContextSafeHandle grpcsharp_batch_context_create(); 2629 2630 [DllImport(ImportName)] grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx)2631 public static extern IntPtr grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx); 2632 2633 [DllImport(ImportName)] grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx)2634 public static extern IntPtr grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx); 2635 2636 [DllImport(ImportName)] grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr)2637 public static extern int grpcsharp_batch_context_recv_message_next_slice_peek(BatchContextSafeHandle ctx, out UIntPtr sliceLen, out IntPtr sliceDataPtr); 2638 2639 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx)2640 public static extern StatusCode grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx); 2641 2642 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength)2643 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx, out UIntPtr detailsLength); 2644 2645 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx)2646 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_error_string(BatchContextSafeHandle ctx); 2647 2648 [DllImport(ImportName)] grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx)2649 public static extern IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx); 2650 2651 [DllImport(ImportName)] grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx)2652 public static extern int grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx); 2653 2654 [DllImport(ImportName)] grpcsharp_batch_context_reset(BatchContextSafeHandle ctx)2655 public static extern void grpcsharp_batch_context_reset(BatchContextSafeHandle ctx); 2656 2657 [DllImport(ImportName)] grpcsharp_batch_context_destroy(IntPtr ctx)2658 public static extern void grpcsharp_batch_context_destroy(IntPtr ctx); 2659 2660 [DllImport(ImportName)] grpcsharp_request_call_context_create()2661 public static extern RequestCallContextSafeHandle grpcsharp_request_call_context_create(); 2662 2663 [DllImport(ImportName)] grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx)2664 public static extern CallSafeHandle grpcsharp_request_call_context_call(RequestCallContextSafeHandle ctx); 2665 2666 [DllImport(ImportName)] grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength)2667 public static extern IntPtr grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength); 2668 2669 [DllImport(ImportName)] grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength)2670 public static extern IntPtr grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength); 2671 2672 [DllImport(ImportName)] grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx)2673 public static extern Timespec grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx); 2674 2675 [DllImport(ImportName)] grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx)2676 public static extern IntPtr grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx); 2677 2678 [DllImport(ImportName)] grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx)2679 public static extern void grpcsharp_request_call_context_reset(RequestCallContextSafeHandle ctx); 2680 2681 [DllImport(ImportName)] grpcsharp_request_call_context_destroy(IntPtr ctx)2682 public static extern void grpcsharp_request_call_context_destroy(IntPtr ctx); 2683 2684 [DllImport(ImportName)] grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2)2685 public static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2); 2686 2687 [DllImport(ImportName)] grpcsharp_call_credentials_release(IntPtr credentials)2688 public static extern void grpcsharp_call_credentials_release(IntPtr credentials); 2689 2690 [DllImport(ImportName)] grpcsharp_call_cancel(CallSafeHandle call)2691 public static extern CallError grpcsharp_call_cancel(CallSafeHandle call); 2692 2693 [DllImport(ImportName)] grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description)2694 public static extern CallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description); 2695 2696 [DllImport(ImportName)] grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)2697 public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 2698 2699 [DllImport(ImportName)] grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)2700 public static extern CallError grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 2701 2702 [DllImport(ImportName)] grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)2703 public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 2704 2705 [DllImport(ImportName)] grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)2706 public static extern CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 2707 2708 [DllImport(ImportName)] grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata)2709 public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata); 2710 2711 [DllImport(ImportName)] grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx)2712 public static extern CallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx); 2713 2714 [DllImport(ImportName)] grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags)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); 2716 2717 [DllImport(ImportName)] grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx)2718 public static extern CallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx); 2719 2720 [DllImport(ImportName)] grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx)2721 public static extern CallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx); 2722 2723 [DllImport(ImportName)] grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx)2724 public static extern CallError grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx); 2725 2726 [DllImport(ImportName)] grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray)2727 public static extern CallError grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray); 2728 2729 [DllImport(ImportName)] grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials)2730 public static extern CallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials); 2731 2732 [DllImport(ImportName)] grpcsharp_call_get_peer(CallSafeHandle call)2733 public static extern CStringSafeHandle grpcsharp_call_get_peer(CallSafeHandle call); 2734 2735 [DllImport(ImportName)] grpcsharp_call_destroy(IntPtr call)2736 public static extern void grpcsharp_call_destroy(IntPtr call); 2737 2738 [DllImport(ImportName)] grpcsharp_channel_args_create(UIntPtr numArgs)2739 public static extern ChannelArgsSafeHandle grpcsharp_channel_args_create(UIntPtr numArgs); 2740 2741 [DllImport(ImportName)] grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value)2742 public static extern void grpcsharp_channel_args_set_string(ChannelArgsSafeHandle args, UIntPtr index, string key, string value); 2743 2744 [DllImport(ImportName)] grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value)2745 public static extern void grpcsharp_channel_args_set_integer(ChannelArgsSafeHandle args, UIntPtr index, string key, int value); 2746 2747 [DllImport(ImportName)] grpcsharp_channel_args_destroy(IntPtr args)2748 public static extern void grpcsharp_channel_args_destroy(IntPtr args); 2749 2750 [DllImport(ImportName)] grpcsharp_override_default_ssl_roots(string pemRootCerts)2751 public static extern void grpcsharp_override_default_ssl_roots(string pemRootCerts); 2752 2753 [DllImport(ImportName)] grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag)2754 public static extern ChannelCredentialsSafeHandle grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey, IntPtr verifyPeerCallbackTag); 2755 2756 [DllImport(ImportName)] grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds)2757 public static extern ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds); 2758 2759 [DllImport(ImportName)] grpcsharp_channel_credentials_release(IntPtr credentials)2760 public static extern void grpcsharp_channel_credentials_release(IntPtr credentials); 2761 2762 [DllImport(ImportName)] grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs)2763 public static extern ChannelSafeHandle grpcsharp_insecure_channel_create(string target, ChannelArgsSafeHandle channelArgs); 2764 2765 [DllImport(ImportName)] grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs)2766 public static extern ChannelSafeHandle grpcsharp_secure_channel_create(ChannelCredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs); 2767 2768 [DllImport(ImportName)] grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline)2769 public static extern CallSafeHandle grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline); 2770 2771 [DllImport(ImportName)] grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect)2772 public static extern ChannelState grpcsharp_channel_check_connectivity_state(ChannelSafeHandle channel, int tryToConnect); 2773 2774 [DllImport(ImportName)] grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)2775 public static extern void grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); 2776 2777 [DllImport(ImportName)] grpcsharp_channel_get_target(ChannelSafeHandle call)2778 public static extern CStringSafeHandle grpcsharp_channel_get_target(ChannelSafeHandle call); 2779 2780 [DllImport(ImportName)] grpcsharp_channel_destroy(IntPtr channel)2781 public static extern void grpcsharp_channel_destroy(IntPtr channel); 2782 2783 [DllImport(ImportName)] grpcsharp_sizeof_grpc_event()2784 public static extern int grpcsharp_sizeof_grpc_event(); 2785 2786 [DllImport(ImportName)] grpcsharp_completion_queue_create_async()2787 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_async(); 2788 2789 [DllImport(ImportName)] grpcsharp_completion_queue_create_sync()2790 public static extern CompletionQueueSafeHandle grpcsharp_completion_queue_create_sync(); 2791 2792 [DllImport(ImportName)] grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq)2793 public static extern void grpcsharp_completion_queue_shutdown(CompletionQueueSafeHandle cq); 2794 2795 [DllImport(ImportName)] grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq)2796 public static extern CompletionQueueEvent grpcsharp_completion_queue_next(CompletionQueueSafeHandle cq); 2797 2798 [DllImport(ImportName)] grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag)2799 public static extern CompletionQueueEvent grpcsharp_completion_queue_pluck(CompletionQueueSafeHandle cq, IntPtr tag); 2800 2801 [DllImport(ImportName)] grpcsharp_completion_queue_destroy(IntPtr cq)2802 public static extern void grpcsharp_completion_queue_destroy(IntPtr cq); 2803 2804 [DllImport(ImportName)] gprsharp_free(IntPtr ptr)2805 public static extern void gprsharp_free(IntPtr ptr); 2806 2807 [DllImport(ImportName)] grpcsharp_metadata_array_create(UIntPtr capacity)2808 public static extern MetadataArraySafeHandle grpcsharp_metadata_array_create(UIntPtr capacity); 2809 2810 [DllImport(ImportName)] grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength)2811 public static extern void grpcsharp_metadata_array_add(MetadataArraySafeHandle array, string key, byte[] value, UIntPtr valueLength); 2812 2813 [DllImport(ImportName)] grpcsharp_metadata_array_count(IntPtr metadataArray)2814 public static extern UIntPtr grpcsharp_metadata_array_count(IntPtr metadataArray); 2815 2816 [DllImport(ImportName)] grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength)2817 public static extern IntPtr grpcsharp_metadata_array_get_key(IntPtr metadataArray, UIntPtr index, out UIntPtr keyLength); 2818 2819 [DllImport(ImportName)] grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength)2820 public static extern IntPtr grpcsharp_metadata_array_get_value(IntPtr metadataArray, UIntPtr index, out UIntPtr valueLength); 2821 2822 [DllImport(ImportName)] grpcsharp_metadata_array_destroy_full(IntPtr array)2823 public static extern void grpcsharp_metadata_array_destroy_full(IntPtr array); 2824 2825 [DllImport(ImportName)] grpcsharp_redirect_log(GprLogDelegate callback)2826 public static extern void grpcsharp_redirect_log(GprLogDelegate callback); 2827 2828 [DllImport(ImportName)] grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher)2829 public static extern void grpcsharp_native_callback_dispatcher_init(NativeCallbackDispatcherCallback dispatcher); 2830 2831 [DllImport(ImportName)] grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag)2832 public static extern CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin(IntPtr nativeCallbackTag); 2833 2834 [DllImport(ImportName)] grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails)2835 public static extern void grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails); 2836 2837 [DllImport(ImportName)] grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest)2838 public static extern ServerCredentialsSafeHandle grpcsharp_ssl_server_credentials_create(string pemRootCerts, string[] keyCertPairCertChainArray, string[] keyCertPairPrivateKeyArray, UIntPtr numKeyCertPairs, SslClientCertificateRequestType clientCertificateRequest); 2839 2840 [DllImport(ImportName)] grpcsharp_server_credentials_release(IntPtr credentials)2841 public static extern void grpcsharp_server_credentials_release(IntPtr credentials); 2842 2843 [DllImport(ImportName)] grpcsharp_server_create(ChannelArgsSafeHandle args)2844 public static extern ServerSafeHandle grpcsharp_server_create(ChannelArgsSafeHandle args); 2845 2846 [DllImport(ImportName)] grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq)2847 public static extern void grpcsharp_server_register_completion_queue(ServerSafeHandle server, CompletionQueueSafeHandle cq); 2848 2849 [DllImport(ImportName)] grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr)2850 public static extern int grpcsharp_server_add_insecure_http2_port(ServerSafeHandle server, string addr); 2851 2852 [DllImport(ImportName)] grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds)2853 public static extern int grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr, ServerCredentialsSafeHandle creds); 2854 2855 [DllImport(ImportName)] grpcsharp_server_start(ServerSafeHandle server)2856 public static extern void grpcsharp_server_start(ServerSafeHandle server); 2857 2858 [DllImport(ImportName)] grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx)2859 public static extern CallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx); 2860 2861 [DllImport(ImportName)] grpcsharp_server_cancel_all_calls(ServerSafeHandle server)2862 public static extern void grpcsharp_server_cancel_all_calls(ServerSafeHandle server); 2863 2864 [DllImport(ImportName)] grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)2865 public static extern void grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); 2866 2867 [DllImport(ImportName)] grpcsharp_server_destroy(IntPtr server)2868 public static extern void grpcsharp_server_destroy(IntPtr server); 2869 2870 [DllImport(ImportName)] grpcsharp_call_auth_context(CallSafeHandle call)2871 public static extern AuthContextSafeHandle grpcsharp_call_auth_context(CallSafeHandle call); 2872 2873 [DllImport(ImportName)] grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext)2874 public static extern IntPtr grpcsharp_auth_context_peer_identity_property_name(AuthContextSafeHandle authContext); 2875 2876 [DllImport(ImportName)] grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext)2877 public static extern AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext); 2878 2879 [DllImport(ImportName)] grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator)2880 public static extern IntPtr grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator); 2881 2882 [DllImport(ImportName)] grpcsharp_auth_context_release(IntPtr authContext)2883 public static extern void grpcsharp_auth_context_release(IntPtr authContext); 2884 2885 [DllImport(ImportName)] grpcsharp_slice_buffer_create()2886 public static extern SliceBufferSafeHandle grpcsharp_slice_buffer_create(); 2887 2888 [DllImport(ImportName)] grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace)2889 public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace); 2890 2891 [DllImport(ImportName)] grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer)2892 public static extern UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer); 2893 2894 [DllImport(ImportName)] grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr)2895 public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr); 2896 2897 [DllImport(ImportName)] grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer)2898 public static extern void grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer); 2899 2900 [DllImport(ImportName)] grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer)2901 public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer); 2902 2903 [DllImport(ImportName)] gprsharp_now(ClockType clockType)2904 public static extern Timespec gprsharp_now(ClockType clockType); 2905 2906 [DllImport(ImportName)] gprsharp_inf_future(ClockType clockType)2907 public static extern Timespec gprsharp_inf_future(ClockType clockType); 2908 2909 [DllImport(ImportName)] gprsharp_inf_past(ClockType clockType)2910 public static extern Timespec gprsharp_inf_past(ClockType clockType); 2911 2912 [DllImport(ImportName)] gprsharp_convert_clock_type(Timespec t, ClockType targetClock)2913 public static extern Timespec gprsharp_convert_clock_type(Timespec t, ClockType targetClock); 2914 2915 [DllImport(ImportName)] gprsharp_sizeof_timespec()2916 public static extern int gprsharp_sizeof_timespec(); 2917 2918 [DllImport(ImportName)] grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback)2919 public static extern CallError grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback); 2920 2921 [DllImport(ImportName)] grpcsharp_test_nop(IntPtr ptr)2922 public static extern IntPtr grpcsharp_test_nop(IntPtr ptr); 2923 2924 [DllImport(ImportName)] grpcsharp_test_override_method(string methodName, string variant)2925 public static extern void grpcsharp_test_override_method(string methodName, string variant); 2926 2927 [DllImport(ImportName)] grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)2928 public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); 2929 } 2930 } 2931 } 2932