WARNING: The online documentation has moved to https://docs.pjsip.org.
Visit the new documentation at https://docs.pjsip.org:
Detailed DescriptionList in PJLIB is implemented as doubly-linked list, and it won't require dynamic memory allocation (just as all PJLIB data structures). The list here should be viewed more like a low level C list instead of high level C++ list (which normally are easier to use but require dynamic memory allocations), therefore all caveats with C list apply here too (such as you can NOT put a node in more than one lists). ExamplesSee below for examples on how to manipulate linked list: Define Documentation
Use this macro in the start of the structure declaration to declare that the structure can be used in the linked list operation. This macro simply declares additional member prev and next to the structure. Function Documentation
Check that the list is empty.
Erase the node from the list it currently belongs.
Find node in the list.
Initialize the list. Initially, the list will have no member, and function pj_list_empty() will always return nonzero (which indicates TRUE) for the newly initialized list.
Insert a node to the list after the specified element position.
Referenced by pj_list_push_front().
Insert the node to the list before the specified element position.
Referenced by pj_list_push_back().
Insert all nodes in nodes to the target list.
Inserts all nodes in nodes to the target list.
Remove elements from the source list, and insert them to the destination list. The elements of the source list will occupy the front elements of the target list. Note that the node pointed by list2 itself is not considered as a node, but rather as the list descriptor, so it will not be inserted to the list1. The elements to be inserted starts at list2->next. If list2 is to be included in the operation, use pj_list_insert_nodes_before.
Remove elements from the second list argument, and insert them to the list in the first argument. The elements from the second list will be appended to the first list. Note that the node pointed by list2 itself is not considered as a node, but rather as the list descriptor, so it will not be inserted to the list1. The elements to be inserted starts at list2->next. If list2 is to be included in the operation, use pj_list_insert_nodes_before.
Insert the node to the back of the list. This is just an alias for pj_list_insert_before().
References pj_list_insert_before().
Insert the node to the front of the list. This is just an alias for pj_list_insert_after().
References pj_list_insert_after().
Search the list for the specified value, using the specified comparison function. This function iterates on nodes in the list, started with the first node, and call the user supplied comparison function until the comparison function returns ZERO.
Traverse the list to get the number of elements in the list.
Copyright (C) 2006-2009 Teluu Inc. |