use core::ffi::*;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-foundation")]
use objc2_foundation::*;
use crate::*;
extern "C-unwind" {
#[cfg(all(feature = "Bluetooth", feature = "objc2-foundation"))]
pub fn IOBluetoothNSStringToDeviceAddress(
in_name_string: Option<&NSString>,
out_device_address: *mut BluetoothDeviceAddress,
) -> IOReturn;
}
#[cfg(all(feature = "Bluetooth", feature = "objc2", feature = "objc2-foundation"))]
#[inline]
pub unsafe extern "C-unwind" fn IOBluetoothNSStringFromDeviceAddress(
device_address: *const BluetoothDeviceAddress,
) -> Option<Retained<NSString>> {
extern "C-unwind" {
fn IOBluetoothNSStringFromDeviceAddress(
device_address: *const BluetoothDeviceAddress,
) -> *mut NSString;
}
let ret = unsafe { IOBluetoothNSStringFromDeviceAddress(device_address) };
unsafe { Retained::retain_autoreleased(ret) }
}
#[cfg(all(feature = "Bluetooth", feature = "objc2", feature = "objc2-foundation"))]
#[inline]
pub unsafe extern "C-unwind" fn IOBluetoothNSStringFromDeviceAddressColon(
device_address: *const BluetoothDeviceAddress,
) -> Option<Retained<NSString>> {
extern "C-unwind" {
fn IOBluetoothNSStringFromDeviceAddressColon(
device_address: *const BluetoothDeviceAddress,
) -> *mut NSString;
}
let ret = unsafe { IOBluetoothNSStringFromDeviceAddressColon(device_address) };
unsafe { Retained::retain_autoreleased(ret) }
}
#[cfg(feature = "objc2-foundation")]
#[inline]
pub unsafe extern "C-unwind" fn IOBluetoothIsFileAppleDesignatedPIMData(
in_file_name: Option<&NSString>,
) -> bool {
extern "C-unwind" {
fn IOBluetoothIsFileAppleDesignatedPIMData(in_file_name: Option<&NSString>) -> Boolean;
}
let ret = unsafe { IOBluetoothIsFileAppleDesignatedPIMData(in_file_name) };
ret != 0
}
#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
#[inline]
pub unsafe extern "C-unwind" fn IOBluetoothGetUniqueFileNameAndPath(
in_name: Option<&NSString>,
in_path: Option<&NSString>,
) -> Option<Retained<NSString>> {
extern "C-unwind" {
fn IOBluetoothGetUniqueFileNameAndPath(
in_name: Option<&NSString>,
in_path: Option<&NSString>,
) -> *mut NSString;
}
let ret = unsafe { IOBluetoothGetUniqueFileNameAndPath(in_name, in_path) };
unsafe { Retained::retain_autoreleased(ret) }
}
extern "C-unwind" {
pub fn IOBluetoothNumberOfAvailableHIDDevices() -> c_long;
}
extern "C-unwind" {
pub fn IOBluetoothNumberOfPointingHIDDevices() -> c_long;
}
extern "C-unwind" {
pub fn IOBluetoothNumberOfKeyboardHIDDevices() -> c_long;
}
extern "C-unwind" {
pub fn IOBluetoothNumberOfTabletHIDDevices() -> c_long;
}
extern "C-unwind" {
pub fn IOBluetoothFindNumberOfRegistryEntriesOfClassName(device_type: *const c_char) -> c_long;
}