mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
26 lines
739 B
Rust
26 lines
739 B
Rust
use std::ffi::c_char;
|
|
|
|
use core_foundation_sys::{base::{CFAllocatorRef, CFTypeRef, mach_port_t}, dictionary::CFMutableDictionaryRef, string::CFStringRef};
|
|
use libc::kern_return_t;
|
|
|
|
#[link(name = "IOKit", kind = "framework")]
|
|
unsafe extern "C" {
|
|
pub fn IOServiceGetMatchingServices(
|
|
mainPort: mach_port_t,
|
|
matching: CFMutableDictionaryRef,
|
|
existing: *mut mach_port_t,
|
|
) -> kern_return_t;
|
|
|
|
pub fn IOServiceMatching(a: *const c_char) -> CFMutableDictionaryRef;
|
|
|
|
pub fn IOIteratorNext(iterator: mach_port_t) -> mach_port_t;
|
|
|
|
pub fn IORegistryEntryCreateCFProperty(
|
|
entry: mach_port_t,
|
|
key: CFStringRef,
|
|
allocator: CFAllocatorRef,
|
|
options: u32,
|
|
) -> CFTypeRef;
|
|
|
|
pub fn IOObjectRelease(obj: mach_port_t) -> kern_return_t;
|
|
}
|