use core::ffi::*;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
use crate::*;
pub const kBluetoothLESMPTimeout: c_uint = 30;
pub const kBluetoothLESMPMinEncryptionKeySize: c_uint = 7;
pub const kBluetoothLESMPMaxEncryptionKeySize: c_uint = 16;
pub const kInfoStringMaxLength: c_uint = 35;
pub const kBluetoothHCIInquiryResultsMaxResults: c_uint = 50;
pub const kMaxChannelIDPerSide: c_uint = 31;
pub type BluetoothConnectionHandle = u16;
pub type BluetoothLMPHandle = u8;
pub const kBluetoothConnectionHandleSerialDeviceReserved: c_uint = 0x0fff;
pub const kBluetoothConnectionHandleNone: c_uint = 0xffff;
pub type BluetoothReasonCode = u8;
pub type BluetoothEncryptionEnable = u8;
pub const kBluetoothEncryptionEnableOff: c_uint = 0x00;
pub const kBluetoothEncryptionEnableOn: c_uint = 0x01;
pub const kBluetoothEncryptionEnableBREDRE0: c_uint = 0x01;
pub const kBluetoothEncryptionEnableLEAESCCM: c_uint = 0x01;
pub const kBluetoothEncryptionEnableBREDRAESCCM: c_uint = 0x02;
pub type BluetoothKeyFlag = u8;
pub const kBluetoothKeyFlagSemiPermanent: c_uint = 0x00;
pub const kBluetoothKeyFlagTemporary: c_uint = 0x01;
pub type BluetoothKeyType = u8;
pub const kBluetoothKeyTypeCombination: c_uint = 0x00;
pub const kBluetoothKeyTypeLocalUnit: c_uint = 0x01;
pub const kBluetoothKeyTypeRemoteUnit: c_uint = 0x02;
pub const kBluetoothKeyTypeDebugCombination: c_uint = 0x03;
pub const kBluetoothKeyTypeUnauthenticatedCombination: c_uint = 0x04;
pub const kBluetoothKeyTypeAuthenticatedCombination: c_uint = 0x05;
pub const kBluetoothKeyTypeChangedCombination: c_uint = 0x06;
pub const kBluetoothKeyTypeUnauthenticatedCombinationP256: c_uint = 0x07;
pub const kBluetoothKeyTypeAuthenticatedCombinationP256: c_uint = 0x08;
pub type BluetoothPacketType = u16;
pub const kBluetoothPacketTypeReserved1: c_uint = 0x0001;
pub const kBluetoothPacketType2DH1Omit: c_uint = 0x0002;
pub const kBluetoothPacketType3DH1Omit: c_uint = 0x0004;
pub const kBluetoothPacketTypeDM1: c_uint = 0x0008;
pub const kBluetoothPacketTypeDH1: c_uint = 0x0010;
pub const kBluetoothPacketTypeHV1: c_uint = 0x0020;
pub const kBluetoothPacketTypeHV2: c_uint = 0x0040;
pub const kBluetoothPacketTypeHV3: c_uint = 0x0080;
pub const kBluetoothPacketTypeDV: c_uint = 0x0100;
pub const kBluetoothPacketType2DH3Omit: c_uint = 0x0100;
pub const kBluetoothPacketType3DH3Omit: c_uint = 0x0200;
pub const kBluetoothPacketTypeAUX: c_uint = 0x0200;
pub const kBluetoothPacketTypeDM3: c_uint = 0x0400;
pub const kBluetoothPacketTypeDH3: c_uint = 0x0800;
pub const kBluetoothPacketType2DH5Omit: c_uint = 0x1000;
pub const kBluetoothPacketType3DM5Omit: c_uint = 0x2000;
pub const kBluetoothPacketTypeDM5: c_uint = 0x4000;
pub const kBluetoothPacketTypeDH5: c_uint = 0x8000;
pub const kBluetoothPacketTypeEnd: c_uint = 32769;
pub const kBluetoothSynchronousConnectionPacketTypeNone: c_uint = 0x0000;
pub const kBluetoothSynchronousConnectionPacketTypeHV1: c_uint = 0x0001;
pub const kBluetoothSynchronousConnectionPacketTypeHV2: c_uint = 0x0002;
pub const kBluetoothSynchronousConnectionPacketTypeHV3: c_uint = 0x0004;
pub const kBluetoothSynchronousConnectionPacketTypeEV3: c_uint = 0x0008;
pub const kBluetoothSynchronousConnectionPacketTypeEV4: c_uint = 0x0010;
pub const kBluetoothSynchronousConnectionPacketTypeEV5: c_uint = 0x0020;
pub const kBluetoothSynchronousConnectionPacketType2EV3Omit: c_uint = 0x0040;
pub const kBluetoothSynchronousConnectionPacketType3EV3Omit: c_uint = 0x0080;
pub const kBluetoothSynchronousConnectionPacketType2EV5Omit: c_uint = 0x0100;
pub const kBluetoothSynchronousConnectionPacketType3EV5Omit: c_uint = 0x0200;
pub const kBluetoothSynchronousConnectionPacketTypeFutureUse: c_uint = 0xFC00;
pub const kBluetoothSynchronousConnectionPacketTypeAll: c_uint = 0xFFFF;
pub const kBluetoothSynchronousConnectionPacketTypeEnd: c_uint = 65536;
pub type BluetoothLAP = u32;
pub const kBluetoothGeneralInquiryAccessCodeIndex: c_uint = 0;
pub const kBluetoothGeneralInquiryAccessCodeLAPValue: c_uint = 0x9E8B33;
pub const kBluetoothLimitedInquiryAccessCodeIndex: c_uint = 1;
pub const kBluetoothLimitedInquiryAccessCodeLAPValue: c_uint = 0x9E8B00;
pub const kBluetoothLimitedInquiryAccessCodeEnd: c_uint = 10390273;
pub type BluetoothPageScanRepetitionMode = u8;
pub const kBluetoothPageScanRepetitionModeR0: c_uint = 0x00;
pub const kBluetoothPageScanRepetitionModeR1: c_uint = 0x01;
pub const kBluetoothPageScanRepetitionModeR2: c_uint = 0x02;
pub type BluetoothPageScanPeriodMode = u8;
pub const kBluetoothPageScanPeriodModeP0: c_uint = 0x00;
pub const kBluetoothPageScanPeriodModeP1: c_uint = 0x01;
pub const kBluetoothPageScanPeriodModeP2: c_uint = 0x02;
pub type BluetoothPageScanMode = u8;
pub const kBluetoothPageScanModeMandatory: c_uint = 0x00;
pub const kBluetoothPageScanModeOptional1: c_uint = 0x01;
pub const kBluetoothPageScanModeOptional2: c_uint = 0x02;
pub const kBluetoothPageScanModeOptional3: c_uint = 0x03;
pub type BluetoothHCIPageScanType = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIPageScanTypes(pub c_uint);
impl BluetoothHCIPageScanTypes {
#[doc(alias = "kBluetoothHCIPageScanTypeStandard")]
pub const Standard: Self = Self(0x00);
#[doc(alias = "kBluetoothHCIPageScanTypeInterlaced")]
pub const Interlaced: Self = Self(0x01);
#[doc(alias = "kBluetoothHCIPageScanTypeReservedStart")]
pub const ReservedStart: Self = Self(0x02);
#[doc(alias = "kBluetoothHCIPageScanTypeReservedEnd")]
pub const ReservedEnd: Self = Self(0xFF);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIPageScanTypes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIPageScanTypes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIErroneousDataReporting = u8;
pub const kBluetoothHCIErroneousDataReportingDisabled: c_uint = 0x00;
pub const kBluetoothHCIErroneousDataReportingEnabled: c_uint = 0x01;
pub const kBluetoothHCIErroneousDataReportingReservedStart: c_uint = 0x02;
pub const kBluetoothHCIErroneousDataReportingReservedEnd: c_uint = 0xFF;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothDeviceAddress {
pub data: [u8; 6],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothDeviceAddress {
const ENCODING: Encoding = Encoding::Struct("BluetoothDeviceAddress", &[<[u8; 6]>::ENCODING]);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothDeviceAddress {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothKey {
pub data: [u8; 16],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothKey {
const ENCODING: Encoding = Encoding::Struct("BluetoothKey", &[<[u8; 16]>::ENCODING]);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothKey {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothIRK {
pub data: [u8; 16],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothIRK {
const ENCODING: Encoding = Encoding::Struct("BluetoothIRK", &[<[u8; 16]>::ENCODING]);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothIRK {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothPINCode {
pub data: [u8; 16],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothPINCode {
const ENCODING: Encoding = Encoding::Struct("BluetoothPINCode", &[<[u8; 16]>::ENCODING]);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothPINCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothClassOfDevice = u32;
pub type BluetoothServiceClassMajor = u32;
pub type BluetoothDeviceClassMajor = u32;
pub type BluetoothDeviceClassMinor = u32;
pub const kBluetoothDeviceNameMaxLength: c_uint = 248;
pub type BluetoothClockOffset = u16;
pub type BluetoothRole = u8;
pub type BluetoothAllowRoleSwitch = u8;
pub const kBluetoothDontAllowRoleSwitch: c_uint = 0x00;
pub const kBluetoothAllowRoleSwitch: c_uint = 0x01;
pub const kBluetoothRoleBecomeCentral: c_uint = 0x00;
pub const kBluetoothRoleRemainPeripheral: c_uint = 0x01;
#[deprecated]
pub const kBluetoothRoleBecomeMaster: c_uint = kBluetoothRoleBecomeCentral;
#[deprecated]
pub const kBluetoothRoleRemainSlave: c_uint = kBluetoothRoleRemainPeripheral;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothSetEventMask {
pub data: [u8; 8],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothSetEventMask {
const ENCODING: Encoding = Encoding::Struct("BluetoothSetEventMask", &[<[u8; 8]>::ENCODING]);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothSetEventMask {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothPINType = u8;
pub const kBluetoothL2CAPMaxPacketSize: c_uint = 65535;
pub const kBluetoothACLLogicalChannelReserved: c_uint = 0;
pub const kBluetoothACLLogicalChannelL2CAPContinue: c_uint = 1;
pub const kBluetoothACLLogicalChannelL2CAPStart: c_uint = 2;
pub const kBluetoothACLLogicalChannelLMP: c_uint = 3;
pub type BluetoothL2CAPChannelID = u16;
pub const kBluetoothL2CAPChannelNull: c_uint = 0x0000;
pub const kBluetoothL2CAPChannelSignalling: c_uint = 0x0001;
pub const kBluetoothL2CAPChannelConnectionLessData: c_uint = 0x0002;
pub const kBluetoothL2CAPChannelAMPManagerProtocol: c_uint = 0x0003;
pub const kBluetoothL2CAPChannelAttributeProtocol: c_uint = 0x0004;
pub const kBluetoothL2CAPChannelLESignalling: c_uint = 0x0005;
pub const kBluetoothL2CAPChannelSecurityManager: c_uint = 0x0006;
pub const kBluetoothL2CAPChannelBREDRSecurityManager: c_uint = 0x0007;
pub const kBluetoothL2CAPChannelReservedStart: c_uint = 0x0008;
pub const kBluetoothL2CAPChannelLEAP: c_uint = 0x002A;
pub const kBluetoothL2CAPChannelLEAS: c_uint = 0x002B;
pub const kBluetoothL2CAPChannelMagicPairing: c_uint = 0x0030;
pub const kBluetoothL2CAPChannelMagnet: c_uint = 0x003A;
pub const kBluetoothL2CAPChannelReservedEnd: c_uint = 0x003E;
pub const kBluetoothL2CAPChannelAMPTestManager: c_uint = 0x003F;
pub const kBluetoothL2CAPChannelDynamicStart: c_uint = 0x0040;
pub const kBluetoothL2CAPChannelDynamicEnd: c_uint = 0xffff;
pub const kBluetoothL2CAPChannelEnd: c_uint = 0xffff;
pub type BluetoothL2CAPGroupID = BluetoothL2CAPChannelID;
pub type BluetoothL2CAPPSM = u16;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothL2CAPCommandCode(pub c_uint);
impl BluetoothL2CAPCommandCode {
#[doc(alias = "kBluetoothL2CAPCommandCodeReserved")]
pub const Reserved: Self = Self(0x00);
#[doc(alias = "kBluetoothL2CAPCommandCodeCommandReject")]
pub const CommandReject: Self = Self(0x01);
#[doc(alias = "kBluetoothL2CAPCommandCodeConnectionRequest")]
pub const ConnectionRequest: Self = Self(0x02);
#[doc(alias = "kBluetoothL2CAPCommandCodeConnectionResponse")]
pub const ConnectionResponse: Self = Self(0x03);
#[doc(alias = "kBluetoothL2CAPCommandCodeConfigureRequest")]
pub const ConfigureRequest: Self = Self(0x04);
#[doc(alias = "kBluetoothL2CAPCommandCodeConfigureResponse")]
pub const ConfigureResponse: Self = Self(0x05);
#[doc(alias = "kBluetoothL2CAPCommandCodeDisconnectionRequest")]
pub const DisconnectionRequest: Self = Self(0x06);
#[doc(alias = "kBluetoothL2CAPCommandCodeDisconnectionResponse")]
pub const DisconnectionResponse: Self = Self(0x07);
#[doc(alias = "kBluetoothL2CAPCommandCodeEchoRequest")]
pub const EchoRequest: Self = Self(0x08);
#[doc(alias = "kBluetoothL2CAPCommandCodeEchoResponse")]
pub const EchoResponse: Self = Self(0x09);
#[doc(alias = "kBluetoothL2CAPCommandCodeInformationRequest")]
pub const InformationRequest: Self = Self(0x0A);
#[doc(alias = "kBluetoothL2CAPCommandCodeInformationResponse")]
pub const InformationResponse: Self = Self(0x0B);
#[doc(alias = "kBluetoothL2CAPCommandCodeCreateChannelRequest")]
pub const CreateChannelRequest: Self = Self(0x0C);
#[doc(alias = "kBluetoothL2CAPCommandCodeCreateChannelResponse")]
pub const CreateChannelResponse: Self = Self(0x0D);
#[doc(alias = "kBluetoothL2CAPCommandCodeMoveChannelRequest")]
pub const MoveChannelRequest: Self = Self(0x0E);
#[doc(alias = "kBluetoothL2CAPCommandCodeMoveChannelResponse")]
pub const MoveChannelResponse: Self = Self(0x0F);
#[doc(alias = "kBluetoothL2CAPCommandCodeMoveChannelConfirmation")]
pub const MoveChannelConfirmation: Self = Self(0x10);
#[doc(alias = "kBluetoothL2CAPCommandCodeMoveChannelConfirmationResponse")]
pub const MoveChannelConfirmationResponse: Self = Self(0x11);
#[doc(alias = "kBluetoothL2CAPCommandCodeConnectionParameterUpdateRequest")]
pub const ConnectionParameterUpdateRequest: Self = Self(0x12);
#[doc(alias = "kBluetoothL2CAPCommandCodeConnectionParameterUpdateResponse")]
pub const ConnectionParameterUpdateResponse: Self = Self(0x13);
#[doc(alias = "kBluetoothL2CAPCommandCodeLECreditBasedConnectionRequest")]
pub const LECreditBasedConnectionRequest: Self = Self(0x14);
#[doc(alias = "kBluetoothL2CAPCommandCodeLECreditBasedConnectionResponse")]
pub const LECreditBasedConnectionResponse: Self = Self(0x15);
#[doc(alias = "kBluetoothL2CAPCommandCodeLEFlowControlCredit")]
pub const LEFlowControlCredit: Self = Self(0x16);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothL2CAPCommandCode {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothL2CAPCommandCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothL2CAPCommandRejectReason(pub c_uint);
impl BluetoothL2CAPCommandRejectReason {
#[doc(alias = "kBluetoothL2CAPCommandRejectReasonCommandNotUnderstood")]
pub const CommandNotUnderstood: Self = Self(0x0000);
#[doc(alias = "kBluetoothL2CAPCommandRejectReasonSignallingMTUExceeded")]
pub const SignallingMTUExceeded: Self = Self(0x0001);
#[doc(alias = "kBluetoothL2CAPCommandRejectReasonInvalidCIDInRequest")]
pub const InvalidCIDInRequest: Self = Self(0x0002);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothL2CAPCommandRejectReason {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothL2CAPCommandRejectReason {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothL2CAPMTU = u16;
pub type BluetoothL2CAPLinkTimeout = u16;
pub type BluetoothL2CAPFlushTimeout = u16;
pub const kBluetoothL2CAPFlushTimeoutUseExisting: c_uint = 0x0000;
pub const kBluetoothL2CAPFlushTimeoutImmediate: c_uint = 0x0001;
pub const kBluetoothL2CAPFlushTimeoutForever: c_uint = 0xFFFF;
pub const kBluetoothL2CAPFlushTimeoutEnd: c_uint = 65536;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothL2CAPQualityOfServiceOptions {
pub flags: u8,
pub serviceType: u8,
pub tokenRate: u32,
pub tokenBucketSize: u32,
pub peakBandwidth: u32,
pub latency: u32,
pub delayVariation: u32,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothL2CAPQualityOfServiceOptions {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothL2CAPQualityOfServiceOptions",
&[
<u8>::ENCODING,
<u8>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothL2CAPQualityOfServiceOptions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothL2CAPRetransmissionAndFlowControlOptions {
pub flags: u8,
pub txWindowSize: u8,
pub maxTransmit: u8,
pub retransmissionTimeout: u16,
pub monitorTimeout: u16,
pub maxPDUPayloadSize: u16,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothL2CAPRetransmissionAndFlowControlOptions {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothL2CAPRetransmissionAndFlowControlOptions",
&[
<u8>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothL2CAPRetransmissionAndFlowControlOptions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothL2CAPSegmentationAndReassembly(pub c_uint);
impl BluetoothL2CAPSegmentationAndReassembly {
#[doc(alias = "kBluetoothL2CAPSegmentationAndReassemblyUnsegmentedSDU")]
pub const UnsegmentedSDU: Self = Self(0x00);
#[doc(alias = "kBluetoothL2CAPSegmentationAndReassemblyStartOfSDU")]
pub const StartOfSDU: Self = Self(0x01);
#[doc(alias = "kBluetoothL2CAPSegmentationAndReassemblyEndOfSDU")]
pub const EndOfSDU: Self = Self(0x02);
#[doc(alias = "kBluetoothL2CAPSegmentationAndReassemblyContinuationOfSDU")]
pub const ContinuationOfSDU: Self = Self(0x03);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothL2CAPSegmentationAndReassembly {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothL2CAPSegmentationAndReassembly {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub const kBluetoothL2CAPInfoTypeMaxConnectionlessMTUSize: c_uint = 0x0001;
pub const kBluetoothL2CAPPacketHeaderSize: c_uint = 4;
pub type BluetoothL2CAPByteCount = u16;
pub type BluetoothL2CAPCommandID = u8;
pub type BluetoothL2CAPCommandByteCount = u16;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothL2CAPConnectionResult(pub c_uint);
impl BluetoothL2CAPConnectionResult {
#[doc(alias = "kBluetoothL2CAPConnectionResultSuccessful")]
pub const Successful: Self = Self(0x0000);
#[doc(alias = "kBluetoothL2CAPConnectionResultPending")]
pub const Pending: Self = Self(0x0001);
#[doc(alias = "kBluetoothL2CAPConnectionResultRefusedPSMNotSupported")]
pub const RefusedPSMNotSupported: Self = Self(0x0002);
#[doc(alias = "kBluetoothL2CAPConnectionResultRefusedSecurityBlock")]
pub const RefusedSecurityBlock: Self = Self(0x0003);
#[doc(alias = "kBluetoothL2CAPConnectionResultRefusedNoResources")]
pub const RefusedNoResources: Self = Self(0x0004);
#[doc(alias = "kBluetoothL2CAPConnectionResultRefusedReserved")]
pub const RefusedReserved: Self = Self(0x0005);
#[doc(alias = "kBluetoothL2CAPConnectionResultRefusedInvalidSourceCID")]
pub const RefusedInvalidSourceCID: Self = Self(0x0006);
#[doc(alias = "kBluetoothL2CAPConnectionResultRefusedSourceCIDAlreadyAllocated")]
pub const RefusedSourceCIDAlreadyAllocated: Self = Self(0x0007);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothL2CAPConnectionResult {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothL2CAPConnectionResult {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothL2CAPConnectionStatus(pub c_uint);
impl BluetoothL2CAPConnectionStatus {
#[doc(alias = "kBluetoothL2CAPConnectionStatusNoInfoAvailable")]
pub const NoInfoAvailable: Self = Self(0x0000);
#[doc(alias = "kBluetoothL2CAPConnectionStatusAuthenticationPending")]
pub const AuthenticationPending: Self = Self(0x0001);
#[doc(alias = "kBluetoothL2CAPConnectionStatusAuthorizationPending")]
pub const AuthorizationPending: Self = Self(0x0002);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothL2CAPConnectionStatus {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothL2CAPConnectionStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothL2CAPConfigurationResult(pub c_uint);
impl BluetoothL2CAPConfigurationResult {
#[doc(alias = "kBluetoothL2CAPConfigurationResultSuccess")]
pub const Success: Self = Self(0x0000);
#[doc(alias = "kBluetoothL2CAPConfigurationResultUnacceptableParams")]
pub const UnacceptableParams: Self = Self(0x0001);
#[doc(alias = "kBluetoothL2CAPConfigurationResultRejected")]
pub const Rejected: Self = Self(0x0002);
#[doc(alias = "kBluetoothL2CAPConfigurationResultUnknownOptions")]
pub const UnknownOptions: Self = Self(0x0003);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothL2CAPConfigurationResult {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothL2CAPConfigurationResult {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothL2CAPConfigurationOption(pub c_uint);
impl BluetoothL2CAPConfigurationOption {
#[doc(alias = "kBluetoothL2CAPConfigurationOptionMTU")]
pub const MTU: Self = Self(0x01);
#[doc(alias = "kBluetoothL2CAPConfigurationOptionFlushTimeout")]
pub const FlushTimeout: Self = Self(0x02);
#[doc(alias = "kBluetoothL2CAPConfigurationOptionQoS")]
pub const QoS: Self = Self(0x03);
#[doc(alias = "kBluetoothL2CAPConfigurationOptionRetransmissionAndFlowControl")]
pub const RetransmissionAndFlowControl: Self = Self(0x04);
#[doc(alias = "kBluetoothL2CAPConfigurationOptionFrameCheckSequence")]
pub const FrameCheckSequence: Self = Self(0x05);
#[doc(alias = "kBluetoothL2CAPConfigurationOptionExtendedFlowSpecification")]
pub const ExtendedFlowSpecification: Self = Self(0x06);
#[doc(alias = "kBluetoothL2CAPConfigurationOptionExtendedWindowSize")]
pub const ExtendedWindowSize: Self = Self(0x07);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothL2CAPConfigurationOption {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothL2CAPConfigurationOption {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub const kBluetoothL2CAPConfigurationOptionMTULength: c_uint = 2;
pub const kBluetoothL2CAPConfigurationOptionFlushTimeoutLength: c_uint = 2;
pub const kBluetoothL2CAPConfigurationOptionQoSLength: c_uint = 22;
pub const kBluetoothL2CAPConfigurationOptionRetransmissionAndFlowControlLength: c_uint = 9;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothL2CAPConfigurationRetransmissionAndFlowControlFlags(pub c_uint);
impl BluetoothL2CAPConfigurationRetransmissionAndFlowControlFlags {
#[doc(alias = "kBluetoothL2CAPConfigurationBasicL2CAPModeFlag")]
pub const BasicL2CAPModeFlag: Self = Self(0x00);
#[doc(alias = "kBluetoothL2CAPConfigurationRetransmissionModeFlag")]
pub const RetransmissionModeFlag: Self = Self(0x01);
#[doc(alias = "kBluetoothL2CAPConfigurationFlowControlModeFlag")]
pub const FlowControlModeFlag: Self = Self(0x02);
#[doc(alias = "kBluetoothL2CAPConfigurationEnhancedRetransmissionMode")]
pub const EnhancedRetransmissionMode: Self = Self(0x03);
#[doc(alias = "kBluetoothL2CAPConfigurationStreamingMode")]
pub const StreamingMode: Self = Self(0x04);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothL2CAPConfigurationRetransmissionAndFlowControlFlags {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothL2CAPConfigurationRetransmissionAndFlowControlFlags {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothL2CAPInformationType(pub c_uint);
impl BluetoothL2CAPInformationType {
#[doc(alias = "kBluetoothL2CAPInformationTypeConnectionlessMTU")]
pub const ConnectionlessMTU: Self = Self(0x0001);
#[doc(alias = "kBluetoothL2CAPInformationTypeExtendedFeatures")]
pub const ExtendedFeatures: Self = Self(0x0002);
#[doc(alias = "kBluetoothL2CAPInformationTypeFixedChannelsSupported")]
pub const FixedChannelsSupported: Self = Self(0x0003);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothL2CAPInformationType {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothL2CAPInformationType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothL2CAPInformationResult(pub c_uint);
impl BluetoothL2CAPInformationResult {
#[doc(alias = "kBluetoothL2CAPInformationResultSuccess")]
pub const Success: Self = Self(0x0000);
#[doc(alias = "kBluetoothL2CAPInformationResultNotSupported")]
pub const NotSupported: Self = Self(0x0001);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothL2CAPInformationResult {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothL2CAPInformationResult {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothL2CAPInformationExtendedFeaturesMask(pub c_uint);
impl BluetoothL2CAPInformationExtendedFeaturesMask {
#[doc(alias = "kBluetoothL2CAPInformationNoExtendedFeatures")]
pub const InformationNoExtendedFeatures: Self = Self(0x00000000);
#[doc(alias = "kBluetoothL2CAPInformationFlowControlMode")]
pub const InformationFlowControlMode: Self = Self(0x00000001);
#[doc(alias = "kBluetoothL2CAPInformationRetransmissionMode")]
pub const InformationRetransmissionMode: Self = Self(0x00000002);
#[doc(alias = "kBluetoothL2CAPInformationBidirectionalQoS")]
pub const InformationBidirectionalQoS: Self = Self(0x00000004);
#[doc(alias = "kBluetoothL2CAPInformationEnhancedRetransmissionMode")]
pub const InformationEnhancedRetransmissionMode: Self = Self(0x00000008);
#[doc(alias = "kBluetoothL2CAPInformationStreamingMode")]
pub const InformationStreamingMode: Self = Self(0x00000010);
#[doc(alias = "kBluetoothL2CAPInformationFCSOption")]
pub const InformationFCSOption: Self = Self(0x00000020);
#[doc(alias = "kBluetoothL2CAPInformationExtendedFlowSpecification")]
pub const InformationExtendedFlowSpecification: Self = Self(0x00000040);
#[doc(alias = "kBluetoothL2CAPInformationFixedChannels")]
pub const InformationFixedChannels: Self = Self(0x00000080);
#[doc(alias = "kBluetoothL2CAPInformationExtendedWindowSize")]
pub const InformationExtendedWindowSize: Self = Self(0x00000100);
#[doc(alias = "kBluetoothL2CAPUnicastConnectionlessDataReception")]
pub const UnicastConnectionlessDataReception: Self = Self(0x00000200);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothL2CAPInformationExtendedFeaturesMask {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothL2CAPInformationExtendedFeaturesMask {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothL2CAPQoSType(pub c_uint);
impl BluetoothL2CAPQoSType {
#[doc(alias = "kBluetoothL2CAPQoSTypeNoTraffic")]
pub const NoTraffic: Self = Self(0x00);
#[doc(alias = "kBluetoothL2CAPQoSTypeBestEffort")]
pub const BestEffort: Self = Self(0x01);
#[doc(alias = "kBluetoothL2CAPQoSTypeGuaranteed")]
pub const Guaranteed: Self = Self(0x02);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothL2CAPQoSType {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothL2CAPQoSType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothL2CAPSupervisoryFuctionType(pub c_uint);
impl BluetoothL2CAPSupervisoryFuctionType {
#[doc(alias = "kBluetoothL2CAPSupervisoryFuctionTypeReceiverReady")]
pub const ReceiverReady: Self = Self(0x0);
#[doc(alias = "kBluetoothL2CAPSupervisoryFuctionTypeReject")]
pub const Reject: Self = Self(0x1);
#[doc(alias = "kBluetoothL2CAPSupervisoryFuctionTypeReceiverNotReady")]
pub const ReceiverNotReady: Self = Self(0x2);
#[doc(alias = "kBluetoothL2CAPSupervisoryFuctionTypeSelectiveReject")]
pub const SelectiveReject: Self = Self(0x3);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothL2CAPSupervisoryFuctionType {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothL2CAPSupervisoryFuctionType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub const kBluetoothLETXTimeMin: c_uint = 0x0148;
pub const kBluetoothLETXTimeDefault: c_uint = 0x0148;
pub const kBluetoothLETXTimeMax: c_uint = 0x0848;
pub const kBluetoothLETXOctetsMin: c_uint = 0x001b;
pub const kBluetoothLETXOctetsDefault: c_uint = 0x001b;
pub const kBluetoothLETXOctetsMax: c_uint = 0x00fb;
pub const kBluetoothL2CAPMTULowEnergyDefault: c_uint = kBluetoothLETXOctetsMin;
pub const kBluetoothL2CAPMTULowEnergyMax: c_uint = kBluetoothLETXOctetsMax;
pub const kBluetoothL2CAPMTUMinimum: c_uint = 0x0030;
pub const kBluetoothL2CAPMTUDefault: c_uint = 0x03F9;
pub const kBluetoothL2CAPMTUMaximum: c_uint = 0xffff;
pub const kBluetoothL2CAPMTUStart: c_uint = 0x7fff;
pub const kBluetoothL2CAPMTUSIG: c_uint = 0x0030;
pub const kBluetoothL2CAPFlushTimeoutDefault: c_uint = kBluetoothL2CAPFlushTimeoutForever;
pub const kBluetoothL2CAPQoSFlagsDefault: c_uint = 0;
pub const kBluetoothL2CAPQoSTypeDefault: c_uint = BluetoothL2CAPQoSType::BestEffort.0;
pub const kBluetoothL2CAPQoSTokenRateDefault: c_uint = 0x00000000;
pub const kBluetoothL2CAPQoSTokenBucketSizeDefault: c_uint = 0x00000000;
pub const kBluetoothL2CAPQoSPeakBandwidthDefault: c_uint = 0x00000000;
pub const kBluetoothL2CAPQoSLatencyDefault: c_uint = 0xffffffff;
pub const kBluetoothL2CAPQoSDelayVariationDefault: c_uint = 0xffffffff;
pub const kBluetoothLEMaxTXTimeMin: c_uint = 0x0148;
pub const kBluetoothLEMaxTXTimeDefault: c_uint = kBluetoothL2CAPMTULowEnergyDefault;
pub const kBluetoothLEMaxTXTimeMax: c_uint = 0x0848;
pub const kBluetoothLEMaxTXOctetsMin: c_uint = 0x001b;
pub const kBluetoothLEMaxTXOctetsDefault: c_uint = 0x0080;
pub const kBluetoothLEMaxTXOctetsMax: c_uint = 0x00fb;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLESecurityManagerKeyDistributionFormat(pub c_uint);
impl BluetoothLESecurityManagerKeyDistributionFormat {
#[doc(alias = "kBluetoothLESecurityManagerEncryptionKey")]
pub const EncryptionKey: Self = Self(1 << 0);
#[doc(alias = "kBluetoothLESecurityManagerIDKey")]
pub const IDKey: Self = Self(1 << 1);
#[doc(alias = "kBluetoothLESecurityManagerSignKey")]
pub const SignKey: Self = Self(1 << 2);
#[doc(alias = "kBluetoothLESecurityManagerLinkKey")]
pub const LinkKey: Self = Self(1 << 3);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLESecurityManagerKeyDistributionFormat {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLESecurityManagerKeyDistributionFormat {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLESecurityManagerCommandCode(pub c_uint);
impl BluetoothLESecurityManagerCommandCode {
#[doc(alias = "kBluetoothLESecurityManagerCommandCodeReserved")]
pub const Reserved: Self = Self(0x00);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingRequest")]
pub const PairingRequest: Self = Self(0x01);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingResponse")]
pub const PairingResponse: Self = Self(0x02);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingConfirm")]
pub const PairingConfirm: Self = Self(0x03);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingRandom")]
pub const PairingRandom: Self = Self(0x04);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingFailed")]
pub const PairingFailed: Self = Self(0x05);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodeEncryptionInfo")]
pub const EncryptionInfo: Self = Self(0x06);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodeMasterIdentification")]
pub const MasterIdentification: Self = Self(0x07);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodeIdentityInfo")]
pub const IdentityInfo: Self = Self(0x08);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodeIdentityAddressInfo")]
pub const IdentityAddressInfo: Self = Self(0x09);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodeSigningInfo")]
pub const SigningInfo: Self = Self(0x0A);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodeSecurityRequest")]
pub const SecurityRequest: Self = Self(0x0B);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingPublicKey")]
pub const PairingPublicKey: Self = Self(0x0C);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingDHKeyCheck")]
pub const PairingDHKeyCheck: Self = Self(0x0D);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodePairingKeypressNotification")]
pub const PairingKeypressNotification: Self = Self(0x0E);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodeReservedStart")]
pub const ReservedStart: Self = Self(0x0F);
#[doc(alias = "kBluetoothLESecurityManagerCommandCodeReservedEnd")]
pub const ReservedEnd: Self = Self(0xFF);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLESecurityManagerCommandCode {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLESecurityManagerCommandCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLESecurityManagerUserInputCapability(pub c_uint);
impl BluetoothLESecurityManagerUserInputCapability {
#[doc(alias = "kBluetoothLESecurityManagerUserInputCapabilityNoInput")]
pub const NoInput: Self = Self(0x01);
#[doc(alias = "kBluetoothLESecurityManagerUserInputCapabilityYesNo")]
pub const YesNo: Self = Self(0x02);
#[doc(alias = "kBluetoothLESecurityManagerUserInputCapabilityKeyboard")]
pub const Keyboard: Self = Self(0x03);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLESecurityManagerUserInputCapability {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLESecurityManagerUserInputCapability {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLESecurityManagerUserOutputCapability(pub c_uint);
impl BluetoothLESecurityManagerUserOutputCapability {
#[doc(alias = "kBluetoothLESecurityManagerUserOutputCapabilityNoOutput")]
pub const NoOutput: Self = Self(0x01);
#[doc(alias = "kBluetoothLESecurityManagerUserOutputCapabilityNumericOutput")]
pub const NumericOutput: Self = Self(0x02);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLESecurityManagerUserOutputCapability {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLESecurityManagerUserOutputCapability {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLESecurityManagerIOCapability(pub c_uint);
impl BluetoothLESecurityManagerIOCapability {
#[doc(alias = "kBluetoothLESecurityManagerIOCapabilityDisplayOnly")]
pub const DisplayOnly: Self = Self(0x00);
#[doc(alias = "kBluetoothLESecurityManagerIOCapabilityDisplayYesNo")]
pub const DisplayYesNo: Self = Self(0x01);
#[doc(alias = "kBluetoothLESecurityManagerIOCapabilityKeyboardOnly")]
pub const KeyboardOnly: Self = Self(0x02);
#[doc(alias = "kBluetoothLESecurityManagerIOCapabilityNoInputNoOutput")]
pub const NoInputNoOutput: Self = Self(0x03);
#[doc(alias = "kBluetoothLESecurityManagerIOCapabilityKeyboardDisplay")]
pub const KeyboardDisplay: Self = Self(0x04);
#[doc(alias = "kBluetoothLESecurityManagerIOCapabilityReservedStart")]
pub const ReservedStart: Self = Self(0x05);
#[doc(alias = "kBluetoothLESecurityManagerIOCapabilityReservedEnd")]
pub const ReservedEnd: Self = Self(0xFF);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLESecurityManagerIOCapability {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLESecurityManagerIOCapability {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLESecurityManagerOOBData(pub c_uint);
impl BluetoothLESecurityManagerOOBData {
#[doc(alias = "kBluetoothLESecurityManagerOOBAuthenticationDataNotPresent")]
pub const AuthenticationDataNotPresent: Self = Self(0x00);
#[doc(alias = "kBluetoothLESecurityManagerOOBAuthenticationDataPresent")]
pub const AuthenticationDataPresent: Self = Self(0x01);
#[doc(alias = "kBluetoothLESecurityManagerOOBDataReservedStart")]
pub const DataReservedStart: Self = Self(0x02);
#[doc(alias = "kBluetoothLESecurityManagerOOBDataReservedEnd")]
pub const DataReservedEnd: Self = Self(0xFF);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLESecurityManagerOOBData {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLESecurityManagerOOBData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub const kBluetoothLESecurityManagerNoBonding: c_uint = 0;
pub const kBluetoothLESecurityManagerBonding: c_uint = 1;
pub const kBluetoothLESecurityManagerReservedStart: c_uint = 2;
pub const kBluetoothLESecurityManagerReservedEnd: c_uint = 3;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLESecurityManagerPairingFailedReasonCode(pub c_uint);
impl BluetoothLESecurityManagerPairingFailedReasonCode {
#[doc(alias = "kBluetoothLESecurityManagerReasonCodeReserved")]
pub const ReasonCodeReserved: Self = Self(0x00);
#[doc(alias = "kBluetoothLESecurityManagerReasonCodePasskeyEntryFailed")]
pub const ReasonCodePasskeyEntryFailed: Self = Self(0x01);
#[doc(alias = "kBluetoothLESecurityManagerReasonCodeOOBNotAvailbale")]
pub const ReasonCodeOOBNotAvailbale: Self = Self(0x02);
#[doc(alias = "kBluetoothLESecurityManagerReasonCodeAuthenticationRequirements")]
pub const ReasonCodeAuthenticationRequirements: Self = Self(0x03);
#[doc(alias = "kBluetoothLESecurityManagerReasonCodeConfirmValueFailed")]
pub const ReasonCodeConfirmValueFailed: Self = Self(0x04);
#[doc(alias = "kBluetoothLESecurityManagerReasonCodePairingNotSupported")]
pub const ReasonCodePairingNotSupported: Self = Self(0x05);
#[doc(alias = "kBluetoothLESecurityManagerReasonCodeEncryptionKeySize")]
pub const ReasonCodeEncryptionKeySize: Self = Self(0x06);
#[doc(alias = "kBluetoothLESecurityManagerReasonCodeCommandNotSupported")]
pub const ReasonCodeCommandNotSupported: Self = Self(0x07);
#[doc(alias = "kBluetoothLESecurityManagerReasonCodeUnspecifiedReason")]
pub const ReasonCodeUnspecifiedReason: Self = Self(0x08);
#[doc(alias = "kBluetoothLESecurityManagerReasonCodeRepeatedAttempts")]
pub const ReasonCodeRepeatedAttempts: Self = Self(0x09);
#[doc(alias = "kBluetoothLESecurityManagerReasonCodeInvalidParameters")]
pub const ReasonCodeInvalidParameters: Self = Self(0x0A);
#[doc(alias = "kBluetoothLESecurityManagerReasonCodeDHKeyCheckFailed")]
pub const ReasonCodeDHKeyCheckFailed: Self = Self(0x0B);
#[doc(alias = "kBluetoothLESecurityManagerReasonCodeNumericComparisonFailed")]
pub const ReasonCodeNumericComparisonFailed: Self = Self(0x0C);
#[doc(alias = "kBluetoothLESecurityManagerReasonCodeBREDRPairingInProgress")]
pub const ReasonCodeBREDRPairingInProgress: Self = Self(0x0D);
#[doc(
alias = "kBluetoothLESecurityManagerReasonCodeCrossTransportKeyDerivationGenerationNotAllowed"
)]
pub const ReasonCodeCrossTransportKeyDerivationGenerationNotAllowed: Self = Self(0x0E);
#[doc(alias = "kBluetoothLESecurityManagerReasonCodeReservedStart")]
pub const ReasonCodeReservedStart: Self = Self(0x0F);
#[doc(alias = "kBluetoothLESecurityManagerReasonCodeReservedEnd")]
pub const ReasonCodeReservedEnd: Self = Self(0xFF);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLESecurityManagerPairingFailedReasonCode {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLESecurityManagerPairingFailedReasonCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLESecurityManagerKeypressNotificationType(pub c_uint);
impl BluetoothLESecurityManagerKeypressNotificationType {
#[doc(alias = "kBluetoothLESecurityManagerNotificationTypePasskeyEntryStarted")]
pub const NotificationTypePasskeyEntryStarted: Self = Self(0);
#[doc(alias = "kBluetoothLESecurityManagerNotificationTypePasskeyDigitEntered")]
pub const NotificationTypePasskeyDigitEntered: Self = Self(1);
#[doc(alias = "kBluetoothLESecurityManagerNotificationTypePasskeyDigitErased")]
pub const NotificationTypePasskeyDigitErased: Self = Self(2);
#[doc(alias = "kBluetoothLESecurityManagerNotificationTypePasskeyCleared")]
pub const NotificationTypePasskeyCleared: Self = Self(3);
#[doc(alias = "kBluetoothLESecurityManagerNotificationTypePasskeyEntryCompleted")]
pub const NotificationTypePasskeyEntryCompleted: Self = Self(4);
#[doc(alias = "kBluetoothLESecurityManagerNotificationTypeReservedStart")]
pub const NotificationTypeReservedStart: Self = Self(5);
#[doc(alias = "kBluetoothLESecurityManagerNotificationTypeReservedEnd")]
pub const NotificationTypeReservedEnd: Self = Self(255);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLESecurityManagerKeypressNotificationType {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLESecurityManagerKeypressNotificationType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothAMPManagerCode(pub c_uint);
impl BluetoothAMPManagerCode {
#[doc(alias = "kBluetoothAMPManagerCodeReserved")]
pub const Reserved: Self = Self(0x00);
#[doc(alias = "kBluetoothAMPManagerCodeAMPCommandReject")]
pub const AMPCommandReject: Self = Self(0x01);
#[doc(alias = "kBluetoothAMPManagerCodeAMPDiscoverRequest")]
pub const AMPDiscoverRequest: Self = Self(0x02);
#[doc(alias = "kBluetoothAMPManagerCodeAMPDiscoverResponse")]
pub const AMPDiscoverResponse: Self = Self(0x03);
#[doc(alias = "kBluetoothAMPManagerCodeAMPChangeNotify")]
pub const AMPChangeNotify: Self = Self(0x04);
#[doc(alias = "kBluetoothAMPManagerCodeAMPChangeResponse")]
pub const AMPChangeResponse: Self = Self(0x05);
#[doc(alias = "kBluetoothAMPManagerCodeAMPGetInfoRequest")]
pub const AMPGetInfoRequest: Self = Self(0x06);
#[doc(alias = "kBluetoothAMPManagerCodeAMPGetInfoResponse")]
pub const AMPGetInfoResponse: Self = Self(0x07);
#[doc(alias = "kBluetoothAMPManagerCodeAMPGetAssocRequest")]
pub const AMPGetAssocRequest: Self = Self(0x08);
#[doc(alias = "kBluetoothAMPManagerCodeAMPGetAssocResponse")]
pub const AMPGetAssocResponse: Self = Self(0x09);
#[doc(alias = "kBluetoothAMPManagerCodeAMPCreatePhysicalLinkRequest")]
pub const AMPCreatePhysicalLinkRequest: Self = Self(0x0A);
#[doc(alias = "kBluetoothAMPManagerCodeAMPCreatePhysicalLinkResponse")]
pub const AMPCreatePhysicalLinkResponse: Self = Self(0x0B);
#[doc(alias = "kBluetoothAMPManagerCodeAMPDisconnectPhysicalLinkRequest")]
pub const AMPDisconnectPhysicalLinkRequest: Self = Self(0x0C);
#[doc(alias = "kBluetoothAMPManagerCodeAMPDisconnectPhysicalLinkResponse")]
pub const AMPDisconnectPhysicalLinkResponse: Self = Self(0x0D);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothAMPManagerCode {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothAMPManagerCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothAMPCommandRejectReason(pub c_uint);
impl BluetoothAMPCommandRejectReason {
#[doc(alias = "kBluetoothAMPManagerCommandRejectReasonCommandNotRecognized")]
pub const ManagerCommandRejectReasonCommandNotRecognized: Self = Self(0x0000);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothAMPCommandRejectReason {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothAMPCommandRejectReason {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothAMPDiscoverResponseControllerStatus(pub c_uint);
impl BluetoothAMPDiscoverResponseControllerStatus {
#[doc(alias = "kBluetoothAMPManagerDiscoverResponseControllerStatusPoweredDown")]
pub const ManagerDiscoverResponseControllerStatusPoweredDown: Self = Self(0x00);
#[doc(alias = "kBluetoothAMPManagerDiscoverResponseControllerStatusBluetoothOnly")]
pub const ManagerDiscoverResponseControllerStatusBluetoothOnly: Self = Self(0x01);
#[doc(alias = "kBluetoothAMPManagerDiscoverResponseControllerStatusNoCapacity")]
pub const ManagerDiscoverResponseControllerStatusNoCapacity: Self = Self(0x02);
#[doc(alias = "kBluetoothAMPManagerDiscoverResponseControllerStatusLowCapacity")]
pub const ManagerDiscoverResponseControllerStatusLowCapacity: Self = Self(0x03);
#[doc(alias = "kBluetoothAMPManagerDiscoverResponseControllerStatusMediumCapacity")]
pub const ManagerDiscoverResponseControllerStatusMediumCapacity: Self = Self(0x04);
#[doc(alias = "kBluetoothAMPManagerDiscoverResponseControllerStatusHighCapacity")]
pub const ManagerDiscoverResponseControllerStatusHighCapacity: Self = Self(0x05);
#[doc(alias = "kBluetoothAMPManagerDiscoverResponseControllerStatusFullCapacity")]
pub const ManagerDiscoverResponseControllerStatusFullCapacity: Self = Self(0x06);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothAMPDiscoverResponseControllerStatus {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothAMPDiscoverResponseControllerStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothAMPGetInfoResponseStatus(pub c_uint);
impl BluetoothAMPGetInfoResponseStatus {
#[doc(alias = "kBluetoothAMPManagerGetInfoResponseSuccess")]
pub const ManagerGetInfoResponseSuccess: Self = Self(0x00);
#[doc(alias = "kBluetoothAMPManagerGetInfoResponseInvalidControllerID")]
pub const ManagerGetInfoResponseInvalidControllerID: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothAMPGetInfoResponseStatus {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothAMPGetInfoResponseStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothAMPGetAssocResponseStatus(pub c_uint);
impl BluetoothAMPGetAssocResponseStatus {
#[doc(alias = "kBluetoothAMPManagerGetAssocResponseSuccess")]
pub const ManagerGetAssocResponseSuccess: Self = Self(0x00);
#[doc(alias = "kBluetoothAMPManagerGetAssocResponseInvalidControllerID")]
pub const ManagerGetAssocResponseInvalidControllerID: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothAMPGetAssocResponseStatus {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothAMPGetAssocResponseStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothAMPCreatePhysicalLinkResponseStatus(pub c_uint);
impl BluetoothAMPCreatePhysicalLinkResponseStatus {
#[doc(alias = "kBluetoothAMPManagerCreatePhysicalLinkResponseSuccess")]
pub const ManagerCreatePhysicalLinkResponseSuccess: Self = Self(0x00);
#[doc(alias = "kBluetoothAMPManagerCreatePhysicalLinkResponseInvalidControllerID")]
pub const ManagerCreatePhysicalLinkResponseInvalidControllerID: Self = Self(0x01);
#[doc(alias = "kBluetoothAMPManagerCreatePhysicalLinkResponseUnableToStartLinkCreation")]
pub const ManagerCreatePhysicalLinkResponseUnableToStartLinkCreation: Self = Self(0x02);
#[doc(alias = "kBluetoothAMPManagerCreatePhysicalLinkResponseCollisionOccurred")]
pub const ManagerCreatePhysicalLinkResponseCollisionOccurred: Self = Self(0x03);
#[doc(
alias = "kBluetoothAMPManagerCreatePhysicalLinkResponseAMPDisconnectedPhysicalLinkRequestReceived"
)]
pub const ManagerCreatePhysicalLinkResponseAMPDisconnectedPhysicalLinkRequestReceived: Self =
Self(0x04);
#[doc(alias = "kBluetoothAMPManagerCreatePhysicalLinkResponsePhysicalLinkAlreadyExists")]
pub const ManagerCreatePhysicalLinkResponsePhysicalLinkAlreadyExists: Self = Self(0x05);
#[doc(alias = "kBluetoothAMPManagerCreatePhysicalLinkResponseSecurityViolation")]
pub const ManagerCreatePhysicalLinkResponseSecurityViolation: Self = Self(0x06);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothAMPCreatePhysicalLinkResponseStatus {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothAMPCreatePhysicalLinkResponseStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothAMPDisconnectPhysicalLinkResponseStatus(pub c_uint);
impl BluetoothAMPDisconnectPhysicalLinkResponseStatus {
#[doc(alias = "kBluetoothAMPManagerDisconnectPhysicalLinkResponseSuccess")]
pub const ManagerDisconnectPhysicalLinkResponseSuccess: Self = Self(0x00);
#[doc(alias = "kBluetoothAMPManagerDisconnectPhysicalLinkResponseInvalidControllerID")]
pub const ManagerDisconnectPhysicalLinkResponseInvalidControllerID: Self = Self(0x01);
#[doc(alias = "kBluetoothAMPManagerDisconnectPhysicalLinkResponseNoPhysicalLink")]
pub const ManagerDisconnectPhysicalLinkResponseNoPhysicalLink: Self = Self(0x02);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothAMPDisconnectPhysicalLinkResponseStatus {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothAMPDisconnectPhysicalLinkResponseStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCICommandOpCodeGroup = u8;
pub type BluetoothHCICommandOpCodeCommand = u16;
pub type BluetoothHCICommandOpCode = u16;
pub type BluetoothHCIVendorCommandSelector = u32;
pub const kBluetoothHCIOpCodeNoOp: c_uint = 0;
pub const kBluetoothHCICommandGroupNoOp: c_uint = 0x00;
pub const kBluetoothHCICommandNoOp: c_uint = 0x0000;
pub const kBluetoothHCICommandGroupLinkControl: c_uint = 0x01;
pub const kBluetoothHCICommandInquiry: c_uint = 0x0001;
pub const kBluetoothHCICommandInquiryCancel: c_uint = 0x0002;
pub const kBluetoothHCICommandPeriodicInquiryMode: c_uint = 0x0003;
pub const kBluetoothHCICommandExitPeriodicInquiryMode: c_uint = 0x0004;
pub const kBluetoothHCICommandCreateConnection: c_uint = 0x0005;
pub const kBluetoothHCICommandDisconnect: c_uint = 0x0006;
pub const kBluetoothHCICommandAddSCOConnection: c_uint = 0x0007;
pub const kBluetoothHCICommandCreateConnectionCancel: c_uint = 0x0008;
pub const kBluetoothHCICommandAcceptConnectionRequest: c_uint = 0x0009;
pub const kBluetoothHCICommandRejectConnectionRequest: c_uint = 0x000A;
pub const kBluetoothHCICommandLinkKeyRequestReply: c_uint = 0x000B;
pub const kBluetoothHCICommandLinkKeyRequestNegativeReply: c_uint = 0x000C;
pub const kBluetoothHCICommandPINCodeRequestReply: c_uint = 0x000D;
pub const kBluetoothHCICommandPINCodeRequestNegativeReply: c_uint = 0x000E;
pub const kBluetoothHCICommandChangeConnectionPacketType: c_uint = 0x000F;
pub const kBluetoothHCICommandAuthenticationRequested: c_uint = 0x0011;
pub const kBluetoothHCICommandSetConnectionEncryption: c_uint = 0x0013;
pub const kBluetoothHCICommandChangeConnectionLinkKey: c_uint = 0x0015;
pub const kBluetoothHCICommandMasterLinkKey: c_uint = 0x0017;
pub const kBluetoothHCICommandRemoteNameRequest: c_uint = 0x0019;
pub const kBluetoothHCICommandReadRemoteSupportedFeatures: c_uint = 0x001B;
pub const kBluetoothHCICommandReadRemoteExtendedFeatures: c_uint = 0x001C;
pub const kBluetoothHCICommandReadRemoteVersionInformation: c_uint = 0x001D;
pub const kBluetoothHCICommandReadClockOffset: c_uint = 0x001F;
pub const kBluetoothHCICommandRemoteNameRequestCancel: c_uint = 0x001A;
pub const kBluetoothHCICommandReadLMPHandle: c_uint = 0x0020;
pub const kBluetoothHCICommandSetupSynchronousConnection: c_uint = 0x0028;
pub const kBluetoothHCICommandAcceptSynchronousConnectionRequest: c_uint = 0x0029;
pub const kBluetoothHCICommandRejectSynchronousConnectionRequest: c_uint = 0x002A;
pub const kBluetoothHCICommandIOCapabilityRequestReply: c_uint = 0x002B;
pub const kBluetoothHCICommandUserConfirmationRequestReply: c_uint = 0x002C;
pub const kBluetoothHCICommandUserConfirmationRequestNegativeReply: c_uint = 0x002D;
pub const kBluetoothHCICommandUserPasskeyRequestReply: c_uint = 0x002E;
pub const kBluetoothHCICommandUserPasskeyRequestNegativeReply: c_uint = 0x002F;
pub const kBluetoothHCICommandRemoteOOBDataRequestReply: c_uint = 0x0030;
pub const kBluetoothHCICommandRemoteOOBDataRequestNegativeReply: c_uint = 0x0033;
pub const kBluetoothHCICommandIOCapabilityRequestNegativeReply: c_uint = 0x0034;
pub const kBluetoothHCICommandEnhancedSetupSynchronousConnection: c_uint = 0x003D;
pub const kBluetoothHCICommandEnhancedAcceptSynchronousConnectionRequest: c_uint = 0x003E;
pub const kBluetoothHCICommandTruncatedPage: c_uint = 0x003F;
pub const kBluetoothHCICommandTruncatedPageCancel: c_uint = 0x0040;
pub const kBluetoothHCICommandSetConnectionlessPeripheralBroadcast: c_uint = 0x0041;
pub const kBluetoothHCICommandSetConnectionlessPeripheralBroadcastReceive: c_uint = 0x0042;
pub const kBluetoothHCICommandStartSynchronizationTrain: c_uint = 0x0043;
pub const kBluetoothHCICommandReceiveSynchronizationTrain: c_uint = 0x0044;
pub const kBluetoothHCICommandRemoteOOBExtendedDataRequestReply: c_uint = 0x0045;
#[deprecated]
pub const kBluetoothHCICommandSetConnectionlessSlaveBroadcast: c_uint =
kBluetoothHCICommandSetConnectionlessPeripheralBroadcast;
#[deprecated]
pub const kBluetoothHCICommandSetConnectionlessSlaveBroadcastReceive: c_uint =
kBluetoothHCICommandSetConnectionlessPeripheralBroadcastReceive;
pub const kBluetoothHCICommandGroupLinkPolicy: c_uint = 0x02;
pub const kBluetoothHCICommandHoldMode: c_uint = 0x0001;
pub const kBluetoothHCICommandSniffMode: c_uint = 0x0003;
pub const kBluetoothHCICommandExitSniffMode: c_uint = 0x0004;
pub const kBluetoothHCICommandParkMode: c_uint = 0x0005;
pub const kBluetoothHCICommandExitParkMode: c_uint = 0x0006;
pub const kBluetoothHCICommandQoSSetup: c_uint = 0x0007;
pub const kBluetoothHCICommandRoleDiscovery: c_uint = 0x0009;
pub const kBluetoothHCICommandSwitchRole: c_uint = 0x000B;
pub const kBluetoothHCICommandReadLinkPolicySettings: c_uint = 0x000C;
pub const kBluetoothHCICommandWriteLinkPolicySettings: c_uint = 0x000D;
pub const kBluetoothHCICommandReadDefaultLinkPolicySettings: c_uint = 0x000E;
pub const kBluetoothHCICommandWriteDefaultLinkPolicySettings: c_uint = 0x000F;
pub const kBluetoothHCICommandFlowSpecification: c_uint = 0x0010;
pub const kBluetoothHCICommandSniffSubrating: c_uint = 0x0011;
pub const kBluetoothHCICommandAcceptSniffRequest: c_uint = 0x0031;
pub const kBluetoothHCICommandRejectSniffRequest: c_uint = 0x0032;
pub const kBluetoothHCICommandGroupHostController: c_uint = 0x03;
pub const kBluetoothHCICommandSetEventMask: c_uint = 0x0001;
pub const kBluetoothHCICommandReset: c_uint = 0x0003;
pub const kBluetoothHCICommandSetEventFilter: c_uint = 0x0005;
pub const kBluetoothHCICommandFlush: c_uint = 0x0008;
pub const kBluetoothHCICommandReadPINType: c_uint = 0x0009;
pub const kBluetoothHCICommandWritePINType: c_uint = 0x000A;
pub const kBluetoothHCICommandCreateNewUnitKey: c_uint = 0x000B;
pub const kBluetoothHCICommandReadStoredLinkKey: c_uint = 0x000D;
pub const kBluetoothHCICommandWriteStoredLinkKey: c_uint = 0x0011;
pub const kBluetoothHCICommandDeleteStoredLinkKey: c_uint = 0x0012;
pub const kBluetoothHCICommandChangeLocalName: c_uint = 0x0013;
pub const kBluetoothHCICommandReadLocalName: c_uint = 0x0014;
pub const kBluetoothHCICommandReadConnectionAcceptTimeout: c_uint = 0x0015;
pub const kBluetoothHCICommandWriteConnectionAcceptTimeout: c_uint = 0x0016;
pub const kBluetoothHCICommandReadPageTimeout: c_uint = 0x0017;
pub const kBluetoothHCICommandWritePageTimeout: c_uint = 0x0018;
pub const kBluetoothHCICommandReadScanEnable: c_uint = 0x0019;
pub const kBluetoothHCICommandWriteScanEnable: c_uint = 0x001A;
pub const kBluetoothHCICommandReadPageScanActivity: c_uint = 0x001B;
pub const kBluetoothHCICommandWritePageScanActivity: c_uint = 0x001C;
pub const kBluetoothHCICommandReadInquiryScanActivity: c_uint = 0x001D;
pub const kBluetoothHCICommandWriteInquiryScanActivity: c_uint = 0x001E;
pub const kBluetoothHCICommandReadAuthenticationEnable: c_uint = 0x001F;
pub const kBluetoothHCICommandWriteAuthenticationEnable: c_uint = 0x0020;
pub const kBluetoothHCICommandReadEncryptionMode: c_uint = 0x0021;
pub const kBluetoothHCICommandWriteEncryptionMode: c_uint = 0x0022;
pub const kBluetoothHCICommandReadClassOfDevice: c_uint = 0x0023;
pub const kBluetoothHCICommandWriteClassOfDevice: c_uint = 0x0024;
pub const kBluetoothHCICommandReadVoiceSetting: c_uint = 0x0025;
pub const kBluetoothHCICommandWriteVoiceSetting: c_uint = 0x0026;
pub const kBluetoothHCICommandReadAutomaticFlushTimeout: c_uint = 0x0027;
pub const kBluetoothHCICommandWriteAutomaticFlushTimeout: c_uint = 0x0028;
pub const kBluetoothHCICommandReadNumberOfBroadcastRetransmissions: c_uint = 0x0029;
pub const kBluetoothHCICommandWriteNumberOfBroadcastRetransmissions: c_uint = 0x002A;
pub const kBluetoothHCICommandReadHoldModeActivity: c_uint = 0x002B;
pub const kBluetoothHCICommandWriteHoldModeActivity: c_uint = 0x002C;
pub const kBluetoothHCICommandReadTransmitPowerLevel: c_uint = 0x002D;
pub const kBluetoothHCICommandReadSCOFlowControlEnable: c_uint = 0x002E;
pub const kBluetoothHCICommandWriteSCOFlowControlEnable: c_uint = 0x002F;
pub const kBluetoothHCICommandSetHostControllerToHostFlowControl: c_uint = 0x0031;
pub const kBluetoothHCICommandHostBufferSize: c_uint = 0x0033;
pub const kBluetoothHCICommandHostNumberOfCompletedPackets: c_uint = 0x0035;
pub const kBluetoothHCICommandReadLinkSupervisionTimeout: c_uint = 0x0036;
pub const kBluetoothHCICommandWriteLinkSupervisionTimeout: c_uint = 0x0037;
pub const kBluetoothHCICommandReadNumberOfSupportedIAC: c_uint = 0x0038;
pub const kBluetoothHCICommandReadCurrentIACLAP: c_uint = 0x0039;
pub const kBluetoothHCICommandWriteCurrentIACLAP: c_uint = 0x003A;
pub const kBluetoothHCICommandReadPageScanPeriodMode: c_uint = 0x003B;
pub const kBluetoothHCICommandWritePageScanPeriodMode: c_uint = 0x003C;
pub const kBluetoothHCICommandReadPageScanMode: c_uint = 0x003D;
pub const kBluetoothHCICommandWritePageScanMode: c_uint = 0x003E;
pub const kBluetoothHCICommandSetAFHClassification: c_uint = 0x003F;
pub const kBluetoothHCICommandReadInquiryScanType: c_uint = 0x0042;
pub const kBluetoothHCICommandWriteInquiryScanType: c_uint = 0x0043;
pub const kBluetoothHCICommandReadInquiryMode: c_uint = 0x0044;
pub const kBluetoothHCICommandWriteInquiryMode: c_uint = 0x0045;
pub const kBluetoothHCICommandReadPageScanType: c_uint = 0x0046;
pub const kBluetoothHCICommandWritePageScanType: c_uint = 0x0047;
pub const kBluetoothHCICommandReadAFHChannelAssessmentMode: c_uint = 0x0048;
pub const kBluetoothHCICommandWriteAFHChannelAssessmentMode: c_uint = 0x0049;
pub const kBluetoothHCICommandReadExtendedInquiryResponse: c_uint = 0x0051;
pub const kBluetoothHCICommandWriteExtendedInquiryResponse: c_uint = 0x0052;
pub const kBluetoothHCICommandRefreshEncryptionKey: c_uint = 0x0053;
pub const kBluetoothHCICommandReadSimplePairingMode: c_uint = 0x0055;
pub const kBluetoothHCICommandWriteSimplePairingMode: c_uint = 0x0056;
pub const kBluetoothHCICommandReadLocalOOBData: c_uint = 0x0057;
pub const kBluetoothHCICommandReadInquiryResponseTransmitPower: c_uint = 0x0058;
pub const kBluetoothHCICommandWriteInquiryResponseTransmitPower: c_uint = 0x0059;
pub const kBluetoothHCICommandSendKeypressNotification: c_uint = 0x0060;
pub const kBluetoothHCICommandReadDefaultErroneousDataReporting: c_uint = 0x005A;
pub const kBluetoothHCICommandWriteDefaultErroneousDataReporting: c_uint = 0x005B;
pub const kBluetoothHCICommandEnhancedFlush: c_uint = 0x005F;
pub const kBluetoothHCICommandReadLogicalLinkAcceptTimeout: c_uint = 0x0061;
pub const kBluetoothHCICommandWriteLogicalLinkAcceptTimeout: c_uint = 0x0062;
pub const kBluetoothHCICommandSetEventMaskPageTwo: c_uint = 0x0063;
pub const kBluetoothHCICommandReadLocationData: c_uint = 0x0064;
pub const kBluetoothHCICommandWriteLocationData: c_uint = 0x0065;
pub const kBluetoothHCICommandReadFlowControlMode: c_uint = 0x0066;
pub const kBluetoothHCICommandWriteFlowControlMode: c_uint = 0x0067;
pub const kBluetoothHCICommandReadEnhancedTransmitPowerLevel: c_uint = 0x0068;
pub const kBluetoothHCICommandReadBestEffortFlushTimeout: c_uint = 0x0069;
pub const kBluetoothHCICommandWriteBestEffortFlushTimeout: c_uint = 0x006A;
pub const kBluetoothHCICommandShortRangeMode: c_uint = 0x006B;
pub const kBluetoothHCICommandReadLEHostSupported: c_uint = 0x006C;
pub const kBluetoothHCICommandWriteLEHostSupported: c_uint = 0x006D;
pub const kBluetoothHCICommandSetMWSChannelParameters: c_uint = 0x006E;
pub const kBluetoothHCICommandSetExternalFrameConfiguration: c_uint = 0x006F;
pub const kBluetoothHCICommandSetMWSSignaling: c_uint = 0x0070;
pub const kBluetoothHCICommandSetMWSTransportLayer: c_uint = 0x0071;
pub const kBluetoothHCICommandSetMWSScanFrequencyTable: c_uint = 0x0072;
pub const kBluetoothHCICommandSetMWSPATTERNConfiguration: c_uint = 0x0073;
pub const kBluetoothHCICommandSetReservedLTADDR: c_uint = 0x0074;
pub const kBluetoothHCICommandDeleteReservedLTADDR: c_uint = 0x0075;
pub const kBluetoothHCICommandSetConnectionlessPeripheralBroadcastData: c_uint = 0x0076;
pub const kBluetoothHCICommandReadSynchronizationTrainParameters: c_uint = 0x0077;
pub const kBluetoothHCICommandWriteSynchronizationTrainParameters: c_uint = 0x0078;
pub const kBluetoothHCICommandReadSecureConnectionsHostSupport: c_uint = 0x0079;
pub const kBluetoothHCICommandWriteSecureConnectionsHostSupport: c_uint = 0x007A;
pub const kBluetoothHCICommandReadAuthenticatedPayloadTimeout: c_uint = 0x007B;
pub const kBluetoothHCICommandWriteAuthenticatedPayloadTimeout: c_uint = 0x007C;
pub const kBluetoothHCICommandReadLocalOOBExtendedData: c_uint = 0x007D;
pub const kBluetoothHCICommandReadExtendedPageTimeout: c_uint = 0x007E;
pub const kBluetoothHCICommandWriteExtendedPageTimeout: c_uint = 0x007F;
pub const kBluetoothHCICommandReadExtendedInquiryLength: c_uint = 0x0080;
pub const kBluetoothHCICommandWriteExtendedInquiryLength: c_uint = 0x0081;
#[deprecated]
pub const kBluetoothHCICommandSetConnectionlessSlaveBroadcastData: c_uint =
kBluetoothHCICommandSetConnectionlessPeripheralBroadcastData;
pub const kBluetoothHCICommandGroupInformational: c_uint = 0x04;
pub const kBluetoothHCICommandReadLocalVersionInformation: c_uint = 0x0001;
pub const kBluetoothHCICommandReadLocalSupportedCommands: c_uint = 0x0002;
pub const kBluetoothHCICommandReadLocalSupportedFeatures: c_uint = 0x0003;
pub const kBluetoothHCICommandReadLocalExtendedFeatures: c_uint = 0x0004;
pub const kBluetoothHCICommandReadBufferSize: c_uint = 0x0005;
pub const kBluetoothHCICommandReadCountryCode: c_uint = 0x0007;
pub const kBluetoothHCICommandReadDeviceAddress: c_uint = 0x0009;
pub const kBluetoothHCICommandReadDataBlockSize: c_uint = 0x000A;
pub const kBluetoothHCICommandReadLocalSupportedCodecs: c_uint = 0x000B;
pub const kBluetoothHCICommandGroupStatus: c_uint = 0x05;
pub const kBluetoothHCICommandReadFailedContactCounter: c_uint = 0x0001;
pub const kBluetoothHCICommandResetFailedContactCounter: c_uint = 0x0002;
pub const kBluetoothHCICommandGetLinkQuality: c_uint = 0x0003;
pub const kBluetoothHCICommandReadRSSI: c_uint = 0x0005;
pub const kBluetoothHCICommandReadAFHMappings: c_uint = 0x0006;
pub const kBluetoothHCICommandReadClock: c_uint = 0x0007;
pub const kBluetoothHCICommandReadEncryptionKeySize: c_uint = 0x0008;
pub const kBluetoothHCICommandReadLocalAMPInfo: c_uint = 0x0009;
pub const kBluetoothHCICommandReadLocalAMPASSOC: c_uint = 0x000A;
pub const kBluetoothHCICommandWriteRemoteAMPASSOC: c_uint = 0x000B;
pub const kBluetoothHCICommandGetMWSTransportLayerConfiguration: c_uint = 0x000C;
pub const kBluetoothHCICommandSetTriggeredClockCapture: c_uint = 0x000D;
pub const kBluetoothHCICommandGroupTesting: c_uint = 0x06;
pub const kBluetoothHCICommandReadLoopbackMode: c_uint = 0x0001;
pub const kBluetoothHCICommandWriteLoopbackMode: c_uint = 0x0002;
pub const kBluetoothHCICommandEnableDeviceUnderTestMode: c_uint = 0x0003;
pub const kBluetoothHCICommandWriteSimplePairingDebugMode: c_uint = 0x0004;
pub const kBluetoothHCICommandEnableAMPReceiverReports: c_uint = 0x0007;
pub const kBluetoothHCICommandAMPTestEnd: c_uint = 0x0008;
pub const kBluetoothHCICommandAMPTest: c_uint = 0x0009;
pub const kBluetoothHCICommandGroupLowEnergy: c_uint = 0x08;
pub const kBluetoothHCICommandLESetEventMask: c_uint = 0x0001;
pub const kBluetoothHCICommandLEReadBufferSize: c_uint = 0x0002;
pub const kBluetoothHCICommandLEReadLocalSupportedFeatures: c_uint = 0x0003;
pub const kBluetoothHCICommandLESetRandomAddress: c_uint = 0x0005;
pub const kBluetoothHCICommandLESetAdvertisingParameters: c_uint = 0x0006;
pub const kBluetoothHCICommandLEReadAdvertisingChannelTxPower: c_uint = 0x0007;
pub const kBluetoothHCICommandLESetAdvertisingData: c_uint = 0x0008;
pub const kBluetoothHCICommandLESetScanResponseData: c_uint = 0x0009;
pub const kBluetoothHCICommandLESetAdvertiseEnable: c_uint = 0x000A;
pub const kBluetoothHCICommandLESetScanParameters: c_uint = 0x000B;
pub const kBluetoothHCICommandLESetScanEnable: c_uint = 0x000C;
pub const kBluetoothHCICommandLECreateConnection: c_uint = 0x000D;
pub const kBluetoothHCICommandLECreateConnectionCancel: c_uint = 0x000E;
pub const kBluetoothHCICommandLEReadWhiteListSize: c_uint = 0x000F;
pub const kBluetoothHCICommandLEClearWhiteList: c_uint = 0x0010;
pub const kBluetoothHCICommandLEAddDeviceToWhiteList: c_uint = 0x0011;
pub const kBluetoothHCICommandLERemoveDeviceFromWhiteList: c_uint = 0x0012;
pub const kBluetoothHCICommandLEConnectionUpdate: c_uint = 0x0013;
pub const kBluetoothHCICommandLESetHostChannelClassification: c_uint = 0x0014;
pub const kBluetoothHCICommandLEReadChannelMap: c_uint = 0x0015;
pub const kBluetoothHCICommandLEReadRemoteUsedFeatures: c_uint = 0x0016;
pub const kBluetoothHCICommandLEEncrypt: c_uint = 0x0017;
pub const kBluetoothHCICommandLERand: c_uint = 0x0018;
pub const kBluetoothHCICommandLEStartEncryption: c_uint = 0x0019;
pub const kBluetoothHCICommandLELongTermKeyRequestReply: c_uint = 0x001A;
pub const kBluetoothHCICommandLELongTermKeyRequestNegativeReply: c_uint = 0x001B;
pub const kBluetoothHCICommandLEReadSupportedStates: c_uint = 0x001C;
pub const kBluetoothHCICommandLEReceiverTest: c_uint = 0x001D;
pub const kBluetoothHCICommandLETransmitterTest: c_uint = 0x001E;
pub const kBluetoothHCICommandLETestEnd: c_uint = 0x001F;
pub const kBluetoothHCICommandLERemoteConnectionParameterRequestReply: c_uint = 0x0020;
pub const kBluetoothHCICommandLERemoteConnectionParameterRequestNegativeReply: c_uint = 0x0021;
pub const kBluetoothHCICommandLESetDataLength: c_uint = 0x0022;
pub const kBluetoothHCICommandLEReadSuggestedDefaultDataLength: c_uint = 0x0023;
pub const kBluetoothHCICommandLEWriteSuggestedDefaultDataLength: c_uint = 0x0024;
pub const kBluetoothHCICommandLEReadLocalP256PublicKey: c_uint = 0x0025;
pub const kBluetoothHCICommandLEGenerateDHKey: c_uint = 0x0026;
pub const kBluetoothHCICommandLEAddDeviceToResolvingList: c_uint = 0x0027;
pub const kBluetoothHCICommandLERemoveDeviceFromResolvingList: c_uint = 0x0028;
pub const kBluetoothHCICommandLEClearResolvingList: c_uint = 0x0029;
pub const kBluetoothHCICommandLEReadResolvingListSize: c_uint = 0x002A;
pub const kBluetoothHCICommandLEReadPeerResolvableAddress: c_uint = 0x002B;
pub const kBluetoothHCICommandLEReadLocalResolvableAddress: c_uint = 0x002C;
pub const kBluetoothHCICommandLESetAddressResolutionEnable: c_uint = 0x002D;
pub const kBluetoothHCICommandLESetResolvablePrivateAddressTimeout: c_uint = 0x002E;
pub const kBluetoothHCICommandLEReadMaximumDataLength: c_uint = 0x002F;
pub const kBluetoothHCICommandLEReadPhy: c_uint = 0x0030;
pub const kBluetoothHCICommandLESetDefaultPhy: c_uint = 0x0031;
pub const kBluetoothHCICommandLESetPhy: c_uint = 0x0032;
pub const kBluetoothHCICommandLEEnhancedReceiverTest: c_uint = 0x0033;
pub const kBluetoothHCICommandLEEnhancedTransmitterTest: c_uint = 0x0034;
pub const kBluetoothHCICommandLESetAdvertisingSetRandomAddress: c_uint = 0x0035;
pub const kBluetoothHCICommandLESetExtendedAdvertisingParameters: c_uint = 0x0036;
pub const kBluetoothHCICommandLESetExtendedAdvertisingData: c_uint = 0x0037;
pub const kBluetoothHCICommandLESetExtendedScanResponseData: c_uint = 0x0038;
pub const kBluetoothHCICommandLESetExtendedAdvertisingEnableCommand: c_uint = 0x0039;
pub const kBluetoothHCICommandLEReadMaximumAdvertisingDataLength: c_uint = 0x003A;
pub const kBluetoothHCICommandLEReadNumberofSupportedAdvertisingSets: c_uint = 0x003B;
pub const kBluetoothHCICommandLERemoveAdvertisingSet: c_uint = 0x003C;
pub const kBluetoothHCICommandLEClearAdvertisingSets: c_uint = 0x003D;
pub const kBluetoothHCICommandLESetPeriodicAdvertisingParameters: c_uint = 0x003E;
pub const kBluetoothHCICommandLESetPeriodicAdvertisingData: c_uint = 0x003F;
pub const kBluetoothHCICommandLESetPeriodicAdvertisingEnable: c_uint = 0x0040;
pub const kBluetoothHCICommandLESetExtendedScanParameters: c_uint = 0x0041;
pub const kBluetoothHCICommandLESetExtendedScanEnable: c_uint = 0x0042;
pub const kBluetoothHCICommandLEExtendedCreateConnection: c_uint = 0x0043;
pub const kBluetoothHCICommandLEPeriodicAdvertisingCreateSync: c_uint = 0x0044;
pub const kBluetoothHCICommandLEPeriodicAdvertisingCreateSyncCancel: c_uint = 0x0045;
pub const kBluetoothHCICommandLEPeriodicAdvertisingTerminateSync: c_uint = 0x0046;
pub const kBluetoothHCICommandLEAddDeviceToPeriodicAdvertiserList: c_uint = 0x0047;
pub const kBluetoothHCICommandLERemoveDeviceFromPeriodicAdvertiserList: c_uint = 0x0048;
pub const kBluetoothHCICommandLEClearPeriodicAdvertiserList: c_uint = 0x0049;
pub const kBluetoothHCICommandLEReadPeriodicAdvertiserListSize: c_uint = 0x004A;
pub const kBluetoothHCICommandLEReadTransmitPower: c_uint = 0x004B;
pub const kBluetoothHCICommandLEReadRFPathCompensation: c_uint = 0x004C;
pub const kBluetoothHCICommandLEWriteRFPathCompensation: c_uint = 0x004D;
pub const kBluetoothHCICommandLESetPrivacyMode: c_uint = 0x004E;
pub const kBluetoothHCICommandGroupLogoTesting: c_uint = 0x3E;
pub const kBluetoothHCICommandGroupVendorSpecific: c_uint = 0x3F;
pub const kBluetoothHCICommandGroupMax: c_uint = 0x40;
pub const kBluetoothHCICommandMax: c_uint = 0x03FF;
pub type BluetoothHCIQoSFlags = u8;
pub type BluetoothHCIParamByteCount = u8;
pub type BluetoothHCIACLDataByteCount = u16;
pub type BluetoothHCISCODataByteCount = u8;
pub type BluetoothHCIInquiryLength = u8;
pub type BluetoothHCIResponseCount = u8;
pub type BluetoothHCICountryCode = u8;
pub type BluetoothHCIModeInterval = u16;
pub type BluetoothHCISniffAttemptCount = u16;
pub type BluetoothHCISniffTimeout = u16;
pub type BluetoothHCIParkModeBeaconInterval = u16;
pub type BluetoothMaxSlots = u8;
pub type BluetoothManufacturerName = u16;
pub type BluetoothLMPVersion = u8;
pub type BluetoothLMPSubversion = u16;
pub type BluetoothHCIConnectionMode = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIConnectionModes(pub c_uint);
impl BluetoothHCIConnectionModes {
#[doc(alias = "kConnectionActiveMode")]
pub const ConnectionActiveMode: Self = Self(0);
#[doc(alias = "kConnectionHoldMode")]
pub const ConnectionHoldMode: Self = Self(1);
#[doc(alias = "kConnectionSniffMode")]
pub const ConnectionSniffMode: Self = Self(2);
#[doc(alias = "kConnectionParkMode")]
pub const ConnectionParkMode: Self = Self(3);
#[doc(alias = "kConnectionModeReservedForFutureUse")]
pub const ConnectionModeReservedForFutureUse: Self = Self(4);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIConnectionModes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIConnectionModes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCISupportedCommands {
pub data: [u8; 64],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCISupportedCommands {
const ENCODING: Encoding =
Encoding::Struct("BluetoothHCISupportedCommands", &[<[u8; 64]>::ENCODING]);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCISupportedCommands {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCISupportedFeatures {
pub data: [u8; 8],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCISupportedFeatures {
const ENCODING: Encoding =
Encoding::Struct("BluetoothHCISupportedFeatures", &[<[u8; 8]>::ENCODING]);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCISupportedFeatures {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCILESupportedFeatures = BluetoothHCISupportedFeatures;
pub type BluetoothHCILEUsedFeatures = BluetoothHCISupportedFeatures;
pub type BluetoothHCIPageNumber = u8;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIExtendedFeaturesInfo {
pub page: BluetoothHCIPageNumber,
pub maxPage: BluetoothHCIPageNumber,
pub data: [u8; 8],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIExtendedFeaturesInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIExtendedFeaturesInfo",
&[
<BluetoothHCIPageNumber>::ENCODING,
<BluetoothHCIPageNumber>::ENCODING,
<[u8; 8]>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIExtendedFeaturesInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLEFeatureBits(pub c_uint);
impl BluetoothLEFeatureBits {
#[doc(alias = "kBluetoothLEFeatureLEEncryption")]
pub const LEEncryption: Self = Self(1 << 0);
#[doc(alias = "kBluetoothLEFeatureConnectionParamsRequestProcedure")]
pub const ConnectionParamsRequestProcedure: Self = Self(1 << 1);
#[doc(alias = "kBluetoothLEFeatureExtendedRejectIndication")]
pub const ExtendedRejectIndication: Self = Self(1 << 2);
#[doc(alias = "kBluetoothLEFeaturePeripheralInitiatedFeaturesExchange")]
pub const PeripheralInitiatedFeaturesExchange: Self = Self(1 << 3);
#[doc(alias = "kBluetoothLEFeatureLEPing")]
pub const LEPing: Self = Self(1 << 4);
#[doc(alias = "kBluetoothLEFeatureLEDataPacketLengthExtension")]
pub const LEDataPacketLengthExtension: Self = Self(1 << 5);
#[doc(alias = "kBluetoothLEFeatureLLPrivacy")]
pub const LLPrivacy: Self = Self(1 << 6);
#[doc(alias = "kBluetoothLEFeatureExtendedScannerFilterPolicies")]
pub const ExtendedScannerFilterPolicies: Self = Self(1 << 7);
#[doc(alias = "kBluetoothLEFeatureSlaveInitiatedFeaturesExchange")]
#[deprecated]
pub const SlaveInitiatedFeaturesExchange: Self =
Self(BluetoothLEFeatureBits::PeripheralInitiatedFeaturesExchange.0);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLEFeatureBits {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLEFeatureBits {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothFeatureBits(pub c_uint);
impl BluetoothFeatureBits {
pub const kBluetoothFeatureThreeSlotPackets: Self = Self(1 << 0);
pub const kBluetoothFeatureFiveSlotPackets: Self = Self(1 << 1);
pub const kBluetoothFeatureEncryption: Self = Self(1 << 2);
pub const kBluetoothFeatureSlotOffset: Self = Self(1 << 3);
pub const kBluetoothFeatureTimingAccuracy: Self = Self(1 << 4);
pub const kBluetoothFeatureSwitchRoles: Self = Self(1 << 5);
pub const kBluetoothFeatureHoldMode: Self = Self(1 << 6);
pub const kBluetoothFeatureSniffMode: Self = Self(1 << 7);
pub const kBluetoothFeatureParkMode: Self = Self(1 << 0);
pub const kBluetoothFeatureRSSI: Self = Self(1 << 1);
pub const kBluetoothFeaturePowerControlRequests: Self = Self(1 << 1);
pub const kBluetoothFeatureChannelQuality: Self = Self(1 << 2);
pub const kBluetoothFeatureSCOLink: Self = Self(1 << 3);
pub const kBluetoothFeatureHV2Packets: Self = Self(1 << 4);
pub const kBluetoothFeatureHV3Packets: Self = Self(1 << 5);
pub const kBluetoothFeatureULawLog: Self = Self(1 << 6);
pub const kBluetoothFeatureALawLog: Self = Self(1 << 7);
pub const kBluetoothFeatureCVSD: Self = Self(1 << 0);
pub const kBluetoothFeaturePagingScheme: Self = Self(1 << 1);
pub const kBluetoothFeaturePowerControl: Self = Self(1 << 2);
pub const kBluetoothFeatureTransparentSCOData: Self = Self(1 << 3);
pub const kBluetoothFeatureFlowControlLagBit0: Self = Self(1 << 4);
pub const kBluetoothFeatureFlowControlLagBit1: Self = Self(1 << 5);
pub const kBluetoothFeatureFlowControlLagBit2: Self = Self(1 << 6);
pub const kBluetoothFeatureBroadcastEncryption: Self = Self(1 << 7);
pub const kBluetoothFeatureScatterMode: Self = Self(1 << 0);
pub const kBluetoothFeatureEnhancedDataRateACL2MbpsMode: Self = Self(1 << 1);
pub const kBluetoothFeatureEnhancedDataRateACL3MbpsMode: Self = Self(1 << 2);
pub const kBluetoothFeatureEnhancedInquiryScan: Self = Self(1 << 3);
pub const kBluetoothFeatureInterlacedInquiryScan: Self = Self(1 << 4);
pub const kBluetoothFeatureInterlacedPageScan: Self = Self(1 << 5);
pub const kBluetoothFeatureRSSIWithInquiryResult: Self = Self(1 << 6);
pub const kBluetoothFeatureExtendedSCOLink: Self = Self(1 << 7);
pub const kBluetoothFeatureEV4Packets: Self = Self(1 << 0);
pub const kBluetoothFeatureEV5Packets: Self = Self(1 << 1);
pub const kBluetoothFeatureAbsenceMasks: Self = Self(1 << 2);
pub const kBluetoothFeatureAFHCapablePeripheral: Self = Self(1 << 3);
pub const kBluetoothFeatureAFHClassificationPeripheral: Self = Self(1 << 4);
pub const kBluetoothFeatureAliasAuhentication: Self = Self(1 << 5);
pub const kBluetoothFeatureLESupportedController: Self = Self(1 << 6);
pub const kBluetoothFeature3SlotEnhancedDataRateACLPackets: Self = Self(1 << 7);
#[deprecated]
pub const kBluetoothFeatureAFHCapableSlave: Self =
Self(BluetoothFeatureBits::kBluetoothFeatureAFHCapablePeripheral.0);
#[deprecated]
pub const kBluetoothFeatureAFHClassificationSlave: Self =
Self(BluetoothFeatureBits::kBluetoothFeatureAFHClassificationPeripheral.0);
pub const kBluetoothFeature5SlotEnhancedDataRateACLPackets: Self = Self(1 << 0);
pub const kBluetoothFeatureSniffSubrating: Self = Self(1 << 1);
pub const kBluetoothFeaturePauseEncryption: Self = Self(1 << 2);
pub const kBluetoothFeatureAFHCapableMaster: Self = Self(1 << 3);
pub const kBluetoothFeatureAFHClassificationMaster: Self = Self(1 << 4);
pub const kBluetoothFeatureEnhancedDataRateeSCO2MbpsMode: Self = Self(1 << 5);
pub const kBluetoothFeatureEnhancedDataRateeSCO3MbpsMode: Self = Self(1 << 6);
pub const kBluetoothFeature3SlotEnhancedDataRateeSCOPackets: Self = Self(1 << 7);
pub const kBluetoothFeatureExtendedInquiryResponse: Self = Self(1 << 0);
pub const kBluetoothFeatureSecureSimplePairing: Self = Self(1 << 3);
pub const kBluetoothFeatureEncapsulatedPDU: Self = Self(1 << 4);
pub const kBluetoothFeatureErroneousDataReporting: Self = Self(1 << 5);
pub const kBluetoothFeatureNonFlushablePacketBoundaryFlag: Self = Self(1 << 6);
pub const kBluetoothFeatureLinkSupervisionTimeoutChangedEvent: Self = Self(1 << 0);
pub const kBluetoothFeatureInquiryTransmissionPowerLevel: Self = Self(1 << 1);
pub const kBluetoothFeatureExtendedFeatures: Self = Self(1 << 7);
pub const kBluetoothExtendedFeatureSimpleSecurePairingHostMode: Self = Self(1 << 0);
pub const kBluetoothExtendedFeatureLESupportedHostMode: Self = Self(1 << 1);
pub const kBluetoothExtendedFeatureLEAndBREDRToSameDeviceHostMode: Self = Self(1 << 2);
pub const KBluetoothExtendedFeatureSecureConnectionsHostMode: Self = Self(1 << 3);
pub const kBluetoothExtendedFeatureSecureConnectionsControllerSupport: Self = Self(1 << 0);
pub const kBluetoothExtendedFeaturePing: Self = Self(1 << 1);
pub const kBluetoothExtendedFeatureReserved: Self = Self(1 << 2);
pub const kBluetoothExtendedFeatureTrainNudging: Self = Self(1 << 3);
pub const kBluetoothExtendedFeatureSlotAvailabilityMask: Self = Self(1 << 4);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothFeatureBits {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothFeatureBits {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothEventFilterCondition {
pub data: [u8; 7],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothEventFilterCondition {
const ENCODING: Encoding =
Encoding::Struct("BluetoothEventFilterCondition", &[<[u8; 7]>::ENCODING]);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothEventFilterCondition {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIFailedContactCount = u16;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIFailedContactInfo {
pub count: BluetoothHCIFailedContactCount,
pub handle: BluetoothConnectionHandle,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIFailedContactInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIFailedContactInfo",
&[
<BluetoothHCIFailedContactCount>::ENCODING,
<BluetoothConnectionHandle>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIFailedContactInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIRSSIValue = i8;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIRSSIInfo {
pub handle: BluetoothConnectionHandle,
pub RSSIValue: BluetoothHCIRSSIValue,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIRSSIInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIRSSIInfo",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothHCIRSSIValue>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIRSSIInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCILinkQuality = u8;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCILinkQualityInfo {
pub handle: BluetoothConnectionHandle,
pub qualityValue: BluetoothHCILinkQuality,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCILinkQualityInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCILinkQualityInfo",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothHCILinkQuality>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCILinkQualityInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIEncryptionKeySize = u8;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEncryptionKeySizeInfo {
pub handle: BluetoothConnectionHandle,
pub keySize: BluetoothHCIEncryptionKeySize,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEncryptionKeySizeInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEncryptionKeySizeInfo",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothHCIEncryptionKeySize>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEncryptionKeySizeInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIRole = u8;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIRoleInfo {
pub role: u8,
pub handle: BluetoothConnectionHandle,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIRoleInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIRoleInfo",
&[<u8>::ENCODING, <BluetoothConnectionHandle>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIRoleInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIRoles(pub c_uint);
impl BluetoothHCIRoles {
#[doc(alias = "kBluetoothHCICentralRole")]
pub const CentralRole: Self = Self(0x00);
#[doc(alias = "kBluetoothHCIPeripheralRole")]
pub const PeripheralRole: Self = Self(0x01);
#[doc(alias = "kBluetoothHCIMasterRole")]
#[deprecated]
pub const MasterRole: Self = Self(BluetoothHCIRoles::CentralRole.0);
#[doc(alias = "kBluetoothHCISlaveRole")]
#[deprecated]
pub const SlaveRole: Self = Self(BluetoothHCIRoles::PeripheralRole.0);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIRoles {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIRoles {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCILinkPolicySettings = u16;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCILinkPolicySettingsValues(pub c_uint);
impl BluetoothHCILinkPolicySettingsValues {
#[doc(alias = "kDisableAllLMModes")]
pub const DisableAllLMModes: Self = Self(0x0000);
#[doc(alias = "kEnableCentralPeripheralSwitch")]
pub const EnableCentralPeripheralSwitch: Self = Self(0x0001);
#[doc(alias = "kEnableHoldMode")]
pub const EnableHoldMode: Self = Self(0x0002);
#[doc(alias = "kEnableSniffMode")]
pub const EnableSniffMode: Self = Self(0x0004);
#[doc(alias = "kEnableParkMode")]
pub const EnableParkMode: Self = Self(0x0008);
#[doc(alias = "kReservedForFutureUse")]
pub const ReservedForFutureUse: Self = Self(0x0010);
#[doc(alias = "kEnableMasterSlaveSwitch")]
#[deprecated]
pub const EnableMasterSlaveSwitch: Self =
Self(BluetoothHCILinkPolicySettingsValues::EnableCentralPeripheralSwitch.0);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCILinkPolicySettingsValues {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCILinkPolicySettingsValues {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCILinkPolicySettingsInfo {
pub settings: BluetoothHCILinkPolicySettings,
pub handle: BluetoothConnectionHandle,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCILinkPolicySettingsInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCILinkPolicySettingsInfo",
&[
<BluetoothHCILinkPolicySettings>::ENCODING,
<BluetoothConnectionHandle>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCILinkPolicySettingsInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIQualityOfServiceSetupParams {
pub flags: u8,
pub serviceType: u8,
pub tokenRate: u32,
pub peakBandwidth: u32,
pub latency: u32,
pub delayVariation: u32,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIQualityOfServiceSetupParams {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIQualityOfServiceSetupParams",
&[
<u8>::ENCODING,
<u8>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIQualityOfServiceSetupParams {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCISetupSynchronousConnectionParams {
pub transmitBandwidth: u32,
pub receiveBandwidth: u32,
pub maxLatency: u16,
pub voiceSetting: u16,
pub retransmissionEffort: u8,
pub packetType: u16,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCISetupSynchronousConnectionParams {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCISetupSynchronousConnectionParams",
&[
<u32>::ENCODING,
<u32>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u8>::ENCODING,
<u16>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCISetupSynchronousConnectionParams {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIAcceptSynchronousConnectionRequestParams {
pub transmitBandwidth: u32,
pub receiveBandwidth: u32,
pub maxLatency: u16,
pub contentFormat: u16,
pub retransmissionEffort: u8,
pub packetType: u16,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIAcceptSynchronousConnectionRequestParams {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIAcceptSynchronousConnectionRequestParams",
&[
<u32>::ENCODING,
<u32>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u8>::ENCODING,
<u16>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIAcceptSynchronousConnectionRequestParams {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEnhancedSetupSynchronousConnectionParams {
pub transmitBandwidth: u32,
pub receiveBandwidth: u32,
pub transmitCodingFormat: u64,
pub receiveCodingFormat: u64,
pub transmitCodecFrameSize: u16,
pub receiveCodecFrameSize: u16,
pub inputBandwidth: u32,
pub outputBandwidth: u32,
pub inputCodingFormat: u64,
pub outputCodingFormat: u64,
pub inputCodedDataSize: u16,
pub outputCodedDataSize: u16,
pub inputPCMDataFormat: u8,
pub outputPCMDataFormat: u8,
pub inputPCMSamplePayloadMSBPosition: u8,
pub outputPCMSamplePayloadMSBPosition: u8,
pub inputDataPath: u8,
pub outputDataPath: u8,
pub inputTransportUnitSize: u8,
pub outputTransportUnitSize: u8,
pub maxLatency: u16,
pub packetType: u16,
pub retransmissionEffort: u8,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEnhancedSetupSynchronousConnectionParams {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEnhancedSetupSynchronousConnectionParams",
&[
<u32>::ENCODING,
<u32>::ENCODING,
<u64>::ENCODING,
<u64>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
<u64>::ENCODING,
<u64>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u8>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEnhancedSetupSynchronousConnectionParams {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEnhancedAcceptSynchronousConnectionRequestParams {
pub transmitBandwidth: u32,
pub receiveBandwidth: u32,
pub transmitCodingFormat: u64,
pub receiveCodingFormat: u64,
pub transmitCodecFrameSize: u16,
pub receiveCodecFrameSize: u16,
pub inputBandwidth: u32,
pub outputBandwidth: u32,
pub inputCodingFormat: u64,
pub outputCodingFormat: u64,
pub inputCodedDataSize: u16,
pub outputCodedDataSize: u16,
pub inputPCMDataFormat: u8,
pub outputPCMDataFormat: u8,
pub inputPCMSamplePayloadMSBPosition: u8,
pub outputPCMSamplePayloadMSBPosition: u8,
pub inputDataPath: u8,
pub outputDataPath: u8,
pub inputTransportUnitSize: u8,
pub outputTransportUnitSize: u8,
pub maxLatency: u16,
pub packetType: u16,
pub retransmissionEffort: u8,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEnhancedAcceptSynchronousConnectionRequestParams {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEnhancedAcceptSynchronousConnectionRequestParams",
&[
<u32>::ENCODING,
<u32>::ENCODING,
<u64>::ENCODING,
<u64>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
<u64>::ENCODING,
<u64>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u8>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEnhancedAcceptSynchronousConnectionRequestParams {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCILoopbackMode = u8;
pub const kBluetoothHCILoopbackModeOff: c_uint = 0x00;
pub const kBluetoothHCILoopbackModeLocal: c_uint = 0x01;
pub const kBluetoothHCILoopbackModeRemote: c_uint = 0x02;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothReadClockInfo {
pub handle: BluetoothConnectionHandle,
pub clock: u32,
pub accuracy: u16,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothReadClockInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothReadClockInfo",
&[
<BluetoothConnectionHandle>::ENCODING,
<u32>::ENCODING,
<u16>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothReadClockInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventFlowSpecificationData {
pub connectionHandle: BluetoothConnectionHandle,
pub flags: u8,
pub flowDirection: u8,
pub serviceType: u8,
pub tokenRate: u32,
pub tokenBucketSize: u32,
pub peakBandwidth: u32,
pub accessLatency: u32,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventFlowSpecificationData {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventFlowSpecificationData",
&[
<BluetoothConnectionHandle>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventFlowSpecificationData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIOperationID = u32;
pub type BluetoothHCIEventID = u32;
pub type BluetoothHCIDataID = u32;
pub type BluetoothHCISignalID = u32;
pub type BluetoothHCITransportID = u32;
pub type BluetoothHCITransportCommandID = u32;
pub type BluetoothHCIRequestID = u32;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIVersionInfo {
pub manufacturerName: BluetoothManufacturerName,
pub lmpVersion: BluetoothLMPVersion,
pub lmpSubVersion: BluetoothLMPSubversion,
pub hciVersion: u8,
pub hciRevision: u16,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIVersionInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIVersionInfo",
&[
<BluetoothManufacturerName>::ENCODING,
<BluetoothLMPVersion>::ENCODING,
<BluetoothLMPSubversion>::ENCODING,
<u8>::ENCODING,
<u16>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIVersionInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIBufferSize {
pub ACLDataPacketLength: u16,
pub SCODataPacketLength: u8,
pub totalNumACLDataPackets: u16,
pub totalNumSCODataPackets: u16,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIBufferSize {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIBufferSize",
&[
<u16>::ENCODING,
<u8>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIBufferSize {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCILEBufferSize {
pub ACLDataPacketLength: u16,
pub totalNumACLDataPackets: u8,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCILEBufferSize {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCILEBufferSize",
&[<u16>::ENCODING, <u8>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCILEBufferSize {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIConnectionAcceptTimeout = u16;
pub type BluetoothHCIPageTimeout = u16;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCITimeoutValues(pub c_uint);
impl BluetoothHCITimeoutValues {
#[doc(alias = "kDefaultPageTimeout")]
pub const DefaultPageTimeout: Self = Self(0x2710);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCITimeoutValues {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCITimeoutValues {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCINumLinkKeysDeleted = u16;
pub type BluetoothHCINumLinkKeysToWrite = u8;
pub type BluetoothHCIDeleteStoredLinkKeyFlag = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIDeleteStoredLinkKeyFlags(pub c_uint);
impl BluetoothHCIDeleteStoredLinkKeyFlags {
#[doc(alias = "kDeleteKeyForSpecifiedDeviceOnly")]
pub const DeleteKeyForSpecifiedDeviceOnly: Self = Self(0x00);
#[doc(alias = "kDeleteAllStoredLinkKeys")]
pub const DeleteAllStoredLinkKeys: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIDeleteStoredLinkKeyFlags {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIDeleteStoredLinkKeyFlags {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIReadStoredLinkKeysFlag = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIReadStoredLinkKeysFlags(pub c_uint);
impl BluetoothHCIReadStoredLinkKeysFlags {
#[doc(alias = "kReturnLinkKeyForSpecifiedDeviceOnly")]
pub const ReturnLinkKeyForSpecifiedDeviceOnly: Self = Self(0x00);
#[doc(alias = "kReadAllStoredLinkKeys")]
pub const ReadAllStoredLinkKeys: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIReadStoredLinkKeysFlags {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIReadStoredLinkKeysFlags {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIStoredLinkKeysInfo {
pub numLinkKeysRead: u16,
pub maxNumLinkKeysAllowedInDevice: u16,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIStoredLinkKeysInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIStoredLinkKeysInfo",
&[<u16>::ENCODING, <u16>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIStoredLinkKeysInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIPageScanMode = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIPageScanModes(pub c_uint);
impl BluetoothHCIPageScanModes {
#[doc(alias = "kMandatoryPageScanMode")]
pub const MandatoryPageScanMode: Self = Self(0x00);
#[doc(alias = "kOptionalPageScanMode1")]
pub const OptionalPageScanMode1: Self = Self(0x01);
#[doc(alias = "kOptionalPageScanMode2")]
pub const OptionalPageScanMode2: Self = Self(0x02);
#[doc(alias = "kOptionalPageScanMode3")]
pub const OptionalPageScanMode3: Self = Self(0x03);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIPageScanModes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIPageScanModes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIPageScanPeriodMode = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIPageScanPeriodModes(pub c_uint);
impl BluetoothHCIPageScanPeriodModes {
#[doc(alias = "kP0Mode")]
pub const P0Mode: Self = Self(0x00);
#[doc(alias = "kP1Mode")]
pub const P1Mode: Self = Self(0x01);
#[doc(alias = "kP2Mode")]
pub const P2Mode: Self = Self(0x02);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIPageScanPeriodModes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIPageScanPeriodModes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIPageScanEnableState = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIPageScanEnableStates(pub c_uint);
impl BluetoothHCIPageScanEnableStates {
#[doc(alias = "kNoScansEnabled")]
pub const NoScansEnabled: Self = Self(0x00);
#[doc(alias = "kInquiryScanEnabledPageScanDisabled")]
pub const InquiryScanEnabledPageScanDisabled: Self = Self(0x01);
#[doc(alias = "kInquiryScanDisabledPageScanEnabled")]
pub const InquiryScanDisabledPageScanEnabled: Self = Self(0x02);
#[doc(alias = "kInquiryScanEnabledPageScanEnabled")]
pub const InquiryScanEnabledPageScanEnabled: Self = Self(0x03);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIPageScanEnableStates {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIPageScanEnableStates {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIScanActivity {
pub scanInterval: u16,
pub scanWindow: u16,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIScanActivity {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIScanActivity",
&[<u16>::ENCODING, <u16>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIScanActivity {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIInquiryAccessCode {
pub data: [u8; 3],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIInquiryAccessCode {
const ENCODING: Encoding =
Encoding::Struct("BluetoothHCIInquiryAccessCode", &[<[u8; 3]>::ENCODING]);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIInquiryAccessCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIInquiryAccessCodeCount = u8;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCICurrentInquiryAccessCodes {
pub count: BluetoothHCIInquiryAccessCodeCount,
pub codes: *mut BluetoothHCIInquiryAccessCode,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCICurrentInquiryAccessCodes {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCICurrentInquiryAccessCodes",
&[
<BluetoothHCIInquiryAccessCodeCount>::ENCODING,
<*mut BluetoothHCIInquiryAccessCode>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCICurrentInquiryAccessCodes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub const kMaximumNumberOfInquiryAccessCodes: c_uint = 0x40;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCICurrentInquiryAccessCodesForWrite {
pub count: BluetoothHCIInquiryAccessCodeCount,
pub codes: [u8; 192],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCICurrentInquiryAccessCodesForWrite {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCICurrentInquiryAccessCodesForWrite",
&[
<BluetoothHCIInquiryAccessCodeCount>::ENCODING,
<[u8; 192]>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCICurrentInquiryAccessCodesForWrite {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCILinkSupervisionTimeout {
pub handle: BluetoothConnectionHandle,
pub timeout: u16,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCILinkSupervisionTimeout {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCILinkSupervisionTimeout",
&[<BluetoothConnectionHandle>::ENCODING, <u16>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCILinkSupervisionTimeout {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIFlowControlState = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCISCOFlowControlStates(pub c_uint);
impl BluetoothHCISCOFlowControlStates {
#[doc(alias = "kSCOFlowControlDisabled")]
pub const SCOFlowControlDisabled: Self = Self(0x00);
#[doc(alias = "kSCOFlowControlEnabled")]
pub const SCOFlowControlEnabled: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCISCOFlowControlStates {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCISCOFlowControlStates {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIGeneralFlowControlStates(pub c_uint);
impl BluetoothHCIGeneralFlowControlStates {
#[doc(alias = "kHostControllerToHostFlowControlOff")]
pub const HostControllerToHostFlowControlOff: Self = Self(0x00);
#[doc(alias = "kHCIACLDataPacketsOnHCISCODataPacketsOff")]
pub const HCIACLDataPacketsOnHCISCODataPacketsOff: Self = Self(0x01);
#[doc(alias = "kHCIACLDataPacketsOffHCISCODataPacketsOn")]
pub const HCIACLDataPacketsOffHCISCODataPacketsOn: Self = Self(0x02);
#[doc(alias = "kHCIACLDataPacketsOnHCISCODataPacketsOn")]
pub const HCIACLDataPacketsOnHCISCODataPacketsOn: Self = Self(0x03);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIGeneralFlowControlStates {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIGeneralFlowControlStates {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCITransmitPowerLevel = i8;
pub type BluetoothHCITransmitPowerLevelType = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCITransmitReadPowerLevelTypes(pub c_uint);
impl BluetoothHCITransmitReadPowerLevelTypes {
#[doc(alias = "kReadCurrentTransmitPowerLevel")]
pub const ReadCurrentTransmitPowerLevel: Self = Self(0x00);
#[doc(alias = "kReadMaximumTransmitPowerLevel")]
pub const ReadMaximumTransmitPowerLevel: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCITransmitReadPowerLevelTypes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCITransmitReadPowerLevelTypes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIAFHChannelAssessmentMode = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIAFHChannelAssessmentModes(pub c_uint);
impl BluetoothHCIAFHChannelAssessmentModes {
#[doc(alias = "kAFHChannelAssessmentModeDisabled")]
pub const AFHChannelAssessmentModeDisabled: Self = Self(0x00);
#[doc(alias = "kAFHChannelAssessmentModeEnabled")]
pub const AFHChannelAssessmentModeEnabled: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIAFHChannelAssessmentModes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIAFHChannelAssessmentModes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCITransmitPowerLevelInfo {
pub handle: BluetoothConnectionHandle,
pub level: BluetoothHCITransmitPowerLevel,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCITransmitPowerLevelInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCITransmitPowerLevelInfo",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothHCITransmitPowerLevel>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCITransmitPowerLevelInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCINumBroadcastRetransmissions = u8;
pub type BluetoothHCIHoldModeActivity = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIHoldModeActivityStates(pub c_uint);
impl BluetoothHCIHoldModeActivityStates {
#[doc(alias = "kMaintainCurrentPowerState")]
pub const MaintainCurrentPowerState: Self = Self(0x00);
#[doc(alias = "kSuspendPageScan")]
pub const SuspendPageScan: Self = Self(0x01);
#[doc(alias = "kSuspendInquiryScan")]
pub const SuspendInquiryScan: Self = Self(0x02);
#[doc(alias = "kSuspendPeriodicInquiries")]
pub const SuspendPeriodicInquiries: Self = Self(0x03);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIHoldModeActivityStates {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIHoldModeActivityStates {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIAuthenticationEnable = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIAuthentionEnableModes(pub c_uint);
impl BluetoothHCIAuthentionEnableModes {
#[doc(alias = "kAuthenticationDisabled")]
pub const AuthenticationDisabled: Self = Self(0x00);
#[doc(alias = "kAuthenticationEnabled")]
pub const AuthenticationEnabled: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIAuthentionEnableModes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIAuthentionEnableModes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIEncryptionMode = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIEncryptionModes(pub c_uint);
impl BluetoothHCIEncryptionModes {
#[doc(alias = "kEncryptionDisabled")]
pub const EncryptionDisabled: Self = Self(0x00);
#[doc(alias = "kEncryptionOnlyForPointToPointPackets")]
pub const EncryptionOnlyForPointToPointPackets: Self = Self(0x01);
#[doc(alias = "kEncryptionForBothPointToPointAndBroadcastPackets")]
pub const EncryptionForBothPointToPointAndBroadcastPackets: Self = Self(0x02);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEncryptionModes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEncryptionModes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIAutomaticFlushTimeout = u16;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIAutomaticFlushTimeoutInfo {
pub handle: BluetoothConnectionHandle,
pub timeout: BluetoothHCIAutomaticFlushTimeout,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIAutomaticFlushTimeoutInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIAutomaticFlushTimeoutInfo",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothHCIAutomaticFlushTimeout>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIAutomaticFlushTimeoutInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothTransportInfoPtr = *mut BluetoothTransportInfo;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothTransportInfo {
pub productID: u32,
pub vendorID: u32,
pub r#type: u32,
pub productName: [c_char; 35],
pub vendorName: [c_char; 35],
pub totalDataBytesSent: u64,
pub totalSCOBytesSent: u64,
pub totalDataBytesReceived: u64,
pub totalSCOBytesReceived: u64,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothTransportInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothTransportInfo",
&[
<u32>::ENCODING,
<u32>::ENCODING,
<u32>::ENCODING,
<[c_char; 35]>::ENCODING,
<[c_char; 35]>::ENCODING,
<u64>::ENCODING,
<u64>::ENCODING,
<u64>::ENCODING,
<u64>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothTransportInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothTransportTypes(pub c_uint);
impl BluetoothTransportTypes {
#[doc(alias = "kBluetoothTransportTypeUSB")]
pub const USB: Self = Self(0x01);
#[doc(alias = "kBluetoothTransportTypePCCard")]
pub const PCCard: Self = Self(0x02);
#[doc(alias = "kBluetoothTransportTypePCICard")]
pub const PCICard: Self = Self(0x03);
#[doc(alias = "kBluetoothTransportTypeUART")]
pub const UART: Self = Self(0x04);
#[doc(alias = "kBluetoothTransportTypePCIe")]
pub const PCIe: Self = Self(0x05);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothTransportTypes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothTransportTypes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIInquiryResult {
pub deviceAddress: BluetoothDeviceAddress,
pub pageScanRepetitionMode: BluetoothPageScanRepetitionMode,
pub pageScanPeriodMode: BluetoothHCIPageScanPeriodMode,
pub pageScanMode: BluetoothHCIPageScanMode,
pub classOfDevice: BluetoothClassOfDevice,
pub clockOffset: BluetoothClockOffset,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIInquiryResult {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIInquiryResult",
&[
<BluetoothDeviceAddress>::ENCODING,
<BluetoothPageScanRepetitionMode>::ENCODING,
<BluetoothHCIPageScanPeriodMode>::ENCODING,
<BluetoothHCIPageScanMode>::ENCODING,
<BluetoothClassOfDevice>::ENCODING,
<BluetoothClockOffset>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIInquiryResult {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIInquiryResults {
pub results: [BluetoothHCIInquiryResult; 50],
pub count: IOItemCount,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIInquiryResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIInquiryResults",
&[
<[BluetoothHCIInquiryResult; 50]>::ENCODING,
<IOItemCount>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIInquiryResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIInquiryWithRSSIResult {
pub deviceAddress: BluetoothDeviceAddress,
pub pageScanRepetitionMode: BluetoothPageScanRepetitionMode,
pub reserved: u8,
pub classOfDevice: BluetoothClassOfDevice,
pub clockOffset: BluetoothClockOffset,
pub RSSIValue: BluetoothHCIRSSIValue,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIInquiryWithRSSIResult {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIInquiryWithRSSIResult",
&[
<BluetoothDeviceAddress>::ENCODING,
<BluetoothPageScanRepetitionMode>::ENCODING,
<u8>::ENCODING,
<BluetoothClassOfDevice>::ENCODING,
<BluetoothClockOffset>::ENCODING,
<BluetoothHCIRSSIValue>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIInquiryWithRSSIResult {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIInquiryWithRSSIResults {
pub results: [BluetoothHCIInquiryWithRSSIResult; 50],
pub count: IOItemCount,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIInquiryWithRSSIResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIInquiryWithRSSIResults",
&[
<[BluetoothHCIInquiryWithRSSIResult; 50]>::ENCODING,
<IOItemCount>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIInquiryWithRSSIResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIFECRequired = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIFECRequiredValues(pub c_uint);
impl BluetoothHCIFECRequiredValues {
#[doc(alias = "kBluetoothHCIFECRequired")]
pub const Required: Self = Self(0x00);
#[doc(alias = "kBluetoothHCIFECNotRequired")]
pub const NotRequired: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIFECRequiredValues {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIFECRequiredValues {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIInquiryMode = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIInquiryModes(pub c_uint);
impl BluetoothHCIInquiryModes {
#[doc(alias = "kBluetoothHCIInquiryModeResultFormatStandard")]
pub const ResultFormatStandard: Self = Self(0x00);
#[doc(alias = "kBluetoothHCIInquiryModeResultFormatWithRSSI")]
pub const ResultFormatWithRSSI: Self = Self(0x01);
#[doc(alias = "kBluetoothHCIInquiryModeResultFormatWithRSSIOrExtendedInquiryResultFormat")]
pub const ResultFormatWithRSSIOrExtendedInquiryResultFormat: Self = Self(0x02);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIInquiryModes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIInquiryModes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIInquiryScanType = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIInquiryScanTypes(pub c_uint);
impl BluetoothHCIInquiryScanTypes {
#[doc(alias = "kBluetoothHCIInquiryScanTypeStandard")]
pub const Standard: Self = Self(0x00);
#[doc(alias = "kBluetoothHCIInquiryScanTypeInterlaced")]
pub const Interlaced: Self = Self(0x01);
#[doc(alias = "kBluetoothHCIInquiryScanTypeReservedStart")]
pub const ReservedStart: Self = Self(0x02);
#[doc(alias = "kBluetoothHCIInquiryScanTypeReservedEnd")]
pub const ReservedEnd: Self = Self(0xFF);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIInquiryScanTypes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIInquiryScanTypes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIExtendedInquiryResponseDataType = u8;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIExtendedInquiryResponse {
pub data: [u8; 240],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIExtendedInquiryResponse {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIExtendedInquiryResponse",
&[<[u8; 240]>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIExtendedInquiryResponse {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIReadExtendedInquiryResponseResults {
pub outFECRequired: BluetoothHCIFECRequired,
pub extendedInquiryResponse: BluetoothHCIExtendedInquiryResponse,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIReadExtendedInquiryResponseResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIReadExtendedInquiryResponseResults",
&[
<BluetoothHCIFECRequired>::ENCODING,
<BluetoothHCIExtendedInquiryResponse>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIReadExtendedInquiryResponseResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIExtendedInquiryResult {
pub numberOfReponses: u8,
pub deviceAddress: BluetoothDeviceAddress,
pub pageScanRepetitionMode: BluetoothPageScanRepetitionMode,
pub reserved: u8,
pub classOfDevice: BluetoothClassOfDevice,
pub clockOffset: BluetoothClockOffset,
pub RSSIValue: BluetoothHCIRSSIValue,
pub extendedInquiryResponse: BluetoothHCIExtendedInquiryResponse,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIExtendedInquiryResult {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIExtendedInquiryResult",
&[
<u8>::ENCODING,
<BluetoothDeviceAddress>::ENCODING,
<BluetoothPageScanRepetitionMode>::ENCODING,
<u8>::ENCODING,
<BluetoothClassOfDevice>::ENCODING,
<BluetoothClockOffset>::ENCODING,
<BluetoothHCIRSSIValue>::ENCODING,
<BluetoothHCIExtendedInquiryResponse>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIExtendedInquiryResult {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIReadLMPHandleResults {
pub handle: BluetoothConnectionHandle,
pub lmp_handle: BluetoothLMPHandle,
pub reserved: u32,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIReadLMPHandleResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIReadLMPHandleResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothLMPHandle>::ENCODING,
<u32>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIReadLMPHandleResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCISimplePairingMode = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCISimplePairingModes(pub c_uint);
impl BluetoothHCISimplePairingModes {
#[doc(alias = "kBluetoothHCISimplePairingModeNotSet")]
pub const NotSet: Self = Self(0x00);
#[doc(alias = "kBluetoothHCISimplePairingModeEnabled")]
pub const Enabled: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCISimplePairingModes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCISimplePairingModes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothSimplePairingDebugMode = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothSimplePairingDebugModes(pub c_uint);
impl BluetoothSimplePairingDebugModes {
#[doc(alias = "kBluetoothHCISimplePairingDebugModeDisabled")]
pub const HCISimplePairingDebugModeDisabled: Self = Self(0x00);
#[doc(alias = "kBluetoothHCISimplePairingDebugModeEnabled")]
pub const HCISimplePairingDebugModeEnabled: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothSimplePairingDebugModes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothSimplePairingDebugModes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCISimplePairingOOBData {
pub data: [u8; 16],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCISimplePairingOOBData {
const ENCODING: Encoding =
Encoding::Struct("BluetoothHCISimplePairingOOBData", &[<[u8; 16]>::ENCODING]);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCISimplePairingOOBData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIReadLocalOOBDataResults {
pub hash: BluetoothHCISimplePairingOOBData,
pub randomizer: BluetoothHCISimplePairingOOBData,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIReadLocalOOBDataResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIReadLocalOOBDataResults",
&[
<BluetoothHCISimplePairingOOBData>::ENCODING,
<BluetoothHCISimplePairingOOBData>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIReadLocalOOBDataResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothIOCapability = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothIOCapabilities(pub c_uint);
impl BluetoothIOCapabilities {
#[doc(alias = "kBluetoothCapabilityTypeDisplayOnly")]
pub const CapabilityTypeDisplayOnly: Self = Self(0x00);
#[doc(alias = "kBluetoothCapabilityTypeDisplayYesNo")]
pub const CapabilityTypeDisplayYesNo: Self = Self(0x01);
#[doc(alias = "kBluetoothCapabilityTypeKeyboardOnly")]
pub const CapabilityTypeKeyboardOnly: Self = Self(0x02);
#[doc(alias = "kBluetoothCapabilityTypeNoInputNoOutput")]
pub const CapabilityTypeNoInputNoOutput: Self = Self(0x03);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothIOCapabilities {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothIOCapabilities {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothOOBDataPresence = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothOOBDataPresenceValues(pub c_uint);
impl BluetoothOOBDataPresenceValues {
#[doc(alias = "kBluetoothOOBAuthenticationDataNotPresent")]
pub const AuthenticationDataNotPresent: Self = Self(0x00);
#[doc(alias = "kBluetoothOOBAuthenticationDataFromRemoteDevicePresent")]
pub const AuthenticationDataFromRemoteDevicePresent: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothOOBDataPresenceValues {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothOOBDataPresenceValues {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothAuthenticationRequirements = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothAuthenticationRequirementsValues(pub c_uint);
impl BluetoothAuthenticationRequirementsValues {
#[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionNotRequired")]
pub const MITMProtectionNotRequired: Self = Self(0x00);
#[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionRequired")]
pub const MITMProtectionRequired: Self = Self(0x01);
#[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionNotRequiredNoBonding")]
pub const MITMProtectionNotRequiredNoBonding: Self = Self(0x00);
#[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionRequiredNoBonding")]
pub const MITMProtectionRequiredNoBonding: Self = Self(0x01);
#[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionNotRequiredDedicatedBonding")]
pub const MITMProtectionNotRequiredDedicatedBonding: Self = Self(0x02);
#[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionRequiredDedicatedBonding")]
pub const MITMProtectionRequiredDedicatedBonding: Self = Self(0x03);
#[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionNotRequiredGeneralBonding")]
pub const MITMProtectionNotRequiredGeneralBonding: Self = Self(0x04);
#[doc(alias = "kBluetoothAuthenticationRequirementsMITMProtectionRequiredGeneralBonding")]
pub const MITMProtectionRequiredGeneralBonding: Self = Self(0x05);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothAuthenticationRequirementsValues {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothAuthenticationRequirementsValues {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothIOCapabilityResponse {
pub deviceAddress: BluetoothDeviceAddress,
pub ioCapability: BluetoothIOCapability,
pub OOBDataPresence: BluetoothOOBDataPresence,
pub authenticationRequirements: BluetoothAuthenticationRequirements,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothIOCapabilityResponse {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothIOCapabilityResponse",
&[
<BluetoothDeviceAddress>::ENCODING,
<BluetoothIOCapability>::ENCODING,
<BluetoothOOBDataPresence>::ENCODING,
<BluetoothAuthenticationRequirements>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothIOCapabilityResponse {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothPasskey = u32;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothUserPasskeyNotification {
pub deviceAddress: BluetoothDeviceAddress,
pub passkey: BluetoothPasskey,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothUserPasskeyNotification {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothUserPasskeyNotification",
&[
<BluetoothDeviceAddress>::ENCODING,
<BluetoothPasskey>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothUserPasskeyNotification {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothKeypressNotificationType = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothKeypressNotificationTypes(pub c_uint);
impl BluetoothKeypressNotificationTypes {
#[doc(alias = "kBluetoothKeypressNotificationTypePasskeyEntryStarted")]
pub const PasskeyEntryStarted: Self = Self(0);
#[doc(alias = "kBluetoothKeypressNotificationTypePasskeyDigitEntered")]
pub const PasskeyDigitEntered: Self = Self(1);
#[doc(alias = "kBluetoothKeypressNotificationTypePasskeyDigitErased")]
pub const PasskeyDigitErased: Self = Self(2);
#[doc(alias = "kBluetoothKeypressNotificationTypePasskeyCleared")]
pub const PasskeyCleared: Self = Self(3);
#[doc(alias = "kBluetoothKeypressNotificationTypePasskeyEntryCompleted")]
pub const PasskeyEntryCompleted: Self = Self(4);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothKeypressNotificationTypes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothKeypressNotificationTypes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothKeypressNotification {
pub deviceAddress: BluetoothDeviceAddress,
pub notificationType: BluetoothKeypressNotificationType,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothKeypressNotification {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothKeypressNotification",
&[
<BluetoothDeviceAddress>::ENCODING,
<BluetoothKeypressNotificationType>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothKeypressNotification {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothRemoteHostSupportedFeaturesNotification {
pub deviceAddress: BluetoothDeviceAddress,
pub hostSupportedFeatures: BluetoothHCISupportedFeatures,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothRemoteHostSupportedFeaturesNotification {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothRemoteHostSupportedFeaturesNotification",
&[
<BluetoothDeviceAddress>::ENCODING,
<BluetoothHCISupportedFeatures>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothRemoteHostSupportedFeaturesNotification {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type TransmissionPower = i8;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothAFHHostChannelClassification {
pub data: [u8; 10],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothAFHHostChannelClassification {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothAFHHostChannelClassification",
&[<[u8; 10]>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothAFHHostChannelClassification {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothAFHMode = u8;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothAFHResults {
pub handle: BluetoothConnectionHandle,
pub mode: BluetoothAFHMode,
pub afhMap: [u8; 10],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothAFHResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothAFHResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothAFHMode>::ENCODING,
<[u8; 10]>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothAFHResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothNumericValue = u32;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothUserConfirmationRequest {
pub deviceAddress: BluetoothDeviceAddress,
pub numericValue: BluetoothNumericValue,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothUserConfirmationRequest {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothUserConfirmationRequest",
&[
<BluetoothDeviceAddress>::ENCODING,
<BluetoothNumericValue>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothUserConfirmationRequest {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventSimplePairingCompleteResults {
pub deviceAddress: BluetoothDeviceAddress,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventSimplePairingCompleteResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventSimplePairingCompleteResults",
&[<BluetoothDeviceAddress>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventSimplePairingCompleteResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub const kBluetoothHCICommandPacketHeaderSize: c_uint = 3;
pub const kBluetoothHCICommandPacketMaxDataSize: c_uint = 255;
pub const kBluetoothHCIMaxCommandPacketSize: c_uint =
kBluetoothHCICommandPacketHeaderSize + kBluetoothHCICommandPacketMaxDataSize;
pub const kBluetoothHCIEventPacketHeaderSize: c_uint = 2;
pub const kBluetoothHCIEventPacketMaxDataSize: c_uint = 255;
pub const kBluetoothHCIMaxEventPacketSize: c_uint =
kBluetoothHCIEventPacketHeaderSize + kBluetoothHCIEventPacketMaxDataSize;
pub const kBluetoothHCIDataPacketHeaderSize: c_uint = 4;
pub const kBluetoothHCIDataPacketMaxDataSize: c_uint = 65535;
pub const kBluetoothHCIMaxDataPacketSize: c_uint =
kBluetoothHCIDataPacketHeaderSize + kBluetoothHCIDataPacketMaxDataSize;
pub type BluetoothHCIEventCode = u8;
pub type BluetoothLinkType = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLinkTypes(pub c_uint);
impl BluetoothLinkTypes {
#[doc(alias = "kBluetoothSCOConnection")]
pub const SCOConnection: Self = Self(0);
#[doc(alias = "kBluetoothACLConnection")]
pub const ACLConnection: Self = Self(1);
#[doc(alias = "kBluetoothESCOConnection")]
pub const ESCOConnection: Self = Self(2);
#[doc(alias = "kBluetoothLinkTypeNone")]
pub const LinkTypeNone: Self = Self(0xff);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLinkTypes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLinkTypes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIContentFormat = u16;
pub type BluetoothHCIVoiceSetting = u16;
pub const kBluetoothVoiceSettingInputCodingMask: c_uint = 0x300;
pub const kBluetoothVoiceSettingInputCodingLinearInputCoding: c_uint = 0x000;
pub const kBluetoothVoiceSettingInputCodingULawInputCoding: c_uint = 0x100;
pub const kBluetoothVoiceSettingInputCodingALawInputCoding: c_uint = 0x200;
pub const kBluetoothVoiceSettingInputDataFormatMask: c_uint = 0x0C0;
pub const kBluetoothVoiceSettingInputDataFormat1sComplement: c_uint = 0x000;
pub const kBluetoothVoiceSettingInputDataFormat2sComplement: c_uint = 0x040;
pub const kBluetoothVoiceSettingInputDataFormatSignMagnitude: c_uint = 0x080;
pub const kBluetoothVoiceSettingInputDataFormatUnsigned: c_uint = 0x0C0;
pub const kBluetoothVoiceSettingInputSampleSizeMask: c_uint = 0x020;
pub const kBluetoothVoiceSettingInputSampleSize8Bit: c_uint = 0x000;
pub const kBluetoothVoiceSettingInputSampleSize16Bit: c_uint = 0x020;
pub const kBluetoothVoiceSettingPCMBitPositionMask: c_uint = 0x01C;
pub const kBluetoothVoiceSettingAirCodingFormatMask: c_uint = 0x003;
pub const kBluetoothVoiceSettingAirCodingFormatCVSD: c_uint = 0x000;
pub const kBluetoothVoiceSettingAirCodingFormatULaw: c_uint = 0x001;
pub const kBluetoothVoiceSettingAirCodingFormatALaw: c_uint = 0x002;
pub const kBluetoothVoiceSettingAirCodingFormatTransparentData: c_uint = 0x003;
pub type BluetoothHCISupportedIAC = u8;
pub type BluetoothHCITransmitBandwidth = u32;
pub type BluetoothHCIReceiveBandwidth = u32;
pub type BluetoothHCITransmitCodingFormat = u64;
pub type BluetoothHCIReceiveCodingFormat = u64;
pub type BluetoothHCITransmitCodecFrameSize = u16;
pub type BluetoothHCIReceiveCodecFrameSize = u16;
pub type BluetoothHCIInputBandwidth = u32;
pub type BluetoothHCIOutputBandwidth = u32;
pub type BluetoothHCIInputCodingFormat = u64;
pub type BluetoothHCIOutputCodingFormat = u64;
pub type BluetoothHCIInputCodedDataSize = u16;
pub type BluetoothHCIOutputCodedDataSize = u16;
pub type BluetoothHCIInputPCMDataFormat = u8;
pub type BluetoothHCIOutputPCMDataFormat = u8;
pub type BluetoothHCIInputPCMSamplePayloadMSBPosition = u8;
pub type BluetoothHCIOutputPCMSamplePayloadMSBPosition = u8;
pub type BluetoothHCIInputDataPath = u8;
pub type BluetoothHCIOutputDataPath = u8;
pub type BluetoothHCIInputTransportUnitSize = u8;
pub type BluetoothHCIOutputTransportUnitSize = u8;
pub type BluetoothHCIMaxLatency = u16;
pub type BluetoothHCIRetransmissionEffort = u8;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIRetransmissionEffortTypes(pub c_uint);
impl BluetoothHCIRetransmissionEffortTypes {
#[doc(alias = "kHCIRetransmissionEffortTypeNone")]
pub const HCIRetransmissionEffortTypeNone: Self = Self(0x00);
#[doc(alias = "kHCIRetransmissionEffortTypeAtLeastOneAndOptimizeForPower")]
pub const HCIRetransmissionEffortTypeAtLeastOneAndOptimizeForPower: Self = Self(0x01);
#[doc(alias = "kHCIRetransmissionEffortTypeAtLeastOneAndOptimizeLinkQuality")]
pub const HCIRetransmissionEffortTypeAtLeastOneAndOptimizeLinkQuality: Self = Self(0x02);
#[doc(alias = "kHCIRetransmissionEffortTypeDontCare")]
pub const HCIRetransmissionEffortTypeDontCare: Self = Self(0xFF);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIRetransmissionEffortTypes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIRetransmissionEffortTypes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothAirMode = u8;
pub const kBluetoothAirModeULawLog: c_uint = 0x00;
pub const kBluetoothAirModeALawLog: c_uint = 0x01;
pub const kBluetoothAirModeCVSD: c_uint = 0x02;
pub const kBluetoothAirModeTransparentData: c_uint = 0x03;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothSynchronousConnectionInfo {
pub transmitBandWidth: BluetoothHCITransmitBandwidth,
pub receiveBandWidth: BluetoothHCIReceiveBandwidth,
pub maxLatency: BluetoothHCIMaxLatency,
pub voiceSetting: BluetoothHCIVoiceSetting,
pub retransmissionEffort: BluetoothHCIRetransmissionEffort,
pub packetType: BluetoothPacketType,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothSynchronousConnectionInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothSynchronousConnectionInfo",
&[
<BluetoothHCITransmitBandwidth>::ENCODING,
<BluetoothHCIReceiveBandwidth>::ENCODING,
<BluetoothHCIMaxLatency>::ENCODING,
<BluetoothHCIVoiceSetting>::ENCODING,
<BluetoothHCIRetransmissionEffort>::ENCODING,
<BluetoothPacketType>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothSynchronousConnectionInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothEnhancedSynchronousConnectionInfo {
pub transmitBandWidth: BluetoothHCITransmitBandwidth,
pub receiveBandWidth: BluetoothHCIReceiveBandwidth,
pub transmitCodingFormat: BluetoothHCITransmitCodingFormat,
pub receiveCodingFormat: BluetoothHCIReceiveCodingFormat,
pub transmitCodecFrameSize: BluetoothHCITransmitCodecFrameSize,
pub receiveCodecFrameSize: BluetoothHCIReceiveCodecFrameSize,
pub inputBandwidth: BluetoothHCIInputBandwidth,
pub outputBandwidth: BluetoothHCIOutputBandwidth,
pub inputCodingFormat: BluetoothHCIInputCodingFormat,
pub outputCodingFormat: BluetoothHCIOutputCodingFormat,
pub inputCodedDataSize: BluetoothHCIInputCodedDataSize,
pub outputCodedDataSize: BluetoothHCIOutputCodedDataSize,
pub inputPCMDataFormat: BluetoothHCIInputPCMDataFormat,
pub outputPCMDataFormat: BluetoothHCIOutputPCMDataFormat,
pub inputPCMSampelPayloadMSBPosition: BluetoothHCIInputPCMSamplePayloadMSBPosition,
pub outputPCMSampelPayloadMSBPosition: BluetoothHCIOutputPCMSamplePayloadMSBPosition,
pub inputDataPath: BluetoothHCIInputDataPath,
pub outputDataPath: BluetoothHCIOutputDataPath,
pub inputTransportUnitSize: BluetoothHCIInputTransportUnitSize,
pub outputTransportUnitSize: BluetoothHCIOutputTransportUnitSize,
pub maxLatency: BluetoothHCIMaxLatency,
pub voiceSetting: BluetoothHCIVoiceSetting,
pub retransmissionEffort: BluetoothHCIRetransmissionEffort,
pub packetType: BluetoothPacketType,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothEnhancedSynchronousConnectionInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothEnhancedSynchronousConnectionInfo",
&[
<BluetoothHCITransmitBandwidth>::ENCODING,
<BluetoothHCIReceiveBandwidth>::ENCODING,
<BluetoothHCITransmitCodingFormat>::ENCODING,
<BluetoothHCIReceiveCodingFormat>::ENCODING,
<BluetoothHCITransmitCodecFrameSize>::ENCODING,
<BluetoothHCIReceiveCodecFrameSize>::ENCODING,
<BluetoothHCIInputBandwidth>::ENCODING,
<BluetoothHCIOutputBandwidth>::ENCODING,
<BluetoothHCIInputCodingFormat>::ENCODING,
<BluetoothHCIOutputCodingFormat>::ENCODING,
<BluetoothHCIInputCodedDataSize>::ENCODING,
<BluetoothHCIOutputCodedDataSize>::ENCODING,
<BluetoothHCIInputPCMDataFormat>::ENCODING,
<BluetoothHCIOutputPCMDataFormat>::ENCODING,
<BluetoothHCIInputPCMSamplePayloadMSBPosition>::ENCODING,
<BluetoothHCIOutputPCMSamplePayloadMSBPosition>::ENCODING,
<BluetoothHCIInputDataPath>::ENCODING,
<BluetoothHCIOutputDataPath>::ENCODING,
<BluetoothHCIInputTransportUnitSize>::ENCODING,
<BluetoothHCIOutputTransportUnitSize>::ENCODING,
<BluetoothHCIMaxLatency>::ENCODING,
<BluetoothHCIVoiceSetting>::ENCODING,
<BluetoothHCIRetransmissionEffort>::ENCODING,
<BluetoothPacketType>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothEnhancedSynchronousConnectionInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventSynchronousConnectionCompleteResults {
pub connectionHandle: BluetoothConnectionHandle,
pub deviceAddress: BluetoothDeviceAddress,
pub linkType: BluetoothLinkType,
pub transmissionInterval: u8,
pub retransmissionWindow: u8,
pub receivePacketLength: u16,
pub transmitPacketLength: u16,
pub airMode: BluetoothAirMode,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventSynchronousConnectionCompleteResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventSynchronousConnectionCompleteResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothDeviceAddress>::ENCODING,
<BluetoothLinkType>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<BluetoothAirMode>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventSynchronousConnectionCompleteResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventSynchronousConnectionChangedResults {
pub connectionHandle: BluetoothConnectionHandle,
pub transmissionInterval: u8,
pub retransmissionWindow: u8,
pub receivePacketLength: u16,
pub transmitPacketLength: u16,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventSynchronousConnectionChangedResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventSynchronousConnectionChangedResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventSynchronousConnectionChangedResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothHCIStatus = u8;
pub type BluetoothHCIEventStatus = u8;
pub const kBluetoothHCIEventInquiryComplete: c_uint = 0x01;
pub const kBluetoothHCIEventInquiryResult: c_uint = 0x02;
pub const kBluetoothHCIEventConnectionComplete: c_uint = 0x03;
pub const kBluetoothHCIEventConnectionRequest: c_uint = 0x04;
pub const kBluetoothHCIEventDisconnectionComplete: c_uint = 0x05;
pub const kBluetoothHCIEventAuthenticationComplete: c_uint = 0x06;
pub const kBluetoothHCIEventRemoteNameRequestComplete: c_uint = 0x07;
pub const kBluetoothHCIEventEncryptionChange: c_uint = 0x08;
pub const kBluetoothHCIEventChangeConnectionLinkKeyComplete: c_uint = 0x09;
pub const kBluetoothHCIEventMasterLinkKeyComplete: c_uint = 0x0A;
pub const kBluetoothHCIEventReadRemoteSupportedFeaturesComplete: c_uint = 0x0B;
pub const kBluetoothHCIEventReadRemoteVersionInformationComplete: c_uint = 0x0C;
pub const kBluetoothHCIEventQoSSetupComplete: c_uint = 0x0D;
pub const kBluetoothHCIEventCommandComplete: c_uint = 0x0E;
pub const kBluetoothHCIEventCommandStatus: c_uint = 0x0F;
pub const kBluetoothHCIEventHardwareError: c_uint = 0x10;
pub const kBluetoothHCIEventFlushOccurred: c_uint = 0x11;
pub const kBluetoothHCIEventRoleChange: c_uint = 0x12;
pub const kBluetoothHCIEventNumberOfCompletedPackets: c_uint = 0x13;
pub const kBluetoothHCIEventModeChange: c_uint = 0x14;
pub const kBluetoothHCIEventReturnLinkKeys: c_uint = 0x15;
pub const kBluetoothHCIEventPINCodeRequest: c_uint = 0x16;
pub const kBluetoothHCIEventLinkKeyRequest: c_uint = 0x17;
pub const kBluetoothHCIEventLinkKeyNotification: c_uint = 0x18;
pub const kBluetoothHCIEventLoopbackCommand: c_uint = 0x19;
pub const kBluetoothHCIEventDataBufferOverflow: c_uint = 0x1A;
pub const kBluetoothHCIEventMaxSlotsChange: c_uint = 0x1B;
pub const kBluetoothHCIEventReadClockOffsetComplete: c_uint = 0x1C;
pub const kBluetoothHCIEventConnectionPacketType: c_uint = 0x1D;
pub const kBluetoothHCIEventQoSViolation: c_uint = 0x1E;
pub const kBluetoothHCIEventPageScanModeChange: c_uint = 0x1F;
pub const kBluetoothHCIEventPageScanRepetitionModeChange: c_uint = 0x20;
pub const kBluetoothHCIEventFlowSpecificationComplete: c_uint = 0x21;
pub const kBluetoothHCIEventInquiryResultWithRSSI: c_uint = 0x22;
pub const kBluetoothHCIEventReadRemoteExtendedFeaturesComplete: c_uint = 0x23;
pub const kBluetoothHCIEventSynchronousConnectionComplete: c_uint = 0x2C;
pub const kBluetoothHCIEventSynchronousConnectionChanged: c_uint = 0x2D;
pub const kBluetoothHCIEventSniffSubrating: c_uint = 0x2E;
pub const kBluetoothHCIEventExtendedInquiryResult: c_uint = 0x2F;
pub const kBluetoothHCIEventEncryptionKeyRefreshComplete: c_uint = 0x30;
pub const kBluetoothHCIEventIOCapabilityRequest: c_uint = 0x31;
pub const kBluetoothHCIEventIOCapabilityResponse: c_uint = 0x32;
pub const kBluetoothHCIEventUserConfirmationRequest: c_uint = 0x33;
pub const kBluetoothHCIEventUserPasskeyRequest: c_uint = 0x34;
pub const kBluetoothHCIEventRemoteOOBDataRequest: c_uint = 0x35;
pub const kBluetoothHCIEventSimplePairingComplete: c_uint = 0x36;
pub const kBluetoothHCIEventLinkSupervisionTimeoutChanged: c_uint = 0x38;
pub const kBluetoothHCIEventEnhancedFlushComplete: c_uint = 0x39;
pub const kBluetoothHCIEventUserPasskeyNotification: c_uint = 0x3B;
pub const kBluetoothHCIEventKeypressNotification: c_uint = 0x3C;
pub const kBluetoothHCIEventRemoteHostSupportedFeaturesNotification: c_uint = 0x3D;
pub const kBluetoothHCIEventLEMetaEvent: c_uint = 0x3E;
pub const kBluetoothHCISubEventLEConnectionComplete: c_uint = 0x01;
pub const kBluetoothHCISubEventLEAdvertisingReport: c_uint = 0x02;
pub const kBluetoothHCISubEventLEConnectionUpdateComplete: c_uint = 0x03;
pub const kBluetoothHCISubEventLEReadRemoteUsedFeaturesComplete: c_uint = 0x04;
pub const kBluetoothHCISubEventLELongTermKeyRequest: c_uint = 0x05;
pub const kBluetoothHCISubEventLERemoteConnectionParameterRequest: c_uint = 0x06;
pub const kBluetoothHCISubEventLEDataLengthChange: c_uint = 0x07;
pub const kBluetoothHCISubEventLEReadLocalP256PublicKeyComplete: c_uint = 0x08;
pub const kBluetoothHCISubEventLEGenerateDHKeyComplete: c_uint = 0x09;
pub const kBluetoothHCISubEventLEEnhancedConnectionComplete: c_uint = 0x0A;
pub const kBluetoothHCISubEventLEDirectAdvertisingReport: c_uint = 0x0B;
pub const kBluetoothHCISubEventLEPhyUpdateComplete: c_uint = 0x0C;
pub const kBluetoothHCISubEventLEExtendedAdvertising: c_uint = 0x0D;
pub const kBluetoothHCISubEventLEPeriodicAdvertisingSyncEstablished: c_uint = 0x0E;
pub const kBluetoothHCISubEventLEPeriodicAdvertisingReport: c_uint = 0x0F;
pub const kBluetoothHCISubEventLEPeriodicAdvertisingSyncLost: c_uint = 0x10;
pub const kBluetoothHCISubEventLEScanTimeout: c_uint = 0x11;
pub const kBluetoothHCISubEventLEAdvertisingSetTerminated: c_uint = 0x12;
pub const kBluetoothHCISubEventLEScanRequestReceived: c_uint = 0x13;
pub const kBluetoothHCISubEventLEChannelSelectionAlgorithm: c_uint = 0x14;
pub const kBluetoothHCIEventPhysicalLinkComplete: c_uint = 0x40;
pub const kBluetoothHCIEventChannelSelected: c_uint = 0x41;
pub const kBluetoothHCIEventDisconnectionPhysicalLinkComplete: c_uint = 0x42;
pub const kBluetoothHCIEventPhysicalLinkLossEarlyWarning: c_uint = 0x43;
pub const kBluetoothHCIEventPhysicalLinkRecovery: c_uint = 0x44;
pub const kBluetoothHCIEventLogicalLinkComplete: c_uint = 0x45;
pub const kBluetoothHCIEventDisconnectionLogicalLinkComplete: c_uint = 0x46;
pub const kBluetoothHCIEventFlowSpecModifyComplete: c_uint = 0x47;
pub const kBluetoothHCIEventNumberOfCompletedDataBlocks: c_uint = 0x48;
pub const kBluetoothHCIEventShortRangeModeChangeComplete: c_uint = 0x4C;
pub const kBluetoothHCIEventAMPStatusChange: c_uint = 0x4D;
pub const kBluetoothHCIEventAMPStartTest: c_uint = 0x49;
pub const kBluetoothHCIEventAMPTestEnd: c_uint = 0x4A;
pub const kBluetoothHCIEventAMPReceiverReport: c_uint = 0x4B;
pub const kBluetoothHCIEventLogoTesting: c_uint = 0xFE;
pub const kBluetoothHCIEventVendorSpecific: c_uint = 0xFF;
pub type BluetoothHCIEventMask = u64;
pub const kBluetoothHCIEventMaskNone: c_uint = 0x00000000;
pub const kBluetoothHCIEventMaskInquiryComplete: c_uint = 0x00000001;
pub const kBluetoothHCIEventMaskInquiryResult: c_uint = 0x00000002;
pub const kBluetoothHCIEventMaskConnectionComplete: c_uint = 0x00000004;
pub const kBluetoothHCIEventMaskConnectionRequest: c_uint = 0x00000008;
pub const kBluetoothHCIEventMaskDisconnectionComplete: c_uint = 0x00000010;
pub const kBluetoothHCIEventMaskAuthenticationComplete: c_uint = 0x00000020;
pub const kBluetoothHCIEventMaskRemoteNameRequestComplete: c_uint = 0x00000040;
pub const kBluetoothHCIEventMaskEncryptionChange: c_uint = 0x00000080;
pub const kBluetoothHCIEventMaskChangeConnectionLinkKeyComplete: c_uint = 0x00000100;
pub const kBluetoothHCIEventMaskMasterLinkKeyComplete: c_uint = 0x00000200;
pub const kBluetoothHCIEventMaskReadRemoteSupportedFeaturesComplete: c_uint = 0x00000400;
pub const kBluetoothHCIEventMaskReadRemoteVersionInformationComplete: c_uint = 0x00000800;
pub const kBluetoothHCIEventMaskQoSSetupComplete: c_uint = 0x00001000;
pub const kBluetoothHCIEventMaskCommandComplete: c_uint = 0x00002000;
pub const kBluetoothHCIEventMaskCommandStatus: c_uint = 0x00004000;
pub const kBluetoothHCIEventMaskHardwareError: c_uint = 0x00008000;
pub const kBluetoothHCIEventMaskFlushOccurred: c_uint = 0x00010000;
pub const kBluetoothHCIEventMaskRoleChange: c_uint = 0x00020000;
pub const kBluetoothHCIEventMaskNumberOfCompletedPackets: c_uint = 0x00040000;
pub const kBluetoothHCIEventMaskModeChange: c_uint = 0x00080000;
pub const kBluetoothHCIEventMaskReturnLinkKeys: c_uint = 0x00100000;
pub const kBluetoothHCIEventMaskPINCodeRequest: c_uint = 0x00200000;
pub const kBluetoothHCIEventMaskLinkKeyRequest: c_uint = 0x00400000;
pub const kBluetoothHCIEventMaskLinkKeyNotification: c_uint = 0x00800000;
pub const kBluetoothHCIEventMaskLoopbackCommand: c_uint = 0x01000000;
pub const kBluetoothHCIEventMaskDataBufferOverflow: c_uint = 0x02000000;
pub const kBluetoothHCIEventMaskMaxSlotsChange: c_uint = 0x04000000;
pub const kBluetoothHCIEventMaskReadClockOffsetComplete: c_uint = 0x08000000;
pub const kBluetoothHCIEventMaskConnectionPacketTypeChanged: c_uint = 0x10000000;
pub const kBluetoothHCIEventMaskQoSViolation: c_uint = 0x20000000;
pub const kBluetoothHCIEventMaskPageScanModeChange: c_uint = 0x40000000;
pub const kBluetoothHCIEventMaskPageScanRepetitionModeChange: c_uint = 0x80000000;
pub const kBluetoothHCIEventMaskAll: c_uint = 0xFFFFFFFF;
pub const kBluetoothHCIEventMaskDefault: c_uint = kBluetoothHCIEventMaskAll;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventConnectionCompleteResults {
pub connectionHandle: BluetoothConnectionHandle,
pub deviceAddress: BluetoothDeviceAddress,
pub linkType: BluetoothLinkType,
pub encryptionMode: BluetoothHCIEncryptionMode,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventConnectionCompleteResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventConnectionCompleteResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothDeviceAddress>::ENCODING,
<BluetoothLinkType>::ENCODING,
<BluetoothHCIEncryptionMode>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventConnectionCompleteResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C, packed)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventLEConnectionCompleteResults {
pub connectionHandle: BluetoothConnectionHandle,
pub role: u8,
pub peerAddressType: u8,
pub peerAddress: BluetoothDeviceAddress,
pub connInterval: u16,
pub connLatency: u16,
pub supervisionTimeout: u16,
pub masterClockAccuracy: u8,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventLEConnectionCompleteResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventLEConnectionCompleteResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<BluetoothDeviceAddress>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u8>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventLEConnectionCompleteResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C, packed)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventLEEnhancedConnectionCompleteResults {
pub connectionHandle: BluetoothConnectionHandle,
pub role: u8,
pub peerAddressType: u8,
pub peerAddress: BluetoothDeviceAddress,
pub localResolvablePrivateAddress: BluetoothDeviceAddress,
pub peerResolvablePrivateAddress: BluetoothDeviceAddress,
pub connInterval: u16,
pub connLatency: u16,
pub supervisionTimeout: u16,
pub masterClockAccuracy: u8,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventLEEnhancedConnectionCompleteResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventLEEnhancedConnectionCompleteResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<u8>::ENCODING,
<u8>::ENCODING,
<BluetoothDeviceAddress>::ENCODING,
<BluetoothDeviceAddress>::ENCODING,
<BluetoothDeviceAddress>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u8>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventLEEnhancedConnectionCompleteResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C, packed)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventLEConnectionUpdateCompleteResults {
pub connectionHandle: BluetoothConnectionHandle,
pub connInterval: u16,
pub connLatency: u16,
pub supervisionTimeout: u16,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventLEConnectionUpdateCompleteResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventLEConnectionUpdateCompleteResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventLEConnectionUpdateCompleteResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C, packed)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventLEReadRemoteUsedFeaturesCompleteResults {
pub connectionHandle: BluetoothConnectionHandle,
pub usedFeatures: BluetoothHCISupportedFeatures,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventLEReadRemoteUsedFeaturesCompleteResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventLEReadRemoteUsedFeaturesCompleteResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothHCISupportedFeatures>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventLEReadRemoteUsedFeaturesCompleteResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventDisconnectionCompleteResults {
pub connectionHandle: BluetoothConnectionHandle,
pub reason: BluetoothReasonCode,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventDisconnectionCompleteResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventDisconnectionCompleteResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothReasonCode>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventDisconnectionCompleteResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventReadSupportedFeaturesResults {
pub connectionHandle: BluetoothConnectionHandle,
pub supportedFeatures: BluetoothHCISupportedFeatures,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventReadSupportedFeaturesResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventReadSupportedFeaturesResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothHCISupportedFeatures>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventReadSupportedFeaturesResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventReadExtendedFeaturesResults {
pub connectionHandle: BluetoothConnectionHandle,
pub supportedFeaturesInfo: BluetoothHCIExtendedFeaturesInfo,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventReadExtendedFeaturesResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventReadExtendedFeaturesResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothHCIExtendedFeaturesInfo>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventReadExtendedFeaturesResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventReadRemoteVersionInfoResults {
pub connectionHandle: BluetoothConnectionHandle,
pub lmpVersion: BluetoothLMPVersion,
pub manufacturerName: BluetoothManufacturerName,
pub lmpSubversion: BluetoothLMPSubversion,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventReadRemoteVersionInfoResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventReadRemoteVersionInfoResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothLMPVersion>::ENCODING,
<BluetoothManufacturerName>::ENCODING,
<BluetoothLMPSubversion>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventReadRemoteVersionInfoResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventRemoteNameRequestResults {
pub deviceAddress: BluetoothDeviceAddress,
pub deviceName: BluetoothDeviceName,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventRemoteNameRequestResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventRemoteNameRequestResults",
&[
<BluetoothDeviceAddress>::ENCODING,
<BluetoothDeviceName>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventRemoteNameRequestResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventReadClockOffsetResults {
pub connectionHandle: BluetoothConnectionHandle,
pub clockOffset: BluetoothClockOffset,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventReadClockOffsetResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventReadClockOffsetResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothClockOffset>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventReadClockOffsetResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventConnectionRequestResults {
pub deviceAddress: BluetoothDeviceAddress,
pub classOfDevice: BluetoothClassOfDevice,
pub linkType: BluetoothLinkType,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventConnectionRequestResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventConnectionRequestResults",
&[
<BluetoothDeviceAddress>::ENCODING,
<BluetoothClassOfDevice>::ENCODING,
<BluetoothLinkType>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventConnectionRequestResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventLinkKeyNotificationResults {
pub deviceAddress: BluetoothDeviceAddress,
pub linkKey: BluetoothKey,
pub keyType: BluetoothKeyType,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventLinkKeyNotificationResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventLinkKeyNotificationResults",
&[
<BluetoothDeviceAddress>::ENCODING,
<BluetoothKey>::ENCODING,
<BluetoothKeyType>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventLinkKeyNotificationResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventMaxSlotsChangeResults {
pub connectionHandle: BluetoothConnectionHandle,
pub maxSlots: BluetoothMaxSlots,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventMaxSlotsChangeResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventMaxSlotsChangeResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothMaxSlots>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventMaxSlotsChangeResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventModeChangeResults {
pub connectionHandle: BluetoothConnectionHandle,
pub mode: BluetoothHCIConnectionMode,
pub modeInterval: BluetoothHCIModeInterval,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventModeChangeResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventModeChangeResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothHCIConnectionMode>::ENCODING,
<BluetoothHCIModeInterval>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventModeChangeResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventReturnLinkKeysResults_linkKeys {
pub deviceAddress: BluetoothDeviceAddress,
pub linkKey: BluetoothKey,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventReturnLinkKeysResults_linkKeys {
const ENCODING: Encoding = Encoding::Struct(
"?",
&[<BluetoothDeviceAddress>::ENCODING, <BluetoothKey>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventReturnLinkKeysResults_linkKeys {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventReturnLinkKeysResults {
pub numLinkKeys: u8,
pub linkKeys: [BluetoothHCIEventReturnLinkKeysResults_linkKeys; 1],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventReturnLinkKeysResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventReturnLinkKeysResults",
&[
<u8>::ENCODING,
<[BluetoothHCIEventReturnLinkKeysResults_linkKeys; 1]>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventReturnLinkKeysResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventAuthenticationCompleteResults {
pub connectionHandle: BluetoothConnectionHandle,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventAuthenticationCompleteResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventAuthenticationCompleteResults",
&[<BluetoothConnectionHandle>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventAuthenticationCompleteResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventEncryptionChangeResults {
pub connectionHandle: BluetoothConnectionHandle,
pub enable: BluetoothEncryptionEnable,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventEncryptionChangeResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventEncryptionChangeResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothEncryptionEnable>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventEncryptionChangeResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventChangeConnectionLinkKeyCompleteResults {
pub connectionHandle: BluetoothConnectionHandle,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventChangeConnectionLinkKeyCompleteResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventChangeConnectionLinkKeyCompleteResults",
&[<BluetoothConnectionHandle>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventChangeConnectionLinkKeyCompleteResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventMasterLinkKeyCompleteResults {
pub connectionHandle: BluetoothConnectionHandle,
pub keyFlag: BluetoothKeyFlag,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventMasterLinkKeyCompleteResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventMasterLinkKeyCompleteResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothKeyFlag>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventMasterLinkKeyCompleteResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventQoSSetupCompleteResults {
pub connectionHandle: BluetoothConnectionHandle,
pub setupParams: BluetoothHCIQualityOfServiceSetupParams,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventQoSSetupCompleteResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventQoSSetupCompleteResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothHCIQualityOfServiceSetupParams>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventQoSSetupCompleteResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventHardwareErrorResults {
pub error: BluetoothHCIStatus,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventHardwareErrorResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventHardwareErrorResults",
&[<BluetoothHCIStatus>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventHardwareErrorResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventFlushOccurredResults {
pub connectionHandle: BluetoothConnectionHandle,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventFlushOccurredResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventFlushOccurredResults",
&[<BluetoothConnectionHandle>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventFlushOccurredResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventRoleChangeResults {
pub connectionHandle: BluetoothConnectionHandle,
pub deviceAddress: BluetoothDeviceAddress,
pub role: BluetoothRole,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventRoleChangeResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventRoleChangeResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothDeviceAddress>::ENCODING,
<BluetoothRole>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventRoleChangeResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventDataBufferOverflowResults {
pub linkType: BluetoothLinkType,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventDataBufferOverflowResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventDataBufferOverflowResults",
&[<BluetoothLinkType>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventDataBufferOverflowResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventConnectionPacketTypeResults {
pub connectionHandle: BluetoothConnectionHandle,
pub packetType: BluetoothPacketType,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventConnectionPacketTypeResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventConnectionPacketTypeResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<BluetoothPacketType>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventConnectionPacketTypeResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventReadRemoteSupportedFeaturesResults {
pub error: BluetoothHCIStatus,
pub connectionHandle: BluetoothConnectionHandle,
pub lmpFeatures: BluetoothHCISupportedFeatures,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventReadRemoteSupportedFeaturesResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventReadRemoteSupportedFeaturesResults",
&[
<BluetoothHCIStatus>::ENCODING,
<BluetoothConnectionHandle>::ENCODING,
<BluetoothHCISupportedFeatures>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventReadRemoteSupportedFeaturesResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventReadRemoteExtendedFeaturesResults {
pub error: BluetoothHCIStatus,
pub connectionHandle: BluetoothConnectionHandle,
pub page: BluetoothHCIPageNumber,
pub maxPage: BluetoothHCIPageNumber,
pub lmpFeatures: BluetoothHCISupportedFeatures,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventReadRemoteExtendedFeaturesResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventReadRemoteExtendedFeaturesResults",
&[
<BluetoothHCIStatus>::ENCODING,
<BluetoothConnectionHandle>::ENCODING,
<BluetoothHCIPageNumber>::ENCODING,
<BluetoothHCIPageNumber>::ENCODING,
<BluetoothHCISupportedFeatures>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventReadRemoteExtendedFeaturesResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventQoSViolationResults {
pub connectionHandle: BluetoothConnectionHandle,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventQoSViolationResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventQoSViolationResults",
&[<BluetoothConnectionHandle>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventQoSViolationResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventPageScanModeChangeResults {
pub deviceAddress: BluetoothDeviceAddress,
pub pageScanMode: BluetoothPageScanMode,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventPageScanModeChangeResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventPageScanModeChangeResults",
&[
<BluetoothDeviceAddress>::ENCODING,
<BluetoothPageScanMode>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventPageScanModeChangeResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventPageScanRepetitionModeChangeResults {
pub deviceAddress: BluetoothDeviceAddress,
pub pageScanRepetitionMode: BluetoothPageScanRepetitionMode,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventPageScanRepetitionModeChangeResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventPageScanRepetitionModeChangeResults",
&[
<BluetoothDeviceAddress>::ENCODING,
<BluetoothPageScanRepetitionMode>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventPageScanRepetitionModeChangeResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventVendorSpecificResults {
pub length: u8,
pub data: [u8; 255],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventVendorSpecificResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventVendorSpecificResults",
&[<u8>::ENCODING, <[u8; 255]>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventVendorSpecificResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventEncryptionKeyRefreshCompleteResults {
pub connectionHandle: BluetoothConnectionHandle,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventEncryptionKeyRefreshCompleteResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventEncryptionKeyRefreshCompleteResults",
&[<BluetoothConnectionHandle>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventEncryptionKeyRefreshCompleteResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventSniffSubratingResults {
pub connectionHandle: BluetoothConnectionHandle,
pub maxTransmitLatency: u16,
pub maxReceiveLatency: u16,
pub minRemoteTimeout: u16,
pub minLocalTimeout: u16,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventSniffSubratingResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventSniffSubratingResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
<u16>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventSniffSubratingResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventLEMetaResults {
pub length: u8,
pub data: [u8; 255],
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventLEMetaResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventLEMetaResults",
&[<u8>::ENCODING, <[u8; 255]>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventLEMetaResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIEventLELongTermKeyRequestResults {
pub connectionHandle: BluetoothConnectionHandle,
pub randomNumber: [u8; 8],
pub ediv: u16,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIEventLELongTermKeyRequestResults {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIEventLELongTermKeyRequestResults",
&[
<BluetoothConnectionHandle>::ENCODING,
<[u8; 8]>::ENCODING,
<u16>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIEventLELongTermKeyRequestResults {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[cfg(feature = "libc")]
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct BluetoothHCIRequestCallbackInfo {
pub userCallback: libc::mach_vm_address_t,
pub userRefCon: libc::mach_vm_address_t,
pub internalRefCon: libc::mach_vm_address_t,
pub asyncIDRefCon: libc::mach_vm_address_t,
pub reserved: libc::mach_vm_address_t,
}
#[cfg(all(feature = "libc", feature = "objc2"))]
unsafe impl Encode for BluetoothHCIRequestCallbackInfo {
const ENCODING: Encoding = Encoding::Struct(
"BluetoothHCIRequestCallbackInfo",
&[
<libc::mach_vm_address_t>::ENCODING,
<libc::mach_vm_address_t>::ENCODING,
<libc::mach_vm_address_t>::ENCODING,
<libc::mach_vm_address_t>::ENCODING,
<libc::mach_vm_address_t>::ENCODING,
],
);
}
#[cfg(all(feature = "libc", feature = "objc2"))]
unsafe impl RefEncode for BluetoothHCIRequestCallbackInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub const kBluetoothHCIErrorSuccess: c_uint = 0x00;
pub const kBluetoothHCIErrorUnknownHCICommand: c_uint = 0x01;
pub const kBluetoothHCIErrorNoConnection: c_uint = 0x02;
pub const kBluetoothHCIErrorHardwareFailure: c_uint = 0x03;
pub const kBluetoothHCIErrorPageTimeout: c_uint = 0x04;
pub const kBluetoothHCIErrorAuthenticationFailure: c_uint = 0x05;
pub const kBluetoothHCIErrorKeyMissing: c_uint = 0x06;
pub const kBluetoothHCIErrorMemoryFull: c_uint = 0x07;
pub const kBluetoothHCIErrorConnectionTimeout: c_uint = 0x08;
pub const kBluetoothHCIErrorMaxNumberOfConnections: c_uint = 0x09;
pub const kBluetoothHCIErrorMaxNumberOfSCOConnectionsToADevice: c_uint = 0x0A;
pub const kBluetoothHCIErrorACLConnectionAlreadyExists: c_uint = 0x0B;
pub const kBluetoothHCIErrorCommandDisallowed: c_uint = 0x0C;
pub const kBluetoothHCIErrorHostRejectedLimitedResources: c_uint = 0x0D;
pub const kBluetoothHCIErrorHostRejectedSecurityReasons: c_uint = 0x0E;
pub const kBluetoothHCIErrorHostRejectedRemoteDeviceIsPersonal: c_uint = 0x0F;
pub const kBluetoothHCIErrorHostTimeout: c_uint = 0x10;
pub const kBluetoothHCIErrorUnsupportedFeatureOrParameterValue: c_uint = 0x11;
pub const kBluetoothHCIErrorInvalidHCICommandParameters: c_uint = 0x12;
pub const kBluetoothHCIErrorOtherEndTerminatedConnectionUserEnded: c_uint = 0x13;
pub const kBluetoothHCIErrorOtherEndTerminatedConnectionLowResources: c_uint = 0x14;
pub const kBluetoothHCIErrorOtherEndTerminatedConnectionAboutToPowerOff: c_uint = 0x15;
pub const kBluetoothHCIErrorConnectionTerminatedByLocalHost: c_uint = 0x16;
pub const kBluetoothHCIErrorRepeatedAttempts: c_uint = 0x17;
pub const kBluetoothHCIErrorPairingNotAllowed: c_uint = 0x18;
pub const kBluetoothHCIErrorUnknownLMPPDU: c_uint = 0x19;
pub const kBluetoothHCIErrorUnsupportedRemoteFeature: c_uint = 0x1A;
pub const kBluetoothHCIErrorSCOOffsetRejected: c_uint = 0x1B;
pub const kBluetoothHCIErrorSCOIntervalRejected: c_uint = 0x1C;
pub const kBluetoothHCIErrorSCOAirModeRejected: c_uint = 0x1D;
pub const kBluetoothHCIErrorInvalidLMPParameters: c_uint = 0x1E;
pub const kBluetoothHCIErrorUnspecifiedError: c_uint = 0x1F;
pub const kBluetoothHCIErrorUnsupportedLMPParameterValue: c_uint = 0x20;
pub const kBluetoothHCIErrorRoleChangeNotAllowed: c_uint = 0x21;
pub const kBluetoothHCIErrorLMPResponseTimeout: c_uint = 0x22;
pub const kBluetoothHCIErrorLMPErrorTransactionCollision: c_uint = 0x23;
pub const kBluetoothHCIErrorLMPPDUNotAllowed: c_uint = 0x24;
pub const kBluetoothHCIErrorEncryptionModeNotAcceptable: c_uint = 0x25;
pub const kBluetoothHCIErrorUnitKeyUsed: c_uint = 0x26;
pub const kBluetoothHCIErrorQoSNotSupported: c_uint = 0x27;
pub const kBluetoothHCIErrorInstantPassed: c_uint = 0x28;
pub const kBluetoothHCIErrorPairingWithUnitKeyNotSupported: c_uint = 0x29;
pub const kBluetoothHCIErrorHostRejectedUnacceptableDeviceAddress: c_uint = 0x0F;
pub const kBluetoothHCIErrorDifferentTransactionCollision: c_uint = 0x2A;
pub const kBluetoothHCIErrorQoSUnacceptableParameter: c_uint = 0x2C;
pub const kBluetoothHCIErrorQoSRejected: c_uint = 0x2D;
pub const kBluetoothHCIErrorChannelClassificationNotSupported: c_uint = 0x2E;
pub const kBluetoothHCIErrorInsufficientSecurity: c_uint = 0x2F;
pub const kBluetoothHCIErrorParameterOutOfMandatoryRange: c_uint = 0x30;
pub const kBluetoothHCIErrorRoleSwitchPending: c_uint = 0x31;
pub const kBluetoothHCIErrorReservedSlotViolation: c_uint = 0x34;
pub const kBluetoothHCIErrorRoleSwitchFailed: c_uint = 0x35;
pub const kBluetoothHCIErrorExtendedInquiryResponseTooLarge: c_uint = 0x36;
pub const kBluetoothHCIErrorSecureSimplePairingNotSupportedByHost: c_uint = 0x37;
pub const kBluetoothHCIErrorHostBusyPairing: c_uint = 0x38;
pub const kBluetoothHCIErrorConnectionRejectedDueToNoSuitableChannelFound: c_uint = 0x39;
pub const kBluetoothHCIErrorControllerBusy: c_uint = 0x3A;
pub const kBluetoothHCIErrorUnacceptableConnectionInterval: c_uint = 0x3B;
pub const kBluetoothHCIErrorDirectedAdvertisingTimeout: c_uint = 0x3C;
pub const kBluetoothHCIErrorConnectionTerminatedDueToMICFailure: c_uint = 0x3D;
pub const kBluetoothHCIErrorConnectionFailedToBeEstablished: c_uint = 0x3E;
pub const kBluetoothHCIErrorMACConnectionFailed: c_uint = 0x3F;
pub const kBluetoothHCIErrorCoarseClockAdjustmentRejected: c_uint = 0x40;
pub const kBluetoothHCIErrorMax: c_uint = 0x40;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothHCIPowerState(pub c_uint);
impl BluetoothHCIPowerState {
#[doc(alias = "kBluetoothHCIPowerStateON")]
pub const ON: Self = Self(0x01);
#[doc(alias = "kBluetoothHCIPowerStateOFF")]
pub const OFF: Self = Self(0x00);
#[doc(alias = "kBluetoothHCIPowerStateUnintialized")]
pub const Unintialized: Self = Self(0xFF);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothHCIPowerState {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothHCIPowerState {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub const kBluetoothHCIErrorPowerIsOFF: c_uint = kBluetoothHCIErrorMax + 1;
pub const kBluetoothHCITransportUSBClassCode: c_uint = 0xE0;
pub const kBluetoothHCITransportUSBSubClassCode: c_uint = 0x01;
pub const kBluetoothHCITransportUSBProtocolCode: c_uint = 0x01;
pub const kBluetoothL2CAPTCIEventIDReserved: c_uint = 0x00;
pub const kBluetoothL2CAPTCIEventIDL2CA_ConnectInd: c_uint = 0x01;
pub const kBluetoothL2CAPTCIEventIDL2CA_ConfigInd: c_uint = 0x02;
pub const kBluetoothL2CAPTCIEventIDL2CA_DisconnectInd: c_uint = 0x03;
pub const kBluetoothL2CAPTCIEventIDL2CA_QoSViolationInd: c_uint = 0x04;
pub const kBluetoothL2CAPTCIEventIDL2CA_TimeOutInd: c_uint = 0x05;
pub const kBluetoothL2CAPTCICommandReserved: c_uint = 0x0000;
pub const kBluetoothL2CAPTCICommandL2CA_ConnectReq: c_uint = 0x0001;
pub const kBluetoothL2CAPTCICommandL2CA_DisconnectReq: c_uint = 0x0002;
pub const kBluetoothL2CAPTCICommandL2CA_ConfigReq: c_uint = 0x0003;
pub const kBluetoothL2CAPTCICommandL2CA_DisableCLT: c_uint = 0x0004;
pub const kBluetoothL2CAPTCICommandL2CA_EnableCLT: c_uint = 0x0005;
pub const kBluetoothL2CAPTCICommandL2CA_GroupCreate: c_uint = 0x0006;
pub const kBluetoothL2CAPTCICommandL2CA_GroupClose: c_uint = 0x0007;
pub const kBluetoothL2CAPTCICommandL2CA_GroupAddMember: c_uint = 0x0008;
pub const kBluetoothL2CAPTCICommandL2CA_GroupRemoveMember: c_uint = 0x0009;
pub const kBluetoothL2CAPTCICommandL2CA_GroupMembership: c_uint = 0x000A;
pub const kBluetoothL2CAPTCICommandL2CA_WriteData: c_uint = 0x000B;
pub const kBluetoothL2CAPTCICommandL2CA_ReadData: c_uint = 0x000C;
pub const kBluetoothL2CAPTCICommandL2CA_Ping: c_uint = 0x000D;
pub const kBluetoothL2CAPTCICommandL2CA_GetInfo: c_uint = 0x000E;
pub const kBluetoothL2CAPTCICommandL2CA_Reserved1: c_uint = 0x000F;
pub const kBluetoothL2CAPTCICommandL2CA_Reserved2: c_uint = 0x0010;
pub const kBluetoothL2CAPTCICommandL2CA_ConnectResp: c_uint = 0x0011;
pub const kBluetoothL2CAPTCICommandL2CA_DisconnectResp: c_uint = 0x0012;
pub const kBluetoothL2CAPTCICommandL2CA_ConfigResp: c_uint = 0x0013;
pub type BluetoothRFCOMMChannelID = u8;
pub type BluetoothRFCOMMMTU = u16;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothRFCOMMParityType(pub c_uint);
impl BluetoothRFCOMMParityType {
#[doc(alias = "kBluetoothRFCOMMParityTypeNoParity")]
pub const NoParity: Self = Self(0);
#[doc(alias = "kBluetoothRFCOMMParityTypeOddParity")]
pub const OddParity: Self = Self(1);
#[doc(alias = "kBluetoothRFCOMMParityTypeEvenParity")]
pub const EvenParity: Self = Self(2);
#[doc(alias = "kBluetoothRFCOMMParityTypeMaxParity")]
pub const MaxParity: Self = Self(3);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothRFCOMMParityType {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothRFCOMMParityType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothRFCOMMLineStatus(pub c_uint);
impl BluetoothRFCOMMLineStatus {
#[doc(alias = "BluetoothRFCOMMLineStatusNoError")]
pub const NoError: Self = Self(0);
#[doc(alias = "BluetoothRFCOMMLineStatusOverrunError")]
pub const OverrunError: Self = Self(1);
#[doc(alias = "BluetoothRFCOMMLineStatusParityError")]
pub const ParityError: Self = Self(2);
#[doc(alias = "BluetoothRFCOMMLineStatusFramingError")]
pub const FramingError: Self = Self(3);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothRFCOMMLineStatus {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothRFCOMMLineStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type BluetoothSDPPDUID = u8;
pub const kBluetoothSDPPDUIDReserved: c_uint = 0;
pub const kBluetoothSDPPDUIDErrorResponse: c_uint = 1;
pub const kBluetoothSDPPDUIDServiceSearchRequest: c_uint = 2;
pub const kBluetoothSDPPDUIDServiceSearchResponse: c_uint = 3;
pub const kBluetoothSDPPDUIDServiceAttributeRequest: c_uint = 4;
pub const kBluetoothSDPPDUIDServiceAttributeResponse: c_uint = 5;
pub const kBluetoothSDPPDUIDServiceSearchAttributeRequest: c_uint = 6;
pub const kBluetoothSDPPDUIDServiceSearchAttributeResponse: c_uint = 7;
pub type BluetoothSDPErrorCode = u16;
pub const kBluetoothSDPErrorCodeSuccess: c_uint = 0x0000;
pub const kBluetoothSDPErrorCodeReserved: c_uint = 0x0000;
pub const kBluetoothSDPErrorCodeInvalidSDPVersion: c_uint = 0x0001;
pub const kBluetoothSDPErrorCodeInvalidServiceRecordHandle: c_uint = 0x0002;
pub const kBluetoothSDPErrorCodeInvalidRequestSyntax: c_uint = 0x0003;
pub const kBluetoothSDPErrorCodeInvalidPDUSize: c_uint = 0x0004;
pub const kBluetoothSDPErrorCodeInvalidContinuationState: c_uint = 0x0005;
pub const kBluetoothSDPErrorCodeInsufficientResources: c_uint = 0x0006;
pub const kBluetoothSDPErrorCodeReservedStart: c_uint = 0x0007;
pub const kBluetoothSDPErrorCodeReservedEnd: c_uint = 0xFFFF;
pub type BluetoothSDPTransactionID = u16;
pub type BluetoothSDPServiceRecordHandle = u32;
pub const kBluetoothSDPDataElementTypeNil: c_uint = 0;
pub const kBluetoothSDPDataElementTypeUnsignedInt: c_uint = 1;
pub const kBluetoothSDPDataElementTypeSignedInt: c_uint = 2;
pub const kBluetoothSDPDataElementTypeUUID: c_uint = 3;
pub const kBluetoothSDPDataElementTypeString: c_uint = 4;
pub const kBluetoothSDPDataElementTypeBoolean: c_uint = 5;
pub const kBluetoothSDPDataElementTypeDataElementSequence: c_uint = 6;
pub const kBluetoothSDPDataElementTypeDataElementAlternative: c_uint = 7;
pub const kBluetoothSDPDataElementTypeURL: c_uint = 8;
pub const kBluetoothSDPDataElementTypeReservedStart: c_uint = 9;
pub const kBluetoothSDPDataElementTypeReservedEnd: c_uint = 31;
pub type BluetoothSDPUUID16 = u16;
pub type BluetoothSDPUUID32 = u32;
pub type BluetoothSDPDataElementTypeDescriptor = u8;
pub type BluetoothSDPDataElementSizeDescriptor = u8;
pub type BluetoothSDPServiceAttributeID = u16;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLEScanType(pub c_uint);
impl BluetoothLEScanType {
#[doc(alias = "BluetoothLEScanTypePassive")]
pub const Passive: Self = Self(0x00);
#[doc(alias = "BluetoothLEScanTypeActive")]
pub const Active: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLEScanType {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLEScanType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLEAddressType(pub c_uint);
impl BluetoothLEAddressType {
#[doc(alias = "BluetoothLEAddressTypePublic")]
pub const Public: Self = Self(0x00);
#[doc(alias = "BluetoothLEAddressTypeRandom")]
pub const Random: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLEAddressType {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLEAddressType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLEScanFilter(pub c_uint);
impl BluetoothLEScanFilter {
#[doc(alias = "BluetoothLEScanFilterNone")]
pub const None: Self = Self(0x00);
#[doc(alias = "BluetoothLEScanFilterSafelist")]
pub const Safelist: Self = Self(0x01);
#[doc(alias = "BluetoothLEScanFilterWhitelist")]
#[deprecated]
pub const Whitelist: Self = Self(BluetoothLEScanFilter::Safelist.0);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLEScanFilter {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLEScanFilter {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLEScan(pub c_uint);
impl BluetoothLEScan {
#[doc(alias = "BluetoothLEScanDisable")]
pub const Disable: Self = Self(0x00);
#[doc(alias = "BluetoothLEScanEnable")]
pub const Enable: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLEScan {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLEScan {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLEConnectionInterval(pub c_uint);
impl BluetoothLEConnectionInterval {
#[doc(alias = "BluetoothLEConnectionIntervalMin")]
pub const Min: Self = Self(0x06);
#[doc(alias = "BluetoothLEConnectionIntervalMax")]
pub const Max: Self = Self(0x0C80);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLEConnectionInterval {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLEConnectionInterval {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLEScanDuplicateFilter(pub c_uint);
impl BluetoothLEScanDuplicateFilter {
#[doc(alias = "BluetoothLEScanDuplicateFilterDisable")]
pub const Disable: Self = Self(0x00);
#[doc(alias = "BluetoothLEScanDuplicateFilterEnable")]
pub const Enable: Self = Self(0x01);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLEScanDuplicateFilter {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLEScanDuplicateFilter {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BluetoothLEAdvertisingType(pub c_uint);
impl BluetoothLEAdvertisingType {
#[doc(alias = "BluetoothLEAdvertisingTypeConnectableUndirected")]
pub const ConnectableUndirected: Self = Self(0x00);
#[doc(alias = "BluetoothLEAdvertisingTypeConnectableDirected")]
pub const ConnectableDirected: Self = Self(0x01);
#[doc(alias = "BluetoothLEAdvertisingTypeDiscoverableUndirected")]
pub const DiscoverableUndirected: Self = Self(0x02);
#[doc(alias = "BluetoothLEAdvertisingTypeNonConnectableUndirected")]
pub const NonConnectableUndirected: Self = Self(0x03);
#[doc(alias = "BluetoothLEAdvertisingTypeScanResponse")]
pub const ScanResponse: Self = Self(0x04);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for BluetoothLEAdvertisingType {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for BluetoothLEAdvertisingType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}