objc2_cf_network/generated/
CFProxySupport.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2_core_foundation::*;
6
7use crate::*;
8
9#[inline]
18pub unsafe extern "C-unwind" fn CFNetworkCopySystemProxySettings(
19) -> Option<CFRetained<CFDictionary>> {
20 extern "C-unwind" {
21 fn CFNetworkCopySystemProxySettings() -> Option<NonNull<CFDictionary>>;
22 }
23 let ret = unsafe { CFNetworkCopySystemProxySettings() };
24 ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
25}
26
27#[inline]
31pub unsafe extern "C-unwind" fn CFNetworkCopyProxiesForURL(
32 url: &CFURL,
33 proxy_settings: &CFDictionary,
34) -> CFRetained<CFArray> {
35 extern "C-unwind" {
36 fn CFNetworkCopyProxiesForURL(
37 url: &CFURL,
38 proxy_settings: &CFDictionary,
39 ) -> Option<NonNull<CFArray>>;
40 }
41 let ret = unsafe { CFNetworkCopyProxiesForURL(url, proxy_settings) };
42 let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
43 unsafe { CFRetained::from_raw(ret) }
44}
45
46pub type CFProxyAutoConfigurationResultCallback =
48 Option<unsafe extern "C-unwind" fn(NonNull<c_void>, NonNull<CFArray>, *mut CFError)>;
49
50#[inline]
54pub unsafe extern "C-unwind" fn CFNetworkCopyProxiesForAutoConfigurationScript(
55 proxy_auto_configuration_script: &CFString,
56 target_url: &CFURL,
57 error: *mut *mut CFError,
58) -> Option<CFRetained<CFArray>> {
59 extern "C-unwind" {
60 fn CFNetworkCopyProxiesForAutoConfigurationScript(
61 proxy_auto_configuration_script: &CFString,
62 target_url: &CFURL,
63 error: *mut *mut CFError,
64 ) -> Option<NonNull<CFArray>>;
65 }
66 let ret = unsafe {
67 CFNetworkCopyProxiesForAutoConfigurationScript(
68 proxy_auto_configuration_script,
69 target_url,
70 error,
71 )
72 };
73 ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
74}
75
76#[inline]
81pub unsafe extern "C-unwind" fn CFNetworkExecuteProxyAutoConfigurationScript(
82 proxy_auto_configuration_script: &CFString,
83 target_url: &CFURL,
84 cb: CFProxyAutoConfigurationResultCallback,
85 client_context: NonNull<CFStreamClientContext>,
86) -> CFRetained<CFRunLoopSource> {
87 extern "C-unwind" {
88 fn CFNetworkExecuteProxyAutoConfigurationScript(
89 proxy_auto_configuration_script: &CFString,
90 target_url: &CFURL,
91 cb: CFProxyAutoConfigurationResultCallback,
92 client_context: NonNull<CFStreamClientContext>,
93 ) -> Option<NonNull<CFRunLoopSource>>;
94 }
95 let ret = unsafe {
96 CFNetworkExecuteProxyAutoConfigurationScript(
97 proxy_auto_configuration_script,
98 target_url,
99 cb,
100 client_context,
101 )
102 };
103 let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
104 unsafe { CFRetained::from_raw(ret) }
105}
106
107#[inline]
112pub unsafe extern "C-unwind" fn CFNetworkExecuteProxyAutoConfigurationURL(
113 proxy_auto_config_url: &CFURL,
114 target_url: &CFURL,
115 cb: CFProxyAutoConfigurationResultCallback,
116 client_context: NonNull<CFStreamClientContext>,
117) -> CFRetained<CFRunLoopSource> {
118 extern "C-unwind" {
119 fn CFNetworkExecuteProxyAutoConfigurationURL(
120 proxy_auto_config_url: &CFURL,
121 target_url: &CFURL,
122 cb: CFProxyAutoConfigurationResultCallback,
123 client_context: NonNull<CFStreamClientContext>,
124 ) -> Option<NonNull<CFRunLoopSource>>;
125 }
126 let ret = unsafe {
127 CFNetworkExecuteProxyAutoConfigurationURL(
128 proxy_auto_config_url,
129 target_url,
130 cb,
131 client_context,
132 )
133 };
134 let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
135 unsafe { CFRetained::from_raw(ret) }
136}
137
138extern "C" {
139 pub static kCFProxyTypeKey: &'static CFString;
141}
142
143extern "C" {
144 pub static kCFProxyHostNameKey: &'static CFString;
146}
147
148extern "C" {
149 pub static kCFProxyPortNumberKey: &'static CFString;
151}
152
153extern "C" {
154 pub static kCFProxyAutoConfigurationURLKey: &'static CFString;
156}
157
158extern "C" {
159 pub static kCFProxyAutoConfigurationJavaScriptKey: &'static CFString;
161}
162
163extern "C" {
164 pub static kCFProxyUsernameKey: &'static CFString;
166}
167
168extern "C" {
169 pub static kCFProxyPasswordKey: &'static CFString;
171}
172
173extern "C" {
174 pub static kCFProxyTypeNone: &'static CFString;
176}
177
178extern "C" {
179 pub static kCFProxyTypeHTTP: &'static CFString;
181}
182
183extern "C" {
184 pub static kCFProxyTypeHTTPS: &'static CFString;
186}
187
188extern "C" {
189 pub static kCFProxyTypeSOCKS: &'static CFString;
191}
192
193extern "C" {
194 pub static kCFProxyTypeFTP: &'static CFString;
196}
197
198extern "C" {
199 pub static kCFProxyTypeAutoConfigurationURL: &'static CFString;
201}
202
203extern "C" {
204 pub static kCFProxyTypeAutoConfigurationJavaScript: &'static CFString;
206}
207
208extern "C" {
209 pub static kCFProxyAutoConfigurationHTTPResponseKey: &'static CFString;
211}
212
213extern "C" {
214 pub static kCFNetworkProxiesExceptionsList: &'static CFString;
216}
217
218extern "C" {
219 pub static kCFNetworkProxiesExcludeSimpleHostnames: &'static CFString;
221}
222
223extern "C" {
224 pub static kCFNetworkProxiesFTPEnable: &'static CFString;
226}
227
228extern "C" {
229 pub static kCFNetworkProxiesFTPPassive: &'static CFString;
231}
232
233extern "C" {
234 pub static kCFNetworkProxiesFTPPort: &'static CFString;
236}
237
238extern "C" {
239 pub static kCFNetworkProxiesFTPProxy: &'static CFString;
241}
242
243extern "C" {
244 pub static kCFNetworkProxiesGopherEnable: &'static CFString;
246}
247
248extern "C" {
249 pub static kCFNetworkProxiesGopherPort: &'static CFString;
251}
252
253extern "C" {
254 pub static kCFNetworkProxiesGopherProxy: &'static CFString;
256}
257
258extern "C" {
259 pub static kCFNetworkProxiesHTTPEnable: &'static CFString;
261}
262
263extern "C" {
264 pub static kCFNetworkProxiesHTTPPort: &'static CFString;
266}
267
268extern "C" {
269 pub static kCFNetworkProxiesHTTPProxy: &'static CFString;
271}
272
273extern "C" {
274 pub static kCFNetworkProxiesHTTPSEnable: &'static CFString;
276}
277
278extern "C" {
279 pub static kCFNetworkProxiesHTTPSPort: &'static CFString;
281}
282
283extern "C" {
284 pub static kCFNetworkProxiesHTTPSProxy: &'static CFString;
286}
287
288extern "C" {
289 pub static kCFNetworkProxiesRTSPEnable: &'static CFString;
291}
292
293extern "C" {
294 pub static kCFNetworkProxiesRTSPPort: &'static CFString;
296}
297
298extern "C" {
299 pub static kCFNetworkProxiesRTSPProxy: &'static CFString;
301}
302
303extern "C" {
304 pub static kCFNetworkProxiesSOCKSEnable: &'static CFString;
306}
307
308extern "C" {
309 pub static kCFNetworkProxiesSOCKSPort: &'static CFString;
311}
312
313extern "C" {
314 pub static kCFNetworkProxiesSOCKSProxy: &'static CFString;
316}
317
318extern "C" {
319 pub static kCFNetworkProxiesProxyAutoConfigEnable: &'static CFString;
321}
322
323extern "C" {
324 pub static kCFNetworkProxiesProxyAutoConfigURLString: &'static CFString;
326}
327
328extern "C" {
329 pub static kCFNetworkProxiesProxyAutoConfigJavaScript: &'static CFString;
331}
332
333extern "C" {
334 pub static kCFNetworkProxiesProxyAutoDiscoveryEnable: &'static CFString;
336}