libosip
5.3.0
|
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) |
#define osip_list_iterator_has_elem | ( | it | ) | (0 != (it).actual && (it).pos < (it).li->nb_elt) |
Check current iterator state.
it | The element to work on. |
Structure used to iterate list.
Structure for referencing a list of elements.
int osip_list_add | ( | osip_list_t * | li, |
void * | element, | ||
int | pos | ||
) |
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) |
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_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.
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. |
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 | ||
) |
Check if the end of list is detected .
li | The element to work on. |
pos | The index of the possible element. |
Referenced by osip_dialog_update_route_set_as_uac(), osip_dialog_update_route_set_as_uas(), osip_list_ofchar_free(), osip_list_special_free(), osip_retransmissions_execute(), osip_stop_200ok_retransmissions(), osip_stop_retransmissions_from_dialog(), osip_uri_free(), sdp_message_endof_media(), and sdp_message_to_str().
void* osip_list_get | ( | const osip_list_t * | li, |
int | pos | ||
) |
Get an element from a list.
li | The element to work on. |
pos | the 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().
void* osip_list_get_first | ( | const osip_list_t * | li, |
osip_list_iterator_t * | it | ||
) |
Get first iterator from list.
li | The element to work on. |
it | The iterator. |
References osip_list_iterator::actual, osip_list_iterator::li, osip_list::nb_elt, osip_list::node, osip_list_iterator::pos, and osip_list_iterator::prev.
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_from_to_str(), osip_ict_execute(), osip_ist_execute(), osip_list_clone(), osip_nict_execute(), osip_nist_execute(), osip_record_route_to_str(), osip_timers_gettimeout(), osip_timers_ict_execute(), osip_timers_ist_execute(), osip_timers_nict_execute(), osip_timers_nist_execute(), osip_transaction_find(), osip_uri_param_get_byname(), osip_uri_to_str(), and osip_via_to_str().
void* osip_list_get_next | ( | osip_list_iterator_t * | it | ) |
GEt next iterator.
it | The element to work on. |
References osip_list_iterator::actual, osip_list_iterator_has_elem, osip_list_iterator::pos, and osip_list_iterator::prev.
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_from_to_str(), osip_ict_execute(), osip_ist_execute(), osip_list_clone(), osip_nict_execute(), osip_nist_execute(), osip_record_route_to_str(), osip_timers_ict_execute(), osip_timers_ist_execute(), osip_timers_nict_execute(), osip_timers_nist_execute(), osip_transaction_find(), osip_uri_param_get_byname(), osip_uri_to_str(), and osip_via_to_str().
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().
li | The 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.
it | The 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.
void osip_list_ofchar_free | ( | osip_list_t * | li | ) |
Free a list of element where elements are pointer to 'char'.
li | The 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 | ||
) |
Remove an element from a list.
li | The element to work on. |
pos | the index of the element to remove. |
References osip_list::nb_elt, and osip_list::node.
Referenced by osip_fifo_get(), osip_fifo_tryget(), osip_list_ofchar_free(), osip_list_special_free(), osip_message_replace_header(), osip_retransmissions_execute(), osip_stop_200ok_retransmissions(), osip_stop_retransmissions_from_dialog(), osip_uri_free(), sdp_message_a_attribute_del(), sdp_message_a_attribute_del_at_index(), and sdp_message_m_payload_del().
int osip_list_size | ( | const osip_list_t * | li | ) |
Get the size of a list of element.
li | The element to work on. |
References osip_list::nb_elt.
Referenced by osip_accept_to_str(), osip_body_to_str(), osip_content_type_to_str(), osip_dialog_update_route_set_as_uac(), osip_fifo_get(), osip_fifo_size(), osip_fifo_tryget(), osip_from_param_get(), osip_ict_execute(), osip_ist_execute(), 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_nict_execute(), osip_nist_execute(), sdp_message_a_attribute_add(), sdp_message_a_attribute_del(), sdp_message_a_attribute_del_at_index(), sdp_message_b_bandwidth_add(), sdp_message_c_connection_add(), sdp_message_e_email_get(), sdp_message_k_key_set(), sdp_message_k_keydata_get(), sdp_message_k_keytype_get(), sdp_message_p_phone_get(), and sdp_message_parse().
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.
li | The element to work on. |
free_func | The 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().