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

Classes

struct  osip_list_iterator_t
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

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

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

Typedef Documentation

Structure for referencing a list of elements.

Function Documentation

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

Add an element in a list.

Parameters
liThe element to work on.
elementThe pointer on the element to add.
posthe index of the element to add. (or -1 to append the element at the end)

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

Referenced by osip_accept_encoding_clone(), osip_body_set_header(), osip_content_type_clone(), osip_dialog_update_route_set_as_uac(), osip_fifo_add(), osip_fifo_insert(), osip_list_clone(), osip_message_append_via(), osip_message_clone(), osip_message_replace_header(), osip_message_set_accept(), osip_message_set_accept_encoding(), osip_message_set_accept_language(), osip_message_set_alert_info(), osip_message_set_allow(), osip_message_set_authentication_info(), osip_message_set_authorization(), osip_message_set_body(), osip_message_set_body_mime(), osip_message_set_call_info(), osip_message_set_contact(), osip_message_set_content_encoding(), osip_message_set_error_info(), osip_message_set_header(), osip_message_set_proxy_authenticate(), osip_message_set_proxy_authentication_info(), osip_message_set_proxy_authorization(), osip_message_set_record_route(), osip_message_set_route(), osip_message_set_topheader(), osip_message_set_via(), osip_message_set_www_authenticate(), osip_uri_param_add(), sdp_message_a_attribute_add(), sdp_message_b_bandwidth_add(), sdp_message_c_connection_add(), sdp_message_e_email_add(), sdp_message_m_media_add(), sdp_message_m_payload_add(), sdp_message_p_phone_add(), sdp_message_r_repeat_add(), and sdp_message_t_time_descr_add().

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

int osip_list_eol ( const osip_list_t li,
int  pos 
)
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_accept_encoding_clone(), osip_accept_encoding_to_str(), osip_accept_to_str(), osip_body_to_str(), osip_call_info_to_str(), osip_content_type_clone(), osip_content_type_to_str(), 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_from_to_str(), osip_list_ofchar_free(), osip_list_special_free(), osip_message_clone(), 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_record_route_to_str(), 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(), osip_uri_param_get_byname(), osip_uri_to_str(), osip_via_to_str(), 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().

void* osip_list_get_first ( osip_list_t li,
osip_list_iterator_t it 
)
void* osip_list_get_next ( osip_list_iterator_t it)
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().

void* osip_list_iterator_remove ( osip_list_iterator_t it)

Remove current iterator.

Parameters
itThe element to work on.

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

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

int osip_list_remove ( osip_list_t li,
int  pos 
)
int osip_list_size ( const osip_list_t li)
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().