24#ifndef ASTOBJ2_CONTAINER_PRIVATE_H_
25#define ASTOBJ2_CONTAINER_PRIVATE_H_
60#define AO2_TRAVERSAL_STATE_SIZE 100
96typedef struct ao2_container *(*ao2_container_alloc_empty_clone_fn)(
struct ao2_container *self,
const char *tag,
const char *
file,
int line,
const char *func);
242#if defined(AO2_DEBUG)
281#if defined(AO2_DEBUG)
310#define __container_unlink_node(node, flags) \
311 __container_unlink_node_debug(node, flags, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__)
313 const char *tag,
const char *
file,
int line,
const char *func);
void() ao2_prnt_obj_fn(void *v_obj, void *where, ao2_prnt_fn *prnt)
Print object key.
int() ao2_callback_fn(void *obj, void *arg, int flags)
Type of a generic callback function.
int() ao2_sort_fn(const void *obj_left, const void *obj_right, int flags)
Type of generic container sort function.
search_flags
Flags passed to ao2_callback_fn(), ao2_hash_fn(), and ao2_sort_fn() to modify behaviour.
void() ao2_prnt_fn(void *where, const char *fmt,...)
Print output.
void(* ao2_container_statistics)(struct ao2_container *self, void *where, ao2_prnt_fn *prnt)
Display statistics of the specified container.
void(* ao2_unlink_node_stat_fn)(struct ao2_container *container, struct ao2_container_node *node)
void(* ao2_container_destroy_fn)(struct ao2_container *self)
Destroy this container.
int(* ao2_container_integrity)(struct ao2_container *self)
Perform an integrity check on the specified container.
struct ao2_container_node *(* ao2_container_new_node_fn)(struct ao2_container *self, void *obj_new, const char *tag, const char *file, int line, const char *func)
Create a new container node.
void(* ao2_container_display)(struct ao2_container *self, void *where, ao2_prnt_fn *prnt, ao2_prnt_obj_fn *prnt_obj)
Display contents of the specified container.
struct ao2_container_node *(* ao2_iterator_next_fn)(struct ao2_container *self, struct ao2_container_node *prev, enum ao2_iterator_flags flags)
Find the next non-empty iteration node in the container.
struct ao2_container_node *(* ao2_container_find_first_fn)(struct ao2_container *self, enum search_flags flags, void *arg, void *v_state)
Find the first container node in a traversal.
struct ao2_container_node *(* ao2_container_find_next_fn)(struct ao2_container *self, void *v_state, struct ao2_container_node *prev)
Find the next container node in a traversal.
void container_destruct(void *_c)
struct ao2_container *(* ao2_container_alloc_empty_clone_fn)(struct ao2_container *self, const char *tag, const char *file, int line, const char *func)
Create an empty copy of this container.
@ AO2_CONTAINER_INSERT_NODE_OBJ_REPLACED
@ AO2_CONTAINER_INSERT_NODE_REJECTED
@ AO2_CONTAINER_INSERT_NODE_INSERTED
int __container_unlink_node_debug(struct ao2_container_node *node, uint32_t flags, const char *tag, const char *file, int line, const char *func)
void(* ao2_link_node_stat_fn)(struct ao2_container *container, struct ao2_container_node *node)
void(* ao2_container_find_cleanup_fn)(void *v_state)
Cleanup the container traversal state.
@ AO2_UNLINK_NODE_UNREF_NODE
@ AO2_UNLINK_NODE_UNLINK_OBJECT
@ AO2_UNLINK_NODE_DEC_COUNT
@ AO2_UNLINK_NODE_NOUNREF_OBJECT
enum ao2_container_insert(* ao2_container_insert_fn)(struct ao2_container *self, struct ao2_container_node *node)
Insert a node into this container.
static struct ao2_container * nodes
All the nodes that we're aware of.
struct ao2_container * container
ao2_container_insert_fn insert
ao2_container_alloc_empty_clone_fn alloc_empty_clone
Create an empty copy of this container.
ao2_iterator_next_fn iterator_next
ao2_container_find_cleanup_fn traverse_cleanup
ao2_container_new_node_fn new_node
ao2_container_destroy_fn destroy
ao2_container_find_next_fn traverse_next
ao2_container_find_first_fn traverse_first
struct ao2_container * my_container
unsigned int destroying
TRUE if the container is being destroyed.
const struct ao2_container_methods * v_table