objc2_io_bluetooth/
lib.rs

1//! # Bindings to the `IOBluetooth` framework
2//!
3//! See [Apple's docs][apple-doc] and [the general docs on framework crates][framework-crates] for more information.
4//!
5//! [apple-doc]: https://developer.apple.com/documentation/iobluetooth/
6//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html
7#![no_std]
8#![cfg_attr(docsrs, feature(doc_auto_cfg))]
9// Update in Cargo.toml as well.
10#![doc(html_root_url = "https://docs.rs/objc2-io-bluetooth/0.3.1")]
11
12#[cfg(feature = "alloc")]
13extern crate alloc;
14
15#[cfg(feature = "std")]
16extern crate std;
17
18mod generated;
19mod macros;
20
21#[allow(unused_imports, unreachable_pub)]
22pub use self::generated::*;
23#[allow(unused_imports, unreachable_pub)]
24pub use self::macros::*;
25
26// IOKit/IOReturn.h
27#[allow(dead_code)]
28pub(crate) type IOReturn = core::ffi::c_int; // kern_return_t
29
30// IOKit/IOTypes.h
31#[allow(dead_code)]
32pub(crate) type IOItemCount = u32; // UInt32
33
34// MacTypes.h
35#[allow(dead_code)]
36pub(crate) type Boolean = u8;
37#[allow(dead_code)]
38pub(crate) type ByteCount = core::ffi::c_ulong;
39
40#[cfg(feature = "Bluetooth")]
41/// [Apple's documentation](https://developer.apple.com/documentation/iobluetooth/bluetoothdevicename?language=objc)
42pub type BluetoothDeviceName = [u8; kBluetoothDeviceNameMaxLength as usize];