1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #include "crt.h" 7 #include "java_class_ids.h" 8 9 #include <jni.h> 10 #include <string.h> 11 12 #include <aws/http/proxy.h> 13 #include <aws/io/tls_channel_handler.h> 14 15 /* on 32-bit platforms, casting pointers to longs throws a warning we don't need */ 16 #if UINTPTR_MAX == 0xffffffff 17 # if defined(_MSC_VER) 18 # pragma warning(push) 19 # pragma warning(disable : 4305) /* 'type cast': truncation from 'jlong' to 'jni_tls_ctx_options *' */ 20 # else 21 # pragma GCC diagnostic push 22 # pragma GCC diagnostic ignored "-Wpointer-to-int-cast" 23 # pragma GCC diagnostic ignored "-Wint-to-pointer-cast" 24 # endif 25 #endif 26 aws_http_proxy_environment_variable_setting_jni_init(struct proxy_env_var_settings * options,jint environment_variable_proxy_connection_type,jint environment_variable_type,struct aws_tls_connection_options * proxy_tls_connection_options)27void aws_http_proxy_environment_variable_setting_jni_init( 28 struct proxy_env_var_settings *options, 29 jint environment_variable_proxy_connection_type, 30 jint environment_variable_type, 31 struct aws_tls_connection_options *proxy_tls_connection_options) { 32 options->connection_type = environment_variable_proxy_connection_type; 33 options->env_var_type = environment_variable_type; 34 options->tls_options = proxy_tls_connection_options; 35 } 36 37 #if UINTPTR_MAX == 0xffffffff 38 # if defined(_MSC_VER) 39 # pragma warning(pop) 40 # else 41 # pragma GCC diagnostic pop 42 # endif 43 #endif 44