27#include <dbus/dbus-internals.h>
28#include <dbus/dbus-memory.h>
29#include <dbus/dbus-types.h>
30#include <dbus/dbus-sysdeps.h>
119#define _dbus_list_get_next_link(list, link) ((link)->next == *(list) ? NULL : (link)->next)
120#define _dbus_list_get_prev_link(list, link) ((link) == *(list) ? NULL : (link)->prev)
124void _dbus_list_get_stats (dbus_uint32_t *in_use_p,
125 dbus_uint32_t *in_free_list_p,
126 dbus_uint32_t *allocated_p);
void(* DBusForeachFunction)(void *element, void *data)
Used to iterate over each item in a collection, such as a DBusList.
DBUS_PRIVATE_EXPORT DBusList * _dbus_list_get_first_link(DBusList **list)
Gets the first link in the list.
DBUS_PRIVATE_EXPORT void _dbus_list_insert_before_link(DBusList **list, DBusList *before_this_link, DBusList *link)
Inserts a link into the list before the given existing link.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_list_copy(DBusList **list, DBusList **dest)
Copies a list.
DBUS_PRIVATE_EXPORT DBusList * _dbus_list_pop_first_link(DBusList **list)
Removes the first link in the list and returns it.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_list_length_is_one(DBusList **list)
Check whether length is exactly one.
DBUS_PRIVATE_EXPORT void * _dbus_list_get_last(DBusList **list)
Gets the last data in the list.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_list_remove(DBusList **list, void *data)
Removes a value from the list.
DBUS_PRIVATE_EXPORT void _dbus_list_append_link(DBusList **list, DBusList *link)
Appends a link to the list.
DBUS_PRIVATE_EXPORT void _dbus_list_insert_after_link(DBusList **list, DBusList *after_this_link, DBusList *link)
Inserts a link into the list after the given existing link.
DBUS_PRIVATE_EXPORT void _dbus_list_clear_full(DBusList **list, DBusFreeFunction function)
Free every link and every element in the list.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_list_insert_after(DBusList **list, DBusList *after_this_link, void *data)
Inserts data into the list after the given existing link.
DBUS_PRIVATE_EXPORT void _dbus_list_remove_link(DBusList **list, DBusList *link)
Removes a link from the list.
DBUS_PRIVATE_EXPORT void * _dbus_list_get_first(DBusList **list)
Gets the first data in the list.
DBUS_PRIVATE_EXPORT DBusList * _dbus_list_get_last_link(DBusList **list)
Gets the last link in the list.
DBUS_PRIVATE_EXPORT void _dbus_list_unlink(DBusList **list, DBusList *link)
Removes the given link from the list, but doesn't free it.
DBUS_PRIVATE_EXPORT DBusList * _dbus_list_find_last(DBusList **list, void *data)
Finds a value in the list.
DBUS_PRIVATE_EXPORT void * _dbus_list_pop_last(DBusList **list)
Removes the last value in the list and returns it.
DBUS_PRIVATE_EXPORT void _dbus_list_free_link(DBusList *link)
Frees a linked list node allocated with _dbus_list_alloc_link.
DBUS_PRIVATE_EXPORT void * _dbus_list_pop_first(DBusList **list)
Removes the first value in the list and returns it.
DBUS_PRIVATE_EXPORT void _dbus_list_foreach(DBusList **list, DBusForeachFunction function, void *data)
Calls the given function for each element in the list.
DBUS_PRIVATE_EXPORT int _dbus_list_get_length(DBusList **list)
Gets the length of a list.
DBUS_PRIVATE_EXPORT void _dbus_list_clear(DBusList **list)
Frees all links in the list and sets the list head to NULL.
DBUS_PRIVATE_EXPORT void _dbus_list_prepend_link(DBusList **list, DBusList *link)
Prepends a link to the list.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_list_prepend(DBusList **list, void *data)
Prepends a value to the list.
DBUS_PRIVATE_EXPORT DBusList * _dbus_list_alloc_link(void *data)
Allocates a linked list node.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_list_remove_last(DBusList **list, void *data)
Removes a value from the list.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_list_append(DBusList **list, void *data)
Appends a value to the list.
#define DBUS_BEGIN_DECLS
Macro used prior to declaring functions in the D-Bus header files.
#define DBUS_END_DECLS
Macro used after declaring functions in the D-Bus header files.
void(* DBusFreeFunction)(void *memory)
The type of a function which frees a block of memory.
dbus_uint32_t dbus_bool_t
A boolean, valid values are TRUE and FALSE.
void * data
Data stored at this element.
DBusList * next
Next list node.
DBusList * prev
Previous list node.