1use core::cell::UnsafeCell;
4use core::ffi::*;
5use core::marker::{PhantomData, PhantomPinned};
6use core::ptr::NonNull;
7#[cfg(feature = "objc2")]
8use objc2::__framework_prelude::*;
9#[cfg(feature = "objc2-core-foundation")]
10use objc2_core_foundation::*;
11
12use crate::*;
13
14pub const kCharsetStringISO88591: &CStr =
16 unsafe { CStr::from_bytes_with_nul_unchecked(b"CHARSET=ISO-8859-1\0") };
17pub const kCharsetStringUTF8: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"UTF-8\0") };
19pub const kEncodingStringQuotedPrintable: &CStr =
21 unsafe { CStr::from_bytes_with_nul_unchecked(b"QUOTED-PRINTABLE\0") };
22pub const kEncodingStringBase64: &CStr =
24 unsafe { CStr::from_bytes_with_nul_unchecked(b"BASE-64\0") };
25pub const kEncodingString8Bit: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"8BIT\0") };
27pub type OBEXError = i32;
32
33#[repr(transparent)]
35#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
36pub struct OBEXErrorCodes(pub c_int);
37impl OBEXErrorCodes {
38 #[doc(alias = "kOBEXErrorRangeMin")]
39 pub const ErrorRangeMin: Self = Self(-21850);
40 #[doc(alias = "kOBEXErrorRangeMax")]
41 pub const ErrorRangeMax: Self = Self(-21899);
42 #[doc(alias = "kOBEXSuccess")]
43 pub const Success: Self = Self(0);
44 #[doc(alias = "kOBEXGeneralError")]
45 pub const GeneralError: Self = Self(-21850);
46 #[doc(alias = "kOBEXNoResourcesError")]
47 pub const NoResourcesError: Self = Self(-21851);
48 #[doc(alias = "kOBEXUnsupportedError")]
49 pub const UnsupportedError: Self = Self(-21852);
50 #[doc(alias = "kOBEXInternalError")]
51 pub const InternalError: Self = Self(-21853);
52 #[doc(alias = "kOBEXBadArgumentError")]
53 pub const BadArgumentError: Self = Self(-21854);
54 #[doc(alias = "kOBEXTimeoutError")]
55 pub const TimeoutError: Self = Self(-21855);
56 #[doc(alias = "kOBEXBadRequestError")]
57 pub const BadRequestError: Self = Self(-21856);
58 #[doc(alias = "kOBEXCancelledError")]
59 pub const CancelledError: Self = Self(-21857);
60 #[doc(alias = "kOBEXForbiddenError")]
61 pub const ForbiddenError: Self = Self(-21858);
62 #[doc(alias = "kOBEXUnauthorizedError")]
63 pub const UnauthorizedError: Self = Self(-21859);
64 #[doc(alias = "kOBEXNotAcceptableError")]
65 pub const NotAcceptableError: Self = Self(-21860);
66 #[doc(alias = "kOBEXConflictError")]
67 pub const ConflictError: Self = Self(-21861);
68 #[doc(alias = "kOBEXMethodNotAllowedError")]
69 pub const MethodNotAllowedError: Self = Self(-21862);
70 #[doc(alias = "kOBEXNotFoundError")]
71 pub const NotFoundError: Self = Self(-21863);
72 #[doc(alias = "kOBEXNotImplementedError")]
73 pub const NotImplementedError: Self = Self(-21864);
74 #[doc(alias = "kOBEXPreconditionFailedError")]
75 pub const PreconditionFailedError: Self = Self(-21865);
76 #[doc(alias = "kOBEXSessionBusyError")]
77 pub const SessionBusyError: Self = Self(-21875);
78 #[doc(alias = "kOBEXSessionNotConnectedError")]
79 pub const SessionNotConnectedError: Self = Self(-21876);
80 #[doc(alias = "kOBEXSessionBadRequestError")]
81 pub const SessionBadRequestError: Self = Self(-21877);
82 #[doc(alias = "kOBEXSessionBadResponseError")]
83 pub const SessionBadResponseError: Self = Self(-21878);
84 #[doc(alias = "kOBEXSessionNoTransportError")]
85 pub const SessionNoTransportError: Self = Self(-21879);
86 #[doc(alias = "kOBEXSessionTransportDiedError")]
87 pub const SessionTransportDiedError: Self = Self(-21880);
88 #[doc(alias = "kOBEXSessionTimeoutError")]
89 pub const SessionTimeoutError: Self = Self(-21881);
90 #[doc(alias = "kOBEXSessionAlreadyConnectedError")]
91 pub const SessionAlreadyConnectedError: Self = Self(-21882);
92}
93
94#[cfg(feature = "objc2")]
95unsafe impl Encode for OBEXErrorCodes {
96 const ENCODING: Encoding = c_int::ENCODING;
97}
98
99#[cfg(feature = "objc2")]
100unsafe impl RefEncode for OBEXErrorCodes {
101 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
102}
103
104#[repr(transparent)]
108#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
109pub struct OBEXHeaderIdentifiers(pub c_uint);
110impl OBEXHeaderIdentifiers {
111 #[doc(alias = "kOBEXHeaderIDName")]
112 pub const IDName: Self = Self(0x01);
113 #[doc(alias = "kOBEXHeaderIDDescription")]
114 pub const IDDescription: Self = Self(0x05);
115 #[doc(alias = "kOBEXHeaderIDReservedRangeStart")]
116 pub const IDReservedRangeStart: Self = Self(0x10);
117 #[doc(alias = "kOBEXHeaderIDReservedRangeEnd")]
118 pub const IDReservedRangeEnd: Self = Self(0x2F);
119 #[doc(alias = "kOBEXHeaderIDUserDefinedRangeStart")]
120 pub const IDUserDefinedRangeStart: Self = Self(0x30);
121 #[doc(alias = "kOBEXHeaderIDUserDefinedRangeEnd")]
122 pub const IDUserDefinedRangeEnd: Self = Self(0x3F);
123 #[doc(alias = "kOBEXHeaderIDType")]
124 pub const IDType: Self = Self(0x42);
125 #[doc(alias = "kOBEXHeaderIDTimeISO")]
126 pub const IDTimeISO: Self = Self(0x44);
127 #[doc(alias = "kOBEXHeaderIDTarget")]
128 pub const IDTarget: Self = Self(0x46);
129 #[doc(alias = "kOBEXHeaderIDHTTP")]
130 pub const IDHTTP: Self = Self(0x47);
131 #[doc(alias = "kOBEXHeaderIDBody")]
132 pub const IDBody: Self = Self(0x48);
133 #[doc(alias = "kOBEXHeaderIDEndOfBody")]
134 pub const IDEndOfBody: Self = Self(0x49);
135 #[doc(alias = "kOBEXHeaderIDWho")]
136 pub const IDWho: Self = Self(0x4A);
137 #[doc(alias = "kOBEXHeaderIDAppParameters")]
138 pub const IDAppParameters: Self = Self(0x4C);
139 #[doc(alias = "kOBEXHeaderIDAuthorizationChallenge")]
140 pub const IDAuthorizationChallenge: Self = Self(0x4D);
141 #[doc(alias = "kOBEXHeaderIDAuthorizationResponse")]
142 pub const IDAuthorizationResponse: Self = Self(0x4E);
143 #[doc(alias = "kOBEXHeaderIDObjectClass")]
144 pub const IDObjectClass: Self = Self(0x4F);
145 #[doc(alias = "kOBEXHeaderIDCount")]
146 pub const IDCount: Self = Self(0xC0);
147 #[doc(alias = "kOBEXHeaderIDLength")]
148 pub const IDLength: Self = Self(0xC3);
149 #[doc(alias = "kOBEXHeaderIDTime4Byte")]
150 pub const IDTime4Byte: Self = Self(0xC4);
151 #[doc(alias = "kOBEXHeaderIDConnectionID")]
152 pub const IDConnectionID: Self = Self(0xCB);
153 #[doc(alias = "kOBEXHeaderIDOBEX13WANUUID")]
154 pub const IDOBEX13WANUUID: Self = Self(0x50);
155 #[doc(alias = "kOBEXHeaderIDOBEX13ObjectClass")]
156 pub const IDOBEX13ObjectClass: Self = Self(0x51);
157 #[doc(alias = "kOBEXHeaderIDOBEX13SessionParameters")]
158 pub const IDOBEX13SessionParameters: Self = Self(0x52);
159 #[doc(alias = "kOBEXHeaderIDOBEX13SessionSequenceNumber")]
160 pub const IDOBEX13SessionSequenceNumber: Self = Self(0x93);
161 #[doc(alias = "kOBEXHeaderIDOBEX13CreatorID")]
162 pub const IDOBEX13CreatorID: Self = Self(0xCF);
163}
164
165#[cfg(feature = "objc2")]
166unsafe impl Encode for OBEXHeaderIdentifiers {
167 const ENCODING: Encoding = c_uint::ENCODING;
168}
169
170#[cfg(feature = "objc2")]
171unsafe impl RefEncode for OBEXHeaderIdentifiers {
172 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
173}
174
175#[repr(transparent)]
179#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
180pub struct OBEXOpCodeResponseValues(pub c_uint);
181impl OBEXOpCodeResponseValues {
182 #[doc(alias = "kOBEXResponseCodeReservedRangeStart")]
183 pub const ResponseCodeReservedRangeStart: Self = Self(0x00);
184 #[doc(alias = "kOBEXResponseCodeReservedRangeEnd")]
185 pub const ResponseCodeReservedRangeEnd: Self = Self(0x0F);
186 #[doc(alias = "kOBEXResponseCodeContinue")]
187 pub const ResponseCodeContinue: Self = Self(0x10);
188 #[doc(alias = "kOBEXResponseCodeContinueWithFinalBit")]
189 pub const ResponseCodeContinueWithFinalBit: Self = Self(0x90);
190 #[doc(alias = "kOBEXResponseCodeSuccess")]
191 pub const ResponseCodeSuccess: Self = Self(0x20);
192 #[doc(alias = "kOBEXResponseCodeSuccessWithFinalBit")]
193 pub const ResponseCodeSuccessWithFinalBit: Self = Self(0xA0);
194 #[doc(alias = "kOBEXResponseCodeCreated")]
195 pub const ResponseCodeCreated: Self = Self(0x21);
196 #[doc(alias = "kOBEXResponseCodeCreatedWithFinalBit")]
197 pub const ResponseCodeCreatedWithFinalBit: Self = Self(0xA1);
198 #[doc(alias = "kOBEXResponseCodeAccepted")]
199 pub const ResponseCodeAccepted: Self = Self(0x22);
200 #[doc(alias = "kOBEXResponseCodeAcceptedWithFinalBit")]
201 pub const ResponseCodeAcceptedWithFinalBit: Self = Self(0xA2);
202 #[doc(alias = "kOBEXResponseCodeNonAuthoritativeInfo")]
203 pub const ResponseCodeNonAuthoritativeInfo: Self = Self(0x23);
204 #[doc(alias = "kOBEXResponseCodeNonAuthoritativeInfoWithFinalBit")]
205 pub const ResponseCodeNonAuthoritativeInfoWithFinalBit: Self = Self(0xA3);
206 #[doc(alias = "kOBEXResponseCodeNoContent")]
207 pub const ResponseCodeNoContent: Self = Self(0x24);
208 #[doc(alias = "kOBEXResponseCodeNoContentWithFinalBit")]
209 pub const ResponseCodeNoContentWithFinalBit: Self = Self(0xA4);
210 #[doc(alias = "kOBEXResponseCodeResetContent")]
211 pub const ResponseCodeResetContent: Self = Self(0x25);
212 #[doc(alias = "kOBEXResponseCodeResetContentWithFinalBit")]
213 pub const ResponseCodeResetContentWithFinalBit: Self = Self(0xA5);
214 #[doc(alias = "kOBEXResponseCodePartialContent")]
215 pub const ResponseCodePartialContent: Self = Self(0x26);
216 #[doc(alias = "kOBEXResponseCodePartialContentWithFinalBit")]
217 pub const ResponseCodePartialContentWithFinalBit: Self = Self(0xA6);
218 #[doc(alias = "kOBEXResponseCodeMultipleChoices")]
219 pub const ResponseCodeMultipleChoices: Self = Self(0x30);
220 #[doc(alias = "kOBEXResponseCodeMultipleChoicesWithFinalBit")]
221 pub const ResponseCodeMultipleChoicesWithFinalBit: Self = Self(0xB0);
222 #[doc(alias = "kOBEXResponseCodeMovedPermanently")]
223 pub const ResponseCodeMovedPermanently: Self = Self(0x31);
224 #[doc(alias = "kOBEXResponseCodeMovedPermanentlyWithFinalBit")]
225 pub const ResponseCodeMovedPermanentlyWithFinalBit: Self = Self(0xB1);
226 #[doc(alias = "kOBEXResponseCodeMovedTemporarily")]
227 pub const ResponseCodeMovedTemporarily: Self = Self(0x32);
228 #[doc(alias = "kOBEXResponseCodeMovedTemporarilyWithFinalBit")]
229 pub const ResponseCodeMovedTemporarilyWithFinalBit: Self = Self(0xB2);
230 #[doc(alias = "kOBEXResponseCodeSeeOther")]
231 pub const ResponseCodeSeeOther: Self = Self(0x33);
232 #[doc(alias = "kOBEXResponseCodeSeeOtherWithFinalBit")]
233 pub const ResponseCodeSeeOtherWithFinalBit: Self = Self(0xB3);
234 #[doc(alias = "kOBEXResponseCodeNotModified")]
235 pub const ResponseCodeNotModified: Self = Self(0x34);
236 #[doc(alias = "kOBEXResponseCodeNotModifiedWithFinalBit")]
237 pub const ResponseCodeNotModifiedWithFinalBit: Self = Self(0xB4);
238 #[doc(alias = "kOBEXResponseCodeUseProxy")]
239 pub const ResponseCodeUseProxy: Self = Self(0x35);
240 #[doc(alias = "kOBEXResponseCodeUseProxyWithFinalBit")]
241 pub const ResponseCodeUseProxyWithFinalBit: Self = Self(0xB5);
242 #[doc(alias = "kOBEXResponseCodeBadRequest")]
243 pub const ResponseCodeBadRequest: Self = Self(0x40);
244 #[doc(alias = "kOBEXResponseCodeBadRequestWithFinalBit")]
245 pub const ResponseCodeBadRequestWithFinalBit: Self = Self(0xC0);
246 #[doc(alias = "kOBEXResponseCodeUnauthorized")]
247 pub const ResponseCodeUnauthorized: Self = Self(0x41);
248 #[doc(alias = "kOBEXResponseCodeUnauthorizedWithFinalBit")]
249 pub const ResponseCodeUnauthorizedWithFinalBit: Self = Self(0xC1);
250 #[doc(alias = "kOBEXResponseCodePaymentRequired")]
251 pub const ResponseCodePaymentRequired: Self = Self(0x42);
252 #[doc(alias = "kOBEXResponseCodePaymentRequiredWithFinalBit")]
253 pub const ResponseCodePaymentRequiredWithFinalBit: Self = Self(0xC2);
254 #[doc(alias = "kOBEXResponseCodeForbidden")]
255 pub const ResponseCodeForbidden: Self = Self(0x43);
256 #[doc(alias = "kOBEXResponseCodeForbiddenWithFinalBit")]
257 pub const ResponseCodeForbiddenWithFinalBit: Self = Self(0xC3);
258 #[doc(alias = "kOBEXResponseCodeNotFound")]
259 pub const ResponseCodeNotFound: Self = Self(0x44);
260 #[doc(alias = "kOBEXResponseCodeNotFoundWithFinalBit")]
261 pub const ResponseCodeNotFoundWithFinalBit: Self = Self(0xC4);
262 #[doc(alias = "kOBEXResponseCodeMethodNotAllowed")]
263 pub const ResponseCodeMethodNotAllowed: Self = Self(0x45);
264 #[doc(alias = "kOBEXResponseCodeMethodNotAllowedWithFinalBit")]
265 pub const ResponseCodeMethodNotAllowedWithFinalBit: Self = Self(0xC5);
266 #[doc(alias = "kOBEXResponseCodeNotAcceptable")]
267 pub const ResponseCodeNotAcceptable: Self = Self(0x46);
268 #[doc(alias = "kOBEXResponseCodeNotAcceptableWithFinalBit")]
269 pub const ResponseCodeNotAcceptableWithFinalBit: Self = Self(0xC6);
270 #[doc(alias = "kOBEXResponseCodeProxyAuthenticationRequired")]
271 pub const ResponseCodeProxyAuthenticationRequired: Self = Self(0x47);
272 #[doc(alias = "kOBEXResponseCodeProxyAuthenticationRequiredWithFinalBit")]
273 pub const ResponseCodeProxyAuthenticationRequiredWithFinalBit: Self = Self(0xC7);
274 #[doc(alias = "kOBEXResponseCodeRequestTimeOut")]
275 pub const ResponseCodeRequestTimeOut: Self = Self(0x48);
276 #[doc(alias = "kOBEXResponseCodeRequestTimeOutWithFinalBit")]
277 pub const ResponseCodeRequestTimeOutWithFinalBit: Self = Self(0xC8);
278 #[doc(alias = "kOBEXResponseCodeConflict")]
279 pub const ResponseCodeConflict: Self = Self(0x49);
280 #[doc(alias = "kOBEXResponseCodeConflictWithFinalBit")]
281 pub const ResponseCodeConflictWithFinalBit: Self = Self(0xC9);
282 #[doc(alias = "kOBEXResponseCodeGone")]
283 pub const ResponseCodeGone: Self = Self(0x4A);
284 #[doc(alias = "kOBEXResponseCodeGoneWithFinalBit")]
285 pub const ResponseCodeGoneWithFinalBit: Self = Self(0xCA);
286 #[doc(alias = "kOBEXResponseCodeLengthRequired")]
287 pub const ResponseCodeLengthRequired: Self = Self(0x4B);
288 #[doc(alias = "kOBEXResponseCodeLengthRequiredFinalBit")]
289 pub const ResponseCodeLengthRequiredFinalBit: Self = Self(0xCB);
290 #[doc(alias = "kOBEXResponseCodePreconditionFailed")]
291 pub const ResponseCodePreconditionFailed: Self = Self(0x4C);
292 #[doc(alias = "kOBEXResponseCodePreconditionFailedWithFinalBit")]
293 pub const ResponseCodePreconditionFailedWithFinalBit: Self = Self(0xCC);
294 #[doc(alias = "kOBEXResponseCodeRequestedEntityTooLarge")]
295 pub const ResponseCodeRequestedEntityTooLarge: Self = Self(0x4D);
296 #[doc(alias = "kOBEXResponseCodeRequestedEntityTooLargeWithFinalBit")]
297 pub const ResponseCodeRequestedEntityTooLargeWithFinalBit: Self = Self(0xCD);
298 #[doc(alias = "kOBEXResponseCodeRequestURLTooLarge")]
299 pub const ResponseCodeRequestURLTooLarge: Self = Self(0x4E);
300 #[doc(alias = "kOBEXResponseCodeRequestURLTooLargeWithFinalBit")]
301 pub const ResponseCodeRequestURLTooLargeWithFinalBit: Self = Self(0xCE);
302 #[doc(alias = "kOBEXResponseCodeUnsupportedMediaType")]
303 pub const ResponseCodeUnsupportedMediaType: Self = Self(0x4F);
304 #[doc(alias = "kOBEXResponseCodeUnsupportedMediaTypeWithFinalBit")]
305 pub const ResponseCodeUnsupportedMediaTypeWithFinalBit: Self = Self(0xCF);
306 #[doc(alias = "kOBEXResponseCodeInternalServerError")]
307 pub const ResponseCodeInternalServerError: Self = Self(0x50);
308 #[doc(alias = "kOBEXResponseCodeInternalServerErrorWithFinalBit")]
309 pub const ResponseCodeInternalServerErrorWithFinalBit: Self = Self(0xD0);
310 #[doc(alias = "kOBEXResponseCodeNotImplemented")]
311 pub const ResponseCodeNotImplemented: Self = Self(0x51);
312 #[doc(alias = "kOBEXResponseCodeNotImplementedWithFinalBit")]
313 pub const ResponseCodeNotImplementedWithFinalBit: Self = Self(0xD1);
314 #[doc(alias = "kOBEXResponseCodeBadGateway")]
315 pub const ResponseCodeBadGateway: Self = Self(0x52);
316 #[doc(alias = "kOBEXResponseCodeBadGatewayWithFinalBit")]
317 pub const ResponseCodeBadGatewayWithFinalBit: Self = Self(0xD2);
318 #[doc(alias = "kOBEXResponseCodeServiceUnavailable")]
319 pub const ResponseCodeServiceUnavailable: Self = Self(0x53);
320 #[doc(alias = "kOBEXResponseCodeServiceUnavailableWithFinalBit")]
321 pub const ResponseCodeServiceUnavailableWithFinalBit: Self = Self(0xD3);
322 #[doc(alias = "kOBEXResponseCodeGatewayTimeout")]
323 pub const ResponseCodeGatewayTimeout: Self = Self(0x54);
324 #[doc(alias = "kOBEXResponseCodeGatewayTimeoutWithFinalBit")]
325 pub const ResponseCodeGatewayTimeoutWithFinalBit: Self = Self(0xD4);
326 #[doc(alias = "kOBEXResponseCodeHTTPVersionNotSupported")]
327 pub const ResponseCodeHTTPVersionNotSupported: Self = Self(0x55);
328 #[doc(alias = "kOBEXResponseCodeHTTPVersionNotSupportedWithFinalBit")]
329 pub const ResponseCodeHTTPVersionNotSupportedWithFinalBit: Self = Self(0xD5);
330 #[doc(alias = "kOBEXResponseCodeDatabaseFull")]
331 pub const ResponseCodeDatabaseFull: Self = Self(0x60);
332 #[doc(alias = "kOBEXResponseCodeDatabaseFullWithFinalBit")]
333 pub const ResponseCodeDatabaseFullWithFinalBit: Self = Self(0xE0);
334 #[doc(alias = "kOBEXResponseCodeDatabaseLocked")]
335 pub const ResponseCodeDatabaseLocked: Self = Self(0x61);
336 #[doc(alias = "kOBEXResponseCodeDatabaseLockedWithFinalBit")]
337 pub const ResponseCodeDatabaseLockedWithFinalBit: Self = Self(0xE1);
338}
339
340#[cfg(feature = "objc2")]
341unsafe impl Encode for OBEXOpCodeResponseValues {
342 const ENCODING: Encoding = c_uint::ENCODING;
343}
344
345#[cfg(feature = "objc2")]
346unsafe impl RefEncode for OBEXOpCodeResponseValues {
347 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
348}
349
350#[repr(transparent)]
354#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
355pub struct OBEXOpCodeCommandValues(pub c_uint);
356impl OBEXOpCodeCommandValues {
357 #[doc(alias = "kOBEXOpCodeReserved")]
358 pub const Reserved: Self = Self(0x04);
359 #[doc(alias = "kOBEXOpCodeConnect")]
360 pub const Connect: Self = Self(0x80);
361 #[doc(alias = "kOBEXOpCodeDisconnect")]
362 pub const Disconnect: Self = Self(0x81);
363 #[doc(alias = "kOBEXOpCodePut")]
364 pub const Put: Self = Self(0x02);
365 #[doc(alias = "kOBEXOpCodePutWithHighBitSet")]
366 pub const PutWithHighBitSet: Self = Self(0x82);
367 #[doc(alias = "kOBEXOpCodeGet")]
368 pub const Get: Self = Self(0x03);
369 #[doc(alias = "kOBEXOpCodeGetWithHighBitSet")]
370 pub const GetWithHighBitSet: Self = Self(0x83);
371 #[doc(alias = "kOBEXOpCodeReservedWithHighBitSet")]
372 pub const ReservedWithHighBitSet: Self = Self(0x84);
373 #[doc(alias = "kOBEXOpCodeSetPath")]
374 pub const SetPath: Self = Self(0x85);
375 #[doc(alias = "kOBEXOpCodeAbort")]
376 pub const Abort: Self = Self(0xFF);
377 #[doc(alias = "kOBEXOpCodeReservedRangeStart")]
378 pub const ReservedRangeStart: Self = Self(0x06);
379 #[doc(alias = "kOBEXOpCodeReservedRangeEnd")]
380 pub const ReservedRangeEnd: Self = Self(0x0F);
381 #[doc(alias = "kOBEXOpCodeUserDefinedStart")]
382 pub const UserDefinedStart: Self = Self(0x10);
383 #[doc(alias = "kOBEXOpCodeUserDefinedEnd")]
384 pub const UserDefinedEnd: Self = Self(0x1F);
385}
386
387#[cfg(feature = "objc2")]
388unsafe impl Encode for OBEXOpCodeCommandValues {
389 const ENCODING: Encoding = c_uint::ENCODING;
390}
391
392#[cfg(feature = "objc2")]
393unsafe impl RefEncode for OBEXOpCodeCommandValues {
394 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
395}
396
397#[repr(transparent)]
401#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
402pub struct OBEXConnectFlagValues(pub c_uint);
403impl OBEXConnectFlagValues {
404 #[doc(alias = "kOBEXConnectFlagNone")]
405 pub const FlagNone: Self = Self(0 << 0);
406 #[doc(alias = "kOBEXConnectFlagSupportMultipleItLMPConnections")]
407 pub const FlagSupportMultipleItLMPConnections: Self = Self(1 << 0);
408 #[doc(alias = "kOBEXConnectFlag1Reserved")]
409 pub const Flag1Reserved: Self = Self(1 << 1);
410 #[doc(alias = "kOBEXConnectFlag2Reserved")]
411 pub const Flag2Reserved: Self = Self(1 << 2);
412 #[doc(alias = "kOBEXConnectFlag3Reserved")]
413 pub const Flag3Reserved: Self = Self(1 << 3);
414 #[doc(alias = "kOBEXConnectFlag4Reserved")]
415 pub const Flag4Reserved: Self = Self(1 << 4);
416 #[doc(alias = "kOBEXConnectFlag5Reserved")]
417 pub const Flag5Reserved: Self = Self(1 << 5);
418 #[doc(alias = "kOBEXConnectFlag6Reserved")]
419 pub const Flag6Reserved: Self = Self(1 << 6);
420 #[doc(alias = "kOBEXConnectFlag7Reserved")]
421 pub const Flag7Reserved: Self = Self(1 << 7);
422}
423
424#[cfg(feature = "objc2")]
425unsafe impl Encode for OBEXConnectFlagValues {
426 const ENCODING: Encoding = c_uint::ENCODING;
427}
428
429#[cfg(feature = "objc2")]
430unsafe impl RefEncode for OBEXConnectFlagValues {
431 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
432}
433
434#[repr(transparent)]
439#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
440pub struct OBEXPutFlagValues(pub c_uint);
441impl OBEXPutFlagValues {
442 #[doc(alias = "kOBEXPutFlagNone")]
443 pub const FlagNone: Self = Self(0 << 0);
444 #[doc(alias = "kOBEXPutFlagGoToParentDirFirst")]
445 pub const FlagGoToParentDirFirst: Self = Self(1 << 0);
446 #[doc(alias = "kOBEXPutFlagDontCreateDirectory")]
447 pub const FlagDontCreateDirectory: Self = Self(1 << 1);
448 #[doc(alias = "kOBEXPutFlag2Reserved")]
449 pub const Flag2Reserved: Self = Self(1 << 2);
450 #[doc(alias = "kOBEXPutFlag3Reserved")]
451 pub const Flag3Reserved: Self = Self(1 << 3);
452 #[doc(alias = "kOBEXPutFlag4Reserved")]
453 pub const Flag4Reserved: Self = Self(1 << 4);
454 #[doc(alias = "kOBEXPutFlag5Reserved")]
455 pub const Flag5Reserved: Self = Self(1 << 5);
456 #[doc(alias = "kOBEXPutFlag6Reserved")]
457 pub const Flag6Reserved: Self = Self(1 << 6);
458 #[doc(alias = "kOBEXPutFlag7Reserved")]
459 pub const Flag7Reserved: Self = Self(1 << 7);
460}
461
462#[cfg(feature = "objc2")]
463unsafe impl Encode for OBEXPutFlagValues {
464 const ENCODING: Encoding = c_uint::ENCODING;
465}
466
467#[cfg(feature = "objc2")]
468unsafe impl RefEncode for OBEXPutFlagValues {
469 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
470}
471
472#[repr(transparent)]
476#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
477pub struct OBEXNonceFlagValues(pub c_uint);
478impl OBEXNonceFlagValues {
479 #[doc(alias = "kOBEXNonceFlagNone")]
480 pub const FlagNone: Self = Self(0 << 0);
481 #[doc(alias = "kOBEXNonceFlagSendUserIDInResponse")]
482 pub const FlagSendUserIDInResponse: Self = Self(1 << 0);
483 #[doc(alias = "kOBEXNonceFlagAccessModeReadOnly")]
484 pub const FlagAccessModeReadOnly: Self = Self(1 << 1);
485 #[doc(alias = "kOBEXNonceFlag2Reserved")]
486 pub const Flag2Reserved: Self = Self(1 << 2);
487 #[doc(alias = "kOBEXNonceFlag3Reserved")]
488 pub const Flag3Reserved: Self = Self(1 << 3);
489 #[doc(alias = "kOBEXNonceFlag4Reserved")]
490 pub const Flag4Reserved: Self = Self(1 << 4);
491 #[doc(alias = "kOBEXNonceFlag5Reserved")]
492 pub const Flag5Reserved: Self = Self(1 << 5);
493 #[doc(alias = "kOBEXNonceFlag6Reserved")]
494 pub const Flag6Reserved: Self = Self(1 << 6);
495 #[doc(alias = "kOBEXNonceFlag7Reserved")]
496 pub const Flag7Reserved: Self = Self(1 << 7);
497}
498
499#[cfg(feature = "objc2")]
500unsafe impl Encode for OBEXNonceFlagValues {
501 const ENCODING: Encoding = c_uint::ENCODING;
502}
503
504#[cfg(feature = "objc2")]
505unsafe impl RefEncode for OBEXNonceFlagValues {
506 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
507}
508
509#[repr(transparent)]
513#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
514pub struct OBEXRealmValues(pub c_uint);
515impl OBEXRealmValues {
516 #[doc(alias = "kOBEXRealmASCII")]
517 pub const ASCII: Self = Self(0x00);
518 #[doc(alias = "kOBEXRealmISO88591")]
519 pub const ISO88591: Self = Self(0x01);
520 #[doc(alias = "kOBEXRealmISO88592")]
521 pub const ISO88592: Self = Self(0x02);
522 #[doc(alias = "kOBEXRealmISO88593")]
523 pub const ISO88593: Self = Self(0x03);
524 #[doc(alias = "kOBEXRealmISO88594")]
525 pub const ISO88594: Self = Self(0x04);
526 #[doc(alias = "kOBEXRealmISO88595")]
527 pub const ISO88595: Self = Self(0x05);
528 #[doc(alias = "kOBEXRealmISO88596")]
529 pub const ISO88596: Self = Self(0x06);
530 #[doc(alias = "kOBEXRealmISO88597")]
531 pub const ISO88597: Self = Self(0x07);
532 #[doc(alias = "kOBEXRealmISO88598")]
533 pub const ISO88598: Self = Self(0x08);
534 #[doc(alias = "kOBEXRealmISO88599")]
535 pub const ISO88599: Self = Self(0x09);
536 #[doc(alias = "kOBEXRealmUNICODE")]
537 pub const UNICODE: Self = Self(0xFF);
538}
539
540#[cfg(feature = "objc2")]
541unsafe impl Encode for OBEXRealmValues {
542 const ENCODING: Encoding = c_uint::ENCODING;
543}
544
545#[cfg(feature = "objc2")]
546unsafe impl RefEncode for OBEXRealmValues {
547 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
548}
549
550#[repr(transparent)]
554#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
555pub struct OBEXOpCodeSessionValues(pub c_uint);
556impl OBEXOpCodeSessionValues {
557 #[doc(alias = "kOBEXOpCodeCreateSession")]
558 pub const CreateSession: Self = Self(0x00);
559 #[doc(alias = "kOBEXOpCodeCloseSession")]
560 pub const CloseSession: Self = Self(0x01);
561 #[doc(alias = "kOBEXOpCodeSuspendSession")]
562 pub const SuspendSession: Self = Self(0x02);
563 #[doc(alias = "kOBEXOpCodeResumeSession")]
564 pub const ResumeSession: Self = Self(0x03);
565 #[doc(alias = "kOBEXOpCodeSetTimeout")]
566 pub const SetTimeout: Self = Self(0x04);
567}
568
569#[cfg(feature = "objc2")]
570unsafe impl Encode for OBEXOpCodeSessionValues {
571 const ENCODING: Encoding = c_uint::ENCODING;
572}
573
574#[cfg(feature = "objc2")]
575unsafe impl RefEncode for OBEXOpCodeSessionValues {
576 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
577}
578
579#[repr(transparent)]
583#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
584pub struct OBEXSessionParameterTags(pub c_uint);
585impl OBEXSessionParameterTags {
586 #[doc(alias = "kOBEXSessionParameterTagDeviceAddress")]
587 pub const DeviceAddress: Self = Self(0x00);
588 #[doc(alias = "kOBEXSessionParameterTagNonce")]
589 pub const Nonce: Self = Self(0x01);
590 #[doc(alias = "kOBEXSessionParameterTagSessionID")]
591 pub const SessionID: Self = Self(0x02);
592 #[doc(alias = "kOBEXSessionParameterTagNextSequenceNumber")]
593 pub const NextSequenceNumber: Self = Self(0x03);
594 #[doc(alias = "kOBEXSessionParameterTagTimeout")]
595 pub const Timeout: Self = Self(0x04);
596 #[doc(alias = "kOBEXSessionParameterTagSessionOpcode")]
597 pub const SessionOpcode: Self = Self(0x05);
598}
599
600#[cfg(feature = "objc2")]
601unsafe impl Encode for OBEXSessionParameterTags {
602 const ENCODING: Encoding = c_uint::ENCODING;
603}
604
605#[cfg(feature = "objc2")]
606unsafe impl RefEncode for OBEXSessionParameterTags {
607 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
608}
609
610#[repr(transparent)]
614#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
615pub struct OBEXVersions(pub c_uint);
616impl OBEXVersions {
617 #[doc(alias = "kOBEXVersion10")]
618 pub const Version10: Self = Self(0x10);
619}
620
621#[cfg(feature = "objc2")]
622unsafe impl Encode for OBEXVersions {
623 const ENCODING: Encoding = c_uint::ENCODING;
624}
625
626#[cfg(feature = "objc2")]
627unsafe impl RefEncode for OBEXVersions {
628 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
629}
630
631pub type OBEXHeaderIdentifier = u8;
633
634pub type OBEXVersion = u8;
636
637pub type OBEXFlags = u8;
639
640pub type OBEXOpCode = u8;
642
643pub type OBEXConstants = u8;
645
646pub type OBEXMaxPacketLength = u16;
648
649#[repr(C)]
651#[derive(Debug)]
652pub struct OpaqueOBEXSessionRef {
653 inner: [u8; 0],
654 _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
655}
656
657#[cfg(feature = "objc2")]
658unsafe impl RefEncode for OpaqueOBEXSessionRef {
659 const ENCODING_REF: Encoding =
660 Encoding::Pointer(&Encoding::Struct("OpaqueOBEXSessionRef", &[]));
661}
662
663pub type OBEXSessionRef = *mut OpaqueOBEXSessionRef;
665
666#[repr(C)]
668#[derive(Clone, Copy, Debug, PartialEq)]
669pub struct OBEXConnectCommandResponseData {
670 pub serverResponseOpCode: OBEXOpCode,
671 pub headerDataPtr: *mut c_void,
672 pub headerDataLength: usize,
673 pub maxPacketSize: OBEXMaxPacketLength,
674 pub version: OBEXVersion,
675 pub flags: OBEXFlags,
676}
677
678#[cfg(feature = "objc2")]
679unsafe impl Encode for OBEXConnectCommandResponseData {
680 const ENCODING: Encoding = Encoding::Struct(
681 "OBEXConnectCommandResponseData",
682 &[
683 <OBEXOpCode>::ENCODING,
684 <*mut c_void>::ENCODING,
685 <usize>::ENCODING,
686 <OBEXMaxPacketLength>::ENCODING,
687 <OBEXVersion>::ENCODING,
688 <OBEXFlags>::ENCODING,
689 ],
690 );
691}
692
693#[cfg(feature = "objc2")]
694unsafe impl RefEncode for OBEXConnectCommandResponseData {
695 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
696}
697
698#[repr(C)]
700#[derive(Clone, Copy, Debug, PartialEq)]
701pub struct OBEXDisconnectCommandResponseData {
702 pub serverResponseOpCode: OBEXOpCode,
703 pub headerDataPtr: *mut c_void,
704 pub headerDataLength: usize,
705}
706
707#[cfg(feature = "objc2")]
708unsafe impl Encode for OBEXDisconnectCommandResponseData {
709 const ENCODING: Encoding = Encoding::Struct(
710 "OBEXDisconnectCommandResponseData",
711 &[
712 <OBEXOpCode>::ENCODING,
713 <*mut c_void>::ENCODING,
714 <usize>::ENCODING,
715 ],
716 );
717}
718
719#[cfg(feature = "objc2")]
720unsafe impl RefEncode for OBEXDisconnectCommandResponseData {
721 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
722}
723
724#[repr(C)]
726#[derive(Clone, Copy, Debug, PartialEq)]
727pub struct OBEXPutCommandResponseData {
728 pub serverResponseOpCode: OBEXOpCode,
729 pub headerDataPtr: *mut c_void,
730 pub headerDataLength: usize,
731}
732
733#[cfg(feature = "objc2")]
734unsafe impl Encode for OBEXPutCommandResponseData {
735 const ENCODING: Encoding = Encoding::Struct(
736 "OBEXPutCommandResponseData",
737 &[
738 <OBEXOpCode>::ENCODING,
739 <*mut c_void>::ENCODING,
740 <usize>::ENCODING,
741 ],
742 );
743}
744
745#[cfg(feature = "objc2")]
746unsafe impl RefEncode for OBEXPutCommandResponseData {
747 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
748}
749
750#[repr(C)]
752#[derive(Clone, Copy, Debug, PartialEq)]
753pub struct OBEXGetCommandResponseData {
754 pub serverResponseOpCode: OBEXOpCode,
755 pub headerDataPtr: *mut c_void,
756 pub headerDataLength: usize,
757}
758
759#[cfg(feature = "objc2")]
760unsafe impl Encode for OBEXGetCommandResponseData {
761 const ENCODING: Encoding = Encoding::Struct(
762 "OBEXGetCommandResponseData",
763 &[
764 <OBEXOpCode>::ENCODING,
765 <*mut c_void>::ENCODING,
766 <usize>::ENCODING,
767 ],
768 );
769}
770
771#[cfg(feature = "objc2")]
772unsafe impl RefEncode for OBEXGetCommandResponseData {
773 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
774}
775
776#[repr(C)]
778#[derive(Clone, Copy, Debug, PartialEq)]
779pub struct OBEXSetPathCommandResponseData {
780 pub serverResponseOpCode: OBEXOpCode,
781 pub headerDataPtr: *mut c_void,
782 pub headerDataLength: usize,
783 pub flags: OBEXFlags,
784 pub constants: OBEXConstants,
785}
786
787#[cfg(feature = "objc2")]
788unsafe impl Encode for OBEXSetPathCommandResponseData {
789 const ENCODING: Encoding = Encoding::Struct(
790 "OBEXSetPathCommandResponseData",
791 &[
792 <OBEXOpCode>::ENCODING,
793 <*mut c_void>::ENCODING,
794 <usize>::ENCODING,
795 <OBEXFlags>::ENCODING,
796 <OBEXConstants>::ENCODING,
797 ],
798 );
799}
800
801#[cfg(feature = "objc2")]
802unsafe impl RefEncode for OBEXSetPathCommandResponseData {
803 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
804}
805
806#[repr(C)]
808#[derive(Clone, Copy, Debug, PartialEq)]
809pub struct OBEXAbortCommandResponseData {
810 pub serverResponseOpCode: OBEXOpCode,
811 pub headerDataPtr: *mut c_void,
812 pub headerDataLength: usize,
813}
814
815#[cfg(feature = "objc2")]
816unsafe impl Encode for OBEXAbortCommandResponseData {
817 const ENCODING: Encoding = Encoding::Struct(
818 "OBEXAbortCommandResponseData",
819 &[
820 <OBEXOpCode>::ENCODING,
821 <*mut c_void>::ENCODING,
822 <usize>::ENCODING,
823 ],
824 );
825}
826
827#[cfg(feature = "objc2")]
828unsafe impl RefEncode for OBEXAbortCommandResponseData {
829 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
830}
831
832#[repr(C)]
834#[derive(Clone, Copy, Debug, PartialEq)]
835pub struct OBEXConnectCommandData {
836 pub headerDataPtr: *mut c_void,
837 pub headerDataLength: usize,
838 pub maxPacketSize: OBEXMaxPacketLength,
839 pub version: OBEXVersion,
840 pub flags: OBEXFlags,
841}
842
843#[cfg(feature = "objc2")]
844unsafe impl Encode for OBEXConnectCommandData {
845 const ENCODING: Encoding = Encoding::Struct(
846 "OBEXConnectCommandData",
847 &[
848 <*mut c_void>::ENCODING,
849 <usize>::ENCODING,
850 <OBEXMaxPacketLength>::ENCODING,
851 <OBEXVersion>::ENCODING,
852 <OBEXFlags>::ENCODING,
853 ],
854 );
855}
856
857#[cfg(feature = "objc2")]
858unsafe impl RefEncode for OBEXConnectCommandData {
859 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
860}
861
862#[repr(C)]
864#[derive(Clone, Copy, Debug, PartialEq)]
865pub struct OBEXDisconnectCommandData {
866 pub headerDataPtr: *mut c_void,
867 pub headerDataLength: usize,
868}
869
870#[cfg(feature = "objc2")]
871unsafe impl Encode for OBEXDisconnectCommandData {
872 const ENCODING: Encoding = Encoding::Struct(
873 "OBEXDisconnectCommandData",
874 &[<*mut c_void>::ENCODING, <usize>::ENCODING],
875 );
876}
877
878#[cfg(feature = "objc2")]
879unsafe impl RefEncode for OBEXDisconnectCommandData {
880 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
881}
882
883#[repr(C)]
885#[derive(Clone, Copy, Debug, PartialEq)]
886pub struct OBEXPutCommandData {
887 pub headerDataPtr: *mut c_void,
888 pub headerDataLength: usize,
889 pub bodyDataLeftToSend: usize,
890}
891
892#[cfg(feature = "objc2")]
893unsafe impl Encode for OBEXPutCommandData {
894 const ENCODING: Encoding = Encoding::Struct(
895 "OBEXPutCommandData",
896 &[
897 <*mut c_void>::ENCODING,
898 <usize>::ENCODING,
899 <usize>::ENCODING,
900 ],
901 );
902}
903
904#[cfg(feature = "objc2")]
905unsafe impl RefEncode for OBEXPutCommandData {
906 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
907}
908
909#[repr(C)]
911#[derive(Clone, Copy, Debug, PartialEq)]
912pub struct OBEXGetCommandData {
913 pub headerDataPtr: *mut c_void,
914 pub headerDataLength: usize,
915}
916
917#[cfg(feature = "objc2")]
918unsafe impl Encode for OBEXGetCommandData {
919 const ENCODING: Encoding = Encoding::Struct(
920 "OBEXGetCommandData",
921 &[<*mut c_void>::ENCODING, <usize>::ENCODING],
922 );
923}
924
925#[cfg(feature = "objc2")]
926unsafe impl RefEncode for OBEXGetCommandData {
927 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
928}
929
930#[repr(C)]
932#[derive(Clone, Copy, Debug, PartialEq)]
933pub struct OBEXSetPathCommandData {
934 pub headerDataPtr: *mut c_void,
935 pub headerDataLength: usize,
936 pub flags: OBEXFlags,
937 pub constants: OBEXConstants,
938}
939
940#[cfg(feature = "objc2")]
941unsafe impl Encode for OBEXSetPathCommandData {
942 const ENCODING: Encoding = Encoding::Struct(
943 "OBEXSetPathCommandData",
944 &[
945 <*mut c_void>::ENCODING,
946 <usize>::ENCODING,
947 <OBEXFlags>::ENCODING,
948 <OBEXConstants>::ENCODING,
949 ],
950 );
951}
952
953#[cfg(feature = "objc2")]
954unsafe impl RefEncode for OBEXSetPathCommandData {
955 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
956}
957
958#[repr(C)]
960#[derive(Clone, Copy, Debug, PartialEq)]
961pub struct OBEXAbortCommandData {
962 pub headerDataPtr: *mut c_void,
963 pub headerDataLength: usize,
964}
965
966#[cfg(feature = "objc2")]
967unsafe impl Encode for OBEXAbortCommandData {
968 const ENCODING: Encoding = Encoding::Struct(
969 "OBEXAbortCommandData",
970 &[<*mut c_void>::ENCODING, <usize>::ENCODING],
971 );
972}
973
974#[cfg(feature = "objc2")]
975unsafe impl RefEncode for OBEXAbortCommandData {
976 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
977}
978
979#[repr(C)]
981#[derive(Clone, Copy, Debug, PartialEq)]
982pub struct OBEXErrorData {
983 pub error: OBEXError,
984 pub dataPtr: *mut c_void,
985 pub dataLength: usize,
986}
987
988#[cfg(feature = "objc2")]
989unsafe impl Encode for OBEXErrorData {
990 const ENCODING: Encoding = Encoding::Struct(
991 "OBEXErrorData",
992 &[
993 <OBEXError>::ENCODING,
994 <*mut c_void>::ENCODING,
995 <usize>::ENCODING,
996 ],
997 );
998}
999
1000#[cfg(feature = "objc2")]
1001unsafe impl RefEncode for OBEXErrorData {
1002 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1003}
1004
1005#[repr(transparent)]
1017#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1018pub struct OBEXSessionEventTypes(pub c_uint);
1019impl OBEXSessionEventTypes {
1020 #[doc(alias = "kOBEXSessionEventTypeConnectCommandResponseReceived")]
1021 pub const ConnectCommandResponseReceived: Self = Self(0x4f434543);
1022 #[doc(alias = "kOBEXSessionEventTypeDisconnectCommandResponseReceived")]
1023 pub const DisconnectCommandResponseReceived: Self = Self(0x4f434544);
1024 #[doc(alias = "kOBEXSessionEventTypePutCommandResponseReceived")]
1025 pub const PutCommandResponseReceived: Self = Self(0x4f434550);
1026 #[doc(alias = "kOBEXSessionEventTypeGetCommandResponseReceived")]
1027 pub const GetCommandResponseReceived: Self = Self(0x4f434547);
1028 #[doc(alias = "kOBEXSessionEventTypeSetPathCommandResponseReceived")]
1029 pub const SetPathCommandResponseReceived: Self = Self(0x4f434553);
1030 #[doc(alias = "kOBEXSessionEventTypeAbortCommandResponseReceived")]
1031 pub const AbortCommandResponseReceived: Self = Self(0x4f434541);
1032 #[doc(alias = "kOBEXSessionEventTypeConnectCommandReceived")]
1033 pub const ConnectCommandReceived: Self = Self(0x4f534543);
1034 #[doc(alias = "kOBEXSessionEventTypeDisconnectCommandReceived")]
1035 pub const DisconnectCommandReceived: Self = Self(0x4f534544);
1036 #[doc(alias = "kOBEXSessionEventTypePutCommandReceived")]
1037 pub const PutCommandReceived: Self = Self(0x4f534550);
1038 #[doc(alias = "kOBEXSessionEventTypeGetCommandReceived")]
1039 pub const GetCommandReceived: Self = Self(0x4f534547);
1040 #[doc(alias = "kOBEXSessionEventTypeSetPathCommandReceived")]
1041 pub const SetPathCommandReceived: Self = Self(0x4f534553);
1042 #[doc(alias = "kOBEXSessionEventTypeAbortCommandReceived")]
1043 pub const AbortCommandReceived: Self = Self(0x4f534541);
1044 #[doc(alias = "kOBEXSessionEventTypeError")]
1045 pub const Error: Self = Self(0x4f474545);
1046}
1047
1048#[cfg(feature = "objc2")]
1049unsafe impl Encode for OBEXSessionEventTypes {
1050 const ENCODING: Encoding = c_uint::ENCODING;
1051}
1052
1053#[cfg(feature = "objc2")]
1054unsafe impl RefEncode for OBEXSessionEventTypes {
1055 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1056}
1057
1058pub type OBEXSessionEventType = u32;
1060
1061#[repr(C)]
1063#[derive(Clone, Copy)]
1064pub union OBEXSessionEvent_u {
1065 pub connectCommandResponseData: OBEXConnectCommandResponseData,
1066 pub disconnectCommandResponseData: OBEXDisconnectCommandResponseData,
1067 pub putCommandResponseData: OBEXPutCommandResponseData,
1068 pub getCommandResponseData: OBEXGetCommandResponseData,
1069 pub setPathCommandResponseData: OBEXSetPathCommandResponseData,
1070 pub abortCommandResponseData: OBEXAbortCommandResponseData,
1071 pub connectCommandData: OBEXConnectCommandData,
1072 pub disconnectCommandData: OBEXDisconnectCommandData,
1073 pub putCommandData: OBEXPutCommandData,
1074 pub getCommandData: OBEXGetCommandData,
1075 pub setPathCommandData: OBEXSetPathCommandData,
1076 pub abortCommandData: OBEXAbortCommandData,
1077 pub errorData: OBEXErrorData,
1078}
1079
1080#[cfg(feature = "objc2")]
1081unsafe impl Encode for OBEXSessionEvent_u {
1082 const ENCODING: Encoding = Encoding::Union(
1083 "?",
1084 &[
1085 <OBEXConnectCommandResponseData>::ENCODING,
1086 <OBEXDisconnectCommandResponseData>::ENCODING,
1087 <OBEXPutCommandResponseData>::ENCODING,
1088 <OBEXGetCommandResponseData>::ENCODING,
1089 <OBEXSetPathCommandResponseData>::ENCODING,
1090 <OBEXAbortCommandResponseData>::ENCODING,
1091 <OBEXConnectCommandData>::ENCODING,
1092 <OBEXDisconnectCommandData>::ENCODING,
1093 <OBEXPutCommandData>::ENCODING,
1094 <OBEXGetCommandData>::ENCODING,
1095 <OBEXSetPathCommandData>::ENCODING,
1096 <OBEXAbortCommandData>::ENCODING,
1097 <OBEXErrorData>::ENCODING,
1098 ],
1099 );
1100}
1101
1102#[cfg(feature = "objc2")]
1103unsafe impl RefEncode for OBEXSessionEvent_u {
1104 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1105}
1106
1107#[repr(C)]
1109#[derive(Clone, Copy)]
1110pub struct OBEXSessionEvent {
1111 pub r#type: OBEXSessionEventType,
1112 pub session: OBEXSessionRef,
1113 pub refCon: *mut c_void,
1114 pub isEndOfEventData: Boolean,
1115 pub reserved1: *mut c_void,
1116 pub reserved2: *mut c_void,
1117 pub u: OBEXSessionEvent_u,
1118}
1119
1120#[cfg(feature = "objc2")]
1121unsafe impl Encode for OBEXSessionEvent {
1122 const ENCODING: Encoding = Encoding::Struct(
1123 "OBEXSessionEvent",
1124 &[
1125 <OBEXSessionEventType>::ENCODING,
1126 <OBEXSessionRef>::ENCODING,
1127 <*mut c_void>::ENCODING,
1128 <Boolean>::ENCODING,
1129 <*mut c_void>::ENCODING,
1130 <*mut c_void>::ENCODING,
1131 <OBEXSessionEvent_u>::ENCODING,
1132 ],
1133 );
1134}
1135
1136#[cfg(feature = "objc2")]
1137unsafe impl RefEncode for OBEXSessionEvent {
1138 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1139}
1140
1141pub type OBEXSessionEventCallback = Option<unsafe extern "C-unwind" fn(*const OBEXSessionEvent)>;
1143
1144extern "C-unwind" {
1145 #[deprecated]
1155 pub fn OBEXSessionDelete(in_session_ref: OBEXSessionRef) -> OBEXError;
1156}
1157
1158extern "C-unwind" {
1159 #[deprecated]
1175 pub fn OBEXSessionHasOpenOBEXConnection(
1176 in_session_ref: OBEXSessionRef,
1177 out_is_connected: *mut Boolean,
1178 ) -> OBEXError;
1179}
1180
1181extern "C-unwind" {
1182 #[deprecated]
1197 pub fn OBEXSessionGetMaxPacketLength(
1198 in_session_ref: OBEXSessionRef,
1199 out_length: *mut OBEXMaxPacketLength,
1200 ) -> OBEXError;
1201}
1202
1203extern "C-unwind" {
1204 #[deprecated]
1226 pub fn OBEXSessionGetAvailableCommandPayloadLength(
1227 in_session_ref: OBEXSessionRef,
1228 in_op_code: OBEXOpCode,
1229 out_length: *mut OBEXMaxPacketLength,
1230 ) -> OBEXError;
1231}
1232
1233extern "C-unwind" {
1234 #[deprecated]
1258 pub fn OBEXSessionGetAvailableCommandResponsePayloadLength(
1259 in_session_ref: OBEXSessionRef,
1260 in_op_code: OBEXOpCode,
1261 out_length: *mut OBEXMaxPacketLength,
1262 ) -> OBEXError;
1263}
1264
1265extern "C-unwind" {
1266 #[deprecated]
1296 pub fn OBEXSessionConnect(
1297 in_session_ref: OBEXSessionRef,
1298 in_flags: OBEXFlags,
1299 in_max_packet_length: OBEXMaxPacketLength,
1300 in_optional_headers: *mut c_void,
1301 in_optional_headers_length: usize,
1302 in_callback: OBEXSessionEventCallback,
1303 in_user_ref_con: *mut c_void,
1304 ) -> OBEXError;
1305}
1306
1307extern "C-unwind" {
1308 #[deprecated]
1331 pub fn OBEXSessionDisconnect(
1332 in_session_ref: OBEXSessionRef,
1333 in_optional_headers: *mut c_void,
1334 in_optional_headers_length: usize,
1335 in_callback: OBEXSessionEventCallback,
1336 in_user_ref_con: *mut c_void,
1337 ) -> OBEXError;
1338}
1339
1340#[deprecated]
1370#[inline]
1371pub unsafe extern "C-unwind" fn OBEXSessionPut(
1372 in_session_ref: OBEXSessionRef,
1373 in_is_final_chunk: bool,
1374 in_headers_data: *mut c_void,
1375 in_headers_data_length: usize,
1376 in_body_data: *mut c_void,
1377 in_body_data_length: usize,
1378 in_callback: OBEXSessionEventCallback,
1379 in_user_ref_con: *mut c_void,
1380) -> OBEXError {
1381 extern "C-unwind" {
1382 fn OBEXSessionPut(
1383 in_session_ref: OBEXSessionRef,
1384 in_is_final_chunk: Boolean,
1385 in_headers_data: *mut c_void,
1386 in_headers_data_length: usize,
1387 in_body_data: *mut c_void,
1388 in_body_data_length: usize,
1389 in_callback: OBEXSessionEventCallback,
1390 in_user_ref_con: *mut c_void,
1391 ) -> OBEXError;
1392 }
1393 unsafe {
1394 OBEXSessionPut(
1395 in_session_ref,
1396 in_is_final_chunk as _,
1397 in_headers_data,
1398 in_headers_data_length,
1399 in_body_data,
1400 in_body_data_length,
1401 in_callback,
1402 in_user_ref_con,
1403 )
1404 }
1405}
1406
1407#[deprecated]
1431#[inline]
1432pub unsafe extern "C-unwind" fn OBEXSessionGet(
1433 in_session_ref: OBEXSessionRef,
1434 in_is_final_chunk: bool,
1435 in_headers_data: *mut c_void,
1436 in_headers_data_length: usize,
1437 in_callback: OBEXSessionEventCallback,
1438 in_user_ref_con: *mut c_void,
1439) -> OBEXError {
1440 extern "C-unwind" {
1441 fn OBEXSessionGet(
1442 in_session_ref: OBEXSessionRef,
1443 in_is_final_chunk: Boolean,
1444 in_headers_data: *mut c_void,
1445 in_headers_data_length: usize,
1446 in_callback: OBEXSessionEventCallback,
1447 in_user_ref_con: *mut c_void,
1448 ) -> OBEXError;
1449 }
1450 unsafe {
1451 OBEXSessionGet(
1452 in_session_ref,
1453 in_is_final_chunk as _,
1454 in_headers_data,
1455 in_headers_data_length,
1456 in_callback,
1457 in_user_ref_con,
1458 )
1459 }
1460}
1461
1462extern "C-unwind" {
1463 #[deprecated]
1486 pub fn OBEXSessionAbort(
1487 in_session_ref: OBEXSessionRef,
1488 in_optional_headers: *mut c_void,
1489 in_optional_headers_length: usize,
1490 in_callback: OBEXSessionEventCallback,
1491 in_user_ref_con: *mut c_void,
1492 ) -> OBEXError;
1493}
1494
1495extern "C-unwind" {
1496 #[deprecated]
1523 pub fn OBEXSessionSetPath(
1524 in_session_ref: OBEXSessionRef,
1525 in_flags: OBEXFlags,
1526 in_constants: OBEXConstants,
1527 in_optional_headers: *mut c_void,
1528 in_optional_headers_length: usize,
1529 in_callback: OBEXSessionEventCallback,
1530 in_user_ref_con: *mut c_void,
1531 ) -> OBEXError;
1532}
1533
1534extern "C-unwind" {
1535 #[deprecated]
1565 pub fn OBEXSessionConnectResponse(
1566 in_session_ref: OBEXSessionRef,
1567 in_response_op_code: OBEXOpCode,
1568 in_flags: OBEXFlags,
1569 in_max_packet_length: OBEXMaxPacketLength,
1570 in_optional_headers: *mut c_void,
1571 in_optional_headers_length: usize,
1572 in_callback: OBEXSessionEventCallback,
1573 in_user_ref_con: *mut c_void,
1574 ) -> OBEXError;
1575}
1576
1577extern "C-unwind" {
1578 #[deprecated]
1603 pub fn OBEXSessionDisconnectResponse(
1604 in_session_ref: OBEXSessionRef,
1605 in_response_op_code: OBEXOpCode,
1606 in_optional_headers: *mut c_void,
1607 in_optional_headers_length: usize,
1608 in_callback: OBEXSessionEventCallback,
1609 in_user_ref_con: *mut c_void,
1610 ) -> OBEXError;
1611}
1612
1613extern "C-unwind" {
1614 #[deprecated]
1639 pub fn OBEXSessionGetResponse(
1640 in_session_ref: OBEXSessionRef,
1641 in_response_op_code: OBEXOpCode,
1642 in_optional_headers: *mut c_void,
1643 in_optional_headers_length: usize,
1644 in_callback: OBEXSessionEventCallback,
1645 in_user_ref_con: *mut c_void,
1646 ) -> OBEXError;
1647}
1648
1649extern "C-unwind" {
1650 #[deprecated]
1675 pub fn OBEXSessionPutResponse(
1676 in_session_ref: OBEXSessionRef,
1677 in_response_op_code: OBEXOpCode,
1678 in_optional_headers: *mut c_void,
1679 in_optional_headers_length: usize,
1680 in_callback: OBEXSessionEventCallback,
1681 in_user_ref_con: *mut c_void,
1682 ) -> OBEXError;
1683}
1684
1685extern "C-unwind" {
1686 #[deprecated]
1711 pub fn OBEXSessionAbortResponse(
1712 in_session_ref: OBEXSessionRef,
1713 in_response_op_code: OBEXOpCode,
1714 in_optional_headers: *mut c_void,
1715 in_optional_headers_length: usize,
1716 in_callback: OBEXSessionEventCallback,
1717 in_user_ref_con: *mut c_void,
1718 ) -> OBEXError;
1719}
1720
1721extern "C-unwind" {
1722 #[deprecated]
1747 pub fn OBEXSessionSetPathResponse(
1748 in_session_ref: OBEXSessionRef,
1749 in_response_op_code: OBEXOpCode,
1750 in_optional_headers: *mut c_void,
1751 in_optional_headers_length: usize,
1752 in_callback: OBEXSessionEventCallback,
1753 in_user_ref_con: *mut c_void,
1754 ) -> OBEXError;
1755}
1756
1757extern "C-unwind" {
1758 #[deprecated]
1776 pub fn OBEXSessionSetServerCallback(
1777 in_session_ref: OBEXSessionRef,
1778 in_callback: OBEXSessionEventCallback,
1779 in_user_ref_con: *mut c_void,
1780 ) -> OBEXError;
1781}
1782
1783#[cfg(feature = "objc2-core-foundation")]
1850#[deprecated]
1851#[inline]
1852pub unsafe extern "C-unwind" fn OBEXCreateVCard(
1853 in_first_name: *const c_void,
1854 in_first_name_length: u32,
1855 in_last_name: *const c_void,
1856 in_last_name_length: u32,
1857 in_friendly_name: *const c_void,
1858 in_friendly_name_length: u32,
1859 in_name_charset: *const c_void,
1860 in_name_charset_length: u32,
1861 in_home_phone: *const c_void,
1862 in_home_phone_length: u32,
1863 in_work_phone: *const c_void,
1864 in_work_phone_length: u32,
1865 in_cell_phone: *const c_void,
1866 in_cell_phone_length: u32,
1867 in_fax_phone: *const c_void,
1868 in_fax_phone_length: u32,
1869 in_e_mail_address: *const c_void,
1870 in_e_mail_address_length: u32,
1871 in_e_mail_address_charset: *const c_void,
1872 in_e_mail_address_charset_length: u32,
1873 in_organization: *const c_void,
1874 in_organization_length: u32,
1875 in_organization_charset: *const c_void,
1876 in_organization_charset_length: u32,
1877 in_title: *const c_void,
1878 in_title_length: u32,
1879 in_title_charset: *const c_void,
1880 in_title_charset_length: u32,
1881) -> Option<CFRetained<CFData>> {
1882 extern "C-unwind" {
1883 fn OBEXCreateVCard(
1884 in_first_name: *const c_void,
1885 in_first_name_length: u32,
1886 in_last_name: *const c_void,
1887 in_last_name_length: u32,
1888 in_friendly_name: *const c_void,
1889 in_friendly_name_length: u32,
1890 in_name_charset: *const c_void,
1891 in_name_charset_length: u32,
1892 in_home_phone: *const c_void,
1893 in_home_phone_length: u32,
1894 in_work_phone: *const c_void,
1895 in_work_phone_length: u32,
1896 in_cell_phone: *const c_void,
1897 in_cell_phone_length: u32,
1898 in_fax_phone: *const c_void,
1899 in_fax_phone_length: u32,
1900 in_e_mail_address: *const c_void,
1901 in_e_mail_address_length: u32,
1902 in_e_mail_address_charset: *const c_void,
1903 in_e_mail_address_charset_length: u32,
1904 in_organization: *const c_void,
1905 in_organization_length: u32,
1906 in_organization_charset: *const c_void,
1907 in_organization_charset_length: u32,
1908 in_title: *const c_void,
1909 in_title_length: u32,
1910 in_title_charset: *const c_void,
1911 in_title_charset_length: u32,
1912 ) -> Option<NonNull<CFData>>;
1913 }
1914 let ret = unsafe {
1915 OBEXCreateVCard(
1916 in_first_name,
1917 in_first_name_length,
1918 in_last_name,
1919 in_last_name_length,
1920 in_friendly_name,
1921 in_friendly_name_length,
1922 in_name_charset,
1923 in_name_charset_length,
1924 in_home_phone,
1925 in_home_phone_length,
1926 in_work_phone,
1927 in_work_phone_length,
1928 in_cell_phone,
1929 in_cell_phone_length,
1930 in_fax_phone,
1931 in_fax_phone_length,
1932 in_e_mail_address,
1933 in_e_mail_address_length,
1934 in_e_mail_address_charset,
1935 in_e_mail_address_charset_length,
1936 in_organization,
1937 in_organization_length,
1938 in_organization_charset,
1939 in_organization_charset_length,
1940 in_title,
1941 in_title_length,
1942 in_title_charset,
1943 in_title_charset_length,
1944 )
1945 };
1946 ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
1947}
1948
1949#[cfg(feature = "objc2-core-foundation")]
1998#[deprecated]
1999#[inline]
2000pub unsafe extern "C-unwind" fn OBEXCreateVEvent(
2001 in_charset: *const c_char,
2002 in_charset_length: u32,
2003 in_encoding: *const c_char,
2004 in_encoding_length: u32,
2005 in_event_start_date: *const c_char,
2006 in_event_start_date_length: u32,
2007 in_event_end_date: *const c_char,
2008 in_event_end_date_length: u32,
2009 in_alarm_date: *const c_char,
2010 in_alarm_date_length: u32,
2011 in_category: *const c_char,
2012 in_category_length: u32,
2013 in_summary: *const c_char,
2014 in_summary_length: u32,
2015 in_location: *const c_char,
2016 in_location_length: u32,
2017 in_xirmcluid: *const c_char,
2018 in_xirmcluid_length: u32,
2019) -> Option<CFRetained<CFData>> {
2020 extern "C-unwind" {
2021 fn OBEXCreateVEvent(
2022 in_charset: *const c_char,
2023 in_charset_length: u32,
2024 in_encoding: *const c_char,
2025 in_encoding_length: u32,
2026 in_event_start_date: *const c_char,
2027 in_event_start_date_length: u32,
2028 in_event_end_date: *const c_char,
2029 in_event_end_date_length: u32,
2030 in_alarm_date: *const c_char,
2031 in_alarm_date_length: u32,
2032 in_category: *const c_char,
2033 in_category_length: u32,
2034 in_summary: *const c_char,
2035 in_summary_length: u32,
2036 in_location: *const c_char,
2037 in_location_length: u32,
2038 in_xirmcluid: *const c_char,
2039 in_xirmcluid_length: u32,
2040 ) -> Option<NonNull<CFData>>;
2041 }
2042 let ret = unsafe {
2043 OBEXCreateVEvent(
2044 in_charset,
2045 in_charset_length,
2046 in_encoding,
2047 in_encoding_length,
2048 in_event_start_date,
2049 in_event_start_date_length,
2050 in_event_end_date,
2051 in_event_end_date_length,
2052 in_alarm_date,
2053 in_alarm_date_length,
2054 in_category,
2055 in_category_length,
2056 in_summary,
2057 in_summary_length,
2058 in_location,
2059 in_location_length,
2060 in_xirmcluid,
2061 in_xirmcluid_length,
2062 )
2063 };
2064 ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
2065}
2066
2067extern "C" {
2068 #[cfg(feature = "objc2-core-foundation")]
2070 pub static kOBEXHeaderIDKeyName: Option<&'static CFString>;
2071}
2072
2073extern "C" {
2074 #[cfg(feature = "objc2-core-foundation")]
2076 pub static kOBEXHeaderIDKeyType: Option<&'static CFString>;
2077}
2078
2079extern "C" {
2080 #[cfg(feature = "objc2-core-foundation")]
2082 pub static kOBEXHeaderIDKeyDescription: Option<&'static CFString>;
2083}
2084
2085extern "C" {
2086 #[cfg(feature = "objc2-core-foundation")]
2088 pub static kOBEXHeaderIDKeyTimeISO: Option<&'static CFString>;
2089}
2090
2091extern "C" {
2092 #[cfg(feature = "objc2-core-foundation")]
2094 pub static kOBEXHeaderIDKeyTime4Byte: Option<&'static CFString>;
2095}
2096
2097extern "C" {
2098 #[cfg(feature = "objc2-core-foundation")]
2100 pub static kOBEXHeaderIDKeyTarget: Option<&'static CFString>;
2101}
2102
2103extern "C" {
2104 #[cfg(feature = "objc2-core-foundation")]
2106 pub static kOBEXHeaderIDKeyHTTP: Option<&'static CFString>;
2107}
2108
2109extern "C" {
2110 #[cfg(feature = "objc2-core-foundation")]
2112 pub static kOBEXHeaderIDKeyBody: Option<&'static CFString>;
2113}
2114
2115extern "C" {
2116 #[cfg(feature = "objc2-core-foundation")]
2118 pub static kOBEXHeaderIDKeyEndOfBody: Option<&'static CFString>;
2119}
2120
2121extern "C" {
2122 #[cfg(feature = "objc2-core-foundation")]
2124 pub static kOBEXHeaderIDKeyWho: Option<&'static CFString>;
2125}
2126
2127extern "C" {
2128 #[cfg(feature = "objc2-core-foundation")]
2130 pub static kOBEXHeaderIDKeyAppParameters: Option<&'static CFString>;
2131}
2132
2133extern "C" {
2134 #[cfg(feature = "objc2-core-foundation")]
2136 pub static kOBEXHeaderIDKeyAuthorizationChallenge: Option<&'static CFString>;
2137}
2138
2139extern "C" {
2140 #[cfg(feature = "objc2-core-foundation")]
2142 pub static kOBEXHeaderIDKeyAuthorizationResponse: Option<&'static CFString>;
2143}
2144
2145extern "C" {
2146 #[cfg(feature = "objc2-core-foundation")]
2148 pub static kOBEXHeaderIDKeyObjectClass: Option<&'static CFString>;
2149}
2150
2151extern "C" {
2152 #[cfg(feature = "objc2-core-foundation")]
2154 pub static kOBEXHeaderIDKeyCount: Option<&'static CFString>;
2155}
2156
2157extern "C" {
2158 #[cfg(feature = "objc2-core-foundation")]
2160 pub static kOBEXHeaderIDKeyLength: Option<&'static CFString>;
2161}
2162
2163extern "C" {
2164 #[cfg(feature = "objc2-core-foundation")]
2166 pub static kOBEXHeaderIDKeyConnectionID: Option<&'static CFString>;
2167}
2168
2169extern "C" {
2170 #[cfg(feature = "objc2-core-foundation")]
2172 pub static kOBEXHeaderIDKeyByteSequence: Option<&'static CFString>;
2173}
2174
2175extern "C" {
2176 #[cfg(feature = "objc2-core-foundation")]
2178 pub static kOBEXHeaderIDKeyUnknownUnicodeText: Option<&'static CFString>;
2179}
2180
2181extern "C" {
2182 #[cfg(feature = "objc2-core-foundation")]
2184 pub static kOBEXHeaderIDKeyUnknownByteSequence: Option<&'static CFString>;
2185}
2186
2187extern "C" {
2188 #[cfg(feature = "objc2-core-foundation")]
2190 pub static kOBEXHeaderIDKeyUnknown1ByteQuantity: Option<&'static CFString>;
2191}
2192
2193extern "C" {
2194 #[cfg(feature = "objc2-core-foundation")]
2196 pub static kOBEXHeaderIDKeyUnknown4ByteQuantity: Option<&'static CFString>;
2197}
2198
2199extern "C" {
2200 #[cfg(feature = "objc2-core-foundation")]
2202 pub static kOBEXHeaderIDKeyUserDefined: Option<&'static CFString>;
2203}
2204
2205#[cfg(feature = "objc2-core-foundation")]
2249#[inline]
2250pub unsafe extern "C-unwind" fn OBEXGetHeaders(
2251 in_data: *const c_void,
2252 in_data_size: usize,
2253) -> Option<CFRetained<CFDictionary>> {
2254 extern "C-unwind" {
2255 fn OBEXGetHeaders(
2256 in_data: *const c_void,
2257 in_data_size: usize,
2258 ) -> Option<NonNull<CFDictionary>>;
2259 }
2260 let ret = unsafe { OBEXGetHeaders(in_data, in_data_size) };
2261 ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
2262}
2263
2264#[cfg(feature = "objc2-core-foundation")]
2301#[inline]
2302pub unsafe extern "C-unwind" fn OBEXHeadersToBytes(
2303 dictionary_of_headers: Option<&CFDictionary>,
2304) -> Option<CFRetained<CFMutableData>> {
2305 extern "C-unwind" {
2306 fn OBEXHeadersToBytes(
2307 dictionary_of_headers: Option<&CFDictionary>,
2308 ) -> Option<NonNull<CFMutableData>>;
2309 }
2310 let ret = unsafe { OBEXHeadersToBytes(dictionary_of_headers) };
2311 ret.map(|ret| unsafe { CFRetained::retain(ret) })
2312}
2313
2314extern "C-unwind" {
2315 #[cfg(feature = "objc2-core-foundation")]
2325 pub fn OBEXAddNameHeader(
2326 name: Option<&CFString>,
2327 dict_ref: Option<&CFMutableDictionary>,
2328 ) -> OBEXError;
2329}
2330
2331extern "C-unwind" {
2332 #[cfg(feature = "objc2-core-foundation")]
2342 pub fn OBEXAddDescriptionHeader(
2343 description: Option<&CFString>,
2344 dict_ref: Option<&CFMutableDictionary>,
2345 ) -> OBEXError;
2346}
2347
2348extern "C-unwind" {
2349 #[cfg(feature = "objc2-core-foundation")]
2359 pub fn OBEXAddCountHeader(count: u32, dict_ref: Option<&CFMutableDictionary>) -> OBEXError;
2360}
2361
2362extern "C-unwind" {
2363 #[cfg(feature = "objc2-core-foundation")]
2373 pub fn OBEXAddTime4ByteHeader(
2374 time4_byte: u32,
2375 dict_ref: Option<&CFMutableDictionary>,
2376 ) -> OBEXError;
2377}
2378
2379extern "C-unwind" {
2380 #[cfg(feature = "objc2-core-foundation")]
2390 pub fn OBEXAddLengthHeader(length: u32, dict_ref: Option<&CFMutableDictionary>) -> OBEXError;
2391}
2392
2393extern "C-unwind" {
2394 #[cfg(feature = "objc2-core-foundation")]
2404 pub fn OBEXAddTypeHeader(
2405 r#type: Option<&CFString>,
2406 dict_ref: Option<&CFMutableDictionary>,
2407 ) -> OBEXError;
2408}
2409
2410extern "C-unwind" {
2411 #[cfg(feature = "objc2-core-foundation")]
2421 pub fn OBEXAddTimeISOHeader(
2422 in_header_data: *const c_void,
2423 in_header_data_length: u32,
2424 dict_ref: Option<&CFMutableDictionary>,
2425 ) -> OBEXError;
2426}
2427
2428extern "C-unwind" {
2429 #[cfg(feature = "objc2-core-foundation")]
2441 pub fn OBEXAddTargetHeader(
2442 in_header_data: *const c_void,
2443 in_header_data_length: u32,
2444 dict_ref: Option<&CFMutableDictionary>,
2445 ) -> OBEXError;
2446}
2447
2448extern "C-unwind" {
2449 #[cfg(feature = "objc2-core-foundation")]
2461 pub fn OBEXAddHTTPHeader(
2462 in_header_data: *const c_void,
2463 in_header_data_length: u32,
2464 dict_ref: Option<&CFMutableDictionary>,
2465 ) -> OBEXError;
2466}
2467
2468#[cfg(feature = "objc2-core-foundation")]
2482#[inline]
2483pub unsafe extern "C-unwind" fn OBEXAddBodyHeader(
2484 in_header_data: *const c_void,
2485 in_header_data_length: u32,
2486 is_end_of_body: bool,
2487 dict_ref: Option<&CFMutableDictionary>,
2488) -> OBEXError {
2489 extern "C-unwind" {
2490 fn OBEXAddBodyHeader(
2491 in_header_data: *const c_void,
2492 in_header_data_length: u32,
2493 is_end_of_body: Boolean,
2494 dict_ref: Option<&CFMutableDictionary>,
2495 ) -> OBEXError;
2496 }
2497 unsafe {
2498 OBEXAddBodyHeader(
2499 in_header_data,
2500 in_header_data_length,
2501 is_end_of_body as _,
2502 dict_ref,
2503 )
2504 }
2505}
2506
2507extern "C-unwind" {
2508 #[cfg(feature = "objc2-core-foundation")]
2520 pub fn OBEXAddWhoHeader(
2521 in_header_data: *const c_void,
2522 in_header_data_length: u32,
2523 dict_ref: Option<&CFMutableDictionary>,
2524 ) -> OBEXError;
2525}
2526
2527extern "C-unwind" {
2528 #[cfg(feature = "objc2-core-foundation")]
2544 pub fn OBEXAddConnectionIDHeader(
2545 in_header_data: *const c_void,
2546 in_header_data_length: u32,
2547 dict_ref: Option<&CFMutableDictionary>,
2548 ) -> OBEXError;
2549}
2550
2551extern "C-unwind" {
2552 #[cfg(feature = "objc2-core-foundation")]
2564 pub fn OBEXAddApplicationParameterHeader(
2565 in_header_data: *const c_void,
2566 in_header_data_length: u32,
2567 dict_ref: Option<&CFMutableDictionary>,
2568 ) -> OBEXError;
2569}
2570
2571extern "C-unwind" {
2572 #[cfg(feature = "objc2-core-foundation")]
2600 pub fn OBEXAddByteSequenceHeader(
2601 in_header_data: *const c_void,
2602 in_header_data_length: u32,
2603 dict_ref: Option<&CFMutableDictionary>,
2604 ) -> OBEXError;
2605}
2606
2607extern "C-unwind" {
2608 #[cfg(feature = "objc2-core-foundation")]
2620 pub fn OBEXAddObjectClassHeader(
2621 in_header_data: *const c_void,
2622 in_header_data_length: u32,
2623 dict_ref: Option<&CFMutableDictionary>,
2624 ) -> OBEXError;
2625}
2626
2627extern "C-unwind" {
2628 #[cfg(feature = "objc2-core-foundation")]
2640 pub fn OBEXAddAuthorizationChallengeHeader(
2641 in_header_data: *const c_void,
2642 in_header_data_length: u32,
2643 dict_ref: Option<&CFMutableDictionary>,
2644 ) -> OBEXError;
2645}
2646
2647extern "C-unwind" {
2648 #[cfg(feature = "objc2-core-foundation")]
2660 pub fn OBEXAddAuthorizationResponseHeader(
2661 in_header_data: *const c_void,
2662 in_header_data_length: u32,
2663 dict_ref: Option<&CFMutableDictionary>,
2664 ) -> OBEXError;
2665}
2666
2667extern "C-unwind" {
2668 #[cfg(feature = "objc2-core-foundation")]
2680 pub fn OBEXAddUserDefinedHeader(
2681 in_header_data: *const c_void,
2682 in_header_data_length: u32,
2683 dict_ref: Option<&CFMutableDictionary>,
2684 ) -> OBEXError;
2685}