use core::ffi::*;
use core::ptr::NonNull;
use objc2_core_foundation::*;
use crate::*;
#[inline]
pub unsafe extern "C-unwind" fn CFNetworkCopySystemProxySettings(
) -> Option<CFRetained<CFDictionary>> {
extern "C-unwind" {
fn CFNetworkCopySystemProxySettings() -> Option<NonNull<CFDictionary>>;
}
let ret = unsafe { CFNetworkCopySystemProxySettings() };
ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
}
#[inline]
pub unsafe extern "C-unwind" fn CFNetworkCopyProxiesForURL(
url: &CFURL,
proxy_settings: &CFDictionary,
) -> CFRetained<CFArray> {
extern "C-unwind" {
fn CFNetworkCopyProxiesForURL(
url: &CFURL,
proxy_settings: &CFDictionary,
) -> Option<NonNull<CFArray>>;
}
let ret = unsafe { CFNetworkCopyProxiesForURL(url, proxy_settings) };
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
pub type CFProxyAutoConfigurationResultCallback =
Option<unsafe extern "C-unwind" fn(NonNull<c_void>, NonNull<CFArray>, *mut CFError)>;
#[inline]
pub unsafe extern "C-unwind" fn CFNetworkCopyProxiesForAutoConfigurationScript(
proxy_auto_configuration_script: &CFString,
target_url: &CFURL,
error: *mut *mut CFError,
) -> Option<CFRetained<CFArray>> {
extern "C-unwind" {
fn CFNetworkCopyProxiesForAutoConfigurationScript(
proxy_auto_configuration_script: &CFString,
target_url: &CFURL,
error: *mut *mut CFError,
) -> Option<NonNull<CFArray>>;
}
let ret = unsafe {
CFNetworkCopyProxiesForAutoConfigurationScript(
proxy_auto_configuration_script,
target_url,
error,
)
};
ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
}
#[inline]
pub unsafe extern "C-unwind" fn CFNetworkExecuteProxyAutoConfigurationScript(
proxy_auto_configuration_script: &CFString,
target_url: &CFURL,
cb: CFProxyAutoConfigurationResultCallback,
client_context: NonNull<CFStreamClientContext>,
) -> CFRetained<CFRunLoopSource> {
extern "C-unwind" {
fn CFNetworkExecuteProxyAutoConfigurationScript(
proxy_auto_configuration_script: &CFString,
target_url: &CFURL,
cb: CFProxyAutoConfigurationResultCallback,
client_context: NonNull<CFStreamClientContext>,
) -> Option<NonNull<CFRunLoopSource>>;
}
let ret = unsafe {
CFNetworkExecuteProxyAutoConfigurationScript(
proxy_auto_configuration_script,
target_url,
cb,
client_context,
)
};
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[inline]
pub unsafe extern "C-unwind" fn CFNetworkExecuteProxyAutoConfigurationURL(
proxy_auto_config_url: &CFURL,
target_url: &CFURL,
cb: CFProxyAutoConfigurationResultCallback,
client_context: NonNull<CFStreamClientContext>,
) -> CFRetained<CFRunLoopSource> {
extern "C-unwind" {
fn CFNetworkExecuteProxyAutoConfigurationURL(
proxy_auto_config_url: &CFURL,
target_url: &CFURL,
cb: CFProxyAutoConfigurationResultCallback,
client_context: NonNull<CFStreamClientContext>,
) -> Option<NonNull<CFRunLoopSource>>;
}
let ret = unsafe {
CFNetworkExecuteProxyAutoConfigurationURL(
proxy_auto_config_url,
target_url,
cb,
client_context,
)
};
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
extern "C" {
pub static kCFProxyTypeKey: &'static CFString;
}
extern "C" {
pub static kCFProxyHostNameKey: &'static CFString;
}
extern "C" {
pub static kCFProxyPortNumberKey: &'static CFString;
}
extern "C" {
pub static kCFProxyAutoConfigurationURLKey: &'static CFString;
}
extern "C" {
pub static kCFProxyAutoConfigurationJavaScriptKey: &'static CFString;
}
extern "C" {
pub static kCFProxyUsernameKey: &'static CFString;
}
extern "C" {
pub static kCFProxyPasswordKey: &'static CFString;
}
extern "C" {
pub static kCFProxyTypeNone: &'static CFString;
}
extern "C" {
pub static kCFProxyTypeHTTP: &'static CFString;
}
extern "C" {
pub static kCFProxyTypeHTTPS: &'static CFString;
}
extern "C" {
pub static kCFProxyTypeSOCKS: &'static CFString;
}
extern "C" {
pub static kCFProxyTypeFTP: &'static CFString;
}
extern "C" {
pub static kCFProxyTypeAutoConfigurationURL: &'static CFString;
}
extern "C" {
pub static kCFProxyTypeAutoConfigurationJavaScript: &'static CFString;
}
extern "C" {
pub static kCFProxyAutoConfigurationHTTPResponseKey: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesExceptionsList: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesExcludeSimpleHostnames: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesFTPEnable: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesFTPPassive: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesFTPPort: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesFTPProxy: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesGopherEnable: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesGopherPort: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesGopherProxy: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesHTTPEnable: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesHTTPPort: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesHTTPProxy: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesHTTPSEnable: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesHTTPSPort: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesHTTPSProxy: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesRTSPEnable: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesRTSPPort: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesRTSPProxy: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesSOCKSEnable: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesSOCKSPort: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesSOCKSProxy: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesProxyAutoConfigEnable: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesProxyAutoConfigURLString: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesProxyAutoConfigJavaScript: &'static CFString;
}
extern "C" {
pub static kCFNetworkProxiesProxyAutoDiscoveryEnable: &'static CFString;
}