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(feature = "unstable-darwin-objc", feature(darwin_objc))]
9#![cfg_attr(docsrs, feature(doc_cfg))]
10// Update in Cargo.toml as well.
11#![doc(html_root_url = "https://docs.rs/objc2-io-bluetooth/0.3.2")]
12
13#[cfg(feature = "alloc")]
14extern crate alloc;
15
16#[cfg(feature = "std")]
17extern crate std;
18
19mod generated;
20mod macros;
21
22#[allow(unused_imports, unreachable_pub)]
23pub use self::generated::*;
24#[allow(unused_imports, unreachable_pub)]
25pub use self::macros::*;
26
27// IOKit/IOReturn.h
28#[allow(dead_code)]
29pub(crate) type IOReturn = core::ffi::c_int; // kern_return_t
30
31// IOKit/IOTypes.h
32#[allow(dead_code)]
33pub(crate) type IOItemCount = u32; // UInt32
34
35// MacTypes.h
36#[allow(dead_code)]
37pub(crate) type Boolean = u8;
38#[allow(dead_code)]
39pub(crate) type ByteCount = core::ffi::c_ulong;
40
41#[cfg(feature = "Bluetooth")]
42/// [Apple's documentation](https://developer.apple.com/documentation/iobluetooth/bluetoothdevicename?language=objc)
43pub type BluetoothDeviceName = [u8; kBluetoothDeviceNameMaxLength as usize];