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