objc2_cf_network/generated/CFSocketStream.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2_core_foundation::*;
6
7use crate::*;
8
9extern "C" {
10 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreampropertysslcontext?language=objc)
11 pub static kCFStreamPropertySSLContext: &'static CFString;
12}
13
14extern "C" {
15 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreampropertysslpeertrust?language=objc)
16 pub static kCFStreamPropertySSLPeerTrust: &'static CFString;
17}
18
19extern "C" {
20 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamsslvalidatescertificatechain?language=objc)
21 pub static kCFStreamSSLValidatesCertificateChain: &'static CFString;
22}
23
24extern "C" {
25 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreampropertysslsettings?language=objc)
26 pub static kCFStreamPropertySSLSettings: &'static CFString;
27}
28
29extern "C" {
30 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamssllevel?language=objc)
31 pub static kCFStreamSSLLevel: &'static CFString;
32}
33
34extern "C" {
35 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamsslpeername?language=objc)
36 pub static kCFStreamSSLPeerName: &'static CFString;
37}
38
39extern "C" {
40 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamsslcertificates?language=objc)
41 pub static kCFStreamSSLCertificates: &'static CFString;
42}
43
44extern "C" {
45 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamsslisserver?language=objc)
46 pub static kCFStreamSSLIsServer: &'static CFString;
47}
48
49extern "C" {
50 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamnetworkservicetype?language=objc)
51 pub static kCFStreamNetworkServiceType: &'static CFString;
52}
53
54extern "C" {
55 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamnetworkservicetypevideo?language=objc)
56 pub static kCFStreamNetworkServiceTypeVideo: &'static CFString;
57}
58
59extern "C" {
60 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamnetworkservicetypevoice?language=objc)
61 pub static kCFStreamNetworkServiceTypeVoice: &'static CFString;
62}
63
64extern "C" {
65 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamnetworkservicetypebackground?language=objc)
66 pub static kCFStreamNetworkServiceTypeBackground: &'static CFString;
67}
68
69extern "C" {
70 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamnetworkservicetyperesponsivedata?language=objc)
71 pub static kCFStreamNetworkServiceTypeResponsiveData: &'static CFString;
72}
73
74extern "C" {
75 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamnetworkservicetypecallsignaling?language=objc)
76 pub static kCFStreamNetworkServiceTypeCallSignaling: &'static CFString;
77}
78
79extern "C" {
80 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamnetworkservicetypeavstreaming?language=objc)
81 pub static kCFStreamNetworkServiceTypeAVStreaming: &'static CFString;
82}
83
84extern "C" {
85 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamnetworkservicetyperesponsiveav?language=objc)
86 pub static kCFStreamNetworkServiceTypeResponsiveAV: &'static CFString;
87}
88
89extern "C" {
90 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamnetworkservicetypevoip?language=objc)
91 #[deprecated = "use PushKit for VoIP control purposes"]
92 pub static kCFStreamNetworkServiceTypeVoIP: &'static CFString;
93}
94
95extern "C" {
96 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreampropertynocellular?language=objc)
97 pub static kCFStreamPropertyNoCellular: &'static CFString;
98}
99
100extern "C" {
101 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreampropertyconnectioniscellular?language=objc)
102 pub static kCFStreamPropertyConnectionIsCellular: &'static CFString;
103}
104
105extern "C" {
106 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreampropertyallowexpensivenetworkaccess?language=objc)
107 pub static kCFStreamPropertyAllowExpensiveNetworkAccess: &'static CFString;
108}
109
110extern "C" {
111 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreampropertyconnectionisexpensive?language=objc)
112 pub static kCFStreamPropertyConnectionIsExpensive: &'static CFString;
113}
114
115extern "C" {
116 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreampropertyallowconstrainednetworkaccess?language=objc)
117 pub static kCFStreamPropertyAllowConstrainedNetworkAccess: &'static CFString;
118}
119
120extern "C" {
121 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamerrordomainwinsock?language=objc)
122 pub static kCFStreamErrorDomainWinSock: CFIndex;
123}
124
125// TODO: pub fn CFSocketStreamSOCKSGetErrorSubdomain(error: NonNull<CFStreamError>,) -> i32;
126
127// TODO: pub fn CFSocketStreamSOCKSGetError(error: NonNull<CFStreamError>,) -> i32;
128
129/// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamerrorsockssubdomainnone?language=objc)
130pub const kCFStreamErrorSOCKSSubDomainNone: c_uint = 0;
131/// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamerrorsockssubdomainversioncode?language=objc)
132pub const kCFStreamErrorSOCKSSubDomainVersionCode: c_uint = 1;
133/// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamerrorsocks4subdomainresponse?language=objc)
134pub const kCFStreamErrorSOCKS4SubDomainResponse: c_uint = 2;
135/// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamerrorsocks5subdomainuserpass?language=objc)
136pub const kCFStreamErrorSOCKS5SubDomainUserPass: c_uint = 3;
137/// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamerrorsocks5subdomainmethod?language=objc)
138pub const kCFStreamErrorSOCKS5SubDomainMethod: c_uint = 4;
139/// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamerrorsocks5subdomainresponse?language=objc)
140pub const kCFStreamErrorSOCKS5SubDomainResponse: c_uint = 5;
141
142/// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamerrorsocks5badresponseaddr?language=objc)
143pub const kCFStreamErrorSOCKS5BadResponseAddr: c_uint = 1;
144/// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamerrorsocks5badstate?language=objc)
145pub const kCFStreamErrorSOCKS5BadState: c_uint = 2;
146/// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamerrorsocksunknownclientversion?language=objc)
147pub const kCFStreamErrorSOCKSUnknownClientVersion: c_uint = 3;
148
149/// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamerrorsocks4requestfailed?language=objc)
150pub const kCFStreamErrorSOCKS4RequestFailed: c_uint = 91;
151/// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamerrorsocks4identdfailed?language=objc)
152pub const kCFStreamErrorSOCKS4IdentdFailed: c_uint = 92;
153/// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamerrorsocks4idconflict?language=objc)
154pub const kCFStreamErrorSOCKS4IdConflict: c_uint = 93;
155
156/// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/ksocks5noacceptablemethod?language=objc)
157pub const kSOCKS5NoAcceptableMethod: c_uint = 0xFF;
158
159extern "C" {
160 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreampropertyproxylocalbypass?language=objc)
161 pub static kCFStreamPropertyProxyLocalBypass: &'static CFString;
162}
163
164extern "C" {
165 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreampropertysocketremotehost?language=objc)
166 pub static kCFStreamPropertySocketRemoteHost: &'static CFString;
167}
168
169extern "C" {
170 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreampropertysocketremotenetservice?language=objc)
171 pub static kCFStreamPropertySocketRemoteNetService: &'static CFString;
172}
173
174extern "C" {
175 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreampropertysocketextendedbackgroundidlemode?language=objc)
176 pub static kCFStreamPropertySocketExtendedBackgroundIdleMode: &'static CFString;
177}
178
179extern "C-unwind" {
180 /// # Safety
181 ///
182 /// - `read_stream` must be a valid pointer or null.
183 /// - `write_stream` must be a valid pointer or null.
184 #[cfg(feature = "CFHost")]
185 #[deprecated = "Use Network framework instead"]
186 pub fn CFStreamCreatePairWithSocketToCFHost(
187 alloc: Option<&CFAllocator>,
188 host: &CFHost,
189 port: i32,
190 read_stream: *mut *mut CFReadStream,
191 write_stream: *mut *mut CFWriteStream,
192 );
193}
194
195extern "C-unwind" {
196 /// # Safety
197 ///
198 /// - `read_stream` must be a valid pointer or null.
199 /// - `write_stream` must be a valid pointer or null.
200 #[cfg(feature = "CFNetServices")]
201 #[deprecated = "Use Network framework instead"]
202 pub fn CFStreamCreatePairWithSocketToNetService(
203 alloc: Option<&CFAllocator>,
204 service: &CFNetService,
205 read_stream: *mut *mut CFReadStream,
206 write_stream: *mut *mut CFWriteStream,
207 );
208}
209
210extern "C" {
211 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreampropertysslpeercertificates?language=objc)
212 #[deprecated]
213 pub static kCFStreamPropertySSLPeerCertificates: &'static CFString;
214}
215
216extern "C" {
217 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamsslallowsexpiredcertificates?language=objc)
218 #[deprecated]
219 pub static kCFStreamSSLAllowsExpiredCertificates: &'static CFString;
220}
221
222extern "C" {
223 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamsslallowsexpiredroots?language=objc)
224 #[deprecated]
225 pub static kCFStreamSSLAllowsExpiredRoots: &'static CFString;
226}
227
228extern "C" {
229 /// [Apple's documentation](https://developer.apple.com/documentation/cfnetwork/kcfstreamsslallowsanyroot?language=objc)
230 #[deprecated]
231 pub static kCFStreamSSLAllowsAnyRoot: &'static CFString;
232}