MCL_EXPORT E_MCL_ERROR_CODE mcl_list_remove_with_content(mcl_list_t *list, mcl_list_node_t *node, mcl_list_item_destroy_callback callback)
Removes a node from the list and destroys the removed item with the provided callback function...
MCL_EXPORT E_MCL_ERROR_CODE mcl_list_initialize(mcl_list_t **list)
Initializes a list with zero items in it.
Common module interface header file.
MCL_EXPORT void mcl_list_destroy(mcl_list_t **list)
Destroys the list.
MCL_EXPORT void mcl_list_reset(mcl_list_t *list)
Reset the current node to head node.
MCL_EXPORT E_MCL_ERROR_CODE mcl_list_remove(mcl_list_t *list, mcl_list_node_t *node)
Removes a node from the list.
void(* mcl_list_item_destroy_callback)(void **item)
E_MCL_ERROR_CODE
MCL Error code definitions. Every function returning an error code uses this enum values...
struct mcl_list_node_t * next
Next node in the list.
mcl_list_node_t * head
Head node of the list.
MCL_EXPORT E_MCL_ERROR_CODE mcl_list_exist(mcl_list_t *list, const void *item_to_find, mcl_list_compare_callback compare_function, void **item)
Searches item_to_find in the list.
MCL_EXPORT E_MCL_ERROR_CODE mcl_list_add(mcl_list_t *list, void *data)
Adds a new item to list.
struct mcl_list_node_t * prev
Previous node in the list.
mcl_list_node_t * last
Last node of the list.
MCL_EXPORT E_MCL_ERROR_CODE mcl_list_next(mcl_list_t *list, mcl_list_node_t **node)
Gets the next node from the list.
mcl_list_node_t * current
Current node of the list.
MCL_EXPORT void mcl_list_destroy_with_content(mcl_list_t **list, mcl_list_item_destroy_callback callback)
Destroys the list and its items with a given callback function.
E_MCL_ERROR_CODE(* mcl_list_compare_callback)(void *reference_item, const void *item_to_compare)
mcl_size_t count
Node count of the list.
void * data
Data of the node.