1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use core_foundation_sys::url::CFURLRef;
use core_foundation_sys::{base::CFAllocatorRef, dictionary::CFDictionaryRef};
use libc::{c_char, c_void};

use crate::session::DASessionRef;

#[repr(C)]
pub struct __DADisk(c_void);
pub type DADiskRef = *const __DADisk;

extern "C" {
    pub fn DADiskCreateFromVolumePath(
        allocator: CFAllocatorRef,
        session: DASessionRef,
        path: CFURLRef,
    ) -> DADiskRef;
    pub fn DADiskGetBSDName(disk: DADiskRef) -> *const c_char;
    pub fn DADiskCopyDescription(disk: DADiskRef) -> CFDictionaryRef;
}