|
HOME
SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port
FAQ
Documentation
Licensing
Download
Development (Trac)
Projects using pjsip
Mailing List
Open Source Links
About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono <bennylp pjsip.org>
|
|
Home --> Documentations --> PJLIB Reference
list.hGo to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __PJ_LIST_H__
00020 #define __PJ_LIST_H__
00021
00027 #include <pj/types.h>
00028
00029 PJ_BEGIN_DECL
00030
00031
00032
00033
00034
00061 #define PJ_DECL_LIST_MEMBER(type) \
00062 \
00063 type *prev; \
00064 \
00065 type *next
00066
00067
00073 struct pj_list
00074 {
00075 PJ_DECL_LIST_MEMBER(void);
00076 };
00077
00078
00087 PJ_INLINE(void) pj_list_init(pj_list_type * node)
00088 {
00089 ((pj_list*)node)->next = ((pj_list*)node)->prev = node;
00090 }
00091
00092
00101 PJ_INLINE(int) pj_list_empty(const pj_list_type * node)
00102 {
00103 return ((pj_list*)node)->next == node;
00104 }
00105
00106
00115 PJ_IDECL(void) pj_list_insert_before(pj_list_type *pos, pj_list_type *node);
00116
00117
00125 PJ_INLINE(void) pj_list_push_back(pj_list_type *list, pj_list_type *node)
00126 {
00127 pj_list_insert_before(list, node);
00128 }
00129
00130
00137 PJ_IDECL(void) pj_list_insert_nodes_before(pj_list_type *lst,
00138 pj_list_type *nodes);
00139
00149 PJ_IDECL(void) pj_list_insert_after(pj_list_type *pos, pj_list_type *node);
00150
00151
00159 PJ_INLINE(void) pj_list_push_front(pj_list_type *list, pj_list_type *node)
00160 {
00161 pj_list_insert_after(list, node);
00162 }
00163
00164
00171 PJ_IDECL(void) pj_list_insert_nodes_after(pj_list_type *lst,
00172 pj_list_type *nodes);
00173
00174
00189 PJ_IDECL(void) pj_list_merge_first(pj_list_type *list1, pj_list_type *list2);
00190
00191
00207 PJ_IDECL(void) pj_list_merge_last( pj_list_type *list1, pj_list_type *list2);
00208
00209
00215 PJ_IDECL(void) pj_list_erase(pj_list_type *node);
00216
00217
00227 PJ_IDECL(pj_list_type*) pj_list_find_node(pj_list_type *list,
00228 pj_list_type *node);
00229
00230
00245 PJ_IDECL(pj_list_type*) pj_list_search(pj_list_type *list, void *value,
00246 int (*comp)(void *value,
00247 const pj_list_type *node)
00248 );
00249
00250
00258 PJ_IDECL(pj_size_t) pj_list_size(const pj_list_type *list);
00259
00260
00265 #if PJ_FUNCTIONS_ARE_INLINED
00266 # include "list_i.h"
00267 #endif
00268
00269 PJ_END_DECL
00270
00271 #endif
00272
PJLIB Open Source, high performance, small footprint, and very very portable framework
(C)2001-2008 Benny Prijono
|
|