objc2_io_bluetooth_ui/generated/
IOBluetoothUIUserLib.rs1use core::cell::UnsafeCell;
4use core::ffi::*;
5use core::marker::{PhantomData, PhantomPinned};
6use core::ptr::NonNull;
7use objc2::__framework_prelude::*;
8#[cfg(feature = "objc2-core-foundation")]
9use objc2_core_foundation::*;
10
11use crate::*;
12
13#[repr(C)]
15pub struct IOBluetoothDeviceSelectorControllerRef {
16 inner: [u8; 0],
17 _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
18}
19
20#[cfg(feature = "objc2-core-foundation")]
21cf_type!(
22 unsafe impl IOBluetoothDeviceSelectorControllerRef {}
23);
24cf_objc2_type!(
25 unsafe impl RefEncode<"OpaqueIOBluetoothObjectRef"> for IOBluetoothDeviceSelectorControllerRef {}
26);
27
28#[repr(C)]
30pub struct IOBluetoothPairingControllerRef {
31 inner: [u8; 0],
32 _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
33}
34
35#[cfg(feature = "objc2-core-foundation")]
36cf_type!(
37 unsafe impl IOBluetoothPairingControllerRef {}
38);
39cf_objc2_type!(
40 unsafe impl RefEncode<"OpaqueIOBluetoothObjectRef"> for IOBluetoothPairingControllerRef {}
41);
42
43#[repr(C)]
45pub struct IOBluetoothServiceBrowserControllerRef {
46 inner: [u8; 0],
47 _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
48}
49
50#[cfg(feature = "objc2-core-foundation")]
51cf_type!(
52 unsafe impl IOBluetoothServiceBrowserControllerRef {}
53);
54cf_objc2_type!(
55 unsafe impl RefEncode<"OpaqueIOBluetoothObjectRef"> for IOBluetoothServiceBrowserControllerRef {}
56);
57
58pub type IOBluetoothServiceBrowserControllerOptions = u32;
62
63pub const kIOBluetoothServiceBrowserControllerOptionsNone: c_uint = 0;
65pub const kIOBluetoothServiceBrowserControllerOptionsAutoStartInquiry: c_uint = 1 << 0;
67pub const kIOBluetoothServiceBrowserControllerOptionsDisconnectWhenDone: c_uint = 1 << 1;
69
70pub const kIOBluetoothUISuccess: c_int = -1000;
72pub const kIOBluetoothUIUserCanceledErr: c_int = -1001;
74
75extern "C-unwind" {
76 #[cfg(feature = "objc2-core-foundation")]
81 pub fn IOBluetoothValidateHardwareWithDescription(
82 cancel_button_title: Option<&CFString>,
83 description_text: Option<&CFString>,
84 ) -> IOReturn;
85}
86
87#[cfg(feature = "objc2-core-foundation")]
88#[inline]
89pub unsafe extern "C-unwind" fn IOBluetoothGetPairingController(
90) -> Option<CFRetained<IOBluetoothPairingControllerRef>> {
91 extern "C-unwind" {
92 fn IOBluetoothGetPairingController() -> Option<NonNull<IOBluetoothPairingControllerRef>>;
93 }
94 let ret = unsafe { IOBluetoothGetPairingController() };
95 ret.map(|ret| unsafe { CFRetained::retain(ret) })
96}
97
98#[cfg(feature = "objc2-core-foundation")]
99#[inline]
100pub unsafe extern "C-unwind" fn IOBluetoothGetDeviceSelectorController(
101) -> Option<CFRetained<IOBluetoothDeviceSelectorControllerRef>> {
102 extern "C-unwind" {
103 fn IOBluetoothGetDeviceSelectorController(
104 ) -> Option<NonNull<IOBluetoothDeviceSelectorControllerRef>>;
105 }
106 let ret = unsafe { IOBluetoothGetDeviceSelectorController() };
107 ret.map(|ret| unsafe { CFRetained::retain(ret) })
108}