1use core::ffi::*;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9pub const kBluetoothLESMPTimeout: c_uint = 30;
11pub const kBluetoothLESMPMinEncryptionKeySize: c_uint = 7;
13pub const kBluetoothLESMPMaxEncryptionKeySize: c_uint = 16;
15pub const kInfoStringMaxLength: c_uint = 35;
17pub const kBluetoothHCIInquiryResultsMaxResults: c_uint = 50;
19pub const kMaxChannelIDPerSide: c_uint = 31;
21pub type BluetoothConnectionHandle = u16;
23
24pub type BluetoothLMPHandle = u8;
26
27pub const kBluetoothConnectionHandleNone: c_uint = 0xffff;
29
30pub type BluetoothReasonCode = u8;
32
33pub type BluetoothEncryptionEnable = u8;
35
36pub const kBluetoothEncryptionEnableOff: c_uint = 0x00;
38pub const kBluetoothEncryptionEnableOn: c_uint = 0x01;
40pub const kBluetoothEncryptionEnableBREDRE0: c_uint = 0x01;
42pub const kBluetoothEncryptionEnableLEAESCCM: c_uint = 0x01;
44pub const kBluetoothEncryptionEnableBREDRAESCCM: c_uint = 0x02;
46
47pub type BluetoothKeyFlag = u8;
49
50pub const kBluetoothKeyFlagSemiPermanent: c_uint = 0x00;
52pub const kBluetoothKeyFlagTemporary: c_uint = 0x01;
54
55pub type BluetoothKeyType = u8;
57
58pub const kBluetoothKeyTypeCombination: c_uint = 0x00;
60pub const kBluetoothKeyTypeLocalUnit: c_uint = 0x01;
62pub const kBluetoothKeyTypeRemoteUnit: c_uint = 0x02;
64pub const kBluetoothKeyTypeDebugCombination: c_uint = 0x03;
66pub const kBluetoothKeyTypeUnauthenticatedCombination: c_uint = 0x04;
68pub const kBluetoothKeyTypeAuthenticatedCombination: c_uint = 0x05;
70pub const kBluetoothKeyTypeChangedCombination: c_uint = 0x06;
72pub const kBluetoothKeyTypeUnauthenticatedCombinationP256: c_uint = 0x07;
74pub const kBluetoothKeyTypeAuthenticatedCombinationP256: c_uint = 0x08;
76
77pub type BluetoothPacketType = u16;
79
80pub const kBluetoothPacketTypeReserved1: c_uint = 0x0001;
82pub const kBluetoothPacketType2DH1Omit: c_uint = 0x0002;
84pub const kBluetoothPacketType3DH1Omit: c_uint = 0x0004;
86pub const kBluetoothPacketTypeDM1: c_uint = 0x0008;
88pub const kBluetoothPacketTypeDH1: c_uint = 0x0010;
90pub const kBluetoothPacketTypeHV1: c_uint = 0x0020;
92pub const kBluetoothPacketTypeHV2: c_uint = 0x0040;
94pub const kBluetoothPacketTypeHV3: c_uint = 0x0080;
96pub const kBluetoothPacketTypeDV: c_uint = 0x0100;
98pub const kBluetoothPacketType2DH3Omit: c_uint = 0x0100;
100pub const kBluetoothPacketType3DH3Omit: c_uint = 0x0200;
102pub const kBluetoothPacketTypeAUX: c_uint = 0x0200;
104pub const kBluetoothPacketTypeDM3: c_uint = 0x0400;
106pub const kBluetoothPacketTypeDH3: c_uint = 0x0800;
108pub const kBluetoothPacketType2DH5Omit: c_uint = 0x1000;
110pub const kBluetoothPacketType3DM5Omit: c_uint = 0x2000;
112pub const kBluetoothPacketTypeDM5: c_uint = 0x4000;
114pub const kBluetoothPacketTypeDH5: c_uint = 0x8000;
116pub const kBluetoothPacketTypeEnd: c_uint = 32769;
118
119pub const kBluetoothSynchronousConnectionPacketTypeNone: c_uint = 0x0000;
121pub const kBluetoothSynchronousConnectionPacketTypeHV1: c_uint = 0x0001;
123pub const kBluetoothSynchronousConnectionPacketTypeHV2: c_uint = 0x0002;
125pub const kBluetoothSynchronousConnectionPacketTypeHV3: c_uint = 0x0004;
127pub const kBluetoothSynchronousConnectionPacketTypeEV3: c_uint = 0x0008;
129pub const kBluetoothSynchronousConnectionPacketTypeEV4: c_uint = 0x0010;
131pub const kBluetoothSynchronousConnectionPacketTypeEV5: c_uint = 0x0020;
133pub const kBluetoothSynchronousConnectionPacketType2EV3Omit: c_uint = 0x0040;
135pub const kBluetoothSynchronousConnectionPacketType3EV3Omit: c_uint = 0x0080;
137pub const kBluetoothSynchronousConnectionPacketType2EV5Omit: c_uint = 0x0100;
139pub const kBluetoothSynchronousConnectionPacketType3EV5Omit: c_uint = 0x0200;
141pub const kBluetoothSynchronousConnectionPacketTypeFutureUse: c_uint = 0xFC00;
143pub const kBluetoothSynchronousConnectionPacketTypeAll: c_uint = 0xFFFF;
145pub const kBluetoothSynchronousConnectionPacketTypeEnd: c_uint = 65536;
147
148pub type BluetoothLAP = u32;
150
151pub const kBluetoothGeneralInquiryAccessCodeIndex: c_uint = 0;
153pub const kBluetoothGeneralInquiryAccessCodeLAPValue: c_uint = 0x9E8B33;
155pub const kBluetoothLimitedInquiryAccessCodeIndex: c_uint = 1;
157pub const kBluetoothLimitedInquiryAccessCodeLAPValue: c_uint = 0x9E8B00;
159pub const kBluetoothLimitedInquiryAccessCodeEnd: c_uint = 10390273;
161
162pub type BluetoothPageScanRepetitionMode = u8;
164
165pub const kBluetoothPageScanRepetitionModeR0: c_uint = 0x00;
167pub const kBluetoothPageScanRepetitionModeR1: c_uint = 0x01;
169pub const kBluetoothPageScanRepetitionModeR2: c_uint = 0x02;
171
172pub type BluetoothPageScanPeriodMode = u8;
174
175pub const kBluetoothPageScanPeriodModeP0: c_uint = 0x00;
177pub const kBluetoothPageScanPeriodModeP1: c_uint = 0x01;
179pub const kBluetoothPageScanPeriodModeP2: c_uint = 0x02;
181
182pub type BluetoothPageScanMode = u8;
184
185pub const kBluetoothPageScanModeMandatory: c_uint = 0x00;
187pub const kBluetoothPageScanModeOptional1: c_uint = 0x01;
189pub const kBluetoothPageScanModeOptional2: c_uint = 0x02;
191pub const kBluetoothPageScanModeOptional3: c_uint = 0x03;
193
194pub type BluetoothHCIPageScanType = u8;
196
197#[repr(transparent)]
199#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
200pub struct BluetoothHCIPageScanTypes(pub c_uint);
201impl BluetoothHCIPageScanTypes {
202 #[doc(alias = "kBluetoothHCIPageScanTypeStandard")]
203 pub const Standard: Self = Self(0x00);
204 #[doc(alias = "kBluetoothHCIPageScanTypeInterlaced")]
205 pub const Interlaced: Self = Self(0x01);
206 #[doc(alias = "kBluetoothHCIPageScanTypeReservedStart")]
207 pub const ReservedStart: Self = Self(0x02);
208 #[doc(alias = "kBluetoothHCIPageScanTypeReservedEnd")]
209 pub const ReservedEnd: Self = Self(0xFF);
210}
211
212#[cfg(feature = "objc2")]
213unsafe impl Encode for BluetoothHCIPageScanTypes {
214 const ENCODING: Encoding = c_uint::ENCODING;
215}
216
217#[cfg(feature = "objc2")]
218unsafe impl RefEncode for BluetoothHCIPageScanTypes {
219 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
220}
221
222pub type BluetoothHCIErroneousDataReporting = u8;
224
225pub const kBluetoothHCIErroneousDataReportingDisabled: c_uint = 0x00;
227pub const kBluetoothHCIErroneousDataReportingEnabled: c_uint = 0x01;
229pub const kBluetoothHCIErroneousDataReportingReservedStart: c_uint = 0x02;
231pub const kBluetoothHCIErroneousDataReportingReservedEnd: c_uint = 0xFF;
233
234#[repr(C)]
236#[derive(Clone, Copy, Debug, PartialEq)]
237pub struct BluetoothDeviceAddress {
238 pub data: [u8; 6],
239}
240
241#[cfg(feature = "objc2")]
242unsafe impl Encode for BluetoothDeviceAddress {
243 const ENCODING: Encoding = Encoding::Struct("BluetoothDeviceAddress", &[<[u8; 6]>::ENCODING]);
244}
245
246#[cfg(feature = "objc2")]
247unsafe impl RefEncode for BluetoothDeviceAddress {
248 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
249}
250
251#[repr(C)]
253#[derive(Clone, Copy, Debug, PartialEq)]
254pub struct BluetoothKey {
255 pub data: [u8; 16],
256}
257
258#[cfg(feature = "objc2")]
259unsafe impl Encode for BluetoothKey {
260 const ENCODING: Encoding = Encoding::Struct("BluetoothKey", &[<[u8; 16]>::ENCODING]);
261}
262
263#[cfg(feature = "objc2")]
264unsafe impl RefEncode for BluetoothKey {
265 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
266}
267
268#[repr(C)]
270#[derive(Clone, Copy, Debug, PartialEq)]
271pub struct BluetoothIRK {
272 pub data: [u8; 16],
273}
274
275#[cfg(feature = "objc2")]
276unsafe impl Encode for BluetoothIRK {
277 const ENCODING: Encoding = Encoding::Struct("BluetoothIRK", &[<[u8; 16]>::ENCODING]);
278}
279
280#[cfg(feature = "objc2")]
281unsafe impl RefEncode for BluetoothIRK {
282 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
283}
284
285#[repr(C)]
287#[derive(Clone, Copy, Debug, PartialEq)]
288pub struct BluetoothPINCode {
289 pub data: [u8; 16],
290}
291
292#[cfg(feature = "objc2")]
293unsafe impl Encode for BluetoothPINCode {
294 const ENCODING: Encoding = Encoding::Struct("BluetoothPINCode", &[<[u8; 16]>::ENCODING]);
295}
296
297#[cfg(feature = "objc2")]
298unsafe impl RefEncode for BluetoothPINCode {
299 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
300}
301
302pub type BluetoothClassOfDevice = u32;
304
305pub type BluetoothServiceClassMajor = u32;
309
310pub type BluetoothDeviceClassMajor = u32;
314
315pub type BluetoothDeviceClassMinor = u32;
319
320pub const kBluetoothDeviceNameMaxLength: c_uint = 248;
322
323pub type BluetoothClockOffset = u16;
325
326pub type BluetoothRole = u8;
328
329pub type BluetoothAllowRoleSwitch = u8;
331
332pub const kBluetoothDontAllowRoleSwitch: c_uint = 0x00;
334pub const kBluetoothAllowRoleSwitch: c_uint = 0x01;
336
337pub const kBluetoothRoleBecomeCentral: c_uint = 0x00;
339pub const kBluetoothRoleRemainPeripheral: c_uint = 0x01;
341pub const kBluetoothRoleBecomeMaster: c_uint = kBluetoothRoleBecomeCentral;
343pub const kBluetoothRoleRemainSlave: c_uint = kBluetoothRoleRemainPeripheral;
345
346#[repr(C)]
348#[derive(Clone, Copy, Debug, PartialEq)]
349pub struct BluetoothSetEventMask {
350 pub data: [u8; 8],
351}
352
353#[cfg(feature = "objc2")]
354unsafe impl Encode for BluetoothSetEventMask {
355 const ENCODING: Encoding = Encoding::Struct("BluetoothSetEventMask", &[<[u8; 8]>::ENCODING]);
356}
357
358#[cfg(feature = "objc2")]
359unsafe impl RefEncode for BluetoothSetEventMask {
360 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
361}
362
363pub type BluetoothPINType = u8;
365
366pub const kBluetoothL2CAPMaxPacketSize: c_uint = 65535;
368pub const kBluetoothACLLogicalChannelReserved: c_uint = 0;
370pub const kBluetoothACLLogicalChannelL2CAPContinue: c_uint = 1;
372pub const kBluetoothACLLogicalChannelL2CAPStart: c_uint = 2;
374pub const kBluetoothACLLogicalChannelLMP: c_uint = 3;
376
377pub type BluetoothL2CAPChannelID = u16;
379
380pub const kBluetoothL2CAPChannelNull: c_uint = 0x0000;
382pub const kBluetoothL2CAPChannelSignalling: c_uint = 0x0001;
384pub const kBluetoothL2CAPChannelConnectionLessData: c_uint = 0x0002;
386pub const kBluetoothL2CAPChannelAMPManagerProtocol: c_uint = 0x0003;
388pub const kBluetoothL2CAPChannelAttributeProtocol: c_uint = 0x0004;
390pub const kBluetoothL2CAPChannelLESignalling: c_uint = 0x0005;
392pub const kBluetoothL2CAPChannelSecurityManager: c_uint = 0x0006;
394pub const kBluetoothL2CAPChannelBREDRSecurityManager: c_uint = 0x0007;
396pub const kBluetoothL2CAPChannelReservedStart: c_uint = 0x0008;
398pub const kBluetoothL2CAPChannelLEAP: c_uint = 0x002A;
400pub const kBluetoothL2CAPChannelLEAS: c_uint = 0x002B;
402pub const kBluetoothL2CAPChannelMagicPairing: c_uint = 0x0030;
404pub const kBluetoothL2CAPChannelMagnet: c_uint = 0x003A;
406pub const kBluetoothL2CAPChannelReservedEnd: c_uint = 0x003E;
408pub const kBluetoothL2CAPChannelAMPTestManager: c_uint = 0x003F;
410pub const kBluetoothL2CAPChannelDynamicStart: c_uint = 0x0040;
412pub const kBluetoothL2CAPChannelDynamicEnd: c_uint = 0xffff;
414pub const kBluetoothL2CAPChannelEnd: c_uint = 0xffff;
416
417pub type BluetoothL2CAPGroupID = BluetoothL2CAPChannelID;
419
420pub type BluetoothL2CAPPSM = u16;
422
423#[repr(transparent)]
425#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
426pub struct BluetoothL2CAPCommandCode(pub c_uint);
427impl BluetoothL2CAPCommandCode {
428 #[doc(alias = "kBluetoothL2CAPCommandCodeReserved")]
429 pub const Reserved: Self = Self(0x00);
430 #[doc(alias = "kBluetoothL2CAPCommandCodeCommandReject")]
431 pub const CommandReject: Self = Self(0x01);
432 #[doc(alias = "kBluetoothL2CAPCommandCodeConnectionRequest")]
433 pub const ConnectionRequest: Self = Self(0x02);
434 #[doc(alias = "kBluetoothL2CAPCommandCodeConnectionResponse")]
435 pub const ConnectionResponse: Self = Self(0x03);
436 #[doc(alias = "kBluetoothL2CAPCommandCodeConfigureRequest")]
437 pub const ConfigureRequest: Self = Self(0x04);
438 #[doc(alias = "kBluetoothL2CAPCommandCodeConfigureResponse")]
439 pub const ConfigureResponse: Self = Self(0x05);
440 #[doc(alias = "kBluetoothL2CAPCommandCodeDisconnectionRequest")]
441 pub const DisconnectionRequest: Self = Self(0x06);
442 #[doc(alias = "kBluetoothL2CAPCommandCodeDisconnectionResponse")]
443 pub const DisconnectionResponse: Self = Self(0x07);
444 #[doc(alias = "kBluetoothL2CAPCommandCodeEchoRequest")]
445 pub const EchoRequest: Self = Self(0x08);
446 #[doc(alias = "kBluetoothL2CAPCommandCodeEchoResponse")]
447 pub const EchoResponse: Self = Self(0x09);
448 #[doc(alias = "kBluetoothL2CAPCommandCodeInformationRequest")]
449 pub const InformationRequest: Self = Self(0x0A);
450 #[doc(alias = "kBluetoothL2CAPCommandCodeInformationResponse")]
451 pub const InformationResponse: Self = Self(0x0B);
452 #[doc(alias = "kBluetoothL2CAPCommandCodeCreateChannelRequest")]
453 pub const CreateChannelRequest: Self = Self(0x0C);
454 #[doc(alias = "kBluetoothL2CAPCommandCodeCreateChannelResponse")]
455 pub const CreateChannelResponse: Self = Self(0x0D);
456 #[doc(alias = "kBluetoothL2CAPCommandCodeMoveChannelRequest")]
457 pub const MoveChannelRequest: Self = Self(0x0E);
458 #[doc(alias = "kBluetoothL2CAPCommandCodeMoveChannelResponse")]
459 pub const MoveChannelResponse: Self = Self(0x0F);
460 #[doc(alias = "kBluetoothL2CAPCommandCodeMoveChannelConfirmation")]
461 pub const MoveChannelConfirmation: Self = Self(0x10);
462 #[doc(alias = "kBluetoothL2CAPCommandCodeMoveChannelConfirmationResponse")]
463 pub const MoveChannelConfirmationResponse: Self = Self(0x11);
464 #[doc(alias = "kBluetoothL2CAPCommandCodeConnectionParameterUpdateRequest")]
465 pub const ConnectionParameterUpdateRequest: Self = Self(0x12);
466 #[doc(alias = "kBluetoothL2CAPCommandCodeConnectionParameterUpdateResponse")]
467 pub const ConnectionParameterUpdateResponse: Self = Self(0x13);
468 #[doc(alias = "kBluetoothL2CAPCommandCodeLECreditBasedConnectionRequest")]
469 pub const LECreditBasedConnectionRequest: Self = Self(0x14);
470 #[doc(alias = "kBluetoothL2CAPCommandCodeLECreditBasedConnectionResponse")]
471 pub const LECreditBasedConnectionResponse: Self = Self(0x15);
472 #[doc(alias = "kBluetoothL2CAPCommandCodeLEFlowControlCredit")]
473 pub const LEFlowControlCredit: Self = Self(0x16);
474}
475
476#[cfg(feature = "objc2")]
477unsafe impl Encode for BluetoothL2CAPCommandCode {
478 const ENCODING: Encoding = c_uint::ENCODING;
479}
480
481#[cfg(feature = "objc2")]
482unsafe impl RefEncode for BluetoothL2CAPCommandCode {
483 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
484}
485
486#[repr(transparent)]
488#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
489pub struct BluetoothL2CAPCommandRejectReason(pub c_uint);
490impl BluetoothL2CAPCommandRejectReason {
491 #[doc(alias = "kBluetoothL2CAPCommandRejectReasonCommandNotUnderstood")]
492 pub const CommandNotUnderstood: Self = Self(0x0000);
493 #[doc(alias = "kBluetoothL2CAPCommandRejectReasonSignallingMTUExceeded")]
494 pub const SignallingMTUExceeded: Self = Self(0x0001);
495 #[doc(alias = "kBluetoothL2CAPCommandRejectReasonInvalidCIDInRequest")]
496 pub const InvalidCIDInRequest: Self = Self(0x0002);
497}
498
499#[cfg(feature = "objc2")]
500unsafe impl Encode for BluetoothL2CAPCommandRejectReason {
501 const ENCODING: Encoding = c_uint::ENCODING;
502}
503
504#[cfg(feature = "objc2")]
505unsafe impl RefEncode for BluetoothL2CAPCommandRejectReason {
506 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
507}
508
509pub type BluetoothL2CAPMTU = u16;
511
512pub type BluetoothL2CAPLinkTimeout = u16;
514
515pub type BluetoothL2CAPFlushTimeout = u16;
517
518pub const kBluetoothL2CAPFlushTimeoutUseExisting: c_uint = 0x0000;
520pub const kBluetoothL2CAPFlushTimeoutImmediate: c_uint = 0x0001;
522pub const kBluetoothL2CAPFlushTimeoutForever: c_uint = 0xFFFF;
524pub const kBluetoothL2CAPFlushTimeoutEnd: c_uint = 65536;
526
527#[repr(C)]
529#[derive(Clone, Copy, Debug, PartialEq)]
530pub struct BluetoothL2CAPQualityOfServiceOptions {
531 pub flags: u8,
532 pub serviceType: u8,
533 pub tokenRate: u32,
534 pub tokenBucketSize: u32,
535 pub peakBandwidth: u32,
536 pub latency: u32,
537 pub delayVariation: u32,
538}
539
540#[cfg(feature = "objc2")]
541unsafe impl Encode for BluetoothL2CAPQualityOfServiceOptions {
542 const ENCODING: Encoding = Encoding::Struct(
543 "BluetoothL2CAPQualityOfServiceOptions",
544 &[
545 <u8>::ENCODING,
546 <u8>::ENCODING,
547 <u32>::ENCODING,
548 <u32>::ENCODING,
549 <u32>::ENCODING,
550 <u32>::ENCODING,
551 <u32>::ENCODING,
552 ],
553 );
554}
555
556#[cfg(feature = "objc2")]
557unsafe impl RefEncode for BluetoothL2CAPQualityOfServiceOptions {
558 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
559}
560
561#[repr(C)]
563#[derive(Clone, Copy, Debug, PartialEq)]
564pub struct BluetoothL2CAPRetransmissionAndFlowControlOptions {
565 pub flags: u8,
566 pub txWindowSize: u8,
567 pub maxTransmit: u8,
568 pub retransmissionTimeout: u16,
569 pub monitorTimeout: u16,
570 pub maxPDUPayloadSize: u16,
571}
572
573#[cfg(feature = "objc2")]
574unsafe impl Encode for BluetoothL2CAPRetransmissionAndFlowControlOptions {
575 const ENCODING: Encoding = Encoding::Struct(
576 "BluetoothL2CAPRetransmissionAndFlowControlOptions",
577 &[
578 <u8>::ENCODING,
579 <u8>::ENCODING,
580 <u8>::ENCODING,
581 <u16>::ENCODING,
582 <u16>::ENCODING,
583 <u16>::ENCODING,
584 ],
585 );
586}
587
588#[cfg(feature = "objc2")]
589unsafe impl RefEncode for BluetoothL2CAPRetransmissionAndFlowControlOptions {
590 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
591}
592
593#[repr(transparent)]
595#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
596pub struct BluetoothL2CAPSegmentationAndReassembly(pub c_uint);
597impl BluetoothL2CAPSegmentationAndReassembly {
598 #[doc(alias = "kBluetoothL2CAPSegmentationAndReassemblyUnsegmentedSDU")]
599 pub const UnsegmentedSDU: Self = Self(0x00);
600 #[doc(alias = "kBluetoothL2CAPSegmentationAndReassemblyStartOfSDU")]
601 pub const StartOfSDU: Self = Self(0x01);
602 #[doc(alias = "kBluetoothL2CAPSegmentationAndReassemblyEndOfSDU")]
603 pub const EndOfSDU: Self = Self(0x02);
604 #[doc(alias = "kBluetoothL2CAPSegmentationAndReassemblyContinuationOfSDU")]
605 pub const ContinuationOfSDU: Self = Self(0x03);
606}
607
608#[cfg(feature = "objc2")]
609unsafe impl Encode for BluetoothL2CAPSegmentationAndReassembly {
610 const ENCODING: Encoding = c_uint::ENCODING;
611}
612
613#[cfg(feature = "objc2")]
614unsafe impl RefEncode for BluetoothL2CAPSegmentationAndReassembly {
615 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
616}
617
618pub const kBluetoothL2CAPInfoTypeMaxConnectionlessMTUSize: c_uint = 0x0001;
620
621pub const kBluetoothL2CAPPacketHeaderSize: c_uint = 4;
623
624pub type BluetoothL2CAPByteCount = u16;
626
627pub type BluetoothL2CAPCommandID = u8;
629
630pub type BluetoothL2CAPCommandByteCount = u16;
632
633#[repr(transparent)]
635#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
636pub struct BluetoothL2CAPConnectionResult(pub c_uint);
637impl BluetoothL2CAPConnectionResult {
638 #[doc(alias = "kBluetoothL2CAPConnectionResultSuccessful")]
639 pub const Successful: Self = Self(0x0000);
640 #[doc(alias = "kBluetoothL2CAPConnectionResultPending")]
641 pub const Pending: Self = Self(0x0001);
642 #[doc(alias = "kBluetoothL2CAPConnectionResultRefusedPSMNotSupported")]
643 pub const RefusedPSMNotSupported: Self = Self(0x0002);
644 #[doc(alias = "kBluetoothL2CAPConnectionResultRefusedSecurityBlock")]
645 pub const RefusedSecurityBlock: Self = Self(0x0003);
646 #[doc(alias = "kBluetoothL2CAPConnectionResultRefusedNoResources")]
647 pub const RefusedNoResources: Self = Self(0x0004);
648 #[doc(alias = "kBluetoothL2CAPConnectionResultRefusedReserved")]
649 pub const RefusedReserved: Self = Self(0x0005);
650 #[doc(alias = "kBluetoothL2CAPConnectionResultRefusedInvalidSourceCID")]
651 pub const RefusedInvalidSourceCID: Self = Self(0x0006);
652 #[doc(alias = "kBluetoothL2CAPConnectionResultRefusedSourceCIDAlreadyAllocated")]
653 pub const RefusedSourceCIDAlreadyAllocated: Self = Self(0x0007);
654}
655
656#[cfg(feature = "objc2")]
657unsafe impl Encode for BluetoothL2CAPConnectionResult {
658 const ENCODING: Encoding = c_uint::ENCODING;
659}
660
661#[cfg(feature = "objc2")]
662unsafe impl RefEncode for BluetoothL2CAPConnectionResult {
663 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
664}
665
666#[repr(transparent)]
668#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
669pub struct BluetoothL2CAPConnectionStatus(pub c_uint);
670impl BluetoothL2CAPConnectionStatus {
671 #[doc(alias = "kBluetoothL2CAPConnectionStatusNoInfoAvailable")]
672 pub const NoInfoAvailable: Self = Self(0x0000);
673 #[doc(alias = "kBluetoothL2CAPConnectionStatusAuthenticationPending")]
674 pub const AuthenticationPending: Self = Self(0x0001);
675 #[doc(alias = "kBluetoothL2CAPConnectionStatusAuthorizationPending")]
676 pub const AuthorizationPending: Self = Self(0x0002);
677}
678
679#[cfg(feature = "objc2")]
680unsafe impl Encode for BluetoothL2CAPConnectionStatus {
681 const ENCODING: Encoding = c_uint::ENCODING;
682}
683
684#[cfg(feature = "objc2")]
685unsafe impl RefEncode for BluetoothL2CAPConnectionStatus {
686 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
687}
688
689#[repr(transparent)]
691#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
692pub struct BluetoothL2CAPConfigurationResult(pub c_uint);
693impl BluetoothL2CAPConfigurationResult {
694 #[doc(alias = "kBluetoothL2CAPConfigurationResultSuccess")]
695 pub const Success: Self = Self(0x0000);
696 #[doc(alias = "kBluetoothL2CAPConfigurationResultUnacceptableParams")]
697 pub const UnacceptableParams: Self = Self(0x0001);
698 #[doc(alias = "kBluetoothL2CAPConfigurationResultRejected")]
699 pub const Rejected: Self = Self(0x0002);
700 #[doc(alias = "kBluetoothL2CAPConfigurationResultUnknownOptions")]
701 pub const UnknownOptions: Self = Self(0x0003);
702}
703
704#[cfg(feature = "objc2")]
705unsafe impl Encode for BluetoothL2CAPConfigurationResult {
706 const ENCODING: Encoding = c_uint::ENCODING;
707}
708
709#[cfg(feature = "objc2")]
710unsafe impl RefEncode for BluetoothL2CAPConfigurationResult {
711 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
712}
713
714#[repr(transparent)]
716#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
717pub struct BluetoothL2CAPConfigurationOption(pub c_uint);
718impl BluetoothL2CAPConfigurationOption {
719 #[doc(alias = "kBluetoothL2CAPConfigurationOptionMTU")]
720 pub const MTU: Self = Self(0x01);
721 #[doc(alias = "kBluetoothL2CAPConfigurationOptionFlushTimeout")]
722 pub const FlushTimeout: Self = Self(0x02);
723 #[doc(alias = "kBluetoothL2CAPConfigurationOptionQoS")]
724 pub const QoS: Self = Self(0x03);
725 #[doc(alias = "kBluetoothL2CAPConfigurationOptionRetransmissionAndFlowControl")]
726 pub const RetransmissionAndFlowControl: Self = Self(0x04);
727 #[doc(alias = "kBluetoothL2CAPConfigurationOptionFrameCheckSequence")]
728 pub const FrameCheckSequence: Self = Self(0x05);
729 #[doc(alias = "kBluetoothL2CAPConfigurationOptionExtendedFlowSpecification")]
730 pub const ExtendedFlowSpecification: Self = Self(0x06);
731 #[doc(alias = "kBluetoothL2CAPConfigurationOptionExtendedWindowSize")]
732 pub const ExtendedWindowSize: Self = Self(0x07);
733}
734
735#[cfg(feature = "objc2")]
736unsafe impl Encode for BluetoothL2CAPConfigurationOption {
737 const ENCODING: Encoding = c_uint::ENCODING;
738}
739
740#[cfg(feature = "objc2")]
741unsafe impl RefEncode for BluetoothL2CAPConfigurationOption {
742 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
743}
744
745pub const kBluetoothL2CAPConfigurationOptionMTULength: c_uint = 2;
747pub const kBluetoothL2CAPConfigurationOptionFlushTimeoutLength: c_uint = 2;
749pub const kBluetoothL2CAPConfigurationOptionQoSLength: c_uint = 22;
751pub const kBluetoothL2CAPConfigurationOptionRetransmissionAndFlowControlLength: c_uint = 9;
753
754#[repr(transparent)]
756#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
757pub struct BluetoothL2CAPConfigurationRetransmissionAndFlowControlFlags(pub c_uint);
758impl BluetoothL2CAPConfigurationRetransmissionAndFlowControlFlags {
759 #[doc(alias = "kBluetoothL2CAPConfigurationBasicL2CAPModeFlag")]
760 pub const BasicL2CAPModeFlag: Self = Self(0x00);
761 #[doc(alias = "kBluetoothL2CAPConfigurationRetransmissionModeFlag")]
762 pub const RetransmissionModeFlag: Self = Self(0x01);
763 #[doc(alias = "kBluetoothL2CAPConfigurationFlowControlModeFlag")]
764 pub const FlowControlModeFlag: Self = Self(0x02);
765 #[doc(alias = "kBluetoothL2CAPConfigurationEnhancedRetransmissionMode")]
766 pub const EnhancedRetransmissionMode: Self = Self(0x03);
767 #[doc(alias = "kBluetoothL2CAPConfigurationStreamingMode")]
768 pub const StreamingMode: Self = Self(0x04);
769}
770
771#[cfg(feature = "objc2")]
772unsafe impl Encode for BluetoothL2CAPConfigurationRetransmissionAndFlowControlFlags {
773 const ENCODING: Encoding = c_uint::ENCODING;
774}
775
776#[cfg(feature = "objc2")]
777unsafe impl RefEncode for BluetoothL2CAPConfigurationRetransmissionAndFlowControlFlags {
778 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
779}
780
781#[repr(transparent)]
783#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
784pub struct BluetoothL2CAPInformationType(pub c_uint);
785impl BluetoothL2CAPInformationType {
786 #[doc(alias = "kBluetoothL2CAPInformationTypeConnectionlessMTU")]
787 pub const ConnectionlessMTU: Self = Self(0x0001);
788 #[doc(alias = "kBluetoothL2CAPInformationTypeExtendedFeatures")]
789 pub const ExtendedFeatures: Self = Self(0x0002);
790 #[doc(alias = "kBluetoothL2CAPInformationTypeFixedChannelsSupported")]
791 pub const FixedChannelsSupported: Self = Self(0x0003);
792}
793
794#[cfg(feature = "objc2")]
795unsafe impl Encode for BluetoothL2CAPInformationType {
796 const ENCODING: Encoding = c_uint::ENCODING;
797}
798
799#[cfg(feature = "objc2")]
800unsafe impl RefEncode for BluetoothL2CAPInformationType {
801 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
802}
803
804#[repr(transparent)]
806#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
807pub struct BluetoothL2CAPInformationResult(pub c_uint);
808impl BluetoothL2CAPInformationResult {
809 #[doc(alias = "kBluetoothL2CAPInformationResultSuccess")]
810 pub const Success: Self = Self(0x0000);
811 #[doc(alias = "kBluetoothL2CAPInformationResultNotSupported")]
812 pub const NotSupported: Self = Self(0x0001);
813}
814
815#[cfg(feature = "objc2")]
816unsafe impl Encode for BluetoothL2CAPInformationResult {
817 const ENCODING: Encoding = c_uint::ENCODING;
818}
819
820#[cfg(feature = "objc2")]
821unsafe impl RefEncode for BluetoothL2CAPInformationResult {
822 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
823}
824
825#[repr(transparent)]
827#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
828pub struct BluetoothL2CAPInformationExtendedFeaturesMask(pub c_uint);
829impl BluetoothL2CAPInformationExtendedFeaturesMask {
830 #[doc(alias = "kBluetoothL2CAPInformationNoExtendedFeatures")]
831 pub const InformationNoExtendedFeatures: Self = Self(0x00000000);
832 #[doc(alias = "kBluetoothL2CAPInformationFlowControlMode")]
833 pub const InformationFlowControlMode: Self = Self(0x00000001);
834 #[doc(alias = "kBluetoothL2CAPInformationRetransmissionMode")]
835 pub const InformationRetransmissionMode: Self = Self(0x00000002);
836 #[doc(alias = "kBluetoothL2CAPInformationBidirectionalQoS")]
837 pub const InformationBidirectionalQoS: Self = Self(0x00000004);
838 #[doc(alias = "kBluetoothL2CAPInformationEnhancedRetransmissionMode")]
839 pub const InformationEnhancedRetransmissionMode: Self = Self(0x00000008);
840 #[doc(alias = "kBluetoothL2CAPInformationStreamingMode")]
841 pub const InformationStreamingMode: Self = Self(0x00000010);
842 #[doc(alias = "kBluetoothL2CAPInformationFCSOption")]
843 pub const InformationFCSOption: Self = Self(0x00000020);
844 #[doc(alias = "kBluetoothL2CAPInformationExtendedFlowSpecification")]
845 pub const InformationExtendedFlowSpecification: Self = Self(0x00000040);
846 #[doc(alias = "kBluetoothL2CAPInformationFixedChannels")]
847 pub const InformationFixedChannels: Self = Self(0x00000080);
848 #[doc(alias = "kBluetoothL2CAPInformationExtendedWindowSize")]
849 pub const InformationExtendedWindowSize: Self = Self(0x00000100);
850 #[doc(alias = "kBluetoothL2CAPUnicastConnectionlessDataReception")]
851 pub const UnicastConnectionlessDataReception: Self = Self(0x00000200);
852}
853
854#[cfg(feature = "objc2")]
855unsafe impl Encode for BluetoothL2CAPInformationExtendedFeaturesMask {
856 const ENCODING: Encoding = c_uint::ENCODING;
857}
858
859#[cfg(feature = "objc2")]
860unsafe impl RefEncode for BluetoothL2CAPInformationExtendedFeaturesMask {
861 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
862}
863
864#[repr(transparent)]
866#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
867pub struct BluetoothL2CAPQoSType(pub c_uint);
868impl BluetoothL2CAPQoSType {
869 #[doc(alias = "kBluetoothL2CAPQoSTypeNoTraffic")]
870 pub const NoTraffic: Self = Self(0x00);
871 #[doc(alias = "kBluetoothL2CAPQoSTypeBestEffort")]
872 pub const BestEffort: Self = Self(0x01);
873 #[doc(alias = "kBluetoothL2CAPQoSTypeGuaranteed")]
874 pub const Guaranteed: Self = Self(0x02);
875}
876
877#[cfg(feature = "objc2")]
878unsafe impl Encode for BluetoothL2CAPQoSType {
879 const ENCODING: Encoding = c_uint::ENCODING;
880}
881
882#[cfg(feature = "objc2")]
883unsafe impl RefEncode for BluetoothL2CAPQoSType {
884 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
885}
886
887#[repr(transparent)]
889#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
890pub struct BluetoothL2CAPSupervisoryFuctionType(pub c_uint);
891impl BluetoothL2CAPSupervisoryFuctionType {
892 #[doc(alias = "kBluetoothL2CAPSupervisoryFuctionTypeReceiverReady")]
893 pub const ReceiverReady: Self = Self(0x0);
894 #[doc(alias = "kBluetoothL2CAPSupervisoryFuctionTypeReject")]
895 pub const Reject: Self = Self(0x1);
896 #[doc(alias = "kBluetoothL2CAPSupervisoryFuctionTypeReceiverNotReady")]
897 pub const ReceiverNotReady: Self = Self(0x2);
898 #[doc(alias = "kBluetoothL2CAPSupervisoryFuctionTypeSelectiveReject")]
899 pub const SelectiveReject: Self = Self(0x3);
900}
901
902#[cfg(feature = "objc2")]
903unsafe impl Encode for BluetoothL2CAPSupervisoryFuctionType {
904 const ENCODING: Encoding = c_uint::ENCODING;
905}
906
907#[cfg(feature = "objc2")]
908unsafe impl RefEncode for BluetoothL2CAPSupervisoryFuctionType {
909 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
910}
911
912pub const kBluetoothLETXTimeMin: c_uint = 0x0148;
914pub const kBluetoothLETXTimeDefault: c_uint = 0x0148;
916pub const kBluetoothLETXTimeMax: c_uint = 0x0848;
918pub const kBluetoothLETXOctetsMin: c_uint = 0x001b;
920pub const kBluetoothLETXOctetsDefault: c_uint = 0x001b;
922pub const kBluetoothLETXOctetsMax: c_uint = 0x00fb;
924
925pub const kBluetoothL2CAPMTULowEnergyDefault: c_uint = kBluetoothLETXOctetsMin;
927pub const kBluetoothL2CAPMTULowEnergyMax: c_uint = kBluetoothLETXOctetsMax;
929pub const kBluetoothL2CAPMTUMinimum: c_uint = 0x0030;
931pub const kBluetoothL2CAPMTUDefault: c_uint = 0x03F9;
933pub const kBluetoothL2CAPMTUMaximum: c_uint = 0xffff;
935pub const kBluetoothL2CAPMTUStart: c_uint = 0x7fff;
937pub const kBluetoothL2CAPMTUSIG: c_uint = 0x0030;
939pub const kBluetoothL2CAPFlushTimeoutDefault: c_uint = kBluetoothL2CAPFlushTimeoutForever;
941pub const kBluetoothL2CAPQoSFlagsDefault: c_uint = 0;
943pub const kBluetoothL2CAPQoSTypeDefault: c_uint = BluetoothL2CAPQoSType::BestEffort.0;
945pub const kBluetoothL2CAPQoSTokenRateDefault: c_uint = 0x00000000;
947pub const kBluetoothL2CAPQoSTokenBucketSizeDefault: c_uint = 0x00000000;
949pub const kBluetoothL2CAPQoSPeakBandwidthDefault: c_uint = 0x00000000;
951pub const kBluetoothL2CAPQoSLatencyDefault: c_uint = 0xffffffff;
953pub const kBluetoothL2CAPQoSDelayVariationDefault: c_uint = 0xffffffff;
955
956pub const kBluetoothLEMaxTXTimeMin: c_uint = 0x0148;
958pub const kBluetoothLEMaxTXTimeDefault: c_uint = kBluetoothL2CAPMTULowEnergyDefault;
960pub const kBluetoothLEMaxTXTimeMax: c_uint = 0x0848;
962pub const kBluetoothLEMaxTXOctetsMin: c_uint = 0x001b;
964pub const kBluetoothLEMaxTXOctetsDefault: c_uint = 0x0080;
966pub const kBluetoothLEMaxTXOctetsMax: c_uint = 0x00fb;
968
969#[repr(transparent)]
971#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
972pub struct BluetoothLESecurityManagerKeyDistributionFormat(pub c_uint);
973impl BluetoothLESecurityManagerKeyDistributionFormat {
974 #[doc(alias = "kBluetoothLESecurityManagerEncryptionKey")]
975 pub const EncryptionKey: Self = Self(1 << 0);
976 #[doc(alias = "kBluetoothLESecurityManagerIDKey")]
977 pub const IDKey: Self = Self(1 << 1);
978 #[doc(alias = "kBluetoothLESecurityManagerSignKey")]
979 pub const SignKey: Self = Self(1 << 2);
980 #[doc(alias = "kBluetoothLESecurityManagerLinkKey")]
981 pub const LinkKey: Self = Self(1 << 3);
982}
983
984#[cfg(feature = "objc2")]
985unsafe impl Encode for BluetoothLESecurityManagerKeyDistributionFormat {
986 const ENCODING: Encoding = c_uint::ENCODING;
987}
988
989#[cfg(feature = "objc2")]
990unsafe impl RefEncode for BluetoothLESecurityManagerKeyDistributionFormat {
991 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
992}
993
994#[repr(transparent)]
996#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
997pub struct BluetoothLESecurityManagerCommandCode(pub c_uint);
998impl BluetoothLESecurityManagerCommandCode {
999 #[doc(alias = "kBluetoothLESecurityManagerCommandCodeReserved")]
1000 pub const Reserved: Self = Self(0x00);
1001 #[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingRequest")]
1002 pub const PairingRequest: Self = Self(0x01);
1003 #[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingResponse")]
1004 pub const PairingResponse: Self = Self(0x02);
1005 #[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingConfirm")]
1006 pub const PairingConfirm: Self = Self(0x03);
1007 #[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingRandom")]
1008 pub const PairingRandom: Self = Self(0x04);
1009 #[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingFailed")]
1010 pub const PairingFailed: Self = Self(0x05);
1011 #[doc(alias = "kBluetoothLESecurityManagerCommandCodeEncryptionInfo")]
1012 pub const EncryptionInfo: Self = Self(0x06);
1013 #[doc(alias = "kBluetoothLESecurityManagerCommandCodeMasterIdentification")]
1014 pub const MasterIdentification: Self = Self(0x07);
1015 #[doc(alias = "kBluetoothLESecurityManagerCommandCodeIdentityInfo")]
1016 pub const IdentityInfo: Self = Self(0x08);
1017 #[doc(alias = "kBluetoothLESecurityManagerCommandCodeIdentityAddressInfo")]
1018 pub const IdentityAddressInfo: Self = Self(0x09);
1019 #[doc(alias = "kBluetoothLESecurityManagerCommandCodeSigningInfo")]
1020 pub const SigningInfo: Self = Self(0x0A);
1021 #[doc(alias = "kBluetoothLESecurityManagerCommandCodeSecurityRequest")]
1022 pub const SecurityRequest: Self = Self(0x0B);
1023 #[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingPublicKey")]
1024 pub const PairingPublicKey: Self = Self(0x0C);
1025 #[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingDHKeyCheck")]
1026 pub const PairingDHKeyCheck: Self = Self(0x0D);
1027 #[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingKeypressNotification")]
1028 pub const PairingKeypressNotification: Self = Self(0x0E);
1029 #[doc(alias = "kBluetoothLESecurityManagerCommandCodeReservedStart")]
1030 pub const ReservedStart: Self = Self(0x0F);
1031 #[doc(alias = "kBluetoothLESecurityManagerCommandCodeReservedEnd")]
1032 pub const ReservedEnd: Self = Self(0xFF);
1033}
1034
1035#[cfg(feature = "objc2")]
1036unsafe impl Encode for BluetoothLESecurityManagerCommandCode {
1037 const ENCODING: Encoding = c_uint::ENCODING;
1038}
1039
1040#[cfg(feature = "objc2")]
1041unsafe impl RefEncode for BluetoothLESecurityManagerCommandCode {
1042 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1043}
1044
1045#[repr(transparent)]
1047#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1048pub struct BluetoothLESecurityManagerUserInputCapability(pub c_uint);
1049impl BluetoothLESecurityManagerUserInputCapability {
1050 #[doc(alias = "kBluetoothLESecurityManagerUserInputCapabilityNoInput")]
1051 pub const NoInput: Self = Self(0x01);
1052 #[doc(alias = "kBluetoothLESecurityManagerUserInputCapabilityYesNo")]
1053 pub const YesNo: Self = Self(0x02);
1054 #[doc(alias = "kBluetoothLESecurityManagerUserInputCapabilityKeyboard")]
1055 pub const Keyboard: Self = Self(0x03);
1056}
1057
1058#[cfg(feature = "objc2")]
1059unsafe impl Encode for BluetoothLESecurityManagerUserInputCapability {
1060 const ENCODING: Encoding = c_uint::ENCODING;
1061}
1062
1063#[cfg(feature = "objc2")]
1064unsafe impl RefEncode for BluetoothLESecurityManagerUserInputCapability {
1065 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1066}
1067
1068#[repr(transparent)]
1070#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1071pub struct BluetoothLESecurityManagerUserOutputCapability(pub c_uint);
1072impl BluetoothLESecurityManagerUserOutputCapability {
1073 #[doc(alias = "kBluetoothLESecurityManagerUserOutputCapabilityNoOutput")]
1074 pub const NoOutput: Self = Self(0x01);
1075 #[doc(alias = "kBluetoothLESecurityManagerUserOutputCapabilityNumericOutput")]
1076 pub const NumericOutput: Self = Self(0x02);
1077}
1078
1079#[cfg(feature = "objc2")]
1080unsafe impl Encode for BluetoothLESecurityManagerUserOutputCapability {
1081 const ENCODING: Encoding = c_uint::ENCODING;
1082}
1083
1084#[cfg(feature = "objc2")]
1085unsafe impl RefEncode for BluetoothLESecurityManagerUserOutputCapability {
1086 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1087}
1088
1089#[repr(transparent)]
1091#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1092pub struct BluetoothLESecurityManagerIOCapability(pub c_uint);
1093impl BluetoothLESecurityManagerIOCapability {
1094 #[doc(alias = "kBluetoothLESecurityManagerIOCapabilityDisplayOnly")]
1095 pub const DisplayOnly: Self = Self(0x00);
1096 #[doc(alias = "kBluetoothLESecurityManagerIOCapabilityDisplayYesNo")]
1097 pub const DisplayYesNo: Self = Self(0x01);
1098 #[doc(alias = "kBluetoothLESecurityManagerIOCapabilityKeyboardOnly")]
1099 pub const KeyboardOnly: Self = Self(0x02);
1100 #[doc(alias = "kBluetoothLESecurityManagerIOCapabilityNoInputNoOutput")]
1101 pub const NoInputNoOutput: Self = Self(0x03);
1102 #[doc(alias = "kBluetoothLESecurityManagerIOCapabilityKeyboardDisplay")]
1103 pub const KeyboardDisplay: Self = Self(0x04);
1104 #[doc(alias = "kBluetoothLESecurityManagerIOCapabilityReservedStart")]
1105 pub const ReservedStart: Self = Self(0x05);
1106 #[doc(alias = "kBluetoothLESecurityManagerIOCapabilityReservedEnd")]
1107 pub const ReservedEnd: Self = Self(0xFF);
1108}
1109
1110#[cfg(feature = "objc2")]
1111unsafe impl Encode for BluetoothLESecurityManagerIOCapability {
1112 const ENCODING: Encoding = c_uint::ENCODING;
1113}
1114
1115#[cfg(feature = "objc2")]
1116unsafe impl RefEncode for BluetoothLESecurityManagerIOCapability {
1117 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1118}
1119
1120#[repr(transparent)]
1122#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1123pub struct BluetoothLESecurityManagerOOBData(pub c_uint);
1124impl BluetoothLESecurityManagerOOBData {
1125 #[doc(alias = "kBluetoothLESecurityManagerOOBAuthenticationDataNotPresent")]
1126 pub const AuthenticationDataNotPresent: Self = Self(0x00);
1127 #[doc(alias = "kBluetoothLESecurityManagerOOBAuthenticationDataPresent")]
1128 pub const AuthenticationDataPresent: Self = Self(0x01);
1129 #[doc(alias = "kBluetoothLESecurityManagerOOBDataReservedStart")]
1130 pub const DataReservedStart: Self = Self(0x02);
1131 #[doc(alias = "kBluetoothLESecurityManagerOOBDataReservedEnd")]
1132 pub const DataReservedEnd: Self = Self(0xFF);
1133}
1134
1135#[cfg(feature = "objc2")]
1136unsafe impl Encode for BluetoothLESecurityManagerOOBData {
1137 const ENCODING: Encoding = c_uint::ENCODING;
1138}
1139
1140#[cfg(feature = "objc2")]
1141unsafe impl RefEncode for BluetoothLESecurityManagerOOBData {
1142 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1143}
1144
1145pub const kBluetoothLESecurityManagerNoBonding: c_uint = 0;
1147pub const kBluetoothLESecurityManagerBonding: c_uint = 1;
1149pub const kBluetoothLESecurityManagerReservedStart: c_uint = 2;
1151pub const kBluetoothLESecurityManagerReservedEnd: c_uint = 3;
1153
1154#[repr(transparent)]
1156#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1157pub struct BluetoothLESecurityManagerPairingFailedReasonCode(pub c_uint);
1158impl BluetoothLESecurityManagerPairingFailedReasonCode {
1159 #[doc(alias = "kBluetoothLESecurityManagerReasonCodeReserved")]
1160 pub const ReasonCodeReserved: Self = Self(0x00);
1161 #[doc(alias = "kBluetoothLESecurityManagerReasonCodePasskeyEntryFailed")]
1162 pub const ReasonCodePasskeyEntryFailed: Self = Self(0x01);
1163 #[doc(alias = "kBluetoothLESecurityManagerReasonCodeOOBNotAvailbale")]
1164 pub const ReasonCodeOOBNotAvailbale: Self = Self(0x02);
1165 #[doc(alias = "kBluetoothLESecurityManagerReasonCodeAuthenticationRequirements")]
1166 pub const ReasonCodeAuthenticationRequirements: Self = Self(0x03);
1167 #[doc(alias = "kBluetoothLESecurityManagerReasonCodeConfirmValueFailed")]
1168 pub const ReasonCodeConfirmValueFailed: Self = Self(0x04);
1169 #[doc(alias = "kBluetoothLESecurityManagerReasonCodePairingNotSupported")]
1170 pub const ReasonCodePairingNotSupported: Self = Self(0x05);
1171 #[doc(alias = "kBluetoothLESecurityManagerReasonCodeEncryptionKeySize")]
1172 pub const ReasonCodeEncryptionKeySize: Self = Self(0x06);
1173 #[doc(alias = "kBluetoothLESecurityManagerReasonCodeCommandNotSupported")]
1174 pub const ReasonCodeCommandNotSupported: Self = Self(0x07);
1175 #[doc(alias = "kBluetoothLESecurityManagerReasonCodeUnspecifiedReason")]
1176 pub const ReasonCodeUnspecifiedReason: Self = Self(0x08);
1177 #[doc(alias = "kBluetoothLESecurityManagerReasonCodeRepeatedAttempts")]
1178 pub const ReasonCodeRepeatedAttempts: Self = Self(0x09);
1179 #[doc(alias = "kBluetoothLESecurityManagerReasonCodeInvalidParameters")]
1180 pub const ReasonCodeInvalidParameters: Self = Self(0x0A);
1181 #[doc(alias = "kBluetoothLESecurityManagerReasonCodeDHKeyCheckFailed")]
1182 pub const ReasonCodeDHKeyCheckFailed: Self = Self(0x0B);
1183 #[doc(alias = "kBluetoothLESecurityManagerReasonCodeNumericComparisonFailed")]
1184 pub const ReasonCodeNumericComparisonFailed: Self = Self(0x0C);
1185 #[doc(alias = "kBluetoothLESecurityManagerReasonCodeBREDRPairingInProgress")]
1186 pub const ReasonCodeBREDRPairingInProgress: Self = Self(0x0D);
1187 #[doc(
1188 alias = "kBluetoothLESecurityManagerReasonCodeCrossTransportKeyDerivationGenerationNotAllowed"
1189 )]
1190 pub const ReasonCodeCrossTransportKeyDerivationGenerationNotAllowed: Self = Self(0x0E);
1191 #[doc(alias = "kBluetoothLESecurityManagerReasonCodeReservedStart")]
1192 pub const ReasonCodeReservedStart: Self = Self(0x0F);
1193 #[doc(alias = "kBluetoothLESecurityManagerReasonCodeReservedEnd")]
1194 pub const ReasonCodeReservedEnd: Self = Self(0xFF);
1195}
1196
1197#[cfg(feature = "objc2")]
1198unsafe impl Encode for BluetoothLESecurityManagerPairingFailedReasonCode {
1199 const ENCODING: Encoding = c_uint::ENCODING;
1200}
1201
1202#[cfg(feature = "objc2")]
1203unsafe impl RefEncode for BluetoothLESecurityManagerPairingFailedReasonCode {
1204 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1205}
1206
1207#[repr(transparent)]
1209#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1210pub struct BluetoothLESecurityManagerKeypressNotificationType(pub c_uint);
1211impl BluetoothLESecurityManagerKeypressNotificationType {
1212 #[doc(alias = "kBluetoothLESecurityManagerNotificationTypePasskeyEntryStarted")]
1213 pub const NotificationTypePasskeyEntryStarted: Self = Self(0);
1214 #[doc(alias = "kBluetoothLESecurityManagerNotificationTypePasskeyDigitEntered")]
1215 pub const NotificationTypePasskeyDigitEntered: Self = Self(1);
1216 #[doc(alias = "kBluetoothLESecurityManagerNotificationTypePasskeyDigitErased")]
1217 pub const NotificationTypePasskeyDigitErased: Self = Self(2);
1218 #[doc(alias = "kBluetoothLESecurityManagerNotificationTypePasskeyCleared")]
1219 pub const NotificationTypePasskeyCleared: Self = Self(3);
1220 #[doc(alias = "kBluetoothLESecurityManagerNotificationTypePasskeyEntryCompleted")]
1221 pub const NotificationTypePasskeyEntryCompleted: Self = Self(4);
1222 #[doc(alias = "kBluetoothLESecurityManagerNotificationTypeReservedStart")]
1223 pub const NotificationTypeReservedStart: Self = Self(5);
1224 #[doc(alias = "kBluetoothLESecurityManagerNotificationTypeReservedEnd")]
1225 pub const NotificationTypeReservedEnd: Self = Self(255);
1226}
1227
1228#[cfg(feature = "objc2")]
1229unsafe impl Encode for BluetoothLESecurityManagerKeypressNotificationType {
1230 const ENCODING: Encoding = c_uint::ENCODING;
1231}
1232
1233#[cfg(feature = "objc2")]
1234unsafe impl RefEncode for BluetoothLESecurityManagerKeypressNotificationType {
1235 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1236}
1237
1238#[repr(transparent)]
1240#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1241pub struct BluetoothAMPManagerCode(pub c_uint);
1242impl BluetoothAMPManagerCode {
1243 #[doc(alias = "kBluetoothAMPManagerCodeReserved")]
1244 pub const Reserved: Self = Self(0x00);
1245 #[doc(alias = "kBluetoothAMPManagerCodeAMPCommandReject")]
1246 pub const AMPCommandReject: Self = Self(0x01);
1247 #[doc(alias = "kBluetoothAMPManagerCodeAMPDiscoverRequest")]
1248 pub const AMPDiscoverRequest: Self = Self(0x02);
1249 #[doc(alias = "kBluetoothAMPManagerCodeAMPDiscoverResponse")]
1250 pub const AMPDiscoverResponse: Self = Self(0x03);
1251 #[doc(alias = "kBluetoothAMPManagerCodeAMPChangeNotify")]
1252 pub const AMPChangeNotify: Self = Self(0x04);
1253 #[doc(alias = "kBluetoothAMPManagerCodeAMPChangeResponse")]
1254 pub const AMPChangeResponse: Self = Self(0x05);
1255 #[doc(alias = "kBluetoothAMPManagerCodeAMPGetInfoRequest")]
1256 pub const AMPGetInfoRequest: Self = Self(0x06);
1257 #[doc(alias = "kBluetoothAMPManagerCodeAMPGetInfoResponse")]
1258 pub const AMPGetInfoResponse: Self = Self(0x07);
1259 #[doc(alias = "kBluetoothAMPManagerCodeAMPGetAssocRequest")]
1260 pub const AMPGetAssocRequest: Self = Self(0x08);
1261 #[doc(alias = "kBluetoothAMPManagerCodeAMPGetAssocResponse")]
1262 pub const AMPGetAssocResponse: Self = Self(0x09);
1263 #[doc(alias = "kBluetoothAMPManagerCodeAMPCreatePhysicalLinkRequest")]
1264 pub const AMPCreatePhysicalLinkRequest: Self = Self(0x0A);
1265 #[doc(alias = "kBluetoothAMPManagerCodeAMPCreatePhysicalLinkResponse")]
1266 pub const AMPCreatePhysicalLinkResponse: Self = Self(0x0B);
1267 #[doc(alias = "kBluetoothAMPManagerCodeAMPDisconnectPhysicalLinkRequest")]
1268 pub const AMPDisconnectPhysicalLinkRequest: Self = Self(0x0C);
1269 #[doc(alias = "kBluetoothAMPManagerCodeAMPDisconnectPhysicalLinkResponse")]
1270 pub const AMPDisconnectPhysicalLinkResponse: Self = Self(0x0D);
1271}
1272
1273#[cfg(feature = "objc2")]
1274unsafe impl Encode for BluetoothAMPManagerCode {
1275 const ENCODING: Encoding = c_uint::ENCODING;
1276}
1277
1278#[cfg(feature = "objc2")]
1279unsafe impl RefEncode for BluetoothAMPManagerCode {
1280 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1281}
1282
1283#[repr(transparent)]
1285#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1286pub struct BluetoothAMPCommandRejectReason(pub c_uint);
1287impl BluetoothAMPCommandRejectReason {
1288 #[doc(alias = "kBluetoothAMPManagerCommandRejectReasonCommandNotRecognized")]
1289 pub const ManagerCommandRejectReasonCommandNotRecognized: Self = Self(0x0000);
1290}
1291
1292#[cfg(feature = "objc2")]
1293unsafe impl Encode for BluetoothAMPCommandRejectReason {
1294 const ENCODING: Encoding = c_uint::ENCODING;
1295}
1296
1297#[cfg(feature = "objc2")]
1298unsafe impl RefEncode for BluetoothAMPCommandRejectReason {
1299 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1300}
1301
1302#[repr(transparent)]
1304#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1305pub struct BluetoothAMPDiscoverResponseControllerStatus(pub c_uint);
1306impl BluetoothAMPDiscoverResponseControllerStatus {
1307 #[doc(alias = "kBluetoothAMPManagerDiscoverResponseControllerStatusPoweredDown")]
1308 pub const ManagerDiscoverResponseControllerStatusPoweredDown: Self = Self(0x00);
1309 #[doc(alias = "kBluetoothAMPManagerDiscoverResponseControllerStatusBluetoothOnly")]
1310 pub const ManagerDiscoverResponseControllerStatusBluetoothOnly: Self = Self(0x01);
1311 #[doc(alias = "kBluetoothAMPManagerDiscoverResponseControllerStatusNoCapacity")]
1312 pub const ManagerDiscoverResponseControllerStatusNoCapacity: Self = Self(0x02);
1313 #[doc(alias = "kBluetoothAMPManagerDiscoverResponseControllerStatusLowCapacity")]
1314 pub const ManagerDiscoverResponseControllerStatusLowCapacity: Self = Self(0x03);
1315 #[doc(alias = "kBluetoothAMPManagerDiscoverResponseControllerStatusMediumCapacity")]
1316 pub const ManagerDiscoverResponseControllerStatusMediumCapacity: Self = Self(0x04);
1317 #[doc(alias = "kBluetoothAMPManagerDiscoverResponseControllerStatusHighCapacity")]
1318 pub const ManagerDiscoverResponseControllerStatusHighCapacity: Self = Self(0x05);
1319 #[doc(alias = "kBluetoothAMPManagerDiscoverResponseControllerStatusFullCapacity")]
1320 pub const ManagerDiscoverResponseControllerStatusFullCapacity: Self = Self(0x06);
1321}
1322
1323#[cfg(feature = "objc2")]
1324unsafe impl Encode for BluetoothAMPDiscoverResponseControllerStatus {
1325 const ENCODING: Encoding = c_uint::ENCODING;
1326}
1327
1328#[cfg(feature = "objc2")]
1329unsafe impl RefEncode for BluetoothAMPDiscoverResponseControllerStatus {
1330 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1331}
1332
1333#[repr(transparent)]
1335#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1336pub struct BluetoothAMPGetInfoResponseStatus(pub c_uint);
1337impl BluetoothAMPGetInfoResponseStatus {
1338 #[doc(alias = "kBluetoothAMPManagerGetInfoResponseSuccess")]
1339 pub const ManagerGetInfoResponseSuccess: Self = Self(0x00);
1340 #[doc(alias = "kBluetoothAMPManagerGetInfoResponseInvalidControllerID")]
1341 pub const ManagerGetInfoResponseInvalidControllerID: Self = Self(0x01);
1342}
1343
1344#[cfg(feature = "objc2")]
1345unsafe impl Encode for BluetoothAMPGetInfoResponseStatus {
1346 const ENCODING: Encoding = c_uint::ENCODING;
1347}
1348
1349#[cfg(feature = "objc2")]
1350unsafe impl RefEncode for BluetoothAMPGetInfoResponseStatus {
1351 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1352}
1353
1354#[repr(transparent)]
1356#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1357pub struct BluetoothAMPGetAssocResponseStatus(pub c_uint);
1358impl BluetoothAMPGetAssocResponseStatus {
1359 #[doc(alias = "kBluetoothAMPManagerGetAssocResponseSuccess")]
1360 pub const ManagerGetAssocResponseSuccess: Self = Self(0x00);
1361 #[doc(alias = "kBluetoothAMPManagerGetAssocResponseInvalidControllerID")]
1362 pub const ManagerGetAssocResponseInvalidControllerID: Self = Self(0x01);
1363}
1364
1365#[cfg(feature = "objc2")]
1366unsafe impl Encode for BluetoothAMPGetAssocResponseStatus {
1367 const ENCODING: Encoding = c_uint::ENCODING;
1368}
1369
1370#[cfg(feature = "objc2")]
1371unsafe impl RefEncode for BluetoothAMPGetAssocResponseStatus {
1372 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1373}
1374
1375#[repr(transparent)]
1377#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1378pub struct BluetoothAMPCreatePhysicalLinkResponseStatus(pub c_uint);
1379impl BluetoothAMPCreatePhysicalLinkResponseStatus {
1380 #[doc(alias = "kBluetoothAMPManagerCreatePhysicalLinkResponseSuccess")]
1381 pub const ManagerCreatePhysicalLinkResponseSuccess: Self = Self(0x00);
1382 #[doc(alias = "kBluetoothAMPManagerCreatePhysicalLinkResponseInvalidControllerID")]
1383 pub const ManagerCreatePhysicalLinkResponseInvalidControllerID: Self = Self(0x01);
1384 #[doc(alias = "kBluetoothAMPManagerCreatePhysicalLinkResponseUnableToStartLinkCreation")]
1385 pub const ManagerCreatePhysicalLinkResponseUnableToStartLinkCreation: Self = Self(0x02);
1386 #[doc(alias = "kBluetoothAMPManagerCreatePhysicalLinkResponseCollisionOccurred")]
1387 pub const ManagerCreatePhysicalLinkResponseCollisionOccurred: Self = Self(0x03);
1388 #[doc(
1389 alias = "kBluetoothAMPManagerCreatePhysicalLinkResponseAMPDisconnectedPhysicalLinkRequestReceived"
1390 )]
1391 pub const ManagerCreatePhysicalLinkResponseAMPDisconnectedPhysicalLinkRequestReceived: Self =
1392 Self(0x04);
1393 #[doc(alias = "kBluetoothAMPManagerCreatePhysicalLinkResponsePhysicalLinkAlreadyExists")]
1394 pub const ManagerCreatePhysicalLinkResponsePhysicalLinkAlreadyExists: Self = Self(0x05);
1395 #[doc(alias = "kBluetoothAMPManagerCreatePhysicalLinkResponseSecurityViolation")]
1396 pub const ManagerCreatePhysicalLinkResponseSecurityViolation: Self = Self(0x06);
1397}
1398
1399#[cfg(feature = "objc2")]
1400unsafe impl Encode for BluetoothAMPCreatePhysicalLinkResponseStatus {
1401 const ENCODING: Encoding = c_uint::ENCODING;
1402}
1403
1404#[cfg(feature = "objc2")]
1405unsafe impl RefEncode for BluetoothAMPCreatePhysicalLinkResponseStatus {
1406 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1407}
1408
1409#[repr(transparent)]
1411#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1412pub struct BluetoothAMPDisconnectPhysicalLinkResponseStatus(pub c_uint);
1413impl BluetoothAMPDisconnectPhysicalLinkResponseStatus {
1414 #[doc(alias = "kBluetoothAMPManagerDisconnectPhysicalLinkResponseSuccess")]
1415 pub const ManagerDisconnectPhysicalLinkResponseSuccess: Self = Self(0x00);
1416 #[doc(alias = "kBluetoothAMPManagerDisconnectPhysicalLinkResponseInvalidControllerID")]
1417 pub const ManagerDisconnectPhysicalLinkResponseInvalidControllerID: Self = Self(0x01);
1418 #[doc(alias = "kBluetoothAMPManagerDisconnectPhysicalLinkResponseNoPhysicalLink")]
1419 pub const ManagerDisconnectPhysicalLinkResponseNoPhysicalLink: Self = Self(0x02);
1420}
1421
1422#[cfg(feature = "objc2")]
1423unsafe impl Encode for BluetoothAMPDisconnectPhysicalLinkResponseStatus {
1424 const ENCODING: Encoding = c_uint::ENCODING;
1425}
1426
1427#[cfg(feature = "objc2")]
1428unsafe impl RefEncode for BluetoothAMPDisconnectPhysicalLinkResponseStatus {
1429 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1430}
1431
1432pub type BluetoothHCICommandOpCodeGroup = u8;
1434
1435pub type BluetoothHCICommandOpCodeCommand = u16;
1437
1438pub type BluetoothHCICommandOpCode = u16;
1440
1441pub type BluetoothHCIVendorCommandSelector = u32;
1443
1444pub const kBluetoothHCIOpCodeNoOp: c_uint = 0;
1446pub const kBluetoothHCICommandGroupNoOp: c_uint = 0x00;
1448pub const kBluetoothHCICommandNoOp: c_uint = 0x0000;
1450pub const kBluetoothHCICommandGroupLinkControl: c_uint = 0x01;
1452pub const kBluetoothHCICommandInquiry: c_uint = 0x0001;
1454pub const kBluetoothHCICommandInquiryCancel: c_uint = 0x0002;
1456pub const kBluetoothHCICommandPeriodicInquiryMode: c_uint = 0x0003;
1458pub const kBluetoothHCICommandExitPeriodicInquiryMode: c_uint = 0x0004;
1460pub const kBluetoothHCICommandCreateConnection: c_uint = 0x0005;
1462pub const kBluetoothHCICommandDisconnect: c_uint = 0x0006;
1464pub const kBluetoothHCICommandAddSCOConnection: c_uint = 0x0007;
1466pub const kBluetoothHCICommandCreateConnectionCancel: c_uint = 0x0008;
1468pub const kBluetoothHCICommandAcceptConnectionRequest: c_uint = 0x0009;
1470pub const kBluetoothHCICommandRejectConnectionRequest: c_uint = 0x000A;
1472pub const kBluetoothHCICommandLinkKeyRequestReply: c_uint = 0x000B;
1474pub const kBluetoothHCICommandLinkKeyRequestNegativeReply: c_uint = 0x000C;
1476pub const kBluetoothHCICommandPINCodeRequestReply: c_uint = 0x000D;
1478pub const kBluetoothHCICommandPINCodeRequestNegativeReply: c_uint = 0x000E;
1480pub const kBluetoothHCICommandChangeConnectionPacketType: c_uint = 0x000F;
1482pub const kBluetoothHCICommandAuthenticationRequested: c_uint = 0x0011;
1484pub const kBluetoothHCICommandSetConnectionEncryption: c_uint = 0x0013;
1486pub const kBluetoothHCICommandChangeConnectionLinkKey: c_uint = 0x0015;
1488pub const kBluetoothHCICommandMasterLinkKey: c_uint = 0x0017;
1490pub const kBluetoothHCICommandRemoteNameRequest: c_uint = 0x0019;
1492pub const kBluetoothHCICommandReadRemoteSupportedFeatures: c_uint = 0x001B;
1494pub const kBluetoothHCICommandReadRemoteExtendedFeatures: c_uint = 0x001C;
1496pub const kBluetoothHCICommandReadRemoteVersionInformation: c_uint = 0x001D;
1498pub const kBluetoothHCICommandReadClockOffset: c_uint = 0x001F;
1500pub const kBluetoothHCICommandRemoteNameRequestCancel: c_uint = 0x001A;
1502pub const kBluetoothHCICommandReadLMPHandle: c_uint = 0x0020;
1504pub const kBluetoothHCICommandSetupSynchronousConnection: c_uint = 0x0028;
1506pub const kBluetoothHCICommandAcceptSynchronousConnectionRequest: c_uint = 0x0029;
1508pub const kBluetoothHCICommandRejectSynchronousConnectionRequest: c_uint = 0x002A;
1510pub const kBluetoothHCICommandIOCapabilityRequestReply: c_uint = 0x002B;
1512pub const kBluetoothHCICommandUserConfirmationRequestReply: c_uint = 0x002C;
1514pub const kBluetoothHCICommandUserConfirmationRequestNegativeReply: c_uint = 0x002D;
1516pub const kBluetoothHCICommandUserPasskeyRequestReply: c_uint = 0x002E;
1518pub const kBluetoothHCICommandUserPasskeyRequestNegativeReply: c_uint = 0x002F;
1520pub const kBluetoothHCICommandRemoteOOBDataRequestReply: c_uint = 0x0030;
1522pub const kBluetoothHCICommandRemoteOOBDataRequestNegativeReply: c_uint = 0x0033;
1524pub const kBluetoothHCICommandIOCapabilityRequestNegativeReply: c_uint = 0x0034;
1526pub const kBluetoothHCICommandEnhancedSetupSynchronousConnection: c_uint = 0x003D;
1528pub const kBluetoothHCICommandEnhancedAcceptSynchronousConnectionRequest: c_uint = 0x003E;
1530pub const kBluetoothHCICommandTruncatedPage: c_uint = 0x003F;
1532pub const kBluetoothHCICommandTruncatedPageCancel: c_uint = 0x0040;
1534pub const kBluetoothHCICommandSetConnectionlessPeripheralBroadcast: c_uint = 0x0041;
1536pub const kBluetoothHCICommandSetConnectionlessPeripheralBroadcastReceive: c_uint = 0x0042;
1538pub const kBluetoothHCICommandStartSynchronizationTrain: c_uint = 0x0043;
1540pub const kBluetoothHCICommandReceiveSynchronizationTrain: c_uint = 0x0044;
1542pub const kBluetoothHCICommandRemoteOOBExtendedDataRequestReply: c_uint = 0x0045;
1544pub const kBluetoothHCICommandSetConnectionlessSlaveBroadcast: c_uint =
1546 kBluetoothHCICommandSetConnectionlessPeripheralBroadcast;
1547pub const kBluetoothHCICommandSetConnectionlessSlaveBroadcastReceive: c_uint =
1549 kBluetoothHCICommandSetConnectionlessPeripheralBroadcastReceive;
1550pub const kBluetoothHCICommandGroupLinkPolicy: c_uint = 0x02;
1552pub const kBluetoothHCICommandHoldMode: c_uint = 0x0001;
1554pub const kBluetoothHCICommandSniffMode: c_uint = 0x0003;
1556pub const kBluetoothHCICommandExitSniffMode: c_uint = 0x0004;
1558pub const kBluetoothHCICommandParkMode: c_uint = 0x0005;
1560pub const kBluetoothHCICommandExitParkMode: c_uint = 0x0006;
1562pub const kBluetoothHCICommandQoSSetup: c_uint = 0x0007;
1564pub const kBluetoothHCICommandRoleDiscovery: c_uint = 0x0009;
1566pub const kBluetoothHCICommandSwitchRole: c_uint = 0x000B;
1568pub const kBluetoothHCICommandReadLinkPolicySettings: c_uint = 0x000C;
1570pub const kBluetoothHCICommandWriteLinkPolicySettings: c_uint = 0x000D;
1572pub const kBluetoothHCICommandReadDefaultLinkPolicySettings: c_uint = 0x000E;
1574pub const kBluetoothHCICommandWriteDefaultLinkPolicySettings: c_uint = 0x000F;
1576pub const kBluetoothHCICommandFlowSpecification: c_uint = 0x0010;
1578pub const kBluetoothHCICommandSniffSubrating: c_uint = 0x0011;
1580pub const kBluetoothHCICommandAcceptSniffRequest: c_uint = 0x0031;
1582pub const kBluetoothHCICommandRejectSniffRequest: c_uint = 0x0032;
1584pub const kBluetoothHCICommandGroupHostController: c_uint = 0x03;
1586pub const kBluetoothHCICommandSetEventMask: c_uint = 0x0001;
1588pub const kBluetoothHCICommandReset: c_uint = 0x0003;
1590pub const kBluetoothHCICommandSetEventFilter: c_uint = 0x0005;
1592pub const kBluetoothHCICommandFlush: c_uint = 0x0008;
1594pub const kBluetoothHCICommandReadPINType: c_uint = 0x0009;
1596pub const kBluetoothHCICommandWritePINType: c_uint = 0x000A;
1598pub const kBluetoothHCICommandCreateNewUnitKey: c_uint = 0x000B;
1600pub const kBluetoothHCICommandReadStoredLinkKey: c_uint = 0x000D;
1602pub const kBluetoothHCICommandWriteStoredLinkKey: c_uint = 0x0011;
1604pub const kBluetoothHCICommandDeleteStoredLinkKey: c_uint = 0x0012;
1606pub const kBluetoothHCICommandChangeLocalName: c_uint = 0x0013;
1608pub const kBluetoothHCICommandReadLocalName: c_uint = 0x0014;
1610pub const kBluetoothHCICommandReadConnectionAcceptTimeout: c_uint = 0x0015;
1612pub const kBluetoothHCICommandWriteConnectionAcceptTimeout: c_uint = 0x0016;
1614pub const kBluetoothHCICommandReadPageTimeout: c_uint = 0x0017;
1616pub const kBluetoothHCICommandWritePageTimeout: c_uint = 0x0018;
1618pub const kBluetoothHCICommandReadScanEnable: c_uint = 0x0019;
1620pub const kBluetoothHCICommandWriteScanEnable: c_uint = 0x001A;
1622pub const kBluetoothHCICommandReadPageScanActivity: c_uint = 0x001B;
1624pub const kBluetoothHCICommandWritePageScanActivity: c_uint = 0x001C;
1626pub const kBluetoothHCICommandReadInquiryScanActivity: c_uint = 0x001D;
1628pub const kBluetoothHCICommandWriteInquiryScanActivity: c_uint = 0x001E;
1630pub const kBluetoothHCICommandReadAuthenticationEnable: c_uint = 0x001F;
1632pub const kBluetoothHCICommandWriteAuthenticationEnable: c_uint = 0x0020;
1634pub const kBluetoothHCICommandReadEncryptionMode: c_uint = 0x0021;
1636pub const kBluetoothHCICommandWriteEncryptionMode: c_uint = 0x0022;
1638pub const kBluetoothHCICommandReadClassOfDevice: c_uint = 0x0023;
1640pub const kBluetoothHCICommandWriteClassOfDevice: c_uint = 0x0024;
1642pub const kBluetoothHCICommandReadVoiceSetting: c_uint = 0x0025;
1644pub const kBluetoothHCICommandWriteVoiceSetting: c_uint = 0x0026;
1646pub const kBluetoothHCICommandReadAutomaticFlushTimeout: c_uint = 0x0027;
1648pub const kBluetoothHCICommandWriteAutomaticFlushTimeout: c_uint = 0x0028;
1650pub const kBluetoothHCICommandReadNumberOfBroadcastRetransmissions: c_uint = 0x0029;
1652pub const kBluetoothHCICommandWriteNumberOfBroadcastRetransmissions: c_uint = 0x002A;
1654pub const kBluetoothHCICommandReadHoldModeActivity: c_uint = 0x002B;
1656pub const kBluetoothHCICommandWriteHoldModeActivity: c_uint = 0x002C;
1658pub const kBluetoothHCICommandReadTransmitPowerLevel: c_uint = 0x002D;
1660pub const kBluetoothHCICommandReadSCOFlowControlEnable: c_uint = 0x002E;
1662pub const kBluetoothHCICommandWriteSCOFlowControlEnable: c_uint = 0x002F;
1664pub const kBluetoothHCICommandSetHostControllerToHostFlowControl: c_uint = 0x0031;
1666pub const kBluetoothHCICommandHostBufferSize: c_uint = 0x0033;
1668pub const kBluetoothHCICommandHostNumberOfCompletedPackets: c_uint = 0x0035;
1670pub const kBluetoothHCICommandReadLinkSupervisionTimeout: c_uint = 0x0036;
1672pub const kBluetoothHCICommandWriteLinkSupervisionTimeout: c_uint = 0x0037;
1674pub const kBluetoothHCICommandReadNumberOfSupportedIAC: c_uint = 0x0038;
1676pub const kBluetoothHCICommandReadCurrentIACLAP: c_uint = 0x0039;
1678pub const kBluetoothHCICommandWriteCurrentIACLAP: c_uint = 0x003A;
1680pub const kBluetoothHCICommandReadPageScanPeriodMode: c_uint = 0x003B;
1682pub const kBluetoothHCICommandWritePageScanPeriodMode: c_uint = 0x003C;
1684pub const kBluetoothHCICommandReadPageScanMode: c_uint = 0x003D;
1686pub const kBluetoothHCICommandWritePageScanMode: c_uint = 0x003E;
1688pub const kBluetoothHCICommandSetAFHClassification: c_uint = 0x003F;
1690pub const kBluetoothHCICommandReadInquiryScanType: c_uint = 0x0042;
1692pub const kBluetoothHCICommandWriteInquiryScanType: c_uint = 0x0043;
1694pub const kBluetoothHCICommandReadInquiryMode: c_uint = 0x0044;
1696pub const kBluetoothHCICommandWriteInquiryMode: c_uint = 0x0045;
1698pub const kBluetoothHCICommandReadPageScanType: c_uint = 0x0046;
1700pub const kBluetoothHCICommandWritePageScanType: c_uint = 0x0047;
1702pub const kBluetoothHCICommandReadAFHChannelAssessmentMode: c_uint = 0x0048;
1704pub const kBluetoothHCICommandWriteAFHChannelAssessmentMode: c_uint = 0x0049;
1706pub const kBluetoothHCICommandReadExtendedInquiryResponse: c_uint = 0x0051;
1708pub const kBluetoothHCICommandWriteExtendedInquiryResponse: c_uint = 0x0052;
1710pub const kBluetoothHCICommandRefreshEncryptionKey: c_uint = 0x0053;
1712pub const kBluetoothHCICommandReadSimplePairingMode: c_uint = 0x0055;
1714pub const kBluetoothHCICommandWriteSimplePairingMode: c_uint = 0x0056;
1716pub const kBluetoothHCICommandReadLocalOOBData: c_uint = 0x0057;
1718pub const kBluetoothHCICommandReadInquiryResponseTransmitPower: c_uint = 0x0058;
1720pub const kBluetoothHCICommandWriteInquiryResponseTransmitPower: c_uint = 0x0059;
1722pub const kBluetoothHCICommandSendKeypressNotification: c_uint = 0x0060;
1724pub const kBluetoothHCICommandReadDefaultErroneousDataReporting: c_uint = 0x005A;
1726pub const kBluetoothHCICommandWriteDefaultErroneousDataReporting: c_uint = 0x005B;
1728pub const kBluetoothHCICommandEnhancedFlush: c_uint = 0x005F;
1730pub const kBluetoothHCICommandReadLogicalLinkAcceptTimeout: c_uint = 0x0061;
1732pub const kBluetoothHCICommandWriteLogicalLinkAcceptTimeout: c_uint = 0x0062;
1734pub const kBluetoothHCICommandSetEventMaskPageTwo: c_uint = 0x0063;
1736pub const kBluetoothHCICommandReadLocationData: c_uint = 0x0064;
1738pub const kBluetoothHCICommandWriteLocationData: c_uint = 0x0065;
1740pub const kBluetoothHCICommandReadFlowControlMode: c_uint = 0x0066;
1742pub const kBluetoothHCICommandWriteFlowControlMode: c_uint = 0x0067;
1744pub const kBluetoothHCICommandReadEnhancedTransmitPowerLevel: c_uint = 0x0068;
1746pub const kBluetoothHCICommandReadBestEffortFlushTimeout: c_uint = 0x0069;
1748pub const kBluetoothHCICommandWriteBestEffortFlushTimeout: c_uint = 0x006A;
1750pub const kBluetoothHCICommandShortRangeMode: c_uint = 0x006B;
1752pub const kBluetoothHCICommandReadLEHostSupported: c_uint = 0x006C;
1754pub const kBluetoothHCICommandWriteLEHostSupported: c_uint = 0x006D;
1756pub const kBluetoothHCICommandSetMWSChannelParameters: c_uint = 0x006E;
1758pub const kBluetoothHCICommandSetExternalFrameConfiguration: c_uint = 0x006F;
1760pub const kBluetoothHCICommandSetMWSSignaling: c_uint = 0x0070;
1762pub const kBluetoothHCICommandSetMWSTransportLayer: c_uint = 0x0071;
1764pub const kBluetoothHCICommandSetMWSScanFrequencyTable: c_uint = 0x0072;
1766pub const kBluetoothHCICommandSetMWSPATTERNConfiguration: c_uint = 0x0073;
1768pub const kBluetoothHCICommandSetReservedLTADDR: c_uint = 0x0074;
1770pub const kBluetoothHCICommandDeleteReservedLTADDR: c_uint = 0x0075;
1772pub const kBluetoothHCICommandSetConnectionlessPeripheralBroadcastData: c_uint = 0x0076;
1774pub const kBluetoothHCICommandReadSynchronizationTrainParameters: c_uint = 0x0077;
1776pub const kBluetoothHCICommandWriteSynchronizationTrainParameters: c_uint = 0x0078;
1778pub const kBluetoothHCICommandReadSecureConnectionsHostSupport: c_uint = 0x0079;
1780pub const kBluetoothHCICommandWriteSecureConnectionsHostSupport: c_uint = 0x007A;
1782pub const kBluetoothHCICommandReadAuthenticatedPayloadTimeout: c_uint = 0x007B;
1784pub const kBluetoothHCICommandWriteAuthenticatedPayloadTimeout: c_uint = 0x007C;
1786pub const kBluetoothHCICommandReadLocalOOBExtendedData: c_uint = 0x007D;
1788pub const kBluetoothHCICommandReadExtendedPageTimeout: c_uint = 0x007E;
1790pub const kBluetoothHCICommandWriteExtendedPageTimeout: c_uint = 0x007F;
1792pub const kBluetoothHCICommandReadExtendedInquiryLength: c_uint = 0x0080;
1794pub const kBluetoothHCICommandWriteExtendedInquiryLength: c_uint = 0x0081;
1796pub const kBluetoothHCICommandSetConnectionlessSlaveBroadcastData: c_uint =
1798 kBluetoothHCICommandSetConnectionlessPeripheralBroadcastData;
1799pub const kBluetoothHCICommandGroupInformational: c_uint = 0x04;
1801pub const kBluetoothHCICommandReadLocalVersionInformation: c_uint = 0x0001;
1803pub const kBluetoothHCICommandReadLocalSupportedCommands: c_uint = 0x0002;
1805pub const kBluetoothHCICommandReadLocalSupportedFeatures: c_uint = 0x0003;
1807pub const kBluetoothHCICommandReadLocalExtendedFeatures: c_uint = 0x0004;
1809pub const kBluetoothHCICommandReadBufferSize: c_uint = 0x0005;
1811pub const kBluetoothHCICommandReadCountryCode: c_uint = 0x0007;
1813pub const kBluetoothHCICommandReadDeviceAddress: c_uint = 0x0009;
1815pub const kBluetoothHCICommandReadDataBlockSize: c_uint = 0x000A;
1817pub const kBluetoothHCICommandReadLocalSupportedCodecs: c_uint = 0x000B;
1819pub const kBluetoothHCICommandGroupStatus: c_uint = 0x05;
1821pub const kBluetoothHCICommandReadFailedContactCounter: c_uint = 0x0001;
1823pub const kBluetoothHCICommandResetFailedContactCounter: c_uint = 0x0002;
1825pub const kBluetoothHCICommandGetLinkQuality: c_uint = 0x0003;
1827pub const kBluetoothHCICommandReadRSSI: c_uint = 0x0005;
1829pub const kBluetoothHCICommandReadAFHMappings: c_uint = 0x0006;
1831pub const kBluetoothHCICommandReadClock: c_uint = 0x0007;
1833pub const kBluetoothHCICommandReadEncryptionKeySize: c_uint = 0x0008;
1835pub const kBluetoothHCICommandReadLocalAMPInfo: c_uint = 0x0009;
1837pub const kBluetoothHCICommandReadLocalAMPASSOC: c_uint = 0x000A;
1839pub const kBluetoothHCICommandWriteRemoteAMPASSOC: c_uint = 0x000B;
1841pub const kBluetoothHCICommandGetMWSTransportLayerConfiguration: c_uint = 0x000C;
1843pub const kBluetoothHCICommandSetTriggeredClockCapture: c_uint = 0x000D;
1845pub const kBluetoothHCICommandGroupTesting: c_uint = 0x06;
1847pub const kBluetoothHCICommandReadLoopbackMode: c_uint = 0x0001;
1849pub const kBluetoothHCICommandWriteLoopbackMode: c_uint = 0x0002;
1851pub const kBluetoothHCICommandEnableDeviceUnderTestMode: c_uint = 0x0003;
1853pub const kBluetoothHCICommandWriteSimplePairingDebugMode: c_uint = 0x0004;
1855pub const kBluetoothHCICommandEnableAMPReceiverReports: c_uint = 0x0007;
1857pub const kBluetoothHCICommandAMPTestEnd: c_uint = 0x0008;
1859pub const kBluetoothHCICommandAMPTest: c_uint = 0x0009;
1861pub const kBluetoothHCICommandGroupLowEnergy: c_uint = 0x08;
1863pub const kBluetoothHCICommandLESetEventMask: c_uint = 0x0001;
1865pub const kBluetoothHCICommandLEReadBufferSize: c_uint = 0x0002;
1867pub const kBluetoothHCICommandLEReadLocalSupportedFeatures: c_uint = 0x0003;
1869pub const kBluetoothHCICommandLESetRandomAddress: c_uint = 0x0005;
1871pub const kBluetoothHCICommandLESetAdvertisingParameters: c_uint = 0x0006;
1873pub const kBluetoothHCICommandLEReadAdvertisingChannelTxPower: c_uint = 0x0007;
1875pub const kBluetoothHCICommandLESetAdvertisingData: c_uint = 0x0008;
1877pub const kBluetoothHCICommandLESetScanResponseData: c_uint = 0x0009;
1879pub const kBluetoothHCICommandLESetAdvertiseEnable: c_uint = 0x000A;
1881pub const kBluetoothHCICommandLESetScanParameters: c_uint = 0x000B;
1883pub const kBluetoothHCICommandLESetScanEnable: c_uint = 0x000C;
1885pub const kBluetoothHCICommandLECreateConnection: c_uint = 0x000D;
1887pub const kBluetoothHCICommandLECreateConnectionCancel: c_uint = 0x000E;
1889pub const kBluetoothHCICommandLEReadWhiteListSize: c_uint = 0x000F;
1891pub const kBluetoothHCICommandLEClearWhiteList: c_uint = 0x0010;
1893pub const kBluetoothHCICommandLEAddDeviceToWhiteList: c_uint = 0x0011;
1895pub const kBluetoothHCICommandLERemoveDeviceFromWhiteList: c_uint = 0x0012;
1897pub const kBluetoothHCICommandLEConnectionUpdate: c_uint = 0x0013;
1899pub const kBluetoothHCICommandLESetHostChannelClassification: c_uint = 0x0014;
1901pub const kBluetoothHCICommandLEReadChannelMap: c_uint = 0x0015;
1903pub const kBluetoothHCICommandLEReadRemoteUsedFeatures: c_uint = 0x0016;
1905pub const kBluetoothHCICommandLEEncrypt: c_uint = 0x0017;
1907pub const kBluetoothHCICommandLERand: c_uint = 0x0018;
1909pub const kBluetoothHCICommandLEStartEncryption: c_uint = 0x0019;
1911pub const kBluetoothHCICommandLELongTermKeyRequestReply: c_uint = 0x001A;
1913pub const kBluetoothHCICommandLELongTermKeyRequestNegativeReply: c_uint = 0x001B;
1915pub const kBluetoothHCICommandLEReadSupportedStates: c_uint = 0x001C;
1917pub const kBluetoothHCICommandLEReceiverTest: c_uint = 0x001D;
1919pub const kBluetoothHCICommandLETransmitterTest: c_uint = 0x001E;
1921pub const kBluetoothHCICommandLETestEnd: c_uint = 0x001F;
1923pub const kBluetoothHCICommandLERemoteConnectionParameterRequestReply: c_uint = 0x0020;
1925pub const kBluetoothHCICommandLERemoteConnectionParameterRequestNegativeReply: c_uint = 0x0021;
1927pub const kBluetoothHCICommandLESetDataLength: c_uint = 0x0022;
1929pub const kBluetoothHCICommandLEReadSuggestedDefaultDataLength: c_uint = 0x0023;
1931pub const kBluetoothHCICommandLEWriteSuggestedDefaultDataLength: c_uint = 0x0024;
1933pub const kBluetoothHCICommandLEReadLocalP256PublicKey: c_uint = 0x0025;
1935pub const kBluetoothHCICommandLEGenerateDHKey: c_uint = 0x0026;
1937pub const kBluetoothHCICommandLEAddDeviceToResolvingList: c_uint = 0x0027;
1939pub const kBluetoothHCICommandLERemoveDeviceFromResolvingList: c_uint = 0x0028;
1941pub const kBluetoothHCICommandLEClearResolvingList: c_uint = 0x0029;
1943pub const kBluetoothHCICommandLEReadResolvingListSize: c_uint = 0x002A;
1945pub const kBluetoothHCICommandLEReadPeerResolvableAddress: c_uint = 0x002B;
1947pub const kBluetoothHCICommandLEReadLocalResolvableAddress: c_uint = 0x002C;
1949pub const kBluetoothHCICommandLESetAddressResolutionEnable: c_uint = 0x002D;
1951pub const kBluetoothHCICommandLESetResolvablePrivateAddressTimeout: c_uint = 0x002E;
1953pub const kBluetoothHCICommandLEReadMaximumDataLength: c_uint = 0x002F;
1955pub const kBluetoothHCICommandLEReadPhy: c_uint = 0x0030;
1957pub const kBluetoothHCICommandLESetDefaultPhy: c_uint = 0x0031;
1959pub const kBluetoothHCICommandLESetPhy: c_uint = 0x0032;
1961pub const kBluetoothHCICommandLEEnhancedReceiverTest: c_uint = 0x0033;
1963pub const kBluetoothHCICommandLEEnhancedTransmitterTest: c_uint = 0x0034;
1965pub const kBluetoothHCICommandLESetAdvertisingSetRandomAddress: c_uint = 0x0035;
1967pub const kBluetoothHCICommandLESetExtendedAdvertisingParameters: c_uint = 0x0036;
1969pub const kBluetoothHCICommandLESetExtendedAdvertisingData: c_uint = 0x0037;
1971pub const kBluetoothHCICommandLESetExtendedScanResponseData: c_uint = 0x0038;
1973pub const kBluetoothHCICommandLESetExtendedAdvertisingEnableCommand: c_uint = 0x0039;
1975pub const kBluetoothHCICommandLEReadMaximumAdvertisingDataLength: c_uint = 0x003A;
1977pub const kBluetoothHCICommandLEReadNumberofSupportedAdvertisingSets: c_uint = 0x003B;
1979pub const kBluetoothHCICommandLERemoveAdvertisingSet: c_uint = 0x003C;
1981pub const kBluetoothHCICommandLEClearAdvertisingSets: c_uint = 0x003D;
1983pub const kBluetoothHCICommandLESetPeriodicAdvertisingParameters: c_uint = 0x003E;
1985pub const kBluetoothHCICommandLESetPeriodicAdvertisingData: c_uint = 0x003F;
1987pub const kBluetoothHCICommandLESetPeriodicAdvertisingEnable: c_uint = 0x0040;
1989pub const kBluetoothHCICommandLESetExtendedScanParameters: c_uint = 0x0041;
1991pub const kBluetoothHCICommandLESetExtendedScanEnable: c_uint = 0x0042;
1993pub const kBluetoothHCICommandLEExtendedCreateConnection: c_uint = 0x0043;
1995pub const kBluetoothHCICommandLEPeriodicAdvertisingCreateSync: c_uint = 0x0044;
1997pub const kBluetoothHCICommandLEPeriodicAdvertisingCreateSyncCancel: c_uint = 0x0045;
1999pub const kBluetoothHCICommandLEPeriodicAdvertisingTerminateSync: c_uint = 0x0046;
2001pub const kBluetoothHCICommandLEAddDeviceToPeriodicAdvertiserList: c_uint = 0x0047;
2003pub const kBluetoothHCICommandLERemoveDeviceFromPeriodicAdvertiserList: c_uint = 0x0048;
2005pub const kBluetoothHCICommandLEClearPeriodicAdvertiserList: c_uint = 0x0049;
2007pub const kBluetoothHCICommandLEReadPeriodicAdvertiserListSize: c_uint = 0x004A;
2009pub const kBluetoothHCICommandLEReadTransmitPower: c_uint = 0x004B;
2011pub const kBluetoothHCICommandLEReadRFPathCompensation: c_uint = 0x004C;
2013pub const kBluetoothHCICommandLEWriteRFPathCompensation: c_uint = 0x004D;
2015pub const kBluetoothHCICommandLESetPrivacyMode: c_uint = 0x004E;
2017pub const kBluetoothHCICommandGroupLogoTesting: c_uint = 0x3E;
2019pub const kBluetoothHCICommandGroupVendorSpecific: c_uint = 0x3F;
2021pub const kBluetoothHCICommandGroupMax: c_uint = 0x40;
2023pub const kBluetoothHCICommandMax: c_uint = 0x03FF;
2025
2026pub type BluetoothHCIQoSFlags = u8;
2028
2029pub type BluetoothHCIParamByteCount = u8;
2031
2032pub type BluetoothHCIACLDataByteCount = u16;
2034
2035pub type BluetoothHCISCODataByteCount = u8;
2037
2038pub type BluetoothHCIInquiryLength = u8;
2040
2041pub type BluetoothHCIResponseCount = u8;
2043
2044pub type BluetoothHCICountryCode = u8;
2046
2047pub type BluetoothHCIModeInterval = u16;
2049
2050pub type BluetoothHCISniffAttemptCount = u16;
2052
2053pub type BluetoothHCISniffTimeout = u16;
2055
2056pub type BluetoothHCIParkModeBeaconInterval = u16;
2058
2059pub type BluetoothMaxSlots = u8;
2061
2062pub type BluetoothManufacturerName = u16;
2064
2065pub type BluetoothLMPVersion = u8;
2067
2068pub type BluetoothLMPSubversion = u16;
2070
2071pub type BluetoothHCIConnectionMode = u8;
2073
2074#[repr(transparent)]
2076#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2077pub struct BluetoothHCIConnectionModes(pub c_uint);
2078impl BluetoothHCIConnectionModes {
2079 #[doc(alias = "kConnectionActiveMode")]
2080 pub const ConnectionActiveMode: Self = Self(0);
2081 #[doc(alias = "kConnectionHoldMode")]
2082 pub const ConnectionHoldMode: Self = Self(1);
2083 #[doc(alias = "kConnectionSniffMode")]
2084 pub const ConnectionSniffMode: Self = Self(2);
2085 #[doc(alias = "kConnectionParkMode")]
2086 pub const ConnectionParkMode: Self = Self(3);
2087 #[doc(alias = "kConnectionModeReservedForFutureUse")]
2088 pub const ConnectionModeReservedForFutureUse: Self = Self(4);
2089}
2090
2091#[cfg(feature = "objc2")]
2092unsafe impl Encode for BluetoothHCIConnectionModes {
2093 const ENCODING: Encoding = c_uint::ENCODING;
2094}
2095
2096#[cfg(feature = "objc2")]
2097unsafe impl RefEncode for BluetoothHCIConnectionModes {
2098 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2099}
2100
2101#[repr(C)]
2103#[derive(Clone, Copy, Debug, PartialEq)]
2104pub struct BluetoothHCISupportedCommands {
2105 pub data: [u8; 64],
2106}
2107
2108#[cfg(feature = "objc2")]
2109unsafe impl Encode for BluetoothHCISupportedCommands {
2110 const ENCODING: Encoding =
2111 Encoding::Struct("BluetoothHCISupportedCommands", &[<[u8; 64]>::ENCODING]);
2112}
2113
2114#[cfg(feature = "objc2")]
2115unsafe impl RefEncode for BluetoothHCISupportedCommands {
2116 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2117}
2118
2119#[repr(C)]
2121#[derive(Clone, Copy, Debug, PartialEq)]
2122pub struct BluetoothHCISupportedFeatures {
2123 pub data: [u8; 8],
2124}
2125
2126#[cfg(feature = "objc2")]
2127unsafe impl Encode for BluetoothHCISupportedFeatures {
2128 const ENCODING: Encoding =
2129 Encoding::Struct("BluetoothHCISupportedFeatures", &[<[u8; 8]>::ENCODING]);
2130}
2131
2132#[cfg(feature = "objc2")]
2133unsafe impl RefEncode for BluetoothHCISupportedFeatures {
2134 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2135}
2136
2137pub type BluetoothHCILESupportedFeatures = BluetoothHCISupportedFeatures;
2139
2140pub type BluetoothHCILEUsedFeatures = BluetoothHCISupportedFeatures;
2142
2143pub type BluetoothHCIPageNumber = u8;
2145
2146#[repr(C)]
2148#[derive(Clone, Copy, Debug, PartialEq)]
2149pub struct BluetoothHCIExtendedFeaturesInfo {
2150 pub page: BluetoothHCIPageNumber,
2151 pub maxPage: BluetoothHCIPageNumber,
2152 pub data: [u8; 8],
2153}
2154
2155#[cfg(feature = "objc2")]
2156unsafe impl Encode for BluetoothHCIExtendedFeaturesInfo {
2157 const ENCODING: Encoding = Encoding::Struct(
2158 "BluetoothHCIExtendedFeaturesInfo",
2159 &[
2160 <BluetoothHCIPageNumber>::ENCODING,
2161 <BluetoothHCIPageNumber>::ENCODING,
2162 <[u8; 8]>::ENCODING,
2163 ],
2164 );
2165}
2166
2167#[cfg(feature = "objc2")]
2168unsafe impl RefEncode for BluetoothHCIExtendedFeaturesInfo {
2169 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2170}
2171
2172#[repr(transparent)]
2174#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2175pub struct BluetoothLEFeatureBits(pub c_uint);
2176impl BluetoothLEFeatureBits {
2177 #[doc(alias = "kBluetoothLEFeatureLEEncryption")]
2178 pub const LEEncryption: Self = Self(1 << 0);
2179 #[doc(alias = "kBluetoothLEFeatureConnectionParamsRequestProcedure")]
2180 pub const ConnectionParamsRequestProcedure: Self = Self(1 << 1);
2181 #[doc(alias = "kBluetoothLEFeatureExtendedRejectIndication")]
2182 pub const ExtendedRejectIndication: Self = Self(1 << 2);
2183 #[doc(alias = "kBluetoothLEFeaturePeripheralInitiatedFeaturesExchange")]
2184 pub const PeripheralInitiatedFeaturesExchange: Self = Self(1 << 3);
2185 #[doc(alias = "kBluetoothLEFeatureLEPing")]
2186 pub const LEPing: Self = Self(1 << 4);
2187 #[doc(alias = "kBluetoothLEFeatureLEDataPacketLengthExtension")]
2188 pub const LEDataPacketLengthExtension: Self = Self(1 << 5);
2189 #[doc(alias = "kBluetoothLEFeatureLLPrivacy")]
2190 pub const LLPrivacy: Self = Self(1 << 6);
2191 #[doc(alias = "kBluetoothLEFeatureExtendedScannerFilterPolicies")]
2192 pub const ExtendedScannerFilterPolicies: Self = Self(1 << 7);
2193 #[doc(alias = "kBluetoothLEFeatureSlaveInitiatedFeaturesExchange")]
2194 pub const SlaveInitiatedFeaturesExchange: Self =
2195 Self(BluetoothLEFeatureBits::PeripheralInitiatedFeaturesExchange.0);
2196}
2197
2198#[cfg(feature = "objc2")]
2199unsafe impl Encode for BluetoothLEFeatureBits {
2200 const ENCODING: Encoding = c_uint::ENCODING;
2201}
2202
2203#[cfg(feature = "objc2")]
2204unsafe impl RefEncode for BluetoothLEFeatureBits {
2205 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2206}
2207
2208#[repr(transparent)]
2210#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2211pub struct BluetoothFeatureBits(pub c_uint);
2212impl BluetoothFeatureBits {
2213 pub const kBluetoothFeatureThreeSlotPackets: Self = Self(1 << 0);
2214 pub const kBluetoothFeatureFiveSlotPackets: Self = Self(1 << 1);
2215 pub const kBluetoothFeatureEncryption: Self = Self(1 << 2);
2216 pub const kBluetoothFeatureSlotOffset: Self = Self(1 << 3);
2217 pub const kBluetoothFeatureTimingAccuracy: Self = Self(1 << 4);
2218 pub const kBluetoothFeatureSwitchRoles: Self = Self(1 << 5);
2219 pub const kBluetoothFeatureHoldMode: Self = Self(1 << 6);
2220 pub const kBluetoothFeatureSniffMode: Self = Self(1 << 7);
2221 pub const kBluetoothFeatureParkMode: Self = Self(1 << 0);
2222 pub const kBluetoothFeatureRSSI: Self = Self(1 << 1);
2223 pub const kBluetoothFeaturePowerControlRequests: Self = Self(1 << 1);
2224 pub const kBluetoothFeatureChannelQuality: Self = Self(1 << 2);
2225 pub const kBluetoothFeatureSCOLink: Self = Self(1 << 3);
2226 pub const kBluetoothFeatureHV2Packets: Self = Self(1 << 4);
2227 pub const kBluetoothFeatureHV3Packets: Self = Self(1 << 5);
2228 pub const kBluetoothFeatureULawLog: Self = Self(1 << 6);
2229 pub const kBluetoothFeatureALawLog: Self = Self(1 << 7);
2230 pub const kBluetoothFeatureCVSD: Self = Self(1 << 0);
2231 pub const kBluetoothFeaturePagingScheme: Self = Self(1 << 1);
2232 pub const kBluetoothFeaturePowerControl: Self = Self(1 << 2);
2233 pub const kBluetoothFeatureTransparentSCOData: Self = Self(1 << 3);
2234 pub const kBluetoothFeatureFlowControlLagBit0: Self = Self(1 << 4);
2235 pub const kBluetoothFeatureFlowControlLagBit1: Self = Self(1 << 5);
2236 pub const kBluetoothFeatureFlowControlLagBit2: Self = Self(1 << 6);
2237 pub const kBluetoothFeatureBroadcastEncryption: Self = Self(1 << 7);
2238 pub const kBluetoothFeatureScatterMode: Self = Self(1 << 0);
2239 pub const kBluetoothFeatureEnhancedDataRateACL2MbpsMode: Self = Self(1 << 1);
2240 pub const kBluetoothFeatureEnhancedDataRateACL3MbpsMode: Self = Self(1 << 2);
2241 pub const kBluetoothFeatureEnhancedInquiryScan: Self = Self(1 << 3);
2242 pub const kBluetoothFeatureInterlacedInquiryScan: Self = Self(1 << 4);
2243 pub const kBluetoothFeatureInterlacedPageScan: Self = Self(1 << 5);
2244 pub const kBluetoothFeatureRSSIWithInquiryResult: Self = Self(1 << 6);
2245 pub const kBluetoothFeatureExtendedSCOLink: Self = Self(1 << 7);
2246 pub const kBluetoothFeatureEV4Packets: Self = Self(1 << 0);
2247 pub const kBluetoothFeatureEV5Packets: Self = Self(1 << 1);
2248 pub const kBluetoothFeatureAbsenceMasks: Self = Self(1 << 2);
2249 pub const kBluetoothFeatureAFHCapablePeripheral: Self = Self(1 << 3);
2250 pub const kBluetoothFeatureAFHClassificationPeripheral: Self = Self(1 << 4);
2251 pub const kBluetoothFeatureAliasAuhentication: Self = Self(1 << 5);
2252 pub const kBluetoothFeatureLESupportedController: Self = Self(1 << 6);
2253 pub const kBluetoothFeature3SlotEnhancedDataRateACLPackets: Self = Self(1 << 7);
2254 pub const kBluetoothFeatureAFHCapableSlave: Self =
2255 Self(BluetoothFeatureBits::kBluetoothFeatureAFHCapablePeripheral.0);
2256 pub const kBluetoothFeatureAFHClassificationSlave: Self =
2257 Self(BluetoothFeatureBits::kBluetoothFeatureAFHClassificationPeripheral.0);
2258 pub const kBluetoothFeature5SlotEnhancedDataRateACLPackets: Self = Self(1 << 0);
2259 pub const kBluetoothFeatureSniffSubrating: Self = Self(1 << 1);
2260 pub const kBluetoothFeaturePauseEncryption: Self = Self(1 << 2);
2261 pub const kBluetoothFeatureAFHCapableMaster: Self = Self(1 << 3);
2262 pub const kBluetoothFeatureAFHClassificationMaster: Self = Self(1 << 4);
2263 pub const kBluetoothFeatureEnhancedDataRateeSCO2MbpsMode: Self = Self(1 << 5);
2264 pub const kBluetoothFeatureEnhancedDataRateeSCO3MbpsMode: Self = Self(1 << 6);
2265 pub const kBluetoothFeature3SlotEnhancedDataRateeSCOPackets: Self = Self(1 << 7);
2266 pub const kBluetoothFeatureExtendedInquiryResponse: Self = Self(1 << 0);
2267 pub const kBluetoothFeatureSecureSimplePairing: Self = Self(1 << 3);
2268 pub const kBluetoothFeatureEncapsulatedPDU: Self = Self(1 << 4);
2269 pub const kBluetoothFeatureErroneousDataReporting: Self = Self(1 << 5);
2270 pub const kBluetoothFeatureNonFlushablePacketBoundaryFlag: Self = Self(1 << 6);
2271 pub const kBluetoothFeatureLinkSupervisionTimeoutChangedEvent: Self = Self(1 << 0);
2272 pub const kBluetoothFeatureInquiryTransmissionPowerLevel: Self = Self(1 << 1);
2273 pub const kBluetoothFeatureExtendedFeatures: Self = Self(1 << 7);
2274 pub const kBluetoothExtendedFeatureSimpleSecurePairingHostMode: Self = Self(1 << 0);
2275 pub const kBluetoothExtendedFeatureLESupportedHostMode: Self = Self(1 << 1);
2276 pub const kBluetoothExtendedFeatureLEAndBREDRToSameDeviceHostMode: Self = Self(1 << 2);
2277 pub const KBluetoothExtendedFeatureSecureConnectionsHostMode: Self = Self(1 << 3);
2278 pub const kBluetoothExtendedFeatureSecureConnectionsControllerSupport: Self = Self(1 << 0);
2279 pub const kBluetoothExtendedFeaturePing: Self = Self(1 << 1);
2280 pub const kBluetoothExtendedFeatureReserved: Self = Self(1 << 2);
2281 pub const kBluetoothExtendedFeatureTrainNudging: Self = Self(1 << 3);
2282 pub const kBluetoothExtendedFeatureSlotAvailabilityMask: Self = Self(1 << 4);
2283}
2284
2285#[cfg(feature = "objc2")]
2286unsafe impl Encode for BluetoothFeatureBits {
2287 const ENCODING: Encoding = c_uint::ENCODING;
2288}
2289
2290#[cfg(feature = "objc2")]
2291unsafe impl RefEncode for BluetoothFeatureBits {
2292 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2293}
2294
2295#[repr(C)]
2297#[derive(Clone, Copy, Debug, PartialEq)]
2298pub struct BluetoothEventFilterCondition {
2299 pub data: [u8; 7],
2300}
2301
2302#[cfg(feature = "objc2")]
2303unsafe impl Encode for BluetoothEventFilterCondition {
2304 const ENCODING: Encoding =
2305 Encoding::Struct("BluetoothEventFilterCondition", &[<[u8; 7]>::ENCODING]);
2306}
2307
2308#[cfg(feature = "objc2")]
2309unsafe impl RefEncode for BluetoothEventFilterCondition {
2310 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2311}
2312
2313pub type BluetoothHCIFailedContactCount = u16;
2315
2316#[repr(C)]
2318#[derive(Clone, Copy, Debug, PartialEq)]
2319pub struct BluetoothHCIFailedContactInfo {
2320 pub count: BluetoothHCIFailedContactCount,
2321 pub handle: BluetoothConnectionHandle,
2322}
2323
2324#[cfg(feature = "objc2")]
2325unsafe impl Encode for BluetoothHCIFailedContactInfo {
2326 const ENCODING: Encoding = Encoding::Struct(
2327 "BluetoothHCIFailedContactInfo",
2328 &[
2329 <BluetoothHCIFailedContactCount>::ENCODING,
2330 <BluetoothConnectionHandle>::ENCODING,
2331 ],
2332 );
2333}
2334
2335#[cfg(feature = "objc2")]
2336unsafe impl RefEncode for BluetoothHCIFailedContactInfo {
2337 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2338}
2339
2340pub type BluetoothHCIRSSIValue = i8;
2342
2343#[repr(C)]
2345#[derive(Clone, Copy, Debug, PartialEq)]
2346pub struct BluetoothHCIRSSIInfo {
2347 pub handle: BluetoothConnectionHandle,
2348 pub RSSIValue: BluetoothHCIRSSIValue,
2349}
2350
2351#[cfg(feature = "objc2")]
2352unsafe impl Encode for BluetoothHCIRSSIInfo {
2353 const ENCODING: Encoding = Encoding::Struct(
2354 "BluetoothHCIRSSIInfo",
2355 &[
2356 <BluetoothConnectionHandle>::ENCODING,
2357 <BluetoothHCIRSSIValue>::ENCODING,
2358 ],
2359 );
2360}
2361
2362#[cfg(feature = "objc2")]
2363unsafe impl RefEncode for BluetoothHCIRSSIInfo {
2364 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2365}
2366
2367pub type BluetoothHCILinkQuality = u8;
2369
2370#[repr(C)]
2372#[derive(Clone, Copy, Debug, PartialEq)]
2373pub struct BluetoothHCILinkQualityInfo {
2374 pub handle: BluetoothConnectionHandle,
2375 pub qualityValue: BluetoothHCILinkQuality,
2376}
2377
2378#[cfg(feature = "objc2")]
2379unsafe impl Encode for BluetoothHCILinkQualityInfo {
2380 const ENCODING: Encoding = Encoding::Struct(
2381 "BluetoothHCILinkQualityInfo",
2382 &[
2383 <BluetoothConnectionHandle>::ENCODING,
2384 <BluetoothHCILinkQuality>::ENCODING,
2385 ],
2386 );
2387}
2388
2389#[cfg(feature = "objc2")]
2390unsafe impl RefEncode for BluetoothHCILinkQualityInfo {
2391 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2392}
2393
2394pub type BluetoothHCIEncryptionKeySize = u8;
2396
2397#[repr(C)]
2399#[derive(Clone, Copy, Debug, PartialEq)]
2400pub struct BluetoothHCIEncryptionKeySizeInfo {
2401 pub handle: BluetoothConnectionHandle,
2402 pub keySize: BluetoothHCIEncryptionKeySize,
2403}
2404
2405#[cfg(feature = "objc2")]
2406unsafe impl Encode for BluetoothHCIEncryptionKeySizeInfo {
2407 const ENCODING: Encoding = Encoding::Struct(
2408 "BluetoothHCIEncryptionKeySizeInfo",
2409 &[
2410 <BluetoothConnectionHandle>::ENCODING,
2411 <BluetoothHCIEncryptionKeySize>::ENCODING,
2412 ],
2413 );
2414}
2415
2416#[cfg(feature = "objc2")]
2417unsafe impl RefEncode for BluetoothHCIEncryptionKeySizeInfo {
2418 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2419}
2420
2421pub type BluetoothHCIRole = u8;
2423
2424#[repr(C)]
2426#[derive(Clone, Copy, Debug, PartialEq)]
2427pub struct BluetoothHCIRoleInfo {
2428 pub role: u8,
2429 pub handle: BluetoothConnectionHandle,
2430}
2431
2432#[cfg(feature = "objc2")]
2433unsafe impl Encode for BluetoothHCIRoleInfo {
2434 const ENCODING: Encoding = Encoding::Struct(
2435 "BluetoothHCIRoleInfo",
2436 &[<u8>::ENCODING, <BluetoothConnectionHandle>::ENCODING],
2437 );
2438}
2439
2440#[cfg(feature = "objc2")]
2441unsafe impl RefEncode for BluetoothHCIRoleInfo {
2442 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2443}
2444
2445#[repr(transparent)]
2447#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2448pub struct BluetoothHCIRoles(pub c_uint);
2449impl BluetoothHCIRoles {
2450 #[doc(alias = "kBluetoothHCICentralRole")]
2451 pub const CentralRole: Self = Self(0x00);
2452 #[doc(alias = "kBluetoothHCIPeripheralRole")]
2453 pub const PeripheralRole: Self = Self(0x01);
2454 #[doc(alias = "kBluetoothHCIMasterRole")]
2455 pub const MasterRole: Self = Self(BluetoothHCIRoles::CentralRole.0);
2456 #[doc(alias = "kBluetoothHCISlaveRole")]
2457 pub const SlaveRole: Self = Self(BluetoothHCIRoles::PeripheralRole.0);
2458}
2459
2460#[cfg(feature = "objc2")]
2461unsafe impl Encode for BluetoothHCIRoles {
2462 const ENCODING: Encoding = c_uint::ENCODING;
2463}
2464
2465#[cfg(feature = "objc2")]
2466unsafe impl RefEncode for BluetoothHCIRoles {
2467 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2468}
2469
2470pub type BluetoothHCILinkPolicySettings = u16;
2472
2473#[repr(transparent)]
2475#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2476pub struct BluetoothHCILinkPolicySettingsValues(pub c_uint);
2477impl BluetoothHCILinkPolicySettingsValues {
2478 #[doc(alias = "kDisableAllLMModes")]
2479 pub const DisableAllLMModes: Self = Self(0x0000);
2480 #[doc(alias = "kEnableCentralPeripheralSwitch")]
2481 pub const EnableCentralPeripheralSwitch: Self = Self(0x0001);
2482 #[doc(alias = "kEnableHoldMode")]
2483 pub const EnableHoldMode: Self = Self(0x0002);
2484 #[doc(alias = "kEnableSniffMode")]
2485 pub const EnableSniffMode: Self = Self(0x0004);
2486 #[doc(alias = "kEnableParkMode")]
2487 pub const EnableParkMode: Self = Self(0x0008);
2488 #[doc(alias = "kReservedForFutureUse")]
2489 pub const ReservedForFutureUse: Self = Self(0x0010);
2490 #[doc(alias = "kEnableMasterSlaveSwitch")]
2491 pub const EnableMasterSlaveSwitch: Self =
2492 Self(BluetoothHCILinkPolicySettingsValues::EnableCentralPeripheralSwitch.0);
2493}
2494
2495#[cfg(feature = "objc2")]
2496unsafe impl Encode for BluetoothHCILinkPolicySettingsValues {
2497 const ENCODING: Encoding = c_uint::ENCODING;
2498}
2499
2500#[cfg(feature = "objc2")]
2501unsafe impl RefEncode for BluetoothHCILinkPolicySettingsValues {
2502 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2503}
2504
2505#[repr(C)]
2507#[derive(Clone, Copy, Debug, PartialEq)]
2508pub struct BluetoothHCILinkPolicySettingsInfo {
2509 pub settings: BluetoothHCILinkPolicySettings,
2510 pub handle: BluetoothConnectionHandle,
2511}
2512
2513#[cfg(feature = "objc2")]
2514unsafe impl Encode for BluetoothHCILinkPolicySettingsInfo {
2515 const ENCODING: Encoding = Encoding::Struct(
2516 "BluetoothHCILinkPolicySettingsInfo",
2517 &[
2518 <BluetoothHCILinkPolicySettings>::ENCODING,
2519 <BluetoothConnectionHandle>::ENCODING,
2520 ],
2521 );
2522}
2523
2524#[cfg(feature = "objc2")]
2525unsafe impl RefEncode for BluetoothHCILinkPolicySettingsInfo {
2526 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2527}
2528
2529#[repr(C)]
2531#[derive(Clone, Copy, Debug, PartialEq)]
2532pub struct BluetoothHCIQualityOfServiceSetupParams {
2533 pub flags: u8,
2534 pub serviceType: u8,
2535 pub tokenRate: u32,
2536 pub peakBandwidth: u32,
2537 pub latency: u32,
2538 pub delayVariation: u32,
2539}
2540
2541#[cfg(feature = "objc2")]
2542unsafe impl Encode for BluetoothHCIQualityOfServiceSetupParams {
2543 const ENCODING: Encoding = Encoding::Struct(
2544 "BluetoothHCIQualityOfServiceSetupParams",
2545 &[
2546 <u8>::ENCODING,
2547 <u8>::ENCODING,
2548 <u32>::ENCODING,
2549 <u32>::ENCODING,
2550 <u32>::ENCODING,
2551 <u32>::ENCODING,
2552 ],
2553 );
2554}
2555
2556#[cfg(feature = "objc2")]
2557unsafe impl RefEncode for BluetoothHCIQualityOfServiceSetupParams {
2558 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2559}
2560
2561#[repr(C)]
2563#[derive(Clone, Copy, Debug, PartialEq)]
2564pub struct BluetoothHCISetupSynchronousConnectionParams {
2565 pub transmitBandwidth: u32,
2566 pub receiveBandwidth: u32,
2567 pub maxLatency: u16,
2568 pub voiceSetting: u16,
2569 pub retransmissionEffort: u8,
2570 pub packetType: u16,
2571}
2572
2573#[cfg(feature = "objc2")]
2574unsafe impl Encode for BluetoothHCISetupSynchronousConnectionParams {
2575 const ENCODING: Encoding = Encoding::Struct(
2576 "BluetoothHCISetupSynchronousConnectionParams",
2577 &[
2578 <u32>::ENCODING,
2579 <u32>::ENCODING,
2580 <u16>::ENCODING,
2581 <u16>::ENCODING,
2582 <u8>::ENCODING,
2583 <u16>::ENCODING,
2584 ],
2585 );
2586}
2587
2588#[cfg(feature = "objc2")]
2589unsafe impl RefEncode for BluetoothHCISetupSynchronousConnectionParams {
2590 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2591}
2592
2593#[repr(C)]
2595#[derive(Clone, Copy, Debug, PartialEq)]
2596pub struct BluetoothHCIAcceptSynchronousConnectionRequestParams {
2597 pub transmitBandwidth: u32,
2598 pub receiveBandwidth: u32,
2599 pub maxLatency: u16,
2600 pub contentFormat: u16,
2601 pub retransmissionEffort: u8,
2602 pub packetType: u16,
2603}
2604
2605#[cfg(feature = "objc2")]
2606unsafe impl Encode for BluetoothHCIAcceptSynchronousConnectionRequestParams {
2607 const ENCODING: Encoding = Encoding::Struct(
2608 "BluetoothHCIAcceptSynchronousConnectionRequestParams",
2609 &[
2610 <u32>::ENCODING,
2611 <u32>::ENCODING,
2612 <u16>::ENCODING,
2613 <u16>::ENCODING,
2614 <u8>::ENCODING,
2615 <u16>::ENCODING,
2616 ],
2617 );
2618}
2619
2620#[cfg(feature = "objc2")]
2621unsafe impl RefEncode for BluetoothHCIAcceptSynchronousConnectionRequestParams {
2622 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2623}
2624
2625#[repr(C)]
2627#[derive(Clone, Copy, Debug, PartialEq)]
2628pub struct BluetoothHCIEnhancedSetupSynchronousConnectionParams {
2629 pub transmitBandwidth: u32,
2630 pub receiveBandwidth: u32,
2631 pub transmitCodingFormat: u64,
2632 pub receiveCodingFormat: u64,
2633 pub transmitCodecFrameSize: u16,
2634 pub receiveCodecFrameSize: u16,
2635 pub inputBandwidth: u32,
2636 pub outputBandwidth: u32,
2637 pub inputCodingFormat: u64,
2638 pub outputCodingFormat: u64,
2639 pub inputCodedDataSize: u16,
2640 pub outputCodedDataSize: u16,
2641 pub inputPCMDataFormat: u8,
2642 pub outputPCMDataFormat: u8,
2643 pub inputPCMSamplePayloadMSBPosition: u8,
2644 pub outputPCMSamplePayloadMSBPosition: u8,
2645 pub inputDataPath: u8,
2646 pub outputDataPath: u8,
2647 pub inputTransportUnitSize: u8,
2648 pub outputTransportUnitSize: u8,
2649 pub maxLatency: u16,
2650 pub packetType: u16,
2651 pub retransmissionEffort: u8,
2652}
2653
2654#[cfg(feature = "objc2")]
2655unsafe impl Encode for BluetoothHCIEnhancedSetupSynchronousConnectionParams {
2656 const ENCODING: Encoding = Encoding::Struct(
2657 "BluetoothHCIEnhancedSetupSynchronousConnectionParams",
2658 &[
2659 <u32>::ENCODING,
2660 <u32>::ENCODING,
2661 <u64>::ENCODING,
2662 <u64>::ENCODING,
2663 <u16>::ENCODING,
2664 <u16>::ENCODING,
2665 <u32>::ENCODING,
2666 <u32>::ENCODING,
2667 <u64>::ENCODING,
2668 <u64>::ENCODING,
2669 <u16>::ENCODING,
2670 <u16>::ENCODING,
2671 <u8>::ENCODING,
2672 <u8>::ENCODING,
2673 <u8>::ENCODING,
2674 <u8>::ENCODING,
2675 <u8>::ENCODING,
2676 <u8>::ENCODING,
2677 <u8>::ENCODING,
2678 <u8>::ENCODING,
2679 <u16>::ENCODING,
2680 <u16>::ENCODING,
2681 <u8>::ENCODING,
2682 ],
2683 );
2684}
2685
2686#[cfg(feature = "objc2")]
2687unsafe impl RefEncode for BluetoothHCIEnhancedSetupSynchronousConnectionParams {
2688 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2689}
2690
2691#[repr(C)]
2693#[derive(Clone, Copy, Debug, PartialEq)]
2694pub struct BluetoothHCIEnhancedAcceptSynchronousConnectionRequestParams {
2695 pub transmitBandwidth: u32,
2696 pub receiveBandwidth: u32,
2697 pub transmitCodingFormat: u64,
2698 pub receiveCodingFormat: u64,
2699 pub transmitCodecFrameSize: u16,
2700 pub receiveCodecFrameSize: u16,
2701 pub inputBandwidth: u32,
2702 pub outputBandwidth: u32,
2703 pub inputCodingFormat: u64,
2704 pub outputCodingFormat: u64,
2705 pub inputCodedDataSize: u16,
2706 pub outputCodedDataSize: u16,
2707 pub inputPCMDataFormat: u8,
2708 pub outputPCMDataFormat: u8,
2709 pub inputPCMSamplePayloadMSBPosition: u8,
2710 pub outputPCMSamplePayloadMSBPosition: u8,
2711 pub inputDataPath: u8,
2712 pub outputDataPath: u8,
2713 pub inputTransportUnitSize: u8,
2714 pub outputTransportUnitSize: u8,
2715 pub maxLatency: u16,
2716 pub packetType: u16,
2717 pub retransmissionEffort: u8,
2718}
2719
2720#[cfg(feature = "objc2")]
2721unsafe impl Encode for BluetoothHCIEnhancedAcceptSynchronousConnectionRequestParams {
2722 const ENCODING: Encoding = Encoding::Struct(
2723 "BluetoothHCIEnhancedAcceptSynchronousConnectionRequestParams",
2724 &[
2725 <u32>::ENCODING,
2726 <u32>::ENCODING,
2727 <u64>::ENCODING,
2728 <u64>::ENCODING,
2729 <u16>::ENCODING,
2730 <u16>::ENCODING,
2731 <u32>::ENCODING,
2732 <u32>::ENCODING,
2733 <u64>::ENCODING,
2734 <u64>::ENCODING,
2735 <u16>::ENCODING,
2736 <u16>::ENCODING,
2737 <u8>::ENCODING,
2738 <u8>::ENCODING,
2739 <u8>::ENCODING,
2740 <u8>::ENCODING,
2741 <u8>::ENCODING,
2742 <u8>::ENCODING,
2743 <u8>::ENCODING,
2744 <u8>::ENCODING,
2745 <u16>::ENCODING,
2746 <u16>::ENCODING,
2747 <u8>::ENCODING,
2748 ],
2749 );
2750}
2751
2752#[cfg(feature = "objc2")]
2753unsafe impl RefEncode for BluetoothHCIEnhancedAcceptSynchronousConnectionRequestParams {
2754 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2755}
2756
2757pub type BluetoothHCILoopbackMode = u8;
2759
2760pub const kBluetoothHCILoopbackModeOff: c_uint = 0x00;
2762pub const kBluetoothHCILoopbackModeLocal: c_uint = 0x01;
2764pub const kBluetoothHCILoopbackModeRemote: c_uint = 0x02;
2766
2767#[repr(C)]
2769#[derive(Clone, Copy, Debug, PartialEq)]
2770pub struct BluetoothReadClockInfo {
2771 pub handle: BluetoothConnectionHandle,
2772 pub clock: u32,
2773 pub accuracy: u16,
2774}
2775
2776#[cfg(feature = "objc2")]
2777unsafe impl Encode for BluetoothReadClockInfo {
2778 const ENCODING: Encoding = Encoding::Struct(
2779 "BluetoothReadClockInfo",
2780 &[
2781 <BluetoothConnectionHandle>::ENCODING,
2782 <u32>::ENCODING,
2783 <u16>::ENCODING,
2784 ],
2785 );
2786}
2787
2788#[cfg(feature = "objc2")]
2789unsafe impl RefEncode for BluetoothReadClockInfo {
2790 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2791}
2792
2793#[repr(C)]
2795#[derive(Clone, Copy, Debug, PartialEq)]
2796pub struct BluetoothHCIEventFlowSpecificationData {
2797 pub connectionHandle: BluetoothConnectionHandle,
2798 pub flags: u8,
2799 pub flowDirection: u8,
2800 pub serviceType: u8,
2801 pub tokenRate: u32,
2802 pub tokenBucketSize: u32,
2803 pub peakBandwidth: u32,
2804 pub accessLatency: u32,
2805}
2806
2807#[cfg(feature = "objc2")]
2808unsafe impl Encode for BluetoothHCIEventFlowSpecificationData {
2809 const ENCODING: Encoding = Encoding::Struct(
2810 "BluetoothHCIEventFlowSpecificationData",
2811 &[
2812 <BluetoothConnectionHandle>::ENCODING,
2813 <u8>::ENCODING,
2814 <u8>::ENCODING,
2815 <u8>::ENCODING,
2816 <u32>::ENCODING,
2817 <u32>::ENCODING,
2818 <u32>::ENCODING,
2819 <u32>::ENCODING,
2820 ],
2821 );
2822}
2823
2824#[cfg(feature = "objc2")]
2825unsafe impl RefEncode for BluetoothHCIEventFlowSpecificationData {
2826 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2827}
2828
2829pub type BluetoothHCIOperationID = u32;
2831
2832pub type BluetoothHCIEventID = u32;
2834
2835pub type BluetoothHCIDataID = u32;
2837
2838pub type BluetoothHCISignalID = u32;
2840
2841pub type BluetoothHCITransportID = u32;
2843
2844pub type BluetoothHCITransportCommandID = u32;
2846
2847pub type BluetoothHCIRequestID = u32;
2849
2850#[repr(C)]
2852#[derive(Clone, Copy, Debug, PartialEq)]
2853pub struct BluetoothHCIVersionInfo {
2854 pub manufacturerName: BluetoothManufacturerName,
2855 pub lmpVersion: BluetoothLMPVersion,
2856 pub lmpSubVersion: BluetoothLMPSubversion,
2857 pub hciVersion: u8,
2858 pub hciRevision: u16,
2859}
2860
2861#[cfg(feature = "objc2")]
2862unsafe impl Encode for BluetoothHCIVersionInfo {
2863 const ENCODING: Encoding = Encoding::Struct(
2864 "BluetoothHCIVersionInfo",
2865 &[
2866 <BluetoothManufacturerName>::ENCODING,
2867 <BluetoothLMPVersion>::ENCODING,
2868 <BluetoothLMPSubversion>::ENCODING,
2869 <u8>::ENCODING,
2870 <u16>::ENCODING,
2871 ],
2872 );
2873}
2874
2875#[cfg(feature = "objc2")]
2876unsafe impl RefEncode for BluetoothHCIVersionInfo {
2877 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2878}
2879
2880#[repr(C)]
2882#[derive(Clone, Copy, Debug, PartialEq)]
2883pub struct BluetoothHCIBufferSize {
2884 pub ACLDataPacketLength: u16,
2885 pub SCODataPacketLength: u8,
2886 pub totalNumACLDataPackets: u16,
2887 pub totalNumSCODataPackets: u16,
2888}
2889
2890#[cfg(feature = "objc2")]
2891unsafe impl Encode for BluetoothHCIBufferSize {
2892 const ENCODING: Encoding = Encoding::Struct(
2893 "BluetoothHCIBufferSize",
2894 &[
2895 <u16>::ENCODING,
2896 <u8>::ENCODING,
2897 <u16>::ENCODING,
2898 <u16>::ENCODING,
2899 ],
2900 );
2901}
2902
2903#[cfg(feature = "objc2")]
2904unsafe impl RefEncode for BluetoothHCIBufferSize {
2905 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2906}
2907
2908#[repr(C)]
2910#[derive(Clone, Copy, Debug, PartialEq)]
2911pub struct BluetoothHCILEBufferSize {
2912 pub ACLDataPacketLength: u16,
2913 pub totalNumACLDataPackets: u8,
2914}
2915
2916#[cfg(feature = "objc2")]
2917unsafe impl Encode for BluetoothHCILEBufferSize {
2918 const ENCODING: Encoding = Encoding::Struct(
2919 "BluetoothHCILEBufferSize",
2920 &[<u16>::ENCODING, <u8>::ENCODING],
2921 );
2922}
2923
2924#[cfg(feature = "objc2")]
2925unsafe impl RefEncode for BluetoothHCILEBufferSize {
2926 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2927}
2928
2929pub type BluetoothHCIConnectionAcceptTimeout = u16;
2931
2932pub type BluetoothHCIPageTimeout = u16;
2934
2935#[repr(transparent)]
2937#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2938pub struct BluetoothHCITimeoutValues(pub c_uint);
2939impl BluetoothHCITimeoutValues {
2940 #[doc(alias = "kDefaultPageTimeout")]
2941 pub const DefaultPageTimeout: Self = Self(0x2710);
2942}
2943
2944#[cfg(feature = "objc2")]
2945unsafe impl Encode for BluetoothHCITimeoutValues {
2946 const ENCODING: Encoding = c_uint::ENCODING;
2947}
2948
2949#[cfg(feature = "objc2")]
2950unsafe impl RefEncode for BluetoothHCITimeoutValues {
2951 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2952}
2953
2954pub type BluetoothHCINumLinkKeysDeleted = u16;
2956
2957pub type BluetoothHCINumLinkKeysToWrite = u8;
2959
2960pub type BluetoothHCIDeleteStoredLinkKeyFlag = u8;
2962
2963#[repr(transparent)]
2965#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2966pub struct BluetoothHCIDeleteStoredLinkKeyFlags(pub c_uint);
2967impl BluetoothHCIDeleteStoredLinkKeyFlags {
2968 #[doc(alias = "kDeleteKeyForSpecifiedDeviceOnly")]
2969 pub const DeleteKeyForSpecifiedDeviceOnly: Self = Self(0x00);
2970 #[doc(alias = "kDeleteAllStoredLinkKeys")]
2971 pub const DeleteAllStoredLinkKeys: Self = Self(0x01);
2972}
2973
2974#[cfg(feature = "objc2")]
2975unsafe impl Encode for BluetoothHCIDeleteStoredLinkKeyFlags {
2976 const ENCODING: Encoding = c_uint::ENCODING;
2977}
2978
2979#[cfg(feature = "objc2")]
2980unsafe impl RefEncode for BluetoothHCIDeleteStoredLinkKeyFlags {
2981 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2982}
2983
2984pub type BluetoothHCIReadStoredLinkKeysFlag = u8;
2986
2987#[repr(transparent)]
2989#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2990pub struct BluetoothHCIReadStoredLinkKeysFlags(pub c_uint);
2991impl BluetoothHCIReadStoredLinkKeysFlags {
2992 #[doc(alias = "kReturnLinkKeyForSpecifiedDeviceOnly")]
2993 pub const ReturnLinkKeyForSpecifiedDeviceOnly: Self = Self(0x00);
2994 #[doc(alias = "kReadAllStoredLinkKeys")]
2995 pub const ReadAllStoredLinkKeys: Self = Self(0x01);
2996}
2997
2998#[cfg(feature = "objc2")]
2999unsafe impl Encode for BluetoothHCIReadStoredLinkKeysFlags {
3000 const ENCODING: Encoding = c_uint::ENCODING;
3001}
3002
3003#[cfg(feature = "objc2")]
3004unsafe impl RefEncode for BluetoothHCIReadStoredLinkKeysFlags {
3005 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3006}
3007
3008#[repr(C)]
3010#[derive(Clone, Copy, Debug, PartialEq)]
3011pub struct BluetoothHCIStoredLinkKeysInfo {
3012 pub numLinkKeysRead: u16,
3013 pub maxNumLinkKeysAllowedInDevice: u16,
3014}
3015
3016#[cfg(feature = "objc2")]
3017unsafe impl Encode for BluetoothHCIStoredLinkKeysInfo {
3018 const ENCODING: Encoding = Encoding::Struct(
3019 "BluetoothHCIStoredLinkKeysInfo",
3020 &[<u16>::ENCODING, <u16>::ENCODING],
3021 );
3022}
3023
3024#[cfg(feature = "objc2")]
3025unsafe impl RefEncode for BluetoothHCIStoredLinkKeysInfo {
3026 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3027}
3028
3029pub type BluetoothHCIPageScanMode = u8;
3031
3032#[repr(transparent)]
3034#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3035pub struct BluetoothHCIPageScanModes(pub c_uint);
3036impl BluetoothHCIPageScanModes {
3037 #[doc(alias = "kMandatoryPageScanMode")]
3038 pub const MandatoryPageScanMode: Self = Self(0x00);
3039 #[doc(alias = "kOptionalPageScanMode1")]
3040 pub const OptionalPageScanMode1: Self = Self(0x01);
3041 #[doc(alias = "kOptionalPageScanMode2")]
3042 pub const OptionalPageScanMode2: Self = Self(0x02);
3043 #[doc(alias = "kOptionalPageScanMode3")]
3044 pub const OptionalPageScanMode3: Self = Self(0x03);
3045}
3046
3047#[cfg(feature = "objc2")]
3048unsafe impl Encode for BluetoothHCIPageScanModes {
3049 const ENCODING: Encoding = c_uint::ENCODING;
3050}
3051
3052#[cfg(feature = "objc2")]
3053unsafe impl RefEncode for BluetoothHCIPageScanModes {
3054 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3055}
3056
3057pub type BluetoothHCIPageScanPeriodMode = u8;
3059
3060#[repr(transparent)]
3062#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3063pub struct BluetoothHCIPageScanPeriodModes(pub c_uint);
3064impl BluetoothHCIPageScanPeriodModes {
3065 #[doc(alias = "kP0Mode")]
3066 pub const P0Mode: Self = Self(0x00);
3067 #[doc(alias = "kP1Mode")]
3068 pub const P1Mode: Self = Self(0x01);
3069 #[doc(alias = "kP2Mode")]
3070 pub const P2Mode: Self = Self(0x02);
3071}
3072
3073#[cfg(feature = "objc2")]
3074unsafe impl Encode for BluetoothHCIPageScanPeriodModes {
3075 const ENCODING: Encoding = c_uint::ENCODING;
3076}
3077
3078#[cfg(feature = "objc2")]
3079unsafe impl RefEncode for BluetoothHCIPageScanPeriodModes {
3080 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3081}
3082
3083pub type BluetoothHCIPageScanEnableState = u8;
3085
3086#[repr(transparent)]
3088#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3089pub struct BluetoothHCIPageScanEnableStates(pub c_uint);
3090impl BluetoothHCIPageScanEnableStates {
3091 #[doc(alias = "kNoScansEnabled")]
3092 pub const NoScansEnabled: Self = Self(0x00);
3093 #[doc(alias = "kInquiryScanEnabledPageScanDisabled")]
3094 pub const InquiryScanEnabledPageScanDisabled: Self = Self(0x01);
3095 #[doc(alias = "kInquiryScanDisabledPageScanEnabled")]
3096 pub const InquiryScanDisabledPageScanEnabled: Self = Self(0x02);
3097 #[doc(alias = "kInquiryScanEnabledPageScanEnabled")]
3098 pub const InquiryScanEnabledPageScanEnabled: Self = Self(0x03);
3099}
3100
3101#[cfg(feature = "objc2")]
3102unsafe impl Encode for BluetoothHCIPageScanEnableStates {
3103 const ENCODING: Encoding = c_uint::ENCODING;
3104}
3105
3106#[cfg(feature = "objc2")]
3107unsafe impl RefEncode for BluetoothHCIPageScanEnableStates {
3108 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3109}
3110
3111#[repr(C)]
3113#[derive(Clone, Copy, Debug, PartialEq)]
3114pub struct BluetoothHCIScanActivity {
3115 pub scanInterval: u16,
3116 pub scanWindow: u16,
3117}
3118
3119#[cfg(feature = "objc2")]
3120unsafe impl Encode for BluetoothHCIScanActivity {
3121 const ENCODING: Encoding = Encoding::Struct(
3122 "BluetoothHCIScanActivity",
3123 &[<u16>::ENCODING, <u16>::ENCODING],
3124 );
3125}
3126
3127#[cfg(feature = "objc2")]
3128unsafe impl RefEncode for BluetoothHCIScanActivity {
3129 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3130}
3131
3132#[repr(C)]
3134#[derive(Clone, Copy, Debug, PartialEq)]
3135pub struct BluetoothHCIInquiryAccessCode {
3136 pub data: [u8; 3],
3137}
3138
3139#[cfg(feature = "objc2")]
3140unsafe impl Encode for BluetoothHCIInquiryAccessCode {
3141 const ENCODING: Encoding =
3142 Encoding::Struct("BluetoothHCIInquiryAccessCode", &[<[u8; 3]>::ENCODING]);
3143}
3144
3145#[cfg(feature = "objc2")]
3146unsafe impl RefEncode for BluetoothHCIInquiryAccessCode {
3147 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3148}
3149
3150pub type BluetoothHCIInquiryAccessCodeCount = u8;
3152
3153#[repr(C)]
3155#[derive(Clone, Copy, Debug, PartialEq)]
3156pub struct BluetoothHCICurrentInquiryAccessCodes {
3157 pub count: BluetoothHCIInquiryAccessCodeCount,
3158 pub codes: *mut BluetoothHCIInquiryAccessCode,
3159}
3160
3161#[cfg(feature = "objc2")]
3162unsafe impl Encode for BluetoothHCICurrentInquiryAccessCodes {
3163 const ENCODING: Encoding = Encoding::Struct(
3164 "BluetoothHCICurrentInquiryAccessCodes",
3165 &[
3166 <BluetoothHCIInquiryAccessCodeCount>::ENCODING,
3167 <*mut BluetoothHCIInquiryAccessCode>::ENCODING,
3168 ],
3169 );
3170}
3171
3172#[cfg(feature = "objc2")]
3173unsafe impl RefEncode for BluetoothHCICurrentInquiryAccessCodes {
3174 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3175}
3176
3177pub const kMaximumNumberOfInquiryAccessCodes: c_uint = 0x40;
3179
3180#[repr(C)]
3182#[derive(Clone, Copy, Debug, PartialEq)]
3183pub struct BluetoothHCICurrentInquiryAccessCodesForWrite {
3184 pub count: BluetoothHCIInquiryAccessCodeCount,
3185 pub codes: [u8; 192],
3186}
3187
3188#[cfg(feature = "objc2")]
3189unsafe impl Encode for BluetoothHCICurrentInquiryAccessCodesForWrite {
3190 const ENCODING: Encoding = Encoding::Struct(
3191 "BluetoothHCICurrentInquiryAccessCodesForWrite",
3192 &[
3193 <BluetoothHCIInquiryAccessCodeCount>::ENCODING,
3194 <[u8; 192]>::ENCODING,
3195 ],
3196 );
3197}
3198
3199#[cfg(feature = "objc2")]
3200unsafe impl RefEncode for BluetoothHCICurrentInquiryAccessCodesForWrite {
3201 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3202}
3203
3204#[repr(C)]
3206#[derive(Clone, Copy, Debug, PartialEq)]
3207pub struct BluetoothHCILinkSupervisionTimeout {
3208 pub handle: BluetoothConnectionHandle,
3209 pub timeout: u16,
3210}
3211
3212#[cfg(feature = "objc2")]
3213unsafe impl Encode for BluetoothHCILinkSupervisionTimeout {
3214 const ENCODING: Encoding = Encoding::Struct(
3215 "BluetoothHCILinkSupervisionTimeout",
3216 &[<BluetoothConnectionHandle>::ENCODING, <u16>::ENCODING],
3217 );
3218}
3219
3220#[cfg(feature = "objc2")]
3221unsafe impl RefEncode for BluetoothHCILinkSupervisionTimeout {
3222 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3223}
3224
3225pub type BluetoothHCIFlowControlState = u8;
3227
3228#[repr(transparent)]
3230#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3231pub struct BluetoothHCISCOFlowControlStates(pub c_uint);
3232impl BluetoothHCISCOFlowControlStates {
3233 #[doc(alias = "kSCOFlowControlDisabled")]
3234 pub const SCOFlowControlDisabled: Self = Self(0x00);
3235 #[doc(alias = "kSCOFlowControlEnabled")]
3236 pub const SCOFlowControlEnabled: Self = Self(0x01);
3237}
3238
3239#[cfg(feature = "objc2")]
3240unsafe impl Encode for BluetoothHCISCOFlowControlStates {
3241 const ENCODING: Encoding = c_uint::ENCODING;
3242}
3243
3244#[cfg(feature = "objc2")]
3245unsafe impl RefEncode for BluetoothHCISCOFlowControlStates {
3246 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3247}
3248
3249#[repr(transparent)]
3251#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3252pub struct BluetoothHCIGeneralFlowControlStates(pub c_uint);
3253impl BluetoothHCIGeneralFlowControlStates {
3254 #[doc(alias = "kHostControllerToHostFlowControlOff")]
3255 pub const HostControllerToHostFlowControlOff: Self = Self(0x00);
3256 #[doc(alias = "kHCIACLDataPacketsOnHCISCODataPacketsOff")]
3257 pub const HCIACLDataPacketsOnHCISCODataPacketsOff: Self = Self(0x01);
3258 #[doc(alias = "kHCIACLDataPacketsOffHCISCODataPacketsOn")]
3259 pub const HCIACLDataPacketsOffHCISCODataPacketsOn: Self = Self(0x02);
3260 #[doc(alias = "kHCIACLDataPacketsOnHCISCODataPacketsOn")]
3261 pub const HCIACLDataPacketsOnHCISCODataPacketsOn: Self = Self(0x03);
3262}
3263
3264#[cfg(feature = "objc2")]
3265unsafe impl Encode for BluetoothHCIGeneralFlowControlStates {
3266 const ENCODING: Encoding = c_uint::ENCODING;
3267}
3268
3269#[cfg(feature = "objc2")]
3270unsafe impl RefEncode for BluetoothHCIGeneralFlowControlStates {
3271 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3272}
3273
3274pub type BluetoothHCITransmitPowerLevel = i8;
3276
3277pub type BluetoothHCITransmitPowerLevelType = u8;
3279
3280#[repr(transparent)]
3282#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3283pub struct BluetoothHCITransmitReadPowerLevelTypes(pub c_uint);
3284impl BluetoothHCITransmitReadPowerLevelTypes {
3285 #[doc(alias = "kReadCurrentTransmitPowerLevel")]
3286 pub const ReadCurrentTransmitPowerLevel: Self = Self(0x00);
3287 #[doc(alias = "kReadMaximumTransmitPowerLevel")]
3288 pub const ReadMaximumTransmitPowerLevel: Self = Self(0x01);
3289}
3290
3291#[cfg(feature = "objc2")]
3292unsafe impl Encode for BluetoothHCITransmitReadPowerLevelTypes {
3293 const ENCODING: Encoding = c_uint::ENCODING;
3294}
3295
3296#[cfg(feature = "objc2")]
3297unsafe impl RefEncode for BluetoothHCITransmitReadPowerLevelTypes {
3298 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3299}
3300
3301pub type BluetoothHCIAFHChannelAssessmentMode = u8;
3303
3304#[repr(transparent)]
3306#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3307pub struct BluetoothHCIAFHChannelAssessmentModes(pub c_uint);
3308impl BluetoothHCIAFHChannelAssessmentModes {
3309 #[doc(alias = "kAFHChannelAssessmentModeDisabled")]
3310 pub const AFHChannelAssessmentModeDisabled: Self = Self(0x00);
3311 #[doc(alias = "kAFHChannelAssessmentModeEnabled")]
3312 pub const AFHChannelAssessmentModeEnabled: Self = Self(0x01);
3313}
3314
3315#[cfg(feature = "objc2")]
3316unsafe impl Encode for BluetoothHCIAFHChannelAssessmentModes {
3317 const ENCODING: Encoding = c_uint::ENCODING;
3318}
3319
3320#[cfg(feature = "objc2")]
3321unsafe impl RefEncode for BluetoothHCIAFHChannelAssessmentModes {
3322 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3323}
3324
3325#[repr(C)]
3327#[derive(Clone, Copy, Debug, PartialEq)]
3328pub struct BluetoothHCITransmitPowerLevelInfo {
3329 pub handle: BluetoothConnectionHandle,
3330 pub level: BluetoothHCITransmitPowerLevel,
3331}
3332
3333#[cfg(feature = "objc2")]
3334unsafe impl Encode for BluetoothHCITransmitPowerLevelInfo {
3335 const ENCODING: Encoding = Encoding::Struct(
3336 "BluetoothHCITransmitPowerLevelInfo",
3337 &[
3338 <BluetoothConnectionHandle>::ENCODING,
3339 <BluetoothHCITransmitPowerLevel>::ENCODING,
3340 ],
3341 );
3342}
3343
3344#[cfg(feature = "objc2")]
3345unsafe impl RefEncode for BluetoothHCITransmitPowerLevelInfo {
3346 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3347}
3348
3349pub type BluetoothHCINumBroadcastRetransmissions = u8;
3351
3352pub type BluetoothHCIHoldModeActivity = u8;
3354
3355#[repr(transparent)]
3357#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3358pub struct BluetoothHCIHoldModeActivityStates(pub c_uint);
3359impl BluetoothHCIHoldModeActivityStates {
3360 #[doc(alias = "kMaintainCurrentPowerState")]
3361 pub const MaintainCurrentPowerState: Self = Self(0x00);
3362 #[doc(alias = "kSuspendPageScan")]
3363 pub const SuspendPageScan: Self = Self(0x01);
3364 #[doc(alias = "kSuspendInquiryScan")]
3365 pub const SuspendInquiryScan: Self = Self(0x02);
3366 #[doc(alias = "kSuspendPeriodicInquiries")]
3367 pub const SuspendPeriodicInquiries: Self = Self(0x03);
3368}
3369
3370#[cfg(feature = "objc2")]
3371unsafe impl Encode for BluetoothHCIHoldModeActivityStates {
3372 const ENCODING: Encoding = c_uint::ENCODING;
3373}
3374
3375#[cfg(feature = "objc2")]
3376unsafe impl RefEncode for BluetoothHCIHoldModeActivityStates {
3377 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3378}
3379
3380pub type BluetoothHCIAuthenticationEnable = u8;
3382
3383#[repr(transparent)]
3385#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3386pub struct BluetoothHCIAuthentionEnableModes(pub c_uint);
3387impl BluetoothHCIAuthentionEnableModes {
3388 #[doc(alias = "kAuthenticationDisabled")]
3389 pub const AuthenticationDisabled: Self = Self(0x00);
3390 #[doc(alias = "kAuthenticationEnabled")]
3391 pub const AuthenticationEnabled: Self = Self(0x01);
3392}
3393
3394#[cfg(feature = "objc2")]
3395unsafe impl Encode for BluetoothHCIAuthentionEnableModes {
3396 const ENCODING: Encoding = c_uint::ENCODING;
3397}
3398
3399#[cfg(feature = "objc2")]
3400unsafe impl RefEncode for BluetoothHCIAuthentionEnableModes {
3401 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3402}
3403
3404pub type BluetoothHCIEncryptionMode = u8;
3406
3407#[repr(transparent)]
3409#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3410pub struct BluetoothHCIEncryptionModes(pub c_uint);
3411impl BluetoothHCIEncryptionModes {
3412 #[doc(alias = "kEncryptionDisabled")]
3413 pub const EncryptionDisabled: Self = Self(0x00);
3414 #[doc(alias = "kEncryptionOnlyForPointToPointPackets")]
3415 pub const EncryptionOnlyForPointToPointPackets: Self = Self(0x01);
3416 #[doc(alias = "kEncryptionForBothPointToPointAndBroadcastPackets")]
3417 pub const EncryptionForBothPointToPointAndBroadcastPackets: Self = Self(0x02);
3418}
3419
3420#[cfg(feature = "objc2")]
3421unsafe impl Encode for BluetoothHCIEncryptionModes {
3422 const ENCODING: Encoding = c_uint::ENCODING;
3423}
3424
3425#[cfg(feature = "objc2")]
3426unsafe impl RefEncode for BluetoothHCIEncryptionModes {
3427 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3428}
3429
3430pub type BluetoothHCIAutomaticFlushTimeout = u16;
3432
3433#[repr(C)]
3435#[derive(Clone, Copy, Debug, PartialEq)]
3436pub struct BluetoothHCIAutomaticFlushTimeoutInfo {
3437 pub handle: BluetoothConnectionHandle,
3438 pub timeout: BluetoothHCIAutomaticFlushTimeout,
3439}
3440
3441#[cfg(feature = "objc2")]
3442unsafe impl Encode for BluetoothHCIAutomaticFlushTimeoutInfo {
3443 const ENCODING: Encoding = Encoding::Struct(
3444 "BluetoothHCIAutomaticFlushTimeoutInfo",
3445 &[
3446 <BluetoothConnectionHandle>::ENCODING,
3447 <BluetoothHCIAutomaticFlushTimeout>::ENCODING,
3448 ],
3449 );
3450}
3451
3452#[cfg(feature = "objc2")]
3453unsafe impl RefEncode for BluetoothHCIAutomaticFlushTimeoutInfo {
3454 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3455}
3456
3457pub type BluetoothTransportInfoPtr = *mut BluetoothTransportInfo;
3459
3460#[repr(C)]
3462#[derive(Clone, Copy, Debug, PartialEq)]
3463pub struct BluetoothTransportInfo {
3464 pub productID: u32,
3465 pub vendorID: u32,
3466 pub r#type: u32,
3467 pub productName: [c_char; 35],
3468 pub vendorName: [c_char; 35],
3469 pub totalDataBytesSent: u64,
3470 pub totalSCOBytesSent: u64,
3471 pub totalDataBytesReceived: u64,
3472 pub totalSCOBytesReceived: u64,
3473}
3474
3475#[cfg(feature = "objc2")]
3476unsafe impl Encode for BluetoothTransportInfo {
3477 const ENCODING: Encoding = Encoding::Struct(
3478 "BluetoothTransportInfo",
3479 &[
3480 <u32>::ENCODING,
3481 <u32>::ENCODING,
3482 <u32>::ENCODING,
3483 <[c_char; 35]>::ENCODING,
3484 <[c_char; 35]>::ENCODING,
3485 <u64>::ENCODING,
3486 <u64>::ENCODING,
3487 <u64>::ENCODING,
3488 <u64>::ENCODING,
3489 ],
3490 );
3491}
3492
3493#[cfg(feature = "objc2")]
3494unsafe impl RefEncode for BluetoothTransportInfo {
3495 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3496}
3497
3498#[repr(transparent)]
3500#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3501pub struct BluetoothTransportTypes(pub c_uint);
3502impl BluetoothTransportTypes {
3503 #[doc(alias = "kBluetoothTransportTypeUSB")]
3504 pub const USB: Self = Self(0x01);
3505 #[doc(alias = "kBluetoothTransportTypePCCard")]
3506 pub const PCCard: Self = Self(0x02);
3507 #[doc(alias = "kBluetoothTransportTypePCICard")]
3508 pub const PCICard: Self = Self(0x03);
3509 #[doc(alias = "kBluetoothTransportTypeUART")]
3510 pub const UART: Self = Self(0x04);
3511 #[doc(alias = "kBluetoothTransportTypePCIe")]
3512 pub const PCIe: Self = Self(0x05);
3513}
3514
3515#[cfg(feature = "objc2")]
3516unsafe impl Encode for BluetoothTransportTypes {
3517 const ENCODING: Encoding = c_uint::ENCODING;
3518}
3519
3520#[cfg(feature = "objc2")]
3521unsafe impl RefEncode for BluetoothTransportTypes {
3522 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3523}
3524
3525#[repr(C)]
3527#[derive(Clone, Copy, Debug, PartialEq)]
3528pub struct BluetoothHCIInquiryResult {
3529 pub deviceAddress: BluetoothDeviceAddress,
3530 pub pageScanRepetitionMode: BluetoothPageScanRepetitionMode,
3531 pub pageScanPeriodMode: BluetoothHCIPageScanPeriodMode,
3532 pub pageScanMode: BluetoothHCIPageScanMode,
3533 pub classOfDevice: BluetoothClassOfDevice,
3534 pub clockOffset: BluetoothClockOffset,
3535}
3536
3537#[cfg(feature = "objc2")]
3538unsafe impl Encode for BluetoothHCIInquiryResult {
3539 const ENCODING: Encoding = Encoding::Struct(
3540 "BluetoothHCIInquiryResult",
3541 &[
3542 <BluetoothDeviceAddress>::ENCODING,
3543 <BluetoothPageScanRepetitionMode>::ENCODING,
3544 <BluetoothHCIPageScanPeriodMode>::ENCODING,
3545 <BluetoothHCIPageScanMode>::ENCODING,
3546 <BluetoothClassOfDevice>::ENCODING,
3547 <BluetoothClockOffset>::ENCODING,
3548 ],
3549 );
3550}
3551
3552#[cfg(feature = "objc2")]
3553unsafe impl RefEncode for BluetoothHCIInquiryResult {
3554 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3555}
3556
3557#[repr(C)]
3559#[derive(Clone, Copy, Debug, PartialEq)]
3560pub struct BluetoothHCIInquiryResults {
3561 pub results: [BluetoothHCIInquiryResult; 50],
3562 pub count: IOItemCount,
3563}
3564
3565#[cfg(feature = "objc2")]
3566unsafe impl Encode for BluetoothHCIInquiryResults {
3567 const ENCODING: Encoding = Encoding::Struct(
3568 "BluetoothHCIInquiryResults",
3569 &[
3570 <[BluetoothHCIInquiryResult; 50]>::ENCODING,
3571 <IOItemCount>::ENCODING,
3572 ],
3573 );
3574}
3575
3576#[cfg(feature = "objc2")]
3577unsafe impl RefEncode for BluetoothHCIInquiryResults {
3578 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3579}
3580
3581#[repr(C)]
3583#[derive(Clone, Copy, Debug, PartialEq)]
3584pub struct BluetoothHCIInquiryWithRSSIResult {
3585 pub deviceAddress: BluetoothDeviceAddress,
3586 pub pageScanRepetitionMode: BluetoothPageScanRepetitionMode,
3587 pub reserved: u8,
3588 pub classOfDevice: BluetoothClassOfDevice,
3589 pub clockOffset: BluetoothClockOffset,
3590 pub RSSIValue: BluetoothHCIRSSIValue,
3591}
3592
3593#[cfg(feature = "objc2")]
3594unsafe impl Encode for BluetoothHCIInquiryWithRSSIResult {
3595 const ENCODING: Encoding = Encoding::Struct(
3596 "BluetoothHCIInquiryWithRSSIResult",
3597 &[
3598 <BluetoothDeviceAddress>::ENCODING,
3599 <BluetoothPageScanRepetitionMode>::ENCODING,
3600 <u8>::ENCODING,
3601 <BluetoothClassOfDevice>::ENCODING,
3602 <BluetoothClockOffset>::ENCODING,
3603 <BluetoothHCIRSSIValue>::ENCODING,
3604 ],
3605 );
3606}
3607
3608#[cfg(feature = "objc2")]
3609unsafe impl RefEncode for BluetoothHCIInquiryWithRSSIResult {
3610 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3611}
3612
3613#[repr(C)]
3615#[derive(Clone, Copy, Debug, PartialEq)]
3616pub struct BluetoothHCIInquiryWithRSSIResults {
3617 pub results: [BluetoothHCIInquiryWithRSSIResult; 50],
3618 pub count: IOItemCount,
3619}
3620
3621#[cfg(feature = "objc2")]
3622unsafe impl Encode for BluetoothHCIInquiryWithRSSIResults {
3623 const ENCODING: Encoding = Encoding::Struct(
3624 "BluetoothHCIInquiryWithRSSIResults",
3625 &[
3626 <[BluetoothHCIInquiryWithRSSIResult; 50]>::ENCODING,
3627 <IOItemCount>::ENCODING,
3628 ],
3629 );
3630}
3631
3632#[cfg(feature = "objc2")]
3633unsafe impl RefEncode for BluetoothHCIInquiryWithRSSIResults {
3634 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3635}
3636
3637pub type BluetoothHCIFECRequired = u8;
3639
3640#[repr(transparent)]
3642#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3643pub struct BluetoothHCIFECRequiredValues(pub c_uint);
3644impl BluetoothHCIFECRequiredValues {
3645 #[doc(alias = "kBluetoothHCIFECRequired")]
3646 pub const Required: Self = Self(0x00);
3647 #[doc(alias = "kBluetoothHCIFECNotRequired")]
3648 pub const NotRequired: Self = Self(0x01);
3649}
3650
3651#[cfg(feature = "objc2")]
3652unsafe impl Encode for BluetoothHCIFECRequiredValues {
3653 const ENCODING: Encoding = c_uint::ENCODING;
3654}
3655
3656#[cfg(feature = "objc2")]
3657unsafe impl RefEncode for BluetoothHCIFECRequiredValues {
3658 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3659}
3660
3661pub type BluetoothHCIInquiryMode = u8;
3663
3664#[repr(transparent)]
3666#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3667pub struct BluetoothHCIInquiryModes(pub c_uint);
3668impl BluetoothHCIInquiryModes {
3669 #[doc(alias = "kBluetoothHCIInquiryModeResultFormatStandard")]
3670 pub const ResultFormatStandard: Self = Self(0x00);
3671 #[doc(alias = "kBluetoothHCIInquiryModeResultFormatWithRSSI")]
3672 pub const ResultFormatWithRSSI: Self = Self(0x01);
3673 #[doc(alias = "kBluetoothHCIInquiryModeResultFormatWithRSSIOrExtendedInquiryResultFormat")]
3674 pub const ResultFormatWithRSSIOrExtendedInquiryResultFormat: Self = Self(0x02);
3675}
3676
3677#[cfg(feature = "objc2")]
3678unsafe impl Encode for BluetoothHCIInquiryModes {
3679 const ENCODING: Encoding = c_uint::ENCODING;
3680}
3681
3682#[cfg(feature = "objc2")]
3683unsafe impl RefEncode for BluetoothHCIInquiryModes {
3684 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3685}
3686
3687pub type BluetoothHCIInquiryScanType = u8;
3689
3690#[repr(transparent)]
3692#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3693pub struct BluetoothHCIInquiryScanTypes(pub c_uint);
3694impl BluetoothHCIInquiryScanTypes {
3695 #[doc(alias = "kBluetoothHCIInquiryScanTypeStandard")]
3696 pub const Standard: Self = Self(0x00);
3697 #[doc(alias = "kBluetoothHCIInquiryScanTypeInterlaced")]
3698 pub const Interlaced: Self = Self(0x01);
3699 #[doc(alias = "kBluetoothHCIInquiryScanTypeReservedStart")]
3700 pub const ReservedStart: Self = Self(0x02);
3701 #[doc(alias = "kBluetoothHCIInquiryScanTypeReservedEnd")]
3702 pub const ReservedEnd: Self = Self(0xFF);
3703}
3704
3705#[cfg(feature = "objc2")]
3706unsafe impl Encode for BluetoothHCIInquiryScanTypes {
3707 const ENCODING: Encoding = c_uint::ENCODING;
3708}
3709
3710#[cfg(feature = "objc2")]
3711unsafe impl RefEncode for BluetoothHCIInquiryScanTypes {
3712 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3713}
3714
3715pub type BluetoothHCIExtendedInquiryResponseDataType = u8;
3717
3718#[repr(C)]
3720#[derive(Clone, Copy, Debug, PartialEq)]
3721pub struct BluetoothHCIExtendedInquiryResponse {
3722 pub data: [u8; 240],
3723}
3724
3725#[cfg(feature = "objc2")]
3726unsafe impl Encode for BluetoothHCIExtendedInquiryResponse {
3727 const ENCODING: Encoding = Encoding::Struct(
3728 "BluetoothHCIExtendedInquiryResponse",
3729 &[<[u8; 240]>::ENCODING],
3730 );
3731}
3732
3733#[cfg(feature = "objc2")]
3734unsafe impl RefEncode for BluetoothHCIExtendedInquiryResponse {
3735 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3736}
3737
3738#[repr(C)]
3740#[derive(Clone, Copy, Debug, PartialEq)]
3741pub struct BluetoothHCIReadExtendedInquiryResponseResults {
3742 pub outFECRequired: BluetoothHCIFECRequired,
3743 pub extendedInquiryResponse: BluetoothHCIExtendedInquiryResponse,
3744}
3745
3746#[cfg(feature = "objc2")]
3747unsafe impl Encode for BluetoothHCIReadExtendedInquiryResponseResults {
3748 const ENCODING: Encoding = Encoding::Struct(
3749 "BluetoothHCIReadExtendedInquiryResponseResults",
3750 &[
3751 <BluetoothHCIFECRequired>::ENCODING,
3752 <BluetoothHCIExtendedInquiryResponse>::ENCODING,
3753 ],
3754 );
3755}
3756
3757#[cfg(feature = "objc2")]
3758unsafe impl RefEncode for BluetoothHCIReadExtendedInquiryResponseResults {
3759 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3760}
3761
3762#[repr(C)]
3764#[derive(Clone, Copy, Debug, PartialEq)]
3765pub struct BluetoothHCIExtendedInquiryResult {
3766 pub numberOfReponses: u8,
3767 pub deviceAddress: BluetoothDeviceAddress,
3768 pub pageScanRepetitionMode: BluetoothPageScanRepetitionMode,
3769 pub reserved: u8,
3770 pub classOfDevice: BluetoothClassOfDevice,
3771 pub clockOffset: BluetoothClockOffset,
3772 pub RSSIValue: BluetoothHCIRSSIValue,
3773 pub extendedInquiryResponse: BluetoothHCIExtendedInquiryResponse,
3774}
3775
3776#[cfg(feature = "objc2")]
3777unsafe impl Encode for BluetoothHCIExtendedInquiryResult {
3778 const ENCODING: Encoding = Encoding::Struct(
3779 "BluetoothHCIExtendedInquiryResult",
3780 &[
3781 <u8>::ENCODING,
3782 <BluetoothDeviceAddress>::ENCODING,
3783 <BluetoothPageScanRepetitionMode>::ENCODING,
3784 <u8>::ENCODING,
3785 <BluetoothClassOfDevice>::ENCODING,
3786 <BluetoothClockOffset>::ENCODING,
3787 <BluetoothHCIRSSIValue>::ENCODING,
3788 <BluetoothHCIExtendedInquiryResponse>::ENCODING,
3789 ],
3790 );
3791}
3792
3793#[cfg(feature = "objc2")]
3794unsafe impl RefEncode for BluetoothHCIExtendedInquiryResult {
3795 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3796}
3797
3798#[repr(C)]
3800#[derive(Clone, Copy, Debug, PartialEq)]
3801pub struct BluetoothHCIReadLMPHandleResults {
3802 pub handle: BluetoothConnectionHandle,
3803 pub lmp_handle: BluetoothLMPHandle,
3804 pub reserved: u32,
3805}
3806
3807#[cfg(feature = "objc2")]
3808unsafe impl Encode for BluetoothHCIReadLMPHandleResults {
3809 const ENCODING: Encoding = Encoding::Struct(
3810 "BluetoothHCIReadLMPHandleResults",
3811 &[
3812 <BluetoothConnectionHandle>::ENCODING,
3813 <BluetoothLMPHandle>::ENCODING,
3814 <u32>::ENCODING,
3815 ],
3816 );
3817}
3818
3819#[cfg(feature = "objc2")]
3820unsafe impl RefEncode for BluetoothHCIReadLMPHandleResults {
3821 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3822}
3823
3824pub type BluetoothHCISimplePairingMode = u8;
3826
3827#[repr(transparent)]
3829#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3830pub struct BluetoothHCISimplePairingModes(pub c_uint);
3831impl BluetoothHCISimplePairingModes {
3832 #[doc(alias = "kBluetoothHCISimplePairingModeNotSet")]
3833 pub const NotSet: Self = Self(0x00);
3834 #[doc(alias = "kBluetoothHCISimplePairingModeEnabled")]
3835 pub const Enabled: Self = Self(0x01);
3836}
3837
3838#[cfg(feature = "objc2")]
3839unsafe impl Encode for BluetoothHCISimplePairingModes {
3840 const ENCODING: Encoding = c_uint::ENCODING;
3841}
3842
3843#[cfg(feature = "objc2")]
3844unsafe impl RefEncode for BluetoothHCISimplePairingModes {
3845 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3846}
3847
3848pub type BluetoothSimplePairingDebugMode = u8;
3850
3851#[repr(transparent)]
3853#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3854pub struct BluetoothSimplePairingDebugModes(pub c_uint);
3855impl BluetoothSimplePairingDebugModes {
3856 #[doc(alias = "kBluetoothHCISimplePairingDebugModeDisabled")]
3857 pub const HCISimplePairingDebugModeDisabled: Self = Self(0x00);
3858 #[doc(alias = "kBluetoothHCISimplePairingDebugModeEnabled")]
3859 pub const HCISimplePairingDebugModeEnabled: Self = Self(0x01);
3860}
3861
3862#[cfg(feature = "objc2")]
3863unsafe impl Encode for BluetoothSimplePairingDebugModes {
3864 const ENCODING: Encoding = c_uint::ENCODING;
3865}
3866
3867#[cfg(feature = "objc2")]
3868unsafe impl RefEncode for BluetoothSimplePairingDebugModes {
3869 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3870}
3871
3872#[repr(C)]
3874#[derive(Clone, Copy, Debug, PartialEq)]
3875pub struct BluetoothHCISimplePairingOOBData {
3876 pub data: [u8; 16],
3877}
3878
3879#[cfg(feature = "objc2")]
3880unsafe impl Encode for BluetoothHCISimplePairingOOBData {
3881 const ENCODING: Encoding =
3882 Encoding::Struct("BluetoothHCISimplePairingOOBData", &[<[u8; 16]>::ENCODING]);
3883}
3884
3885#[cfg(feature = "objc2")]
3886unsafe impl RefEncode for BluetoothHCISimplePairingOOBData {
3887 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3888}
3889
3890#[repr(C)]
3892#[derive(Clone, Copy, Debug, PartialEq)]
3893pub struct BluetoothHCIReadLocalOOBDataResults {
3894 pub hash: BluetoothHCISimplePairingOOBData,
3895 pub randomizer: BluetoothHCISimplePairingOOBData,
3896}
3897
3898#[cfg(feature = "objc2")]
3899unsafe impl Encode for BluetoothHCIReadLocalOOBDataResults {
3900 const ENCODING: Encoding = Encoding::Struct(
3901 "BluetoothHCIReadLocalOOBDataResults",
3902 &[
3903 <BluetoothHCISimplePairingOOBData>::ENCODING,
3904 <BluetoothHCISimplePairingOOBData>::ENCODING,
3905 ],
3906 );
3907}
3908
3909#[cfg(feature = "objc2")]
3910unsafe impl RefEncode for BluetoothHCIReadLocalOOBDataResults {
3911 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3912}
3913
3914pub type BluetoothIOCapability = u8;
3916
3917#[repr(transparent)]
3919#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3920pub struct BluetoothIOCapabilities(pub c_uint);
3921impl BluetoothIOCapabilities {
3922 #[doc(alias = "kBluetoothCapabilityTypeDisplayOnly")]
3923 pub const CapabilityTypeDisplayOnly: Self = Self(0x00);
3924 #[doc(alias = "kBluetoothCapabilityTypeDisplayYesNo")]
3925 pub const CapabilityTypeDisplayYesNo: Self = Self(0x01);
3926 #[doc(alias = "kBluetoothCapabilityTypeKeyboardOnly")]
3927 pub const CapabilityTypeKeyboardOnly: Self = Self(0x02);
3928 #[doc(alias = "kBluetoothCapabilityTypeNoInputNoOutput")]
3929 pub const CapabilityTypeNoInputNoOutput: Self = Self(0x03);
3930}
3931
3932#[cfg(feature = "objc2")]
3933unsafe impl Encode for BluetoothIOCapabilities {
3934 const ENCODING: Encoding = c_uint::ENCODING;
3935}
3936
3937#[cfg(feature = "objc2")]
3938unsafe impl RefEncode for BluetoothIOCapabilities {
3939 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3940}
3941
3942pub type BluetoothOOBDataPresence = u8;
3944
3945#[repr(transparent)]
3947#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3948pub struct BluetoothOOBDataPresenceValues(pub c_uint);
3949impl BluetoothOOBDataPresenceValues {
3950 #[doc(alias = "kBluetoothOOBAuthenticationDataNotPresent")]
3951 pub const AuthenticationDataNotPresent: Self = Self(0x00);
3952 #[doc(alias = "kBluetoothOOBAuthenticationDataFromRemoteDevicePresent")]
3953 pub const AuthenticationDataFromRemoteDevicePresent: Self = Self(0x01);
3954}
3955
3956#[cfg(feature = "objc2")]
3957unsafe impl Encode for BluetoothOOBDataPresenceValues {
3958 const ENCODING: Encoding = c_uint::ENCODING;
3959}
3960
3961#[cfg(feature = "objc2")]
3962unsafe impl RefEncode for BluetoothOOBDataPresenceValues {
3963 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3964}
3965
3966pub type BluetoothAuthenticationRequirements = u8;
3968
3969#[repr(transparent)]
3971#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3972pub struct BluetoothAuthenticationRequirementsValues(pub c_uint);
3973impl BluetoothAuthenticationRequirementsValues {
3974 #[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionNotRequired")]
3975 pub const MITMProtectionNotRequired: Self = Self(0x00);
3976 #[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionRequired")]
3977 pub const MITMProtectionRequired: Self = Self(0x01);
3978 #[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionNotRequiredNoBonding")]
3979 pub const MITMProtectionNotRequiredNoBonding: Self = Self(0x00);
3980 #[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionRequiredNoBonding")]
3981 pub const MITMProtectionRequiredNoBonding: Self = Self(0x01);
3982 #[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionNotRequiredDedicatedBonding")]
3983 pub const MITMProtectionNotRequiredDedicatedBonding: Self = Self(0x02);
3984 #[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionRequiredDedicatedBonding")]
3985 pub const MITMProtectionRequiredDedicatedBonding: Self = Self(0x03);
3986 #[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionNotRequiredGeneralBonding")]
3987 pub const MITMProtectionNotRequiredGeneralBonding: Self = Self(0x04);
3988 #[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionRequiredGeneralBonding")]
3989 pub const MITMProtectionRequiredGeneralBonding: Self = Self(0x05);
3990}
3991
3992#[cfg(feature = "objc2")]
3993unsafe impl Encode for BluetoothAuthenticationRequirementsValues {
3994 const ENCODING: Encoding = c_uint::ENCODING;
3995}
3996
3997#[cfg(feature = "objc2")]
3998unsafe impl RefEncode for BluetoothAuthenticationRequirementsValues {
3999 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4000}
4001
4002#[repr(C)]
4004#[derive(Clone, Copy, Debug, PartialEq)]
4005pub struct BluetoothIOCapabilityResponse {
4006 pub deviceAddress: BluetoothDeviceAddress,
4007 pub ioCapability: BluetoothIOCapability,
4008 pub OOBDataPresence: BluetoothOOBDataPresence,
4009 pub authenticationRequirements: BluetoothAuthenticationRequirements,
4010}
4011
4012#[cfg(feature = "objc2")]
4013unsafe impl Encode for BluetoothIOCapabilityResponse {
4014 const ENCODING: Encoding = Encoding::Struct(
4015 "BluetoothIOCapabilityResponse",
4016 &[
4017 <BluetoothDeviceAddress>::ENCODING,
4018 <BluetoothIOCapability>::ENCODING,
4019 <BluetoothOOBDataPresence>::ENCODING,
4020 <BluetoothAuthenticationRequirements>::ENCODING,
4021 ],
4022 );
4023}
4024
4025#[cfg(feature = "objc2")]
4026unsafe impl RefEncode for BluetoothIOCapabilityResponse {
4027 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4028}
4029
4030pub type BluetoothPasskey = u32;
4032
4033#[repr(C)]
4035#[derive(Clone, Copy, Debug, PartialEq)]
4036pub struct BluetoothUserPasskeyNotification {
4037 pub deviceAddress: BluetoothDeviceAddress,
4038 pub passkey: BluetoothPasskey,
4039}
4040
4041#[cfg(feature = "objc2")]
4042unsafe impl Encode for BluetoothUserPasskeyNotification {
4043 const ENCODING: Encoding = Encoding::Struct(
4044 "BluetoothUserPasskeyNotification",
4045 &[
4046 <BluetoothDeviceAddress>::ENCODING,
4047 <BluetoothPasskey>::ENCODING,
4048 ],
4049 );
4050}
4051
4052#[cfg(feature = "objc2")]
4053unsafe impl RefEncode for BluetoothUserPasskeyNotification {
4054 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4055}
4056
4057pub type BluetoothKeypressNotificationType = u8;
4059
4060#[repr(transparent)]
4062#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
4063pub struct BluetoothKeypressNotificationTypes(pub c_uint);
4064impl BluetoothKeypressNotificationTypes {
4065 #[doc(alias = "kBluetoothKeypressNotificationTypePasskeyEntryStarted")]
4066 pub const PasskeyEntryStarted: Self = Self(0);
4067 #[doc(alias = "kBluetoothKeypressNotificationTypePasskeyDigitEntered")]
4068 pub const PasskeyDigitEntered: Self = Self(1);
4069 #[doc(alias = "kBluetoothKeypressNotificationTypePasskeyDigitErased")]
4070 pub const PasskeyDigitErased: Self = Self(2);
4071 #[doc(alias = "kBluetoothKeypressNotificationTypePasskeyCleared")]
4072 pub const PasskeyCleared: Self = Self(3);
4073 #[doc(alias = "kBluetoothKeypressNotificationTypePasskeyEntryCompleted")]
4074 pub const PasskeyEntryCompleted: Self = Self(4);
4075}
4076
4077#[cfg(feature = "objc2")]
4078unsafe impl Encode for BluetoothKeypressNotificationTypes {
4079 const ENCODING: Encoding = c_uint::ENCODING;
4080}
4081
4082#[cfg(feature = "objc2")]
4083unsafe impl RefEncode for BluetoothKeypressNotificationTypes {
4084 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4085}
4086
4087#[repr(C)]
4089#[derive(Clone, Copy, Debug, PartialEq)]
4090pub struct BluetoothKeypressNotification {
4091 pub deviceAddress: BluetoothDeviceAddress,
4092 pub notificationType: BluetoothKeypressNotificationType,
4093}
4094
4095#[cfg(feature = "objc2")]
4096unsafe impl Encode for BluetoothKeypressNotification {
4097 const ENCODING: Encoding = Encoding::Struct(
4098 "BluetoothKeypressNotification",
4099 &[
4100 <BluetoothDeviceAddress>::ENCODING,
4101 <BluetoothKeypressNotificationType>::ENCODING,
4102 ],
4103 );
4104}
4105
4106#[cfg(feature = "objc2")]
4107unsafe impl RefEncode for BluetoothKeypressNotification {
4108 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4109}
4110
4111#[repr(C)]
4113#[derive(Clone, Copy, Debug, PartialEq)]
4114pub struct BluetoothRemoteHostSupportedFeaturesNotification {
4115 pub deviceAddress: BluetoothDeviceAddress,
4116 pub hostSupportedFeatures: BluetoothHCISupportedFeatures,
4117}
4118
4119#[cfg(feature = "objc2")]
4120unsafe impl Encode for BluetoothRemoteHostSupportedFeaturesNotification {
4121 const ENCODING: Encoding = Encoding::Struct(
4122 "BluetoothRemoteHostSupportedFeaturesNotification",
4123 &[
4124 <BluetoothDeviceAddress>::ENCODING,
4125 <BluetoothHCISupportedFeatures>::ENCODING,
4126 ],
4127 );
4128}
4129
4130#[cfg(feature = "objc2")]
4131unsafe impl RefEncode for BluetoothRemoteHostSupportedFeaturesNotification {
4132 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4133}
4134
4135pub type TransmissionPower = i8;
4137
4138#[repr(C)]
4140#[derive(Clone, Copy, Debug, PartialEq)]
4141pub struct BluetoothAFHHostChannelClassification {
4142 pub data: [u8; 10],
4143}
4144
4145#[cfg(feature = "objc2")]
4146unsafe impl Encode for BluetoothAFHHostChannelClassification {
4147 const ENCODING: Encoding = Encoding::Struct(
4148 "BluetoothAFHHostChannelClassification",
4149 &[<[u8; 10]>::ENCODING],
4150 );
4151}
4152
4153#[cfg(feature = "objc2")]
4154unsafe impl RefEncode for BluetoothAFHHostChannelClassification {
4155 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4156}
4157
4158pub type BluetoothAFHMode = u8;
4160
4161#[repr(C)]
4163#[derive(Clone, Copy, Debug, PartialEq)]
4164pub struct BluetoothAFHResults {
4165 pub handle: BluetoothConnectionHandle,
4166 pub mode: BluetoothAFHMode,
4167 pub afhMap: [u8; 10],
4168}
4169
4170#[cfg(feature = "objc2")]
4171unsafe impl Encode for BluetoothAFHResults {
4172 const ENCODING: Encoding = Encoding::Struct(
4173 "BluetoothAFHResults",
4174 &[
4175 <BluetoothConnectionHandle>::ENCODING,
4176 <BluetoothAFHMode>::ENCODING,
4177 <[u8; 10]>::ENCODING,
4178 ],
4179 );
4180}
4181
4182#[cfg(feature = "objc2")]
4183unsafe impl RefEncode for BluetoothAFHResults {
4184 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4185}
4186
4187pub type BluetoothNumericValue = u32;
4189
4190#[repr(C)]
4192#[derive(Clone, Copy, Debug, PartialEq)]
4193pub struct BluetoothUserConfirmationRequest {
4194 pub deviceAddress: BluetoothDeviceAddress,
4195 pub numericValue: BluetoothNumericValue,
4196}
4197
4198#[cfg(feature = "objc2")]
4199unsafe impl Encode for BluetoothUserConfirmationRequest {
4200 const ENCODING: Encoding = Encoding::Struct(
4201 "BluetoothUserConfirmationRequest",
4202 &[
4203 <BluetoothDeviceAddress>::ENCODING,
4204 <BluetoothNumericValue>::ENCODING,
4205 ],
4206 );
4207}
4208
4209#[cfg(feature = "objc2")]
4210unsafe impl RefEncode for BluetoothUserConfirmationRequest {
4211 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4212}
4213
4214#[repr(C)]
4216#[derive(Clone, Copy, Debug, PartialEq)]
4217pub struct BluetoothHCIEventSimplePairingCompleteResults {
4218 pub deviceAddress: BluetoothDeviceAddress,
4219}
4220
4221#[cfg(feature = "objc2")]
4222unsafe impl Encode for BluetoothHCIEventSimplePairingCompleteResults {
4223 const ENCODING: Encoding = Encoding::Struct(
4224 "BluetoothHCIEventSimplePairingCompleteResults",
4225 &[<BluetoothDeviceAddress>::ENCODING],
4226 );
4227}
4228
4229#[cfg(feature = "objc2")]
4230unsafe impl RefEncode for BluetoothHCIEventSimplePairingCompleteResults {
4231 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4232}
4233
4234pub const kBluetoothHCICommandPacketHeaderSize: c_uint = 3;
4236pub const kBluetoothHCICommandPacketMaxDataSize: c_uint = 255;
4238pub const kBluetoothHCIMaxCommandPacketSize: c_uint =
4240 kBluetoothHCICommandPacketHeaderSize + kBluetoothHCICommandPacketMaxDataSize;
4241pub const kBluetoothHCIEventPacketHeaderSize: c_uint = 2;
4243pub const kBluetoothHCIEventPacketMaxDataSize: c_uint = 255;
4245pub const kBluetoothHCIMaxEventPacketSize: c_uint =
4247 kBluetoothHCIEventPacketHeaderSize + kBluetoothHCIEventPacketMaxDataSize;
4248pub const kBluetoothHCIDataPacketHeaderSize: c_uint = 4;
4250pub const kBluetoothHCIDataPacketMaxDataSize: c_uint = 65535;
4252pub const kBluetoothHCIMaxDataPacketSize: c_uint =
4254 kBluetoothHCIDataPacketHeaderSize + kBluetoothHCIDataPacketMaxDataSize;
4255
4256pub type BluetoothHCIEventCode = u8;
4258
4259pub type BluetoothLinkType = u8;
4261
4262#[repr(transparent)]
4264#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
4265pub struct BluetoothLinkTypes(pub c_uint);
4266impl BluetoothLinkTypes {
4267 #[doc(alias = "kBluetoothSCOConnection")]
4268 pub const SCOConnection: Self = Self(0);
4269 #[doc(alias = "kBluetoothACLConnection")]
4270 pub const ACLConnection: Self = Self(1);
4271 #[doc(alias = "kBluetoothESCOConnection")]
4272 pub const ESCOConnection: Self = Self(2);
4273 #[doc(alias = "kBluetoothLinkTypeNone")]
4274 pub const LinkTypeNone: Self = Self(0xff);
4275}
4276
4277#[cfg(feature = "objc2")]
4278unsafe impl Encode for BluetoothLinkTypes {
4279 const ENCODING: Encoding = c_uint::ENCODING;
4280}
4281
4282#[cfg(feature = "objc2")]
4283unsafe impl RefEncode for BluetoothLinkTypes {
4284 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4285}
4286
4287pub type BluetoothHCIContentFormat = u16;
4289
4290pub type BluetoothHCIVoiceSetting = u16;
4292
4293pub const kBluetoothVoiceSettingInputCodingMask: c_uint = 0x300;
4295pub const kBluetoothVoiceSettingInputCodingLinearInputCoding: c_uint = 0x000;
4297pub const kBluetoothVoiceSettingInputCodingULawInputCoding: c_uint = 0x100;
4299pub const kBluetoothVoiceSettingInputCodingALawInputCoding: c_uint = 0x200;
4301
4302pub const kBluetoothVoiceSettingInputDataFormatMask: c_uint = 0x0C0;
4304pub const kBluetoothVoiceSettingInputDataFormat1sComplement: c_uint = 0x000;
4306pub const kBluetoothVoiceSettingInputDataFormat2sComplement: c_uint = 0x040;
4308pub const kBluetoothVoiceSettingInputDataFormatSignMagnitude: c_uint = 0x080;
4310pub const kBluetoothVoiceSettingInputDataFormatUnsigned: c_uint = 0x0C0;
4312
4313pub const kBluetoothVoiceSettingInputSampleSizeMask: c_uint = 0x020;
4315pub const kBluetoothVoiceSettingInputSampleSize8Bit: c_uint = 0x000;
4317pub const kBluetoothVoiceSettingInputSampleSize16Bit: c_uint = 0x020;
4319
4320pub const kBluetoothVoiceSettingPCMBitPositionMask: c_uint = 0x01C;
4322
4323pub const kBluetoothVoiceSettingAirCodingFormatMask: c_uint = 0x003;
4325pub const kBluetoothVoiceSettingAirCodingFormatCVSD: c_uint = 0x000;
4327pub const kBluetoothVoiceSettingAirCodingFormatULaw: c_uint = 0x001;
4329pub const kBluetoothVoiceSettingAirCodingFormatALaw: c_uint = 0x002;
4331pub const kBluetoothVoiceSettingAirCodingFormatTransparentData: c_uint = 0x003;
4333
4334pub type BluetoothHCISupportedIAC = u8;
4336
4337pub type BluetoothHCITransmitBandwidth = u32;
4339
4340pub type BluetoothHCIReceiveBandwidth = u32;
4342
4343pub type BluetoothHCITransmitCodingFormat = u64;
4345
4346pub type BluetoothHCIReceiveCodingFormat = u64;
4348
4349pub type BluetoothHCITransmitCodecFrameSize = u16;
4351
4352pub type BluetoothHCIReceiveCodecFrameSize = u16;
4354
4355pub type BluetoothHCIInputBandwidth = u32;
4357
4358pub type BluetoothHCIOutputBandwidth = u32;
4360
4361pub type BluetoothHCIInputCodingFormat = u64;
4363
4364pub type BluetoothHCIOutputCodingFormat = u64;
4366
4367pub type BluetoothHCIInputCodedDataSize = u16;
4369
4370pub type BluetoothHCIOutputCodedDataSize = u16;
4372
4373pub type BluetoothHCIInputPCMDataFormat = u8;
4375
4376pub type BluetoothHCIOutputPCMDataFormat = u8;
4378
4379pub type BluetoothHCIInputPCMSamplePayloadMSBPosition = u8;
4381
4382pub type BluetoothHCIOutputPCMSamplePayloadMSBPosition = u8;
4384
4385pub type BluetoothHCIInputDataPath = u8;
4387
4388pub type BluetoothHCIOutputDataPath = u8;
4390
4391pub type BluetoothHCIInputTransportUnitSize = u8;
4393
4394pub type BluetoothHCIOutputTransportUnitSize = u8;
4396
4397pub type BluetoothHCIMaxLatency = u16;
4399
4400pub type BluetoothHCIRetransmissionEffort = u8;
4402
4403#[repr(transparent)]
4405#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
4406pub struct BluetoothHCIRetransmissionEffortTypes(pub c_uint);
4407impl BluetoothHCIRetransmissionEffortTypes {
4408 #[doc(alias = "kHCIRetransmissionEffortTypeNone")]
4409 pub const HCIRetransmissionEffortTypeNone: Self = Self(0x00);
4410 #[doc(alias = "kHCIRetransmissionEffortTypeAtLeastOneAndOptimizeForPower")]
4411 pub const HCIRetransmissionEffortTypeAtLeastOneAndOptimizeForPower: Self = Self(0x01);
4412 #[doc(alias = "kHCIRetransmissionEffortTypeAtLeastOneAndOptimizeLinkQuality")]
4413 pub const HCIRetransmissionEffortTypeAtLeastOneAndOptimizeLinkQuality: Self = Self(0x02);
4414 #[doc(alias = "kHCIRetransmissionEffortTypeDontCare")]
4415 pub const HCIRetransmissionEffortTypeDontCare: Self = Self(0xFF);
4416}
4417
4418#[cfg(feature = "objc2")]
4419unsafe impl Encode for BluetoothHCIRetransmissionEffortTypes {
4420 const ENCODING: Encoding = c_uint::ENCODING;
4421}
4422
4423#[cfg(feature = "objc2")]
4424unsafe impl RefEncode for BluetoothHCIRetransmissionEffortTypes {
4425 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4426}
4427
4428pub type BluetoothAirMode = u8;
4430
4431pub const kBluetoothAirModeULawLog: c_uint = 0x00;
4433pub const kBluetoothAirModeALawLog: c_uint = 0x01;
4435pub const kBluetoothAirModeCVSD: c_uint = 0x02;
4437pub const kBluetoothAirModeTransparentData: c_uint = 0x03;
4439
4440#[repr(C)]
4442#[derive(Clone, Copy, Debug, PartialEq)]
4443pub struct BluetoothSynchronousConnectionInfo {
4444 pub transmitBandWidth: BluetoothHCITransmitBandwidth,
4445 pub receiveBandWidth: BluetoothHCIReceiveBandwidth,
4446 pub maxLatency: BluetoothHCIMaxLatency,
4447 pub voiceSetting: BluetoothHCIVoiceSetting,
4448 pub retransmissionEffort: BluetoothHCIRetransmissionEffort,
4449 pub packetType: BluetoothPacketType,
4450}
4451
4452#[cfg(feature = "objc2")]
4453unsafe impl Encode for BluetoothSynchronousConnectionInfo {
4454 const ENCODING: Encoding = Encoding::Struct(
4455 "BluetoothSynchronousConnectionInfo",
4456 &[
4457 <BluetoothHCITransmitBandwidth>::ENCODING,
4458 <BluetoothHCIReceiveBandwidth>::ENCODING,
4459 <BluetoothHCIMaxLatency>::ENCODING,
4460 <BluetoothHCIVoiceSetting>::ENCODING,
4461 <BluetoothHCIRetransmissionEffort>::ENCODING,
4462 <BluetoothPacketType>::ENCODING,
4463 ],
4464 );
4465}
4466
4467#[cfg(feature = "objc2")]
4468unsafe impl RefEncode for BluetoothSynchronousConnectionInfo {
4469 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4470}
4471
4472#[repr(C)]
4474#[derive(Clone, Copy, Debug, PartialEq)]
4475pub struct BluetoothEnhancedSynchronousConnectionInfo {
4476 pub transmitBandWidth: BluetoothHCITransmitBandwidth,
4477 pub receiveBandWidth: BluetoothHCIReceiveBandwidth,
4478 pub transmitCodingFormat: BluetoothHCITransmitCodingFormat,
4479 pub receiveCodingFormat: BluetoothHCIReceiveCodingFormat,
4480 pub transmitCodecFrameSize: BluetoothHCITransmitCodecFrameSize,
4481 pub receiveCodecFrameSize: BluetoothHCIReceiveCodecFrameSize,
4482 pub inputBandwidth: BluetoothHCIInputBandwidth,
4483 pub outputBandwidth: BluetoothHCIOutputBandwidth,
4484 pub inputCodingFormat: BluetoothHCIInputCodingFormat,
4485 pub outputCodingFormat: BluetoothHCIOutputCodingFormat,
4486 pub inputCodedDataSize: BluetoothHCIInputCodedDataSize,
4487 pub outputCodedDataSize: BluetoothHCIOutputCodedDataSize,
4488 pub inputPCMDataFormat: BluetoothHCIInputPCMDataFormat,
4489 pub outputPCMDataFormat: BluetoothHCIOutputPCMDataFormat,
4490 pub inputPCMSampelPayloadMSBPosition: BluetoothHCIInputPCMSamplePayloadMSBPosition,
4491 pub outputPCMSampelPayloadMSBPosition: BluetoothHCIOutputPCMSamplePayloadMSBPosition,
4492 pub inputDataPath: BluetoothHCIInputDataPath,
4493 pub outputDataPath: BluetoothHCIOutputDataPath,
4494 pub inputTransportUnitSize: BluetoothHCIInputTransportUnitSize,
4495 pub outputTransportUnitSize: BluetoothHCIOutputTransportUnitSize,
4496 pub maxLatency: BluetoothHCIMaxLatency,
4497 pub voiceSetting: BluetoothHCIVoiceSetting,
4498 pub retransmissionEffort: BluetoothHCIRetransmissionEffort,
4499 pub packetType: BluetoothPacketType,
4500}
4501
4502#[cfg(feature = "objc2")]
4503unsafe impl Encode for BluetoothEnhancedSynchronousConnectionInfo {
4504 const ENCODING: Encoding = Encoding::Struct(
4505 "BluetoothEnhancedSynchronousConnectionInfo",
4506 &[
4507 <BluetoothHCITransmitBandwidth>::ENCODING,
4508 <BluetoothHCIReceiveBandwidth>::ENCODING,
4509 <BluetoothHCITransmitCodingFormat>::ENCODING,
4510 <BluetoothHCIReceiveCodingFormat>::ENCODING,
4511 <BluetoothHCITransmitCodecFrameSize>::ENCODING,
4512 <BluetoothHCIReceiveCodecFrameSize>::ENCODING,
4513 <BluetoothHCIInputBandwidth>::ENCODING,
4514 <BluetoothHCIOutputBandwidth>::ENCODING,
4515 <BluetoothHCIInputCodingFormat>::ENCODING,
4516 <BluetoothHCIOutputCodingFormat>::ENCODING,
4517 <BluetoothHCIInputCodedDataSize>::ENCODING,
4518 <BluetoothHCIOutputCodedDataSize>::ENCODING,
4519 <BluetoothHCIInputPCMDataFormat>::ENCODING,
4520 <BluetoothHCIOutputPCMDataFormat>::ENCODING,
4521 <BluetoothHCIInputPCMSamplePayloadMSBPosition>::ENCODING,
4522 <BluetoothHCIOutputPCMSamplePayloadMSBPosition>::ENCODING,
4523 <BluetoothHCIInputDataPath>::ENCODING,
4524 <BluetoothHCIOutputDataPath>::ENCODING,
4525 <BluetoothHCIInputTransportUnitSize>::ENCODING,
4526 <BluetoothHCIOutputTransportUnitSize>::ENCODING,
4527 <BluetoothHCIMaxLatency>::ENCODING,
4528 <BluetoothHCIVoiceSetting>::ENCODING,
4529 <BluetoothHCIRetransmissionEffort>::ENCODING,
4530 <BluetoothPacketType>::ENCODING,
4531 ],
4532 );
4533}
4534
4535#[cfg(feature = "objc2")]
4536unsafe impl RefEncode for BluetoothEnhancedSynchronousConnectionInfo {
4537 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4538}
4539
4540#[repr(C)]
4542#[derive(Clone, Copy, Debug, PartialEq)]
4543pub struct BluetoothHCIEventSynchronousConnectionCompleteResults {
4544 pub connectionHandle: BluetoothConnectionHandle,
4545 pub deviceAddress: BluetoothDeviceAddress,
4546 pub linkType: BluetoothLinkType,
4547 pub transmissionInterval: u8,
4548 pub retransmissionWindow: u8,
4549 pub receivePacketLength: u16,
4550 pub transmitPacketLength: u16,
4551 pub airMode: BluetoothAirMode,
4552}
4553
4554#[cfg(feature = "objc2")]
4555unsafe impl Encode for BluetoothHCIEventSynchronousConnectionCompleteResults {
4556 const ENCODING: Encoding = Encoding::Struct(
4557 "BluetoothHCIEventSynchronousConnectionCompleteResults",
4558 &[
4559 <BluetoothConnectionHandle>::ENCODING,
4560 <BluetoothDeviceAddress>::ENCODING,
4561 <BluetoothLinkType>::ENCODING,
4562 <u8>::ENCODING,
4563 <u8>::ENCODING,
4564 <u16>::ENCODING,
4565 <u16>::ENCODING,
4566 <BluetoothAirMode>::ENCODING,
4567 ],
4568 );
4569}
4570
4571#[cfg(feature = "objc2")]
4572unsafe impl RefEncode for BluetoothHCIEventSynchronousConnectionCompleteResults {
4573 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4574}
4575
4576#[repr(C)]
4578#[derive(Clone, Copy, Debug, PartialEq)]
4579pub struct BluetoothHCIEventSynchronousConnectionChangedResults {
4580 pub connectionHandle: BluetoothConnectionHandle,
4581 pub transmissionInterval: u8,
4582 pub retransmissionWindow: u8,
4583 pub receivePacketLength: u16,
4584 pub transmitPacketLength: u16,
4585}
4586
4587#[cfg(feature = "objc2")]
4588unsafe impl Encode for BluetoothHCIEventSynchronousConnectionChangedResults {
4589 const ENCODING: Encoding = Encoding::Struct(
4590 "BluetoothHCIEventSynchronousConnectionChangedResults",
4591 &[
4592 <BluetoothConnectionHandle>::ENCODING,
4593 <u8>::ENCODING,
4594 <u8>::ENCODING,
4595 <u16>::ENCODING,
4596 <u16>::ENCODING,
4597 ],
4598 );
4599}
4600
4601#[cfg(feature = "objc2")]
4602unsafe impl RefEncode for BluetoothHCIEventSynchronousConnectionChangedResults {
4603 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4604}
4605
4606pub type BluetoothHCIStatus = u8;
4608
4609pub type BluetoothHCIEventStatus = u8;
4611
4612pub const kBluetoothHCIEventInquiryComplete: c_uint = 0x01;
4614pub const kBluetoothHCIEventInquiryResult: c_uint = 0x02;
4616pub const kBluetoothHCIEventConnectionComplete: c_uint = 0x03;
4618pub const kBluetoothHCIEventConnectionRequest: c_uint = 0x04;
4620pub const kBluetoothHCIEventDisconnectionComplete: c_uint = 0x05;
4622pub const kBluetoothHCIEventAuthenticationComplete: c_uint = 0x06;
4624pub const kBluetoothHCIEventRemoteNameRequestComplete: c_uint = 0x07;
4626pub const kBluetoothHCIEventEncryptionChange: c_uint = 0x08;
4628pub const kBluetoothHCIEventChangeConnectionLinkKeyComplete: c_uint = 0x09;
4630pub const kBluetoothHCIEventMasterLinkKeyComplete: c_uint = 0x0A;
4632pub const kBluetoothHCIEventReadRemoteSupportedFeaturesComplete: c_uint = 0x0B;
4634pub const kBluetoothHCIEventReadRemoteVersionInformationComplete: c_uint = 0x0C;
4636pub const kBluetoothHCIEventQoSSetupComplete: c_uint = 0x0D;
4638pub const kBluetoothHCIEventCommandComplete: c_uint = 0x0E;
4640pub const kBluetoothHCIEventCommandStatus: c_uint = 0x0F;
4642pub const kBluetoothHCIEventHardwareError: c_uint = 0x10;
4644pub const kBluetoothHCIEventFlushOccurred: c_uint = 0x11;
4646pub const kBluetoothHCIEventRoleChange: c_uint = 0x12;
4648pub const kBluetoothHCIEventNumberOfCompletedPackets: c_uint = 0x13;
4650pub const kBluetoothHCIEventModeChange: c_uint = 0x14;
4652pub const kBluetoothHCIEventReturnLinkKeys: c_uint = 0x15;
4654pub const kBluetoothHCIEventPINCodeRequest: c_uint = 0x16;
4656pub const kBluetoothHCIEventLinkKeyRequest: c_uint = 0x17;
4658pub const kBluetoothHCIEventLinkKeyNotification: c_uint = 0x18;
4660pub const kBluetoothHCIEventLoopbackCommand: c_uint = 0x19;
4662pub const kBluetoothHCIEventDataBufferOverflow: c_uint = 0x1A;
4664pub const kBluetoothHCIEventMaxSlotsChange: c_uint = 0x1B;
4666pub const kBluetoothHCIEventReadClockOffsetComplete: c_uint = 0x1C;
4668pub const kBluetoothHCIEventConnectionPacketType: c_uint = 0x1D;
4670pub const kBluetoothHCIEventQoSViolation: c_uint = 0x1E;
4672pub const kBluetoothHCIEventPageScanModeChange: c_uint = 0x1F;
4674pub const kBluetoothHCIEventPageScanRepetitionModeChange: c_uint = 0x20;
4676pub const kBluetoothHCIEventFlowSpecificationComplete: c_uint = 0x21;
4678pub const kBluetoothHCIEventInquiryResultWithRSSI: c_uint = 0x22;
4680pub const kBluetoothHCIEventReadRemoteExtendedFeaturesComplete: c_uint = 0x23;
4682pub const kBluetoothHCIEventSynchronousConnectionComplete: c_uint = 0x2C;
4684pub const kBluetoothHCIEventSynchronousConnectionChanged: c_uint = 0x2D;
4686pub const kBluetoothHCIEventSniffSubrating: c_uint = 0x2E;
4688pub const kBluetoothHCIEventExtendedInquiryResult: c_uint = 0x2F;
4690pub const kBluetoothHCIEventEncryptionKeyRefreshComplete: c_uint = 0x30;
4692pub const kBluetoothHCIEventIOCapabilityRequest: c_uint = 0x31;
4694pub const kBluetoothHCIEventIOCapabilityResponse: c_uint = 0x32;
4696pub const kBluetoothHCIEventUserConfirmationRequest: c_uint = 0x33;
4698pub const kBluetoothHCIEventUserPasskeyRequest: c_uint = 0x34;
4700pub const kBluetoothHCIEventRemoteOOBDataRequest: c_uint = 0x35;
4702pub const kBluetoothHCIEventSimplePairingComplete: c_uint = 0x36;
4704pub const kBluetoothHCIEventLinkSupervisionTimeoutChanged: c_uint = 0x38;
4706pub const kBluetoothHCIEventEnhancedFlushComplete: c_uint = 0x39;
4708pub const kBluetoothHCIEventUserPasskeyNotification: c_uint = 0x3B;
4710pub const kBluetoothHCIEventKeypressNotification: c_uint = 0x3C;
4712pub const kBluetoothHCIEventRemoteHostSupportedFeaturesNotification: c_uint = 0x3D;
4714pub const kBluetoothHCIEventLEMetaEvent: c_uint = 0x3E;
4716pub const kBluetoothHCISubEventLEConnectionComplete: c_uint = 0x01;
4718pub const kBluetoothHCISubEventLEAdvertisingReport: c_uint = 0x02;
4720pub const kBluetoothHCISubEventLEConnectionUpdateComplete: c_uint = 0x03;
4722pub const kBluetoothHCISubEventLEReadRemoteUsedFeaturesComplete: c_uint = 0x04;
4724pub const kBluetoothHCISubEventLELongTermKeyRequest: c_uint = 0x05;
4726pub const kBluetoothHCISubEventLERemoteConnectionParameterRequest: c_uint = 0x06;
4728pub const kBluetoothHCISubEventLEDataLengthChange: c_uint = 0x07;
4730pub const kBluetoothHCISubEventLEReadLocalP256PublicKeyComplete: c_uint = 0x08;
4732pub const kBluetoothHCISubEventLEGenerateDHKeyComplete: c_uint = 0x09;
4734pub const kBluetoothHCISubEventLEEnhancedConnectionComplete: c_uint = 0x0A;
4736pub const kBluetoothHCISubEventLEDirectAdvertisingReport: c_uint = 0x0B;
4738pub const kBluetoothHCISubEventLEPhyUpdateComplete: c_uint = 0x0C;
4740pub const kBluetoothHCISubEventLEExtendedAdvertising: c_uint = 0x0D;
4742pub const kBluetoothHCISubEventLEPeriodicAdvertisingSyncEstablished: c_uint = 0x0E;
4744pub const kBluetoothHCISubEventLEPeriodicAdvertisingReport: c_uint = 0x0F;
4746pub const kBluetoothHCISubEventLEPeriodicAdvertisingSyncLost: c_uint = 0x10;
4748pub const kBluetoothHCISubEventLEScanTimeout: c_uint = 0x11;
4750pub const kBluetoothHCISubEventLEAdvertisingSetTerminated: c_uint = 0x12;
4752pub const kBluetoothHCISubEventLEScanRequestReceived: c_uint = 0x13;
4754pub const kBluetoothHCISubEventLEChannelSelectionAlgorithm: c_uint = 0x14;
4756pub const kBluetoothHCIEventPhysicalLinkComplete: c_uint = 0x40;
4758pub const kBluetoothHCIEventChannelSelected: c_uint = 0x41;
4760pub const kBluetoothHCIEventDisconnectionPhysicalLinkComplete: c_uint = 0x42;
4762pub const kBluetoothHCIEventPhysicalLinkLossEarlyWarning: c_uint = 0x43;
4764pub const kBluetoothHCIEventPhysicalLinkRecovery: c_uint = 0x44;
4766pub const kBluetoothHCIEventLogicalLinkComplete: c_uint = 0x45;
4768pub const kBluetoothHCIEventDisconnectionLogicalLinkComplete: c_uint = 0x46;
4770pub const kBluetoothHCIEventFlowSpecModifyComplete: c_uint = 0x47;
4772pub const kBluetoothHCIEventNumberOfCompletedDataBlocks: c_uint = 0x48;
4774pub const kBluetoothHCIEventShortRangeModeChangeComplete: c_uint = 0x4C;
4776pub const kBluetoothHCIEventAMPStatusChange: c_uint = 0x4D;
4778pub const kBluetoothHCIEventAMPStartTest: c_uint = 0x49;
4780pub const kBluetoothHCIEventAMPTestEnd: c_uint = 0x4A;
4782pub const kBluetoothHCIEventAMPReceiverReport: c_uint = 0x4B;
4784pub const kBluetoothHCIEventLogoTesting: c_uint = 0xFE;
4786pub const kBluetoothHCIEventVendorSpecific: c_uint = 0xFF;
4788
4789pub type BluetoothHCIEventMask = u64;
4791
4792pub const kBluetoothHCIEventMaskNone: c_uint = 0x00000000;
4794pub const kBluetoothHCIEventMaskInquiryComplete: c_uint = 0x00000001;
4796pub const kBluetoothHCIEventMaskInquiryResult: c_uint = 0x00000002;
4798pub const kBluetoothHCIEventMaskConnectionComplete: c_uint = 0x00000004;
4800pub const kBluetoothHCIEventMaskConnectionRequest: c_uint = 0x00000008;
4802pub const kBluetoothHCIEventMaskDisconnectionComplete: c_uint = 0x00000010;
4804pub const kBluetoothHCIEventMaskAuthenticationComplete: c_uint = 0x00000020;
4806pub const kBluetoothHCIEventMaskRemoteNameRequestComplete: c_uint = 0x00000040;
4808pub const kBluetoothHCIEventMaskEncryptionChange: c_uint = 0x00000080;
4810pub const kBluetoothHCIEventMaskChangeConnectionLinkKeyComplete: c_uint = 0x00000100;
4812pub const kBluetoothHCIEventMaskMasterLinkKeyComplete: c_uint = 0x00000200;
4814pub const kBluetoothHCIEventMaskReadRemoteSupportedFeaturesComplete: c_uint = 0x00000400;
4816pub const kBluetoothHCIEventMaskReadRemoteVersionInformationComplete: c_uint = 0x00000800;
4818pub const kBluetoothHCIEventMaskQoSSetupComplete: c_uint = 0x00001000;
4820pub const kBluetoothHCIEventMaskCommandComplete: c_uint = 0x00002000;
4822pub const kBluetoothHCIEventMaskCommandStatus: c_uint = 0x00004000;
4824pub const kBluetoothHCIEventMaskHardwareError: c_uint = 0x00008000;
4826pub const kBluetoothHCIEventMaskFlushOccurred: c_uint = 0x00010000;
4828pub const kBluetoothHCIEventMaskRoleChange: c_uint = 0x00020000;
4830pub const kBluetoothHCIEventMaskNumberOfCompletedPackets: c_uint = 0x00040000;
4832pub const kBluetoothHCIEventMaskModeChange: c_uint = 0x00080000;
4834pub const kBluetoothHCIEventMaskReturnLinkKeys: c_uint = 0x00100000;
4836pub const kBluetoothHCIEventMaskPINCodeRequest: c_uint = 0x00200000;
4838pub const kBluetoothHCIEventMaskLinkKeyRequest: c_uint = 0x00400000;
4840pub const kBluetoothHCIEventMaskLinkKeyNotification: c_uint = 0x00800000;
4842pub const kBluetoothHCIEventMaskLoopbackCommand: c_uint = 0x01000000;
4844pub const kBluetoothHCIEventMaskDataBufferOverflow: c_uint = 0x02000000;
4846pub const kBluetoothHCIEventMaskMaxSlotsChange: c_uint = 0x04000000;
4848pub const kBluetoothHCIEventMaskReadClockOffsetComplete: c_uint = 0x08000000;
4850pub const kBluetoothHCIEventMaskConnectionPacketTypeChanged: c_uint = 0x10000000;
4852pub const kBluetoothHCIEventMaskQoSViolation: c_uint = 0x20000000;
4854pub const kBluetoothHCIEventMaskPageScanModeChange: c_uint = 0x40000000;
4856pub const kBluetoothHCIEventMaskPageScanRepetitionModeChange: c_uint = 0x80000000;
4858pub const kBluetoothHCIEventMaskAll: c_uint = 0xFFFFFFFF;
4860pub const kBluetoothHCIEventMaskDefault: c_uint = kBluetoothHCIEventMaskAll;
4862
4863#[repr(C)]
4865#[derive(Clone, Copy, Debug, PartialEq)]
4866pub struct BluetoothHCIEventConnectionCompleteResults {
4867 pub connectionHandle: BluetoothConnectionHandle,
4868 pub deviceAddress: BluetoothDeviceAddress,
4869 pub linkType: BluetoothLinkType,
4870 pub encryptionMode: BluetoothHCIEncryptionMode,
4871}
4872
4873#[cfg(feature = "objc2")]
4874unsafe impl Encode for BluetoothHCIEventConnectionCompleteResults {
4875 const ENCODING: Encoding = Encoding::Struct(
4876 "BluetoothHCIEventConnectionCompleteResults",
4877 &[
4878 <BluetoothConnectionHandle>::ENCODING,
4879 <BluetoothDeviceAddress>::ENCODING,
4880 <BluetoothLinkType>::ENCODING,
4881 <BluetoothHCIEncryptionMode>::ENCODING,
4882 ],
4883 );
4884}
4885
4886#[cfg(feature = "objc2")]
4887unsafe impl RefEncode for BluetoothHCIEventConnectionCompleteResults {
4888 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4889}
4890
4891#[repr(C, packed)]
4893#[derive(Clone, Copy, Debug, PartialEq)]
4894pub struct BluetoothHCIEventLEConnectionCompleteResults {
4895 pub connectionHandle: BluetoothConnectionHandle,
4896 pub role: u8,
4897 pub peerAddressType: u8,
4898 pub peerAddress: BluetoothDeviceAddress,
4899 pub connInterval: u16,
4900 pub connLatency: u16,
4901 pub supervisionTimeout: u16,
4902 pub masterClockAccuracy: u8,
4903}
4904
4905#[cfg(feature = "objc2")]
4906unsafe impl Encode for BluetoothHCIEventLEConnectionCompleteResults {
4907 const ENCODING: Encoding = Encoding::Struct(
4908 "BluetoothHCIEventLEConnectionCompleteResults",
4909 &[
4910 <BluetoothConnectionHandle>::ENCODING,
4911 <u8>::ENCODING,
4912 <u8>::ENCODING,
4913 <BluetoothDeviceAddress>::ENCODING,
4914 <u16>::ENCODING,
4915 <u16>::ENCODING,
4916 <u16>::ENCODING,
4917 <u8>::ENCODING,
4918 ],
4919 );
4920}
4921
4922#[cfg(feature = "objc2")]
4923unsafe impl RefEncode for BluetoothHCIEventLEConnectionCompleteResults {
4924 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4925}
4926
4927#[repr(C, packed)]
4929#[derive(Clone, Copy, Debug, PartialEq)]
4930pub struct BluetoothHCIEventLEEnhancedConnectionCompleteResults {
4931 pub connectionHandle: BluetoothConnectionHandle,
4932 pub role: u8,
4933 pub peerAddressType: u8,
4934 pub peerAddress: BluetoothDeviceAddress,
4935 pub localResolvablePrivateAddress: BluetoothDeviceAddress,
4936 pub peerResolvablePrivateAddress: BluetoothDeviceAddress,
4937 pub connInterval: u16,
4938 pub connLatency: u16,
4939 pub supervisionTimeout: u16,
4940 pub masterClockAccuracy: u8,
4941}
4942
4943#[cfg(feature = "objc2")]
4944unsafe impl Encode for BluetoothHCIEventLEEnhancedConnectionCompleteResults {
4945 const ENCODING: Encoding = Encoding::Struct(
4946 "BluetoothHCIEventLEEnhancedConnectionCompleteResults",
4947 &[
4948 <BluetoothConnectionHandle>::ENCODING,
4949 <u8>::ENCODING,
4950 <u8>::ENCODING,
4951 <BluetoothDeviceAddress>::ENCODING,
4952 <BluetoothDeviceAddress>::ENCODING,
4953 <BluetoothDeviceAddress>::ENCODING,
4954 <u16>::ENCODING,
4955 <u16>::ENCODING,
4956 <u16>::ENCODING,
4957 <u8>::ENCODING,
4958 ],
4959 );
4960}
4961
4962#[cfg(feature = "objc2")]
4963unsafe impl RefEncode for BluetoothHCIEventLEEnhancedConnectionCompleteResults {
4964 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4965}
4966
4967#[repr(C, packed)]
4969#[derive(Clone, Copy, Debug, PartialEq)]
4970pub struct BluetoothHCIEventLEConnectionUpdateCompleteResults {
4971 pub connectionHandle: BluetoothConnectionHandle,
4972 pub connInterval: u16,
4973 pub connLatency: u16,
4974 pub supervisionTimeout: u16,
4975}
4976
4977#[cfg(feature = "objc2")]
4978unsafe impl Encode for BluetoothHCIEventLEConnectionUpdateCompleteResults {
4979 const ENCODING: Encoding = Encoding::Struct(
4980 "BluetoothHCIEventLEConnectionUpdateCompleteResults",
4981 &[
4982 <BluetoothConnectionHandle>::ENCODING,
4983 <u16>::ENCODING,
4984 <u16>::ENCODING,
4985 <u16>::ENCODING,
4986 ],
4987 );
4988}
4989
4990#[cfg(feature = "objc2")]
4991unsafe impl RefEncode for BluetoothHCIEventLEConnectionUpdateCompleteResults {
4992 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4993}
4994
4995#[repr(C, packed)]
4997#[derive(Clone, Copy, Debug, PartialEq)]
4998pub struct BluetoothHCIEventLEReadRemoteUsedFeaturesCompleteResults {
4999 pub connectionHandle: BluetoothConnectionHandle,
5000 pub usedFeatures: BluetoothHCISupportedFeatures,
5001}
5002
5003#[cfg(feature = "objc2")]
5004unsafe impl Encode for BluetoothHCIEventLEReadRemoteUsedFeaturesCompleteResults {
5005 const ENCODING: Encoding = Encoding::Struct(
5006 "BluetoothHCIEventLEReadRemoteUsedFeaturesCompleteResults",
5007 &[
5008 <BluetoothConnectionHandle>::ENCODING,
5009 <BluetoothHCISupportedFeatures>::ENCODING,
5010 ],
5011 );
5012}
5013
5014#[cfg(feature = "objc2")]
5015unsafe impl RefEncode for BluetoothHCIEventLEReadRemoteUsedFeaturesCompleteResults {
5016 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5017}
5018
5019#[repr(C)]
5021#[derive(Clone, Copy, Debug, PartialEq)]
5022pub struct BluetoothHCIEventDisconnectionCompleteResults {
5023 pub connectionHandle: BluetoothConnectionHandle,
5024 pub reason: BluetoothReasonCode,
5025}
5026
5027#[cfg(feature = "objc2")]
5028unsafe impl Encode for BluetoothHCIEventDisconnectionCompleteResults {
5029 const ENCODING: Encoding = Encoding::Struct(
5030 "BluetoothHCIEventDisconnectionCompleteResults",
5031 &[
5032 <BluetoothConnectionHandle>::ENCODING,
5033 <BluetoothReasonCode>::ENCODING,
5034 ],
5035 );
5036}
5037
5038#[cfg(feature = "objc2")]
5039unsafe impl RefEncode for BluetoothHCIEventDisconnectionCompleteResults {
5040 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5041}
5042
5043#[repr(C)]
5045#[derive(Clone, Copy, Debug, PartialEq)]
5046pub struct BluetoothHCIEventReadSupportedFeaturesResults {
5047 pub connectionHandle: BluetoothConnectionHandle,
5048 pub supportedFeatures: BluetoothHCISupportedFeatures,
5049}
5050
5051#[cfg(feature = "objc2")]
5052unsafe impl Encode for BluetoothHCIEventReadSupportedFeaturesResults {
5053 const ENCODING: Encoding = Encoding::Struct(
5054 "BluetoothHCIEventReadSupportedFeaturesResults",
5055 &[
5056 <BluetoothConnectionHandle>::ENCODING,
5057 <BluetoothHCISupportedFeatures>::ENCODING,
5058 ],
5059 );
5060}
5061
5062#[cfg(feature = "objc2")]
5063unsafe impl RefEncode for BluetoothHCIEventReadSupportedFeaturesResults {
5064 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5065}
5066
5067#[repr(C)]
5069#[derive(Clone, Copy, Debug, PartialEq)]
5070pub struct BluetoothHCIEventReadExtendedFeaturesResults {
5071 pub connectionHandle: BluetoothConnectionHandle,
5072 pub supportedFeaturesInfo: BluetoothHCIExtendedFeaturesInfo,
5073}
5074
5075#[cfg(feature = "objc2")]
5076unsafe impl Encode for BluetoothHCIEventReadExtendedFeaturesResults {
5077 const ENCODING: Encoding = Encoding::Struct(
5078 "BluetoothHCIEventReadExtendedFeaturesResults",
5079 &[
5080 <BluetoothConnectionHandle>::ENCODING,
5081 <BluetoothHCIExtendedFeaturesInfo>::ENCODING,
5082 ],
5083 );
5084}
5085
5086#[cfg(feature = "objc2")]
5087unsafe impl RefEncode for BluetoothHCIEventReadExtendedFeaturesResults {
5088 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5089}
5090
5091#[repr(C)]
5093#[derive(Clone, Copy, Debug, PartialEq)]
5094pub struct BluetoothHCIEventReadRemoteVersionInfoResults {
5095 pub connectionHandle: BluetoothConnectionHandle,
5096 pub lmpVersion: BluetoothLMPVersion,
5097 pub manufacturerName: BluetoothManufacturerName,
5098 pub lmpSubversion: BluetoothLMPSubversion,
5099}
5100
5101#[cfg(feature = "objc2")]
5102unsafe impl Encode for BluetoothHCIEventReadRemoteVersionInfoResults {
5103 const ENCODING: Encoding = Encoding::Struct(
5104 "BluetoothHCIEventReadRemoteVersionInfoResults",
5105 &[
5106 <BluetoothConnectionHandle>::ENCODING,
5107 <BluetoothLMPVersion>::ENCODING,
5108 <BluetoothManufacturerName>::ENCODING,
5109 <BluetoothLMPSubversion>::ENCODING,
5110 ],
5111 );
5112}
5113
5114#[cfg(feature = "objc2")]
5115unsafe impl RefEncode for BluetoothHCIEventReadRemoteVersionInfoResults {
5116 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5117}
5118
5119#[repr(C)]
5121#[derive(Clone, Copy, Debug, PartialEq)]
5122pub struct BluetoothHCIEventRemoteNameRequestResults {
5123 pub deviceAddress: BluetoothDeviceAddress,
5124 pub deviceName: BluetoothDeviceName,
5125}
5126
5127#[cfg(feature = "objc2")]
5128unsafe impl Encode for BluetoothHCIEventRemoteNameRequestResults {
5129 const ENCODING: Encoding = Encoding::Struct(
5130 "BluetoothHCIEventRemoteNameRequestResults",
5131 &[
5132 <BluetoothDeviceAddress>::ENCODING,
5133 <BluetoothDeviceName>::ENCODING,
5134 ],
5135 );
5136}
5137
5138#[cfg(feature = "objc2")]
5139unsafe impl RefEncode for BluetoothHCIEventRemoteNameRequestResults {
5140 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5141}
5142
5143#[repr(C)]
5145#[derive(Clone, Copy, Debug, PartialEq)]
5146pub struct BluetoothHCIEventReadClockOffsetResults {
5147 pub connectionHandle: BluetoothConnectionHandle,
5148 pub clockOffset: BluetoothClockOffset,
5149}
5150
5151#[cfg(feature = "objc2")]
5152unsafe impl Encode for BluetoothHCIEventReadClockOffsetResults {
5153 const ENCODING: Encoding = Encoding::Struct(
5154 "BluetoothHCIEventReadClockOffsetResults",
5155 &[
5156 <BluetoothConnectionHandle>::ENCODING,
5157 <BluetoothClockOffset>::ENCODING,
5158 ],
5159 );
5160}
5161
5162#[cfg(feature = "objc2")]
5163unsafe impl RefEncode for BluetoothHCIEventReadClockOffsetResults {
5164 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5165}
5166
5167#[repr(C)]
5169#[derive(Clone, Copy, Debug, PartialEq)]
5170pub struct BluetoothHCIEventConnectionRequestResults {
5171 pub deviceAddress: BluetoothDeviceAddress,
5172 pub classOfDevice: BluetoothClassOfDevice,
5173 pub linkType: BluetoothLinkType,
5174}
5175
5176#[cfg(feature = "objc2")]
5177unsafe impl Encode for BluetoothHCIEventConnectionRequestResults {
5178 const ENCODING: Encoding = Encoding::Struct(
5179 "BluetoothHCIEventConnectionRequestResults",
5180 &[
5181 <BluetoothDeviceAddress>::ENCODING,
5182 <BluetoothClassOfDevice>::ENCODING,
5183 <BluetoothLinkType>::ENCODING,
5184 ],
5185 );
5186}
5187
5188#[cfg(feature = "objc2")]
5189unsafe impl RefEncode for BluetoothHCIEventConnectionRequestResults {
5190 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5191}
5192
5193#[repr(C)]
5195#[derive(Clone, Copy, Debug, PartialEq)]
5196pub struct BluetoothHCIEventLinkKeyNotificationResults {
5197 pub deviceAddress: BluetoothDeviceAddress,
5198 pub linkKey: BluetoothKey,
5199 pub keyType: BluetoothKeyType,
5200}
5201
5202#[cfg(feature = "objc2")]
5203unsafe impl Encode for BluetoothHCIEventLinkKeyNotificationResults {
5204 const ENCODING: Encoding = Encoding::Struct(
5205 "BluetoothHCIEventLinkKeyNotificationResults",
5206 &[
5207 <BluetoothDeviceAddress>::ENCODING,
5208 <BluetoothKey>::ENCODING,
5209 <BluetoothKeyType>::ENCODING,
5210 ],
5211 );
5212}
5213
5214#[cfg(feature = "objc2")]
5215unsafe impl RefEncode for BluetoothHCIEventLinkKeyNotificationResults {
5216 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5217}
5218
5219#[repr(C)]
5221#[derive(Clone, Copy, Debug, PartialEq)]
5222pub struct BluetoothHCIEventMaxSlotsChangeResults {
5223 pub connectionHandle: BluetoothConnectionHandle,
5224 pub maxSlots: BluetoothMaxSlots,
5225}
5226
5227#[cfg(feature = "objc2")]
5228unsafe impl Encode for BluetoothHCIEventMaxSlotsChangeResults {
5229 const ENCODING: Encoding = Encoding::Struct(
5230 "BluetoothHCIEventMaxSlotsChangeResults",
5231 &[
5232 <BluetoothConnectionHandle>::ENCODING,
5233 <BluetoothMaxSlots>::ENCODING,
5234 ],
5235 );
5236}
5237
5238#[cfg(feature = "objc2")]
5239unsafe impl RefEncode for BluetoothHCIEventMaxSlotsChangeResults {
5240 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5241}
5242
5243#[repr(C)]
5245#[derive(Clone, Copy, Debug, PartialEq)]
5246pub struct BluetoothHCIEventModeChangeResults {
5247 pub connectionHandle: BluetoothConnectionHandle,
5248 pub mode: BluetoothHCIConnectionMode,
5249 pub modeInterval: BluetoothHCIModeInterval,
5250}
5251
5252#[cfg(feature = "objc2")]
5253unsafe impl Encode for BluetoothHCIEventModeChangeResults {
5254 const ENCODING: Encoding = Encoding::Struct(
5255 "BluetoothHCIEventModeChangeResults",
5256 &[
5257 <BluetoothConnectionHandle>::ENCODING,
5258 <BluetoothHCIConnectionMode>::ENCODING,
5259 <BluetoothHCIModeInterval>::ENCODING,
5260 ],
5261 );
5262}
5263
5264#[cfg(feature = "objc2")]
5265unsafe impl RefEncode for BluetoothHCIEventModeChangeResults {
5266 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5267}
5268
5269#[repr(C)]
5271#[derive(Clone, Copy, Debug, PartialEq)]
5272pub struct BluetoothHCIEventReturnLinkKeysResults_linkKeys {
5273 pub deviceAddress: BluetoothDeviceAddress,
5274 pub linkKey: BluetoothKey,
5275}
5276
5277#[cfg(feature = "objc2")]
5278unsafe impl Encode for BluetoothHCIEventReturnLinkKeysResults_linkKeys {
5279 const ENCODING: Encoding = Encoding::Struct(
5280 "?",
5281 &[<BluetoothDeviceAddress>::ENCODING, <BluetoothKey>::ENCODING],
5282 );
5283}
5284
5285#[cfg(feature = "objc2")]
5286unsafe impl RefEncode for BluetoothHCIEventReturnLinkKeysResults_linkKeys {
5287 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5288}
5289
5290#[repr(C)]
5292#[derive(Clone, Copy, Debug, PartialEq)]
5293pub struct BluetoothHCIEventReturnLinkKeysResults {
5294 pub numLinkKeys: u8,
5295 pub linkKeys: [BluetoothHCIEventReturnLinkKeysResults_linkKeys; 1],
5296}
5297
5298#[cfg(feature = "objc2")]
5299unsafe impl Encode for BluetoothHCIEventReturnLinkKeysResults {
5300 const ENCODING: Encoding = Encoding::Struct(
5301 "BluetoothHCIEventReturnLinkKeysResults",
5302 &[
5303 <u8>::ENCODING,
5304 <[BluetoothHCIEventReturnLinkKeysResults_linkKeys; 1]>::ENCODING,
5305 ],
5306 );
5307}
5308
5309#[cfg(feature = "objc2")]
5310unsafe impl RefEncode for BluetoothHCIEventReturnLinkKeysResults {
5311 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5312}
5313
5314#[repr(C)]
5316#[derive(Clone, Copy, Debug, PartialEq)]
5317pub struct BluetoothHCIEventAuthenticationCompleteResults {
5318 pub connectionHandle: BluetoothConnectionHandle,
5319}
5320
5321#[cfg(feature = "objc2")]
5322unsafe impl Encode for BluetoothHCIEventAuthenticationCompleteResults {
5323 const ENCODING: Encoding = Encoding::Struct(
5324 "BluetoothHCIEventAuthenticationCompleteResults",
5325 &[<BluetoothConnectionHandle>::ENCODING],
5326 );
5327}
5328
5329#[cfg(feature = "objc2")]
5330unsafe impl RefEncode for BluetoothHCIEventAuthenticationCompleteResults {
5331 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5332}
5333
5334#[repr(C)]
5336#[derive(Clone, Copy, Debug, PartialEq)]
5337pub struct BluetoothHCIEventEncryptionChangeResults {
5338 pub connectionHandle: BluetoothConnectionHandle,
5339 pub enable: BluetoothEncryptionEnable,
5340}
5341
5342#[cfg(feature = "objc2")]
5343unsafe impl Encode for BluetoothHCIEventEncryptionChangeResults {
5344 const ENCODING: Encoding = Encoding::Struct(
5345 "BluetoothHCIEventEncryptionChangeResults",
5346 &[
5347 <BluetoothConnectionHandle>::ENCODING,
5348 <BluetoothEncryptionEnable>::ENCODING,
5349 ],
5350 );
5351}
5352
5353#[cfg(feature = "objc2")]
5354unsafe impl RefEncode for BluetoothHCIEventEncryptionChangeResults {
5355 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5356}
5357
5358#[repr(C)]
5360#[derive(Clone, Copy, Debug, PartialEq)]
5361pub struct BluetoothHCIEventChangeConnectionLinkKeyCompleteResults {
5362 pub connectionHandle: BluetoothConnectionHandle,
5363}
5364
5365#[cfg(feature = "objc2")]
5366unsafe impl Encode for BluetoothHCIEventChangeConnectionLinkKeyCompleteResults {
5367 const ENCODING: Encoding = Encoding::Struct(
5368 "BluetoothHCIEventChangeConnectionLinkKeyCompleteResults",
5369 &[<BluetoothConnectionHandle>::ENCODING],
5370 );
5371}
5372
5373#[cfg(feature = "objc2")]
5374unsafe impl RefEncode for BluetoothHCIEventChangeConnectionLinkKeyCompleteResults {
5375 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5376}
5377
5378#[repr(C)]
5380#[derive(Clone, Copy, Debug, PartialEq)]
5381pub struct BluetoothHCIEventMasterLinkKeyCompleteResults {
5382 pub connectionHandle: BluetoothConnectionHandle,
5383 pub keyFlag: BluetoothKeyFlag,
5384}
5385
5386#[cfg(feature = "objc2")]
5387unsafe impl Encode for BluetoothHCIEventMasterLinkKeyCompleteResults {
5388 const ENCODING: Encoding = Encoding::Struct(
5389 "BluetoothHCIEventMasterLinkKeyCompleteResults",
5390 &[
5391 <BluetoothConnectionHandle>::ENCODING,
5392 <BluetoothKeyFlag>::ENCODING,
5393 ],
5394 );
5395}
5396
5397#[cfg(feature = "objc2")]
5398unsafe impl RefEncode for BluetoothHCIEventMasterLinkKeyCompleteResults {
5399 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5400}
5401
5402#[repr(C)]
5404#[derive(Clone, Copy, Debug, PartialEq)]
5405pub struct BluetoothHCIEventQoSSetupCompleteResults {
5406 pub connectionHandle: BluetoothConnectionHandle,
5407 pub setupParams: BluetoothHCIQualityOfServiceSetupParams,
5408}
5409
5410#[cfg(feature = "objc2")]
5411unsafe impl Encode for BluetoothHCIEventQoSSetupCompleteResults {
5412 const ENCODING: Encoding = Encoding::Struct(
5413 "BluetoothHCIEventQoSSetupCompleteResults",
5414 &[
5415 <BluetoothConnectionHandle>::ENCODING,
5416 <BluetoothHCIQualityOfServiceSetupParams>::ENCODING,
5417 ],
5418 );
5419}
5420
5421#[cfg(feature = "objc2")]
5422unsafe impl RefEncode for BluetoothHCIEventQoSSetupCompleteResults {
5423 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5424}
5425
5426#[repr(C)]
5428#[derive(Clone, Copy, Debug, PartialEq)]
5429pub struct BluetoothHCIEventHardwareErrorResults {
5430 pub error: BluetoothHCIStatus,
5431}
5432
5433#[cfg(feature = "objc2")]
5434unsafe impl Encode for BluetoothHCIEventHardwareErrorResults {
5435 const ENCODING: Encoding = Encoding::Struct(
5436 "BluetoothHCIEventHardwareErrorResults",
5437 &[<BluetoothHCIStatus>::ENCODING],
5438 );
5439}
5440
5441#[cfg(feature = "objc2")]
5442unsafe impl RefEncode for BluetoothHCIEventHardwareErrorResults {
5443 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5444}
5445
5446#[repr(C)]
5448#[derive(Clone, Copy, Debug, PartialEq)]
5449pub struct BluetoothHCIEventFlushOccurredResults {
5450 pub connectionHandle: BluetoothConnectionHandle,
5451}
5452
5453#[cfg(feature = "objc2")]
5454unsafe impl Encode for BluetoothHCIEventFlushOccurredResults {
5455 const ENCODING: Encoding = Encoding::Struct(
5456 "BluetoothHCIEventFlushOccurredResults",
5457 &[<BluetoothConnectionHandle>::ENCODING],
5458 );
5459}
5460
5461#[cfg(feature = "objc2")]
5462unsafe impl RefEncode for BluetoothHCIEventFlushOccurredResults {
5463 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5464}
5465
5466#[repr(C)]
5468#[derive(Clone, Copy, Debug, PartialEq)]
5469pub struct BluetoothHCIEventRoleChangeResults {
5470 pub connectionHandle: BluetoothConnectionHandle,
5471 pub deviceAddress: BluetoothDeviceAddress,
5472 pub role: BluetoothRole,
5473}
5474
5475#[cfg(feature = "objc2")]
5476unsafe impl Encode for BluetoothHCIEventRoleChangeResults {
5477 const ENCODING: Encoding = Encoding::Struct(
5478 "BluetoothHCIEventRoleChangeResults",
5479 &[
5480 <BluetoothConnectionHandle>::ENCODING,
5481 <BluetoothDeviceAddress>::ENCODING,
5482 <BluetoothRole>::ENCODING,
5483 ],
5484 );
5485}
5486
5487#[cfg(feature = "objc2")]
5488unsafe impl RefEncode for BluetoothHCIEventRoleChangeResults {
5489 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5490}
5491
5492#[repr(C)]
5494#[derive(Clone, Copy, Debug, PartialEq)]
5495pub struct BluetoothHCIEventDataBufferOverflowResults {
5496 pub linkType: BluetoothLinkType,
5497}
5498
5499#[cfg(feature = "objc2")]
5500unsafe impl Encode for BluetoothHCIEventDataBufferOverflowResults {
5501 const ENCODING: Encoding = Encoding::Struct(
5502 "BluetoothHCIEventDataBufferOverflowResults",
5503 &[<BluetoothLinkType>::ENCODING],
5504 );
5505}
5506
5507#[cfg(feature = "objc2")]
5508unsafe impl RefEncode for BluetoothHCIEventDataBufferOverflowResults {
5509 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5510}
5511
5512#[repr(C)]
5514#[derive(Clone, Copy, Debug, PartialEq)]
5515pub struct BluetoothHCIEventConnectionPacketTypeResults {
5516 pub connectionHandle: BluetoothConnectionHandle,
5517 pub packetType: BluetoothPacketType,
5518}
5519
5520#[cfg(feature = "objc2")]
5521unsafe impl Encode for BluetoothHCIEventConnectionPacketTypeResults {
5522 const ENCODING: Encoding = Encoding::Struct(
5523 "BluetoothHCIEventConnectionPacketTypeResults",
5524 &[
5525 <BluetoothConnectionHandle>::ENCODING,
5526 <BluetoothPacketType>::ENCODING,
5527 ],
5528 );
5529}
5530
5531#[cfg(feature = "objc2")]
5532unsafe impl RefEncode for BluetoothHCIEventConnectionPacketTypeResults {
5533 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5534}
5535
5536#[repr(C)]
5538#[derive(Clone, Copy, Debug, PartialEq)]
5539pub struct BluetoothHCIEventReadRemoteSupportedFeaturesResults {
5540 pub error: BluetoothHCIStatus,
5541 pub connectionHandle: BluetoothConnectionHandle,
5542 pub lmpFeatures: BluetoothHCISupportedFeatures,
5543}
5544
5545#[cfg(feature = "objc2")]
5546unsafe impl Encode for BluetoothHCIEventReadRemoteSupportedFeaturesResults {
5547 const ENCODING: Encoding = Encoding::Struct(
5548 "BluetoothHCIEventReadRemoteSupportedFeaturesResults",
5549 &[
5550 <BluetoothHCIStatus>::ENCODING,
5551 <BluetoothConnectionHandle>::ENCODING,
5552 <BluetoothHCISupportedFeatures>::ENCODING,
5553 ],
5554 );
5555}
5556
5557#[cfg(feature = "objc2")]
5558unsafe impl RefEncode for BluetoothHCIEventReadRemoteSupportedFeaturesResults {
5559 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5560}
5561
5562#[repr(C)]
5564#[derive(Clone, Copy, Debug, PartialEq)]
5565pub struct BluetoothHCIEventReadRemoteExtendedFeaturesResults {
5566 pub error: BluetoothHCIStatus,
5567 pub connectionHandle: BluetoothConnectionHandle,
5568 pub page: BluetoothHCIPageNumber,
5569 pub maxPage: BluetoothHCIPageNumber,
5570 pub lmpFeatures: BluetoothHCISupportedFeatures,
5571}
5572
5573#[cfg(feature = "objc2")]
5574unsafe impl Encode for BluetoothHCIEventReadRemoteExtendedFeaturesResults {
5575 const ENCODING: Encoding = Encoding::Struct(
5576 "BluetoothHCIEventReadRemoteExtendedFeaturesResults",
5577 &[
5578 <BluetoothHCIStatus>::ENCODING,
5579 <BluetoothConnectionHandle>::ENCODING,
5580 <BluetoothHCIPageNumber>::ENCODING,
5581 <BluetoothHCIPageNumber>::ENCODING,
5582 <BluetoothHCISupportedFeatures>::ENCODING,
5583 ],
5584 );
5585}
5586
5587#[cfg(feature = "objc2")]
5588unsafe impl RefEncode for BluetoothHCIEventReadRemoteExtendedFeaturesResults {
5589 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5590}
5591
5592#[repr(C)]
5594#[derive(Clone, Copy, Debug, PartialEq)]
5595pub struct BluetoothHCIEventQoSViolationResults {
5596 pub connectionHandle: BluetoothConnectionHandle,
5597}
5598
5599#[cfg(feature = "objc2")]
5600unsafe impl Encode for BluetoothHCIEventQoSViolationResults {
5601 const ENCODING: Encoding = Encoding::Struct(
5602 "BluetoothHCIEventQoSViolationResults",
5603 &[<BluetoothConnectionHandle>::ENCODING],
5604 );
5605}
5606
5607#[cfg(feature = "objc2")]
5608unsafe impl RefEncode for BluetoothHCIEventQoSViolationResults {
5609 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5610}
5611
5612#[repr(C)]
5614#[derive(Clone, Copy, Debug, PartialEq)]
5615pub struct BluetoothHCIEventPageScanModeChangeResults {
5616 pub deviceAddress: BluetoothDeviceAddress,
5617 pub pageScanMode: BluetoothPageScanMode,
5618}
5619
5620#[cfg(feature = "objc2")]
5621unsafe impl Encode for BluetoothHCIEventPageScanModeChangeResults {
5622 const ENCODING: Encoding = Encoding::Struct(
5623 "BluetoothHCIEventPageScanModeChangeResults",
5624 &[
5625 <BluetoothDeviceAddress>::ENCODING,
5626 <BluetoothPageScanMode>::ENCODING,
5627 ],
5628 );
5629}
5630
5631#[cfg(feature = "objc2")]
5632unsafe impl RefEncode for BluetoothHCIEventPageScanModeChangeResults {
5633 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5634}
5635
5636#[repr(C)]
5638#[derive(Clone, Copy, Debug, PartialEq)]
5639pub struct BluetoothHCIEventPageScanRepetitionModeChangeResults {
5640 pub deviceAddress: BluetoothDeviceAddress,
5641 pub pageScanRepetitionMode: BluetoothPageScanRepetitionMode,
5642}
5643
5644#[cfg(feature = "objc2")]
5645unsafe impl Encode for BluetoothHCIEventPageScanRepetitionModeChangeResults {
5646 const ENCODING: Encoding = Encoding::Struct(
5647 "BluetoothHCIEventPageScanRepetitionModeChangeResults",
5648 &[
5649 <BluetoothDeviceAddress>::ENCODING,
5650 <BluetoothPageScanRepetitionMode>::ENCODING,
5651 ],
5652 );
5653}
5654
5655#[cfg(feature = "objc2")]
5656unsafe impl RefEncode for BluetoothHCIEventPageScanRepetitionModeChangeResults {
5657 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5658}
5659
5660#[repr(C)]
5662#[derive(Clone, Copy, Debug, PartialEq)]
5663pub struct BluetoothHCIEventVendorSpecificResults {
5664 pub length: u8,
5665 pub data: [u8; 255],
5666}
5667
5668#[cfg(feature = "objc2")]
5669unsafe impl Encode for BluetoothHCIEventVendorSpecificResults {
5670 const ENCODING: Encoding = Encoding::Struct(
5671 "BluetoothHCIEventVendorSpecificResults",
5672 &[<u8>::ENCODING, <[u8; 255]>::ENCODING],
5673 );
5674}
5675
5676#[cfg(feature = "objc2")]
5677unsafe impl RefEncode for BluetoothHCIEventVendorSpecificResults {
5678 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5679}
5680
5681#[repr(C)]
5683#[derive(Clone, Copy, Debug, PartialEq)]
5684pub struct BluetoothHCIEventEncryptionKeyRefreshCompleteResults {
5685 pub connectionHandle: BluetoothConnectionHandle,
5686}
5687
5688#[cfg(feature = "objc2")]
5689unsafe impl Encode for BluetoothHCIEventEncryptionKeyRefreshCompleteResults {
5690 const ENCODING: Encoding = Encoding::Struct(
5691 "BluetoothHCIEventEncryptionKeyRefreshCompleteResults",
5692 &[<BluetoothConnectionHandle>::ENCODING],
5693 );
5694}
5695
5696#[cfg(feature = "objc2")]
5697unsafe impl RefEncode for BluetoothHCIEventEncryptionKeyRefreshCompleteResults {
5698 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5699}
5700
5701#[repr(C)]
5703#[derive(Clone, Copy, Debug, PartialEq)]
5704pub struct BluetoothHCIEventSniffSubratingResults {
5705 pub connectionHandle: BluetoothConnectionHandle,
5706 pub maxTransmitLatency: u16,
5707 pub maxReceiveLatency: u16,
5708 pub minRemoteTimeout: u16,
5709 pub minLocalTimeout: u16,
5710}
5711
5712#[cfg(feature = "objc2")]
5713unsafe impl Encode for BluetoothHCIEventSniffSubratingResults {
5714 const ENCODING: Encoding = Encoding::Struct(
5715 "BluetoothHCIEventSniffSubratingResults",
5716 &[
5717 <BluetoothConnectionHandle>::ENCODING,
5718 <u16>::ENCODING,
5719 <u16>::ENCODING,
5720 <u16>::ENCODING,
5721 <u16>::ENCODING,
5722 ],
5723 );
5724}
5725
5726#[cfg(feature = "objc2")]
5727unsafe impl RefEncode for BluetoothHCIEventSniffSubratingResults {
5728 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5729}
5730
5731#[repr(C)]
5733#[derive(Clone, Copy, Debug, PartialEq)]
5734pub struct BluetoothHCIEventLEMetaResults {
5735 pub length: u8,
5736 pub data: [u8; 255],
5737}
5738
5739#[cfg(feature = "objc2")]
5740unsafe impl Encode for BluetoothHCIEventLEMetaResults {
5741 const ENCODING: Encoding = Encoding::Struct(
5742 "BluetoothHCIEventLEMetaResults",
5743 &[<u8>::ENCODING, <[u8; 255]>::ENCODING],
5744 );
5745}
5746
5747#[cfg(feature = "objc2")]
5748unsafe impl RefEncode for BluetoothHCIEventLEMetaResults {
5749 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5750}
5751
5752#[repr(C)]
5754#[derive(Clone, Copy, Debug, PartialEq)]
5755pub struct BluetoothHCIEventLELongTermKeyRequestResults {
5756 pub connectionHandle: BluetoothConnectionHandle,
5757 pub randomNumber: [u8; 8],
5758 pub ediv: u16,
5759}
5760
5761#[cfg(feature = "objc2")]
5762unsafe impl Encode for BluetoothHCIEventLELongTermKeyRequestResults {
5763 const ENCODING: Encoding = Encoding::Struct(
5764 "BluetoothHCIEventLELongTermKeyRequestResults",
5765 &[
5766 <BluetoothConnectionHandle>::ENCODING,
5767 <[u8; 8]>::ENCODING,
5768 <u16>::ENCODING,
5769 ],
5770 );
5771}
5772
5773#[cfg(feature = "objc2")]
5774unsafe impl RefEncode for BluetoothHCIEventLELongTermKeyRequestResults {
5775 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5776}
5777
5778#[cfg(feature = "libc")]
5780#[repr(C)]
5781#[derive(Clone, Copy, Debug, PartialEq)]
5782pub struct BluetoothHCIRequestCallbackInfo {
5783 pub userCallback: libc::mach_vm_address_t,
5784 pub userRefCon: libc::mach_vm_address_t,
5785 pub internalRefCon: libc::mach_vm_address_t,
5786 pub asyncIDRefCon: libc::mach_vm_address_t,
5787 pub reserved: libc::mach_vm_address_t,
5788}
5789
5790#[cfg(all(feature = "libc", feature = "objc2"))]
5791unsafe impl Encode for BluetoothHCIRequestCallbackInfo {
5792 const ENCODING: Encoding = Encoding::Struct(
5793 "BluetoothHCIRequestCallbackInfo",
5794 &[
5795 <libc::mach_vm_address_t>::ENCODING,
5796 <libc::mach_vm_address_t>::ENCODING,
5797 <libc::mach_vm_address_t>::ENCODING,
5798 <libc::mach_vm_address_t>::ENCODING,
5799 <libc::mach_vm_address_t>::ENCODING,
5800 ],
5801 );
5802}
5803
5804#[cfg(all(feature = "libc", feature = "objc2"))]
5805unsafe impl RefEncode for BluetoothHCIRequestCallbackInfo {
5806 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5807}
5808
5809pub const kBluetoothHCIErrorSuccess: c_uint = 0x00;
5811pub const kBluetoothHCIErrorUnknownHCICommand: c_uint = 0x01;
5813pub const kBluetoothHCIErrorNoConnection: c_uint = 0x02;
5815pub const kBluetoothHCIErrorHardwareFailure: c_uint = 0x03;
5817pub const kBluetoothHCIErrorPageTimeout: c_uint = 0x04;
5819pub const kBluetoothHCIErrorAuthenticationFailure: c_uint = 0x05;
5821pub const kBluetoothHCIErrorKeyMissing: c_uint = 0x06;
5823pub const kBluetoothHCIErrorMemoryFull: c_uint = 0x07;
5825pub const kBluetoothHCIErrorConnectionTimeout: c_uint = 0x08;
5827pub const kBluetoothHCIErrorMaxNumberOfConnections: c_uint = 0x09;
5829pub const kBluetoothHCIErrorMaxNumberOfSCOConnectionsToADevice: c_uint = 0x0A;
5831pub const kBluetoothHCIErrorACLConnectionAlreadyExists: c_uint = 0x0B;
5833pub const kBluetoothHCIErrorCommandDisallowed: c_uint = 0x0C;
5835pub const kBluetoothHCIErrorHostRejectedLimitedResources: c_uint = 0x0D;
5837pub const kBluetoothHCIErrorHostRejectedSecurityReasons: c_uint = 0x0E;
5839pub const kBluetoothHCIErrorHostRejectedRemoteDeviceIsPersonal: c_uint = 0x0F;
5841pub const kBluetoothHCIErrorHostTimeout: c_uint = 0x10;
5843pub const kBluetoothHCIErrorUnsupportedFeatureOrParameterValue: c_uint = 0x11;
5845pub const kBluetoothHCIErrorInvalidHCICommandParameters: c_uint = 0x12;
5847pub const kBluetoothHCIErrorOtherEndTerminatedConnectionUserEnded: c_uint = 0x13;
5849pub const kBluetoothHCIErrorOtherEndTerminatedConnectionLowResources: c_uint = 0x14;
5851pub const kBluetoothHCIErrorOtherEndTerminatedConnectionAboutToPowerOff: c_uint = 0x15;
5853pub const kBluetoothHCIErrorConnectionTerminatedByLocalHost: c_uint = 0x16;
5855pub const kBluetoothHCIErrorRepeatedAttempts: c_uint = 0x17;
5857pub const kBluetoothHCIErrorPairingNotAllowed: c_uint = 0x18;
5859pub const kBluetoothHCIErrorUnknownLMPPDU: c_uint = 0x19;
5861pub const kBluetoothHCIErrorUnsupportedRemoteFeature: c_uint = 0x1A;
5863pub const kBluetoothHCIErrorSCOOffsetRejected: c_uint = 0x1B;
5865pub const kBluetoothHCIErrorSCOIntervalRejected: c_uint = 0x1C;
5867pub const kBluetoothHCIErrorSCOAirModeRejected: c_uint = 0x1D;
5869pub const kBluetoothHCIErrorInvalidLMPParameters: c_uint = 0x1E;
5871pub const kBluetoothHCIErrorUnspecifiedError: c_uint = 0x1F;
5873pub const kBluetoothHCIErrorUnsupportedLMPParameterValue: c_uint = 0x20;
5875pub const kBluetoothHCIErrorRoleChangeNotAllowed: c_uint = 0x21;
5877pub const kBluetoothHCIErrorLMPResponseTimeout: c_uint = 0x22;
5879pub const kBluetoothHCIErrorLMPErrorTransactionCollision: c_uint = 0x23;
5881pub const kBluetoothHCIErrorLMPPDUNotAllowed: c_uint = 0x24;
5883pub const kBluetoothHCIErrorEncryptionModeNotAcceptable: c_uint = 0x25;
5885pub const kBluetoothHCIErrorUnitKeyUsed: c_uint = 0x26;
5887pub const kBluetoothHCIErrorQoSNotSupported: c_uint = 0x27;
5889pub const kBluetoothHCIErrorInstantPassed: c_uint = 0x28;
5891pub const kBluetoothHCIErrorPairingWithUnitKeyNotSupported: c_uint = 0x29;
5893pub const kBluetoothHCIErrorHostRejectedUnacceptableDeviceAddress: c_uint = 0x0F;
5895pub const kBluetoothHCIErrorDifferentTransactionCollision: c_uint = 0x2A;
5897pub const kBluetoothHCIErrorQoSUnacceptableParameter: c_uint = 0x2C;
5899pub const kBluetoothHCIErrorQoSRejected: c_uint = 0x2D;
5901pub const kBluetoothHCIErrorChannelClassificationNotSupported: c_uint = 0x2E;
5903pub const kBluetoothHCIErrorInsufficientSecurity: c_uint = 0x2F;
5905pub const kBluetoothHCIErrorParameterOutOfMandatoryRange: c_uint = 0x30;
5907pub const kBluetoothHCIErrorRoleSwitchPending: c_uint = 0x31;
5909pub const kBluetoothHCIErrorReservedSlotViolation: c_uint = 0x34;
5911pub const kBluetoothHCIErrorRoleSwitchFailed: c_uint = 0x35;
5913pub const kBluetoothHCIErrorExtendedInquiryResponseTooLarge: c_uint = 0x36;
5915pub const kBluetoothHCIErrorSecureSimplePairingNotSupportedByHost: c_uint = 0x37;
5917pub const kBluetoothHCIErrorHostBusyPairing: c_uint = 0x38;
5919pub const kBluetoothHCIErrorConnectionRejectedDueToNoSuitableChannelFound: c_uint = 0x39;
5921pub const kBluetoothHCIErrorControllerBusy: c_uint = 0x3A;
5923pub const kBluetoothHCIErrorUnacceptableConnectionInterval: c_uint = 0x3B;
5925pub const kBluetoothHCIErrorDirectedAdvertisingTimeout: c_uint = 0x3C;
5927pub const kBluetoothHCIErrorConnectionTerminatedDueToMICFailure: c_uint = 0x3D;
5929pub const kBluetoothHCIErrorConnectionFailedToBeEstablished: c_uint = 0x3E;
5931pub const kBluetoothHCIErrorMACConnectionFailed: c_uint = 0x3F;
5933pub const kBluetoothHCIErrorCoarseClockAdjustmentRejected: c_uint = 0x40;
5935pub const kBluetoothHCIErrorMax: c_uint = 0x40;
5937
5938#[repr(transparent)]
5940#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
5941pub struct BluetoothHCIPowerState(pub c_uint);
5942impl BluetoothHCIPowerState {
5943 #[doc(alias = "kBluetoothHCIPowerStateON")]
5944 pub const ON: Self = Self(0x01);
5945 #[doc(alias = "kBluetoothHCIPowerStateOFF")]
5946 pub const OFF: Self = Self(0x00);
5947 #[doc(alias = "kBluetoothHCIPowerStateUnintialized")]
5948 pub const Unintialized: Self = Self(0xFF);
5949}
5950
5951#[cfg(feature = "objc2")]
5952unsafe impl Encode for BluetoothHCIPowerState {
5953 const ENCODING: Encoding = c_uint::ENCODING;
5954}
5955
5956#[cfg(feature = "objc2")]
5957unsafe impl RefEncode for BluetoothHCIPowerState {
5958 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5959}
5960
5961pub const kBluetoothHCIErrorPowerIsOFF: c_uint = kBluetoothHCIErrorMax + 1;
5963
5964pub const kBluetoothHCITransportUSBClassCode: c_uint = 0xE0;
5966pub const kBluetoothHCITransportUSBSubClassCode: c_uint = 0x01;
5968pub const kBluetoothHCITransportUSBProtocolCode: c_uint = 0x01;
5970
5971pub const kBluetoothL2CAPTCIEventIDReserved: c_uint = 0x00;
5973pub const kBluetoothL2CAPTCIEventIDL2CA_ConnectInd: c_uint = 0x01;
5975pub const kBluetoothL2CAPTCIEventIDL2CA_ConfigInd: c_uint = 0x02;
5977pub const kBluetoothL2CAPTCIEventIDL2CA_DisconnectInd: c_uint = 0x03;
5979pub const kBluetoothL2CAPTCIEventIDL2CA_QoSViolationInd: c_uint = 0x04;
5981pub const kBluetoothL2CAPTCIEventIDL2CA_TimeOutInd: c_uint = 0x05;
5983
5984pub const kBluetoothL2CAPTCICommandReserved: c_uint = 0x0000;
5986pub const kBluetoothL2CAPTCICommandL2CA_ConnectReq: c_uint = 0x0001;
5988pub const kBluetoothL2CAPTCICommandL2CA_DisconnectReq: c_uint = 0x0002;
5990pub const kBluetoothL2CAPTCICommandL2CA_ConfigReq: c_uint = 0x0003;
5992pub const kBluetoothL2CAPTCICommandL2CA_DisableCLT: c_uint = 0x0004;
5994pub const kBluetoothL2CAPTCICommandL2CA_EnableCLT: c_uint = 0x0005;
5996pub const kBluetoothL2CAPTCICommandL2CA_GroupCreate: c_uint = 0x0006;
5998pub const kBluetoothL2CAPTCICommandL2CA_GroupClose: c_uint = 0x0007;
6000pub const kBluetoothL2CAPTCICommandL2CA_GroupAddMember: c_uint = 0x0008;
6002pub const kBluetoothL2CAPTCICommandL2CA_GroupRemoveMember: c_uint = 0x0009;
6004pub const kBluetoothL2CAPTCICommandL2CA_GroupMembership: c_uint = 0x000A;
6006pub const kBluetoothL2CAPTCICommandL2CA_WriteData: c_uint = 0x000B;
6008pub const kBluetoothL2CAPTCICommandL2CA_ReadData: c_uint = 0x000C;
6010pub const kBluetoothL2CAPTCICommandL2CA_Ping: c_uint = 0x000D;
6012pub const kBluetoothL2CAPTCICommandL2CA_GetInfo: c_uint = 0x000E;
6014pub const kBluetoothL2CAPTCICommandL2CA_Reserved1: c_uint = 0x000F;
6016pub const kBluetoothL2CAPTCICommandL2CA_Reserved2: c_uint = 0x0010;
6018pub const kBluetoothL2CAPTCICommandL2CA_ConnectResp: c_uint = 0x0011;
6020pub const kBluetoothL2CAPTCICommandL2CA_DisconnectResp: c_uint = 0x0012;
6022pub const kBluetoothL2CAPTCICommandL2CA_ConfigResp: c_uint = 0x0013;
6024
6025pub type BluetoothRFCOMMChannelID = u8;
6027
6028pub type BluetoothRFCOMMMTU = u16;
6030
6031#[repr(transparent)]
6033#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
6034pub struct BluetoothRFCOMMParityType(pub c_uint);
6035impl BluetoothRFCOMMParityType {
6036 #[doc(alias = "kBluetoothRFCOMMParityTypeNoParity")]
6037 pub const NoParity: Self = Self(0);
6038 #[doc(alias = "kBluetoothRFCOMMParityTypeOddParity")]
6039 pub const OddParity: Self = Self(1);
6040 #[doc(alias = "kBluetoothRFCOMMParityTypeEvenParity")]
6041 pub const EvenParity: Self = Self(2);
6042 #[doc(alias = "kBluetoothRFCOMMParityTypeMaxParity")]
6043 pub const MaxParity: Self = Self(3);
6044}
6045
6046#[cfg(feature = "objc2")]
6047unsafe impl Encode for BluetoothRFCOMMParityType {
6048 const ENCODING: Encoding = c_uint::ENCODING;
6049}
6050
6051#[cfg(feature = "objc2")]
6052unsafe impl RefEncode for BluetoothRFCOMMParityType {
6053 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6054}
6055
6056#[repr(transparent)]
6058#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
6059pub struct BluetoothRFCOMMLineStatus(pub c_uint);
6060impl BluetoothRFCOMMLineStatus {
6061 #[doc(alias = "BluetoothRFCOMMLineStatusNoError")]
6062 pub const NoError: Self = Self(0);
6063 #[doc(alias = "BluetoothRFCOMMLineStatusOverrunError")]
6064 pub const OverrunError: Self = Self(1);
6065 #[doc(alias = "BluetoothRFCOMMLineStatusParityError")]
6066 pub const ParityError: Self = Self(2);
6067 #[doc(alias = "BluetoothRFCOMMLineStatusFramingError")]
6068 pub const FramingError: Self = Self(3);
6069}
6070
6071#[cfg(feature = "objc2")]
6072unsafe impl Encode for BluetoothRFCOMMLineStatus {
6073 const ENCODING: Encoding = c_uint::ENCODING;
6074}
6075
6076#[cfg(feature = "objc2")]
6077unsafe impl RefEncode for BluetoothRFCOMMLineStatus {
6078 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6079}
6080
6081pub type BluetoothSDPPDUID = u8;
6083
6084pub const kBluetoothSDPPDUIDReserved: c_uint = 0;
6086pub const kBluetoothSDPPDUIDErrorResponse: c_uint = 1;
6088pub const kBluetoothSDPPDUIDServiceSearchRequest: c_uint = 2;
6090pub const kBluetoothSDPPDUIDServiceSearchResponse: c_uint = 3;
6092pub const kBluetoothSDPPDUIDServiceAttributeRequest: c_uint = 4;
6094pub const kBluetoothSDPPDUIDServiceAttributeResponse: c_uint = 5;
6096pub const kBluetoothSDPPDUIDServiceSearchAttributeRequest: c_uint = 6;
6098pub const kBluetoothSDPPDUIDServiceSearchAttributeResponse: c_uint = 7;
6100
6101pub type BluetoothSDPErrorCode = u16;
6103
6104pub const kBluetoothSDPErrorCodeSuccess: c_uint = 0x0000;
6106pub const kBluetoothSDPErrorCodeReserved: c_uint = 0x0000;
6108pub const kBluetoothSDPErrorCodeInvalidSDPVersion: c_uint = 0x0001;
6110pub const kBluetoothSDPErrorCodeInvalidServiceRecordHandle: c_uint = 0x0002;
6112pub const kBluetoothSDPErrorCodeInvalidRequestSyntax: c_uint = 0x0003;
6114pub const kBluetoothSDPErrorCodeInvalidPDUSize: c_uint = 0x0004;
6116pub const kBluetoothSDPErrorCodeInvalidContinuationState: c_uint = 0x0005;
6118pub const kBluetoothSDPErrorCodeInsufficientResources: c_uint = 0x0006;
6120pub const kBluetoothSDPErrorCodeReservedStart: c_uint = 0x0007;
6122pub const kBluetoothSDPErrorCodeReservedEnd: c_uint = 0xFFFF;
6124
6125pub type BluetoothSDPTransactionID = u16;
6127
6128pub type BluetoothSDPServiceRecordHandle = u32;
6130
6131pub const kBluetoothSDPDataElementTypeNil: c_uint = 0;
6133pub const kBluetoothSDPDataElementTypeUnsignedInt: c_uint = 1;
6135pub const kBluetoothSDPDataElementTypeSignedInt: c_uint = 2;
6137pub const kBluetoothSDPDataElementTypeUUID: c_uint = 3;
6139pub const kBluetoothSDPDataElementTypeString: c_uint = 4;
6141pub const kBluetoothSDPDataElementTypeBoolean: c_uint = 5;
6143pub const kBluetoothSDPDataElementTypeDataElementSequence: c_uint = 6;
6145pub const kBluetoothSDPDataElementTypeDataElementAlternative: c_uint = 7;
6147pub const kBluetoothSDPDataElementTypeURL: c_uint = 8;
6149pub const kBluetoothSDPDataElementTypeReservedStart: c_uint = 9;
6151pub const kBluetoothSDPDataElementTypeReservedEnd: c_uint = 31;
6153
6154pub type BluetoothSDPUUID16 = u16;
6156
6157pub type BluetoothSDPUUID32 = u32;
6159
6160pub type BluetoothSDPDataElementTypeDescriptor = u8;
6162
6163pub type BluetoothSDPDataElementSizeDescriptor = u8;
6165
6166pub type BluetoothSDPServiceAttributeID = u16;
6168
6169#[repr(transparent)]
6171#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
6172pub struct BluetoothLEScanType(pub c_uint);
6173impl BluetoothLEScanType {
6174 #[doc(alias = "BluetoothLEScanTypePassive")]
6175 pub const Passive: Self = Self(0x00);
6176 #[doc(alias = "BluetoothLEScanTypeActive")]
6177 pub const Active: Self = Self(0x01);
6178}
6179
6180#[cfg(feature = "objc2")]
6181unsafe impl Encode for BluetoothLEScanType {
6182 const ENCODING: Encoding = c_uint::ENCODING;
6183}
6184
6185#[cfg(feature = "objc2")]
6186unsafe impl RefEncode for BluetoothLEScanType {
6187 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6188}
6189
6190#[repr(transparent)]
6192#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
6193pub struct BluetoothLEAddressType(pub c_uint);
6194impl BluetoothLEAddressType {
6195 #[doc(alias = "BluetoothLEAddressTypePublic")]
6196 pub const Public: Self = Self(0x00);
6197 #[doc(alias = "BluetoothLEAddressTypeRandom")]
6198 pub const Random: Self = Self(0x01);
6199}
6200
6201#[cfg(feature = "objc2")]
6202unsafe impl Encode for BluetoothLEAddressType {
6203 const ENCODING: Encoding = c_uint::ENCODING;
6204}
6205
6206#[cfg(feature = "objc2")]
6207unsafe impl RefEncode for BluetoothLEAddressType {
6208 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6209}
6210
6211#[repr(transparent)]
6213#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
6214pub struct BluetoothLEScanFilter(pub c_uint);
6215impl BluetoothLEScanFilter {
6216 #[doc(alias = "BluetoothLEScanFilterNone")]
6217 pub const None: Self = Self(0x00);
6218 #[doc(alias = "BluetoothLEScanFilterSafelist")]
6219 pub const Safelist: Self = Self(0x01);
6220 #[doc(alias = "BluetoothLEScanFilterWhitelist")]
6221 pub const Whitelist: Self = Self(BluetoothLEScanFilter::Safelist.0);
6222}
6223
6224#[cfg(feature = "objc2")]
6225unsafe impl Encode for BluetoothLEScanFilter {
6226 const ENCODING: Encoding = c_uint::ENCODING;
6227}
6228
6229#[cfg(feature = "objc2")]
6230unsafe impl RefEncode for BluetoothLEScanFilter {
6231 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6232}
6233
6234#[repr(transparent)]
6236#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
6237pub struct BluetoothLEScan(pub c_uint);
6238impl BluetoothLEScan {
6239 #[doc(alias = "BluetoothLEScanDisable")]
6240 pub const Disable: Self = Self(0x00);
6241 #[doc(alias = "BluetoothLEScanEnable")]
6242 pub const Enable: Self = Self(0x01);
6243}
6244
6245#[cfg(feature = "objc2")]
6246unsafe impl Encode for BluetoothLEScan {
6247 const ENCODING: Encoding = c_uint::ENCODING;
6248}
6249
6250#[cfg(feature = "objc2")]
6251unsafe impl RefEncode for BluetoothLEScan {
6252 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6253}
6254
6255#[repr(transparent)]
6257#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
6258pub struct BluetoothLEConnectionInterval(pub c_uint);
6259impl BluetoothLEConnectionInterval {
6260 #[doc(alias = "BluetoothLEConnectionIntervalMin")]
6261 pub const Min: Self = Self(0x06);
6262 #[doc(alias = "BluetoothLEConnectionIntervalMax")]
6263 pub const Max: Self = Self(0x0C80);
6264}
6265
6266#[cfg(feature = "objc2")]
6267unsafe impl Encode for BluetoothLEConnectionInterval {
6268 const ENCODING: Encoding = c_uint::ENCODING;
6269}
6270
6271#[cfg(feature = "objc2")]
6272unsafe impl RefEncode for BluetoothLEConnectionInterval {
6273 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6274}
6275
6276#[repr(transparent)]
6278#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
6279pub struct BluetoothLEScanDuplicateFilter(pub c_uint);
6280impl BluetoothLEScanDuplicateFilter {
6281 #[doc(alias = "BluetoothLEScanDuplicateFilterDisable")]
6282 pub const Disable: Self = Self(0x00);
6283 #[doc(alias = "BluetoothLEScanDuplicateFilterEnable")]
6284 pub const Enable: Self = Self(0x01);
6285}
6286
6287#[cfg(feature = "objc2")]
6288unsafe impl Encode for BluetoothLEScanDuplicateFilter {
6289 const ENCODING: Encoding = c_uint::ENCODING;
6290}
6291
6292#[cfg(feature = "objc2")]
6293unsafe impl RefEncode for BluetoothLEScanDuplicateFilter {
6294 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6295}
6296
6297#[repr(transparent)]
6299#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
6300pub struct BluetoothLEAdvertisingType(pub c_uint);
6301impl BluetoothLEAdvertisingType {
6302 #[doc(alias = "BluetoothLEAdvertisingTypeConnectableUndirected")]
6303 pub const ConnectableUndirected: Self = Self(0x00);
6304 #[doc(alias = "BluetoothLEAdvertisingTypeConnectableDirected")]
6305 pub const ConnectableDirected: Self = Self(0x01);
6306 #[doc(alias = "BluetoothLEAdvertisingTypeDiscoverableUndirected")]
6307 pub const DiscoverableUndirected: Self = Self(0x02);
6308 #[doc(alias = "BluetoothLEAdvertisingTypeNonConnectableUndirected")]
6309 pub const NonConnectableUndirected: Self = Self(0x03);
6310 #[doc(alias = "BluetoothLEAdvertisingTypeScanResponse")]
6311 pub const ScanResponse: Self = Self(0x04);
6312}
6313
6314#[cfg(feature = "objc2")]
6315unsafe impl Encode for BluetoothLEAdvertisingType {
6316 const ENCODING: Encoding = c_uint::ENCODING;
6317}
6318
6319#[cfg(feature = "objc2")]
6320unsafe impl RefEncode for BluetoothLEAdvertisingType {
6321 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6322}