libosip  5.3.0
Classes | Macros | Typedefs | Functions
oSIP list Handling

Classes

struct  osip_list_iterator
 
struct  osip_list
 

Macros

#define osip_list_iterator_has_elem(it)   (0 != (it).actual && (it).pos < (it).li->nb_elt)
 

Typedefs

typedef struct osip_list osip_list_t
 
typedef struct osip_list_iterator osip_list_iterator_t
 

Functions

int osip_list_init (osip_list_t *li)
 
void osip_list_special_free (osip_list_t *li, void(*free_func)(void *))
 
int osip_list_clone (const osip_list_t *src, osip_list_t *dst, int(*clone_func)(void *, void **))
 
void osip_list_ofchar_free (osip_list_t *li)
 
int osip_list_size (const osip_list_t *li)
 
int osip_list_eol (const osip_list_t *li, int pos)
 
int osip_list_add (osip_list_t *li, void *element, int pos)
 
void * osip_list_get (const osip_list_t *li, int pos)
 
int osip_list_remove (osip_list_t *li, int pos)
 
void * osip_list_get_first (const osip_list_t *li, osip_list_iterator_t *it)
 
void * osip_list_get_next (osip_list_iterator_t *it)
 
void * osip_list_iterator_remove (osip_list_iterator_t *it)
 

Detailed Description

Macro Definition Documentation

◆ osip_list_iterator_has_elem

#define osip_list_iterator_has_elem (   it)    (0 != (it).actual && (it).pos < (it).li->nb_elt)

Check current iterator state.

Parameters
itThe element to work on.

Typedef Documentation

◆ osip_list_iterator_t

Structure used to iterate list.

◆ osip_list_t

Structure for referencing a list of elements.

Function Documentation

◆ osip_list_add()

int osip_list_add ( osip_list_t li,
void *  element,
int  pos 
)

◆ osip_list_clone()

int osip_list_clone ( const osip_list_t src,
osip_list_t dst,
int(*)(void *, void **)  clone_func 
)

Clone a list of element. Each element will be cloned with the method given as the second parameter.

Parameters
srcThe element to work on.
dstThe element to work on.
clone_funcThe method that is able to release one element of the list.

References osip_list_add(), osip_list_get_first(), osip_list_get_next(), and osip_list_iterator_has_elem.

Referenced by osip_body_clone(), osip_call_info_clone(), osip_from_clone(), osip_message_clone(), osip_uri_clone(), and osip_via_clone().

◆ osip_list_eol()

int osip_list_eol ( const osip_list_t li,
int  pos 
)

◆ osip_list_get()

void* osip_list_get ( const osip_list_t li,
int  pos 
)

Get an element from a list.

Parameters
liThe element to work on.
posthe index of the element to get.

References osip_list::nb_elt, and osip_list::node.

Referenced by osip_dialog_update_route_set_as_uac(), osip_dialog_update_route_set_as_uas(), osip_fifo_get(), osip_fifo_tryget(), osip_from_param_get(), osip_list_ofchar_free(), osip_list_special_free(), osip_message_fix_last_via_header(), osip_message_get_accept(), osip_message_get_accept_encoding(), osip_message_get_accept_language(), osip_message_get_alert_info(), osip_message_get_allow(), osip_message_get_authentication_info(), osip_message_get_authorization(), osip_message_get_body(), osip_message_get_call_info(), osip_message_get_contact(), osip_message_get_content_encoding(), osip_message_get_error_info(), osip_message_get_header(), osip_message_get_knownheaderlist(), osip_message_get_proxy_authenticate(), osip_message_get_proxy_authentication_info(), osip_message_get_proxy_authorization(), osip_message_get_record_route(), osip_message_get_route(), osip_message_get_via(), osip_message_get_www_authenticate(), osip_message_header_get_byname(), osip_response_get_destination(), osip_retransmissions_execute(), osip_stop_200ok_retransmissions(), osip_stop_retransmissions_from_dialog(), osip_transaction_find(), osip_transaction_init(), osip_uri_free(), sdp_message_a_attribute_add(), sdp_message_a_attribute_del(), sdp_message_a_attribute_del_at_index(), sdp_message_attribute_get(), sdp_message_b_bandwidth_add(), sdp_message_bandwidth_get(), sdp_message_c_connection_add(), sdp_message_e_email_get(), sdp_message_i_info_get(), sdp_message_i_info_set(), sdp_message_k_key_set(), sdp_message_k_keydata_get(), sdp_message_k_keytype_get(), sdp_message_m_media_get(), sdp_message_m_number_of_port_get(), sdp_message_m_payload_add(), sdp_message_m_payload_del(), sdp_message_m_payload_get(), sdp_message_m_port_get(), sdp_message_m_port_set(), sdp_message_m_proto_get(), sdp_message_p_phone_get(), sdp_message_r_repeat_add(), sdp_message_r_repeat_get(), sdp_message_t_start_time_get(), sdp_message_t_stop_time_get(), and sdp_message_to_str().

◆ osip_list_get_first()

void* osip_list_get_first ( const osip_list_t li,
osip_list_iterator_t it 
)

◆ osip_list_get_next()

void* osip_list_get_next ( osip_list_iterator_t it)

◆ osip_list_init()

int osip_list_init ( osip_list_t li)

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().

Parameters
liThe element to initialise.

Referenced by osip_accept_encoding_init(), osip_body_init(), osip_call_info_init(), osip_content_type_init(), osip_dialog_update_route_set_as_uac(), osip_fifo_init(), osip_from_init(), osip_init(), osip_message_init(), osip_uri_init(), osip_via_init(), sdp_media_init(), sdp_message_init(), and sdp_time_descr_init().

◆ osip_list_iterator_remove()

void* osip_list_iterator_remove ( osip_list_iterator_t it)

Remove current iterator.

Parameters
itThe element to work on.

References osip_list_iterator::actual, osip_list_iterator::li, osip_list::nb_elt, osip_list_iterator_has_elem, and osip_list_iterator::prev.

◆ osip_list_ofchar_free()

void osip_list_ofchar_free ( osip_list_t li)

Free a list of element where elements are pointer to 'char'.

Parameters
liThe element to work on.

References osip_list_eol(), osip_list_get(), and osip_list_remove().

Referenced by sdp_media_free(), sdp_media_init(), sdp_message_free(), sdp_message_init(), and sdp_time_descr_free().

◆ osip_list_remove()

int osip_list_remove ( osip_list_t li,
int  pos 
)

◆ osip_list_size()

int osip_list_size ( const osip_list_t li)

◆ osip_list_special_free()

void osip_list_special_free ( osip_list_t li,
void(*)(void *)  free_func 
)

Free a list of element. Each element will be free with the method given as the second parameter.

Parameters
liThe element to work on.
free_funcThe method that is able to release one element of the list.

References osip_list_eol(), osip_list_get(), and osip_list_remove().

Referenced by osip_body_free(), osip_dialog_free(), osip_dialog_update_route_set_as_uac(), osip_message_free(), sdp_media_free(), sdp_media_init(), sdp_message_free(), and sdp_message_init().