Type Alias libosdp_sys::cp_event_callback_t

source ·
pub type cp_event_callback_t = Option<unsafe extern "C" fn(arg: *mut c_void, pd: c_int, ev: *mut osdp_event) -> c_int>;
Expand description

@brief Callback for CP event notifications. After it has been registered with osdp_cp_set_event_callback, this method is invoked when the CP receives an event from the PD.

@param arg Opaque pointer provided by the application during callback registration. @param pd PD offset (0-indexed) of this PD in osdp_pd_info_t * passed to osdp_cp_setup() @param ev pointer to osdp_event struct (filled by libosdp).

@retval 0 on handling the event successfully. @retval -ve on errors.

Aliased Type§

enum cp_event_callback_t {
    None,
    Some(unsafe extern "C" fn(_: *mut c_void, _: i32, _: *mut osdp_event) -> i32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut c_void, _: i32, _: *mut osdp_event) -> i32)

Some value of type T.