SIP Witch 1.9.15
|
Data Structures | |
struct | __node |
Structure for referencing a node in a osip_list_t element. More... | |
struct | osip_list_iterator_t |
struct | osip_list |
Structure for referencing a list of elements. More... | |
Macros | |
#define | osip_list_iterator_has_elem(it) ( 0 != (it).actual && (it).pos < (it).li->nb_elt ) |
Check current iterator state. More... | |
Typedefs | |
typedef struct __node | __node_t |
Structure for referencing a node in a osip_list_t element. More... | |
typedef struct osip_list | osip_list_t |
Structure for referencing a list of elements. More... | |
Functions | |
int | osip_list_init (osip_list_t *li) |
Initialise a osip_list_t element. More... | |
void | osip_list_special_free (osip_list_t *li, void(*free_func)(void *)) |
Free a list of element. More... | |
int | osip_list_clone (const osip_list_t *src, osip_list_t *dst, int(*clone_func)(void *, void **)) |
Clone a list of element. More... | |
void | osip_list_ofchar_free (osip_list_t *li) |
Free a list of element where elements are pointer to 'char'. More... | |
int | osip_list_size (const osip_list_t *li) |
Get the size of a list of element. More... | |
int | osip_list_eol (const osip_list_t *li, int pos) |
Check if the end of list is detected . More... | |
int | osip_list_add (osip_list_t *li, void *element, int pos) |
Add an element in a list. More... | |
void * | osip_list_get (const osip_list_t *li, int pos) |
Get an element from a list. More... | |
int | osip_list_remove (osip_list_t *li, int pos) |
Remove an element from a list. More... | |
void * | osip_list_get_first (const osip_list_t *li, osip_list_iterator_t *it) |
Get first iterator from list. More... | |
void * | osip_list_get_next (osip_list_iterator_t *it) |
GEt next iterator. More... | |
void * | osip_list_iterator_remove (osip_list_iterator_t *it) |
Remove current iterator. More... | |
#define osip_list_iterator_has_elem | ( | it | ) | ( 0 != (it).actual && (it).pos < (it).li->nb_elt ) |
#include <osip_list.h>
Check current iterator state.
it | The element to work on. |
Definition at line 154 of file osip_list.h.
#include <osip_list.h>
Structure for referencing a node in a osip_list_t element.
Definition at line 49 of file osip_list.h.
#include <osip_list.h>
Structure for referencing a list of elements.
Definition at line 65 of file osip_list.h.
int osip_list_add | ( | osip_list_t * | li, |
void * | element, | ||
int | pos | ||
) |
#include <osip_list.h>
Add an element in a list.
li | The element to work on. |
element | The pointer on the element to add. |
pos | the index of the element to add. (or -1 to append the element at the end) |
int osip_list_clone | ( | const osip_list_t * | src, |
osip_list_t * | dst, | ||
int(*)(void *, void **) | clone_func | ||
) |
#include <osip_list.h>
Clone a list of element.
Each element will be cloned with the method given as the second parameter.
src | The element to work on. |
dst | The element to work on. |
clone_func | The method that is able to release one element of the list. |
int osip_list_eol | ( | const osip_list_t * | li, |
int | pos | ||
) |
#include <osip_list.h>
Check if the end of list is detected .
li | The element to work on. |
pos | The index of the possible element. |
void* osip_list_get | ( | const osip_list_t * | li, |
int | pos | ||
) |
#include <osip_list.h>
Get an element from a list.
li | The element to work on. |
pos | the index of the element to get. |
void* osip_list_get_first | ( | const osip_list_t * | li, |
osip_list_iterator_t * | it | ||
) |
#include <osip_list.h>
Get first iterator from list.
li | The element to work on. |
it | The iterator. |
void* osip_list_get_next | ( | osip_list_iterator_t * | it | ) |
int osip_list_init | ( | osip_list_t * | li | ) |
#include <osip_list.h>
Initialise a osip_list_t element.
NOTE: this element MUST be previously allocated with osip_malloc(). The osip_free() call on the list is still automatically done by osip_list_free(). This also means you can't use a static osip_list_t variable if you want to use osip_list_free().
li | The element to initialise. |
void* osip_list_iterator_remove | ( | osip_list_iterator_t * | it | ) |
void osip_list_ofchar_free | ( | osip_list_t * | li | ) |
#include <osip_list.h>
Free a list of element where elements are pointer to 'char'.
li | The element to work on. |
int osip_list_remove | ( | osip_list_t * | li, |
int | pos | ||
) |
#include <osip_list.h>
Remove an element from a list.
li | The element to work on. |
pos | the index of the element to remove. |
int osip_list_size | ( | const osip_list_t * | li | ) |
void osip_list_special_free | ( | osip_list_t * | li, |
void(*)(void *) | free_func | ||
) |
#include <osip_list.h>
Free a list of element.
Each element will be free with the method given as the second parameter.
li | The element to work on. |
free_func | The method that is able to release one element of the list. |