IOUPSEventCallbackFunction

Type Alias IOUPSEventCallbackFunction 

Source
pub type IOUPSEventCallbackFunction = Option<unsafe extern "C-unwind" fn(*mut c_void, IOReturn, *mut c_void, *mut c_void, *const CFDictionary)>;
Available on crate feature ps only.
Expand description

Type and arguments of callout C function that is used when a completion routine is called. This function pointer is set via setEventCallback and is called when an event is available from the UPS.

Parameter target: void * pointer to your data, often a pointer to an object.

Parameter result: Completion result of desired operation.

Parameter refcon: void * pointer to more data.

Parameter sender: Interface instance sending the completion routine.

Parameter event: CFDictionaryRef containing event data.

See also Apple’s documentation

Aliased Type§

pub enum IOUPSEventCallbackFunction {
    None,
    Some(unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void, *mut c_void, *const CFDictionary)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void, *mut c_void, *const CFDictionary))

Some value of type T.