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 is has been registered with osdp_cp_set_event_callback, this method is invoked when the CP receives an event from the PD.

@param arg pointer that will was passed to the arg param of osdp_cp_set_event_callback. @param pd PD offset number as in pd_info_t *. @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.