diff options
author | Martin Willi <martin@strongswan.org> | 2006-02-08 15:25:34 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2006-02-08 15:25:34 +0000 |
commit | c06dbbabd1498d614d4db88bb4205e2afcd6dab8 (patch) | |
tree | 694e4df33baf70813367276b6956d9e6a714742e /Source/charon/utils/linked_list.h | |
parent | 384efc76d58eea98648988045de413a6cc027dff (diff) | |
download | strongswan-c06dbbabd1498d614d4db88bb4205e2afcd6dab8.tar.bz2 strongswan-c06dbbabd1498d614d4db88bb4205e2afcd6dab8.tar.xz |
- fixed alot of bugs in child_proposal
- near to working state ;-)
Diffstat (limited to 'Source/charon/utils/linked_list.h')
-rw-r--r-- | Source/charon/utils/linked_list.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/Source/charon/utils/linked_list.h b/Source/charon/utils/linked_list.h index 113d64260..8647f064d 100644 --- a/Source/charon/utils/linked_list.h +++ b/Source/charon/utils/linked_list.h @@ -64,6 +64,22 @@ struct linked_list_t { * @return new iterator_t object */ iterator_t * (*create_iterator) (linked_list_t *linked_list, bool forward); + + /** + * @brief Call a function with list element as argument. + * + * This method accepts a function, which will be called for + * each list element once. The function must accept the list + * element as the first argument. Handy for destruction of + * list elements. + * + * @todo Additional vararg which are passed to the + * function would be nice... + * + * @param linked_list calling object + * @param func function to call + */ + void (*call_on_items) (linked_list_t *linked_list, void(*func)(void*)); /** * @brief Inserts a new item at the beginning of the list. @@ -77,7 +93,7 @@ struct linked_list_t { * @brief Removes the first item in the list and returns its value. * * @param linked_list calling object - * @param[out] item returned value of first item + * @param[out] item returned value of first item, or NULL * @return * - SUCCESS * - NOT_FOUND, if list is empty @@ -143,7 +159,7 @@ struct linked_list_t { * @brief Removes the last item in the list and returns its value. * * @param linked_list calling object - * @param[out] item item returned value of last item + * @param[out] item returned value of last item, or NULL * @return * - SUCCESS * - NOT_FOUND if list is empty @@ -154,7 +170,7 @@ struct linked_list_t { * @brief Returns the value of the last list item without removing it. * * @param linked_list calling object - * @param[out] item item returned value of last item + * @param[out] item returned value of last item * @return * - SUCCESS * - NOT_FOUND if list is empty |