Type Alias HHandleInfo

Source
pub type HHandleInfo = H_HANDLE_TYPE;
Expand description

/ /** HHandleInfo holds handle type information.

This structure exists once per handle type (usually per sem_type). It contains basic, static, constant information about that type. Most notably, it contains pointers to the functions that operate on the handles (clear, serialize, deserialize and signal).

Handles (instances) of types where the cb_signal callback is not NULL are stored in a list that allows calling the signal callback for each of them.

All serialized items must have a unique header, usually a string, that identifies them. ‘header’ contains a pointer to that header, allowing other functions to identify a serialized item based on its header. If no (de)serialization function is set, header must be NULL.

\ingroup data_structures_handles

Aliased Type§

#[repr(C)]
pub struct HHandleInfo { pub type_id: i64, pub sem_type: *const i8, pub cb_serialize: Option<unsafe extern "C" fn(*mut c_void, *mut HStreamBufferT, *mut c_void) -> u32>, pub cb_deserialize: Option<unsafe extern "C" fn(*mut c_void, *mut HStreamBufferT, *mut *mut c_void) -> u32>, pub header: *const i8, pub cb_clear: Option<unsafe extern "C" fn(*mut c_void, *mut c_void) -> u32>, pub cb_signal: Option<unsafe extern "C" fn(i32, *mut c_void) -> u32>, pub list: *mut HhandleListT, }

Fields§

§type_id: i64

< Type ID

§sem_type: *const i8

< sem_type of the handle

§cb_serialize: Option<unsafe extern "C" fn(*mut c_void, *mut HStreamBufferT, *mut c_void) -> u32>

< Serialize this handle type

§cb_deserialize: Option<unsafe extern "C" fn(*mut c_void, *mut HStreamBufferT, *mut *mut c_void) -> u32>

< Deserialize this handle type

§header: *const i8

< Serialization header

§cb_clear: Option<unsafe extern "C" fn(*mut c_void, *mut c_void) -> u32>

< Clear this handle type

§cb_signal: Option<unsafe extern "C" fn(i32, *mut c_void) -> u32>

< Signal (for semaphores etc.)

§list: *mut HhandleListT

< List of handles, or NULL