disk_arbitration_sys/dissenter.rs
1use crate::prelude::*;
2
3/// Type of a reference to DADissenter instances.
4pub type DADissenterRef = *const __DADissenter;
5
6#[repr(C)]
7#[derive(Debug, Copy, Clone)]
8pub struct __DADissenter {
9 _unused: [u8; 0],
10}
11
12extern "C" {
13 /// Creates a new dissenter object.
14 ///
15 /// # Parameters
16 ///
17 /// * `allocator` - The allocator object to be used to allocate memory.
18 /// * `status` - The return code.
19 /// * `string` - The return code string. Pass NULL for no reason.
20 ///
21 /// # Returns
22 ///
23 /// A reference to a new DADissenter.
24 pub fn DADissenterCreate(
25 allocator: CFAllocatorRef,
26 status: DAReturn,
27 string: CFStringRef,
28 ) -> DADissenterRef;
29
30 /// Obtains the return code.
31 ///
32 /// # Parameters
33 ///
34 /// * `dissenter` - The DADissenter for which to obtain the return code.
35 ///
36 /// # Returns
37 ///
38 /// The return code. A BSD return code, if applicable, is encoded with unix_err().
39 pub fn DADissenterGetStatus(dissenter: DADissenterRef) -> DAReturn;
40
41 /// Obtains the return code string.
42 ///
43 /// # Parameters
44 ///
45 /// * `dissenter` - The DADissenter for which to obtain the return code string.
46 ///
47 /// # Returns
48 ///
49 /// The return code string.
50 pub fn DADissenterGetStatusString(dissenter: DADissenterRef) -> CFStringRef;
51}